1 USING: help.syntax help.markup strings kernel alien opengl
2 opengl.sprites quotations ui.render ui.text ui.text.private
7 { $values { "alien" alien } }
8 { $description "Outputs a native handle used by the FreeType library, initializing FreeType first if necessary." } ;
11 { $var-description "Global variable. Hashtable mapping font descriptors to " { $link freetype-font } " instances." } ;
14 { $description "Initializes the FreeType library." }
15 { $notes "Do not call this word if you are using the UI." } ;
18 { $class-description "A font which has been loaded by FreeType." } ;
21 { $description "Closes the FreeType library." }
22 { $notes "Do not call this word if you are using the UI." } ;
25 { $values { "font" freetype-font } { "face" "alien pointer to an " { $snippet "FT_Face" } } }
26 { $description "Loads a TrueType font with the requested logical font name and style." } ;
29 { $values { "font" freetype-font } { "char" "a non-negative integer" } { "bitmap" alien } }
30 { $description "Renders a character and outputs a pointer to the bitmap." } ;
33 { $values { "font" freetype-font } { "char" "a non-negative integer" } { "sprite" sprite } }
34 { $description "Renders a character to an OpenGL texture and records a display list which draws a quad with this texture. This word allocates native resources which must be freed by " { $link free-sprites } "." } ;
37 { $values { "font" freetype-font } { "sprites" "a vector of " { $link sprite } " instances" } { "string" string } { "loc" "a pair of integers" } }
38 { $description "Draws a line of text." }
39 { $notes "This is a low-level word, UI code should use " { $link draw-string } " or " { $link draw-text } " instead." }
40 { $side-effects "sprites" } ;
43 { $values { "font" freetype-font } { "string" string } { "widths" "a sequence of integers" } }
44 { $description "Outputs a sequence of x co-ordinates of the midpoint of each character in the string." }
45 { $notes "This word is used to convert x offsets to document locations, for example when the user moves the caret by clicking the mouse." } ;