Skip to main content

Module glyph_cache

Module glyph_cache 

Source
Expand description

Backend-neutral glyph/render cache with byte-weighted eviction

Caches complete RenderOutput values keyed by the shaped glyph stream, render parameters, font identity, and renderer backend name. This sits in typf-core so every renderer can benefit without bespoke cache logic.

Memory safety: Uses byte-weighted eviction to prevent memory explosions. A 4MB emoji bitmap consumes 4000x more cache quota than a 1KB glyph.

Structs§

GlyphCache
Byte-weighted render output cache
GlyphCacheKey
Stable key for render output caching

Type Aliases§

SharedGlyphCache
Thread-safe shared glyph cache