natiny_font_preload_range

C
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 Unicode code point
last uint32_t Last Unicode code point, inclusive

Example

C
natiny_font_preload_range(font, 0x0410, 0x044F);   /* Cyrillic */

Notes

  • The endpoints are inclusive and are swapped when last is less than first; the upper endpoint is clamped to U+10FFFF.
  • A code point the face has no outline for costs an entry in the glyph table and no atlas space, so a generous range is cheap in pixels and not free in memory. Prefer natiny_font_preload when the strings are known.