natiny_font_preload_range
void natiny_font_preload_range(NatinyFont font, uint32_t first, uint32_t last);
Rasterizes every glyph in a range of code points.
Parameters
| Name | Type | Description |
|---|---|---|
font |
NatinyFont |
Font handle from natiny_font_create |
first |
uint32_t |
First code point |
last |
uint32_t |
Last code point, inclusive |
Example
natiny_font_preload_range(font, 0x0410, 0x044F); /* Cyrillic */
Notes
- The endpoints are inclusive and are swapped when
lastis less thanfirst; the upper endpoint is clamped toU+10FFFF. - A code point the face has no outline for costs an entry in the glyph table
and no atlas space. Prefer
natiny_font_preloadwhen the strings are known. - The atlas is finite. A range wide enough to overflow it prints "font atlas is full" once and the glyphs past that point are not drawn.
- Follows the fallback chain.
- An invalid font handle is ignored.