Expand description
Cache key for glyph bitmaps stored in the atlas.
GlyphCacheKey captures every parameter that affects the visual appearance
of a rasterized glyph โ font identity, size, hinting, subpixel position,
COLR context color, and variable-font coordinates. Two keys that compare
equal produce identical bitmaps and can safely share a single atlas entry.
Structsยง
- Glyph
Cache Key - Unique identifier for a cached glyph bitmap.
Constantsยง
- SUBPIXEL_
BITMAP ๐ - Sentinel
subpixel_xfor bitmap glyph cache entries. SeeSUBPIXEL_COLR. - SUBPIXEL_
BUCKETS ๐ - Number of horizontal subpixel quantization buckets (valid range: 1โ253).
- SUBPIXEL_
COLR ๐ - Sentinel
subpixel_xfor COLR glyph cache entries.
Functionsยง
- f32_
bits ๐ - join_
bits ๐ - pack_
color ๐ - Premultiply and pack an RGBA color into a
u32for bitwise hashing/comparison. - quantize_
subpixel ๐ - Quantize a fractional pixel offset into one of
SUBPIXEL_BUCKETSbuckets. - subpixel_
offset - Convert a quantized bucket index back to the fractional pixel offset it represents.