Fonts
Resolve font families, weights, coverage fallback and font inputs.
A text run requests a family and weight. The host supplies the fonts available to the renderer. An ordinary local editor can use installed fonts. A project can supply additional faces, and a headless renderer can use a fixed collection. All three consume the same scene.
Authored request
font-family on text names one nonempty family. font-weight requests a weight from 1 through 1000 and defaults to 400. A span may override either field independently. Resolve inherited and animated values at the sample before selecting faces. Text fields and inheritance
Treat the entire family value as a name. A comma does not start a fallback list. A path or URL in that field never authorizes a read or fetch. Level 1 has no font import declaration, embedded font payload or required companion manifest. A host can offer installation or project packaging outside the scene.
Face selection and fallback
- Match the request against the host's available faces. The host controls its font sources, precedence, weight matching and fallback order. Keep the resolved primary face for paragraph metrics even when individual runs need another face. If the family is unavailable, report the authored request and source location, choose an available substitute and continue layout.
- For text the primary face cannot shape, try suitable fallback faces. Preserve extended grapheme clusters, including combining marks and emoji sequences, and the shaping context of the surrounding script. Keep text covered by the primary face in that face wherever shaping permits. Successful coverage fallback is ordinary rendering. The requested family and weight continue to belong to their authored owner.
- If coverage is exhausted, display a missing-glyph mark for the unresolved cluster, report its source range and face request, and continue with subsequent text. An empty font environment must be reported if the host cannot lay out the paragraph.
Use the same resolved faces, instances, advances and cluster mapping for measuring, wrapping, painting, hit testing and deriving outlines. Face selection does not extend the Level 1 glyph artwork profile. A selected emoji face may supply a monochrome outline. Color-only or bitmap-only ink remains subject to the glyph geometry rules.
Opening or saving with different fonts preserves authored family, weight, spans and copy. Only an explicit author edit changes the request. Installing a missing face and reopening the original scene can therefore recover the intended typography.
Reproducing a layout
Different font environments may produce different line breaks, glyph ink, mask coverage and attachment positions. For repeatable rendering, supply the same primary and fallback font bytes, face indices, variable-font axis coordinates and selection order. Keep the shaping implementation, Unicode data and layout settings fixed. Shape in design units with default OpenType features for the script and language und. Test fixtures can bind names to exact files without creating scene syntax. Font resolution cases