Expand description
Precomputed font fallback chains for resolving font stacks.
A FontFallbackChain is a self-contained snapshot that maps a CSS font stack
to the exact fonts that will be used for any character, without requiring
further metadata lookups during layout.
Resolution order:
- The CSS stack in order.
- The script fallback group whose block contains the character.
- The configured last resort, without a coverage check.
Structs§
- CssFallback
Group - The fonts one entry of the CSS font stack resolved to.
- Font
Fallback Chain - A resolved font fallback chain for one CSS font stack and style.
- RankKey
- The ordering used wherever font candidates compete. Smaller is better.
- Script
Fallback Group - Fonts to try for characters inside one Unicode block, best first.
Constants§
- LAST_
RESORT_ SOURCE css_sourcereported byFontFallbackChain::resolve_charfor the configured last resort.- MAX_
AUTO_ FALLBACKS_ PER_ SCRIPT - How many coverage-ranked fonts a script fallback group keeps beyond the configured preferences.
- MAX_
FACES_ PER_ FAMILY - How many faces of one family a chain keeps (Regular, Bold, Italic, … ranked by closeness to the requested style).
- UNICODE_
FALLBACK_ SOURCE css_sourcereported byFontFallbackChain::resolve_charfor a font taken fromFontFallbackChain::unicode_fallbacks.
Functions§
- breadth
- Total coverage in codepoints.
- covers
- Returns
trueifrangescontainscp.rangesmust be sorted and disjoint. - overlap_
size - Number of codepoints in
blockthatrangescover, capped at the block’s width. - range_
width - Width of a range in codepoints.