font_cache
Mojo module 🡭
font_cache
Caller-owned cache for font resolution, parsed faces, and glyph masks.
Pass one FontCache through the cache= overloads of text measurement
and drawing functions. Font discovery is initialized lazily. Parsed
faces are keyed by path and pixel size; glyph masks are held in a
bounded two-generation store.
Structs
FontCache: Construct one, then pass it bycache=into draw_text/measure_text/measure_text_block for every call reusing the same fonts. No cleanup, and no setup: the one font scan happens on the first lookup, and every later lookup skips it.