{ $notes "Do not call this word if you are using the UI." } ;
HELP: with-freetype
{ $values { "quot" quotation } }
{ $description "Sets up and tears down FreeType before and after calling the quotation. This word is re-entrant, so the quotation itself can call " { $link with-freetype } "." }
{ $notes "Do not call this word if you are using the UI." } ;
{ $description "Loads a TrueType font with the requested logical font name and style." }
{ $notes "This is a low-level word. Call " { $link open-font } " instead." } ;
HELP: open-font
{ $values { "font" "a font specifier" } { "open-font" font } }
{ $description "Loads a TrueType font if it has not already been loaded, otherwise outputs the existing " { $link font } " instance." }
{ $errors "Throws an error if the font does not exist." } ;
HELP: render-glyph
{ $values { "font" font } { "char" "a non-negative integer" } { "bitmap" alien } }
{ $description "Renders a character and outputs a pointer to the bitmap." } ;
HELP: <char-sprite>
{ $values { "font" font } { "char" "a non-negative integer" } { "sprite" sprite } }
{ $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 } "." } ;
HELP: (draw-string)
{ $values { "open-font" font } { "sprites" "a vector of " { $link sprite } " instances" } { "string" string } { "loc" "a pair of integers" } }
{ $description "Draws a line of text." }
{ $notes "This is a low-level word, UI code should use " { $link draw-string } " or " { $link draw-text } " instead." }