Font
This type represents a font object. Internally, this type uses FreeType library to rasterize font glyphs.
This type inherits FontBase type. All of its base methods and fields are also available in this type.
__call
Constructor
Constructs a font object.
Passing an invalid pointer, a or memory region that is smaller than the size will result in a crash.
Arguments
1. From file.
Name
Type
Description
path
string
Path to a ttf/otf file.
size
float
Font height, in pixels.
mi
int
Starting codepoint. Defaults to 0.
ma
int
Ending codepoint. Defaults to 255 (entire ASCII code page).
1. From memory.
1. From memory, with codepoint pairs.
Returns
Type
Description
Font
Font object.
Example
Last updated