natiny.font.preload
natiny.font.preload(font, text)
Rasterizes every glyph the text uses now, instead of on the frame that first draws it.
Parameters
| Name | Type | Description |
|---|---|---|
font |
number |
Font handle from natiny.font.create |
text |
string |
UTF-8 text whose glyphs to bake |
Example
local font = natiny.font.create(res, 24)
natiny.font.preload(font, "Play Settings Quit")