Font
Custom font from draw.create_font, ready one frame after creation or a Themes font reload.
Methods
font:ready
font:ready() -> booleanTrue once in the atlas; until then draw.text_font uses the menu font.
Stays false forever if the font file is missing.
font:size
font:size() -> numberCreated pixel height, clamped to 4 to 256.
Returns 0 while not ready
font:measure
font:measure(text [, size]) -> w, h| Name | Type | Description |
|---|---|---|
| text | string | |
| sizeoptional | number | Pixel size. Default the font's size. |
Measures text as draw.text_font draws it.
Returns pixels
Menu-font results while not ready; 0, 0 before the first menu frame.