Text Drawing
- Function LoadFont(fnt_file$, font_size)
Returns a font id for a font with glyphs of font_size.
- Sub DeleteFont(font_id)
Frees a font from memory.
- Function FontExists(fnt_id)
Returns True if the specified font id is associated with a loaded font.
- Sub SetFont(fnt_id)
Sets the active font for text rendering.
See also
- Sub DrawText(txt$, x, y)
Draws text to the current canvas.
- Sub GetTextSize(txt$, byref w, byref h)
Gets the size of the text if rendered with the current font.
- Function TextWidth(txt$)
The width of text rendered with the active font.
See also
- Function TextHeight(txt$)
The height of text rendered with the active font.
See also
- Function ActiveFont(txt$)
Returns the current font that will be used with DrawText.
test_font = LoadFont("test_font.ttf", 12)
SetFont(test_font)
If ActiveFont() = test_font Then
Print "Test Font is active"
End IfSee also