Add a fixed-metrics font (no glyphs are drawn) to the next slot.
- text: the text system to add the font to.
ui := headless();
defer free_ui(*ui);
width := text_width(*ui.text, "abcde", .{ size = 10 });
assert(width == 30); // every character is 0.6 of the size wideadd_synthetic_font :: (text: *Text_System)
Add a fixed-metrics font (no glyphs are drawn) to the next slot.
Parameters
- text: *Text_System
- the text system to add the font to.
ui := headless();
defer free_ui(*ui);
width := text_width(*ui.text, "abcde", .{ size = 10 });
assert(width == 30); // every character is 0.6 of the size wide