Open the font file at path into the next slot. Returns false when it cannot be read or parsed.
- text: the text system to add the font to.
- path: the font file to read.
ui := headless();
defer free_ui(*ui);
if !load_font(*ui.text, "fonts/Inter-Regular.ttf") print("font missing\n");This one is only checked to compile, not run.
load_font :: (text: *Text_System, path: string) -> bool
Open the font file at path into the next slot. Returns false when it cannot be read or parsed.
Parameters
- text: *Text_System
- the text system to add the font to.
- path: string
- the font file to read.
Returns
- bool
ui := headless();
defer free_ui(*ui);
if !load_font(*ui.text, "fonts/Inter-Regular.ttf") print("font missing\n");This one is only checked to compile, not run.