Skip to main content

SUBPIXEL_COLR

Constant SUBPIXEL_COLR 

Source
pub(crate) const SUBPIXEL_COLR: u8 = SUBPIXEL_BUCKETS; // 4u8
Expand description

Sentinel subpixel_x for COLR glyph cache entries.

quantize_subpixel returns values in 0..SUBPIXEL_BUCKETS, so values above that range can never appear in an outline key. Using distinct sentinels for COLR and bitmap entries prevents cache collisions between glyph types that would otherwise produce identical keys (same font, glyph id, size, and color).