Expand description
The font a piece of text with no role is set in.
Text with a role takes its font from the theme, and nothing on this side can change
that for one node. Text with no role, which is what a page laid out by CSS draws, names
its own: a list of candidates tried in order, the way a CSS font-family list is, the
first one the Renderer can resolve winning.
The list travels as fixed-length records followed by the bytes of the family names they
point at. The same records sit in a Text’s Font property, in a run of a Text’s
spans, and in a measure request, so the Renderer resolves all three with one function
and the text it measures is set in exactly the font it draws.
Structs§
- Font
Refs - A list of candidates, ready to travel.
Enums§
- FontRef
- One candidate.
Constants§
- FONT_
REF_ ASSET - A registered font asset.
valueis its id. - FONT_
REF_ GENERIC - A generic family.
valueis itsGenericFamilytag. - FONT_
REF_ KIND_ AT - Where each word of a candidate starts.
- FONT_
REF_ LEN - Bytes of one candidate: what kind it is, then two words whose meaning the kind gives.
- FONT_
REF_ LENGTH_ AT - FONT_
REF_ SYSTEM - An installed family, by name.
valueandlengthare where the UTF-8 name sits, counted from the start of the buffer the record is in. - FONT_
REF_ VALUE_ AT - MAX_
FONT_ REFS - The most candidates one list may hold. A CSS list longer than this is a page that names fonts it does not expect to find, and the ninth would never be reached.