Expand description
Text for oxframe: layout with parley, glyph outlines with skrifa.
Text becomes a BezPath, so it renders identically on every backend
and can be morphed and trimmed like any other path.
Determinism: only embedded fonts are used — Inter and JetBrains Mono
(SIL OFL 1.1, see fonts/) plus fonts registered with
register_font. System fonts are never consulted.
Structs§
- Glyph
Info - Where a glyph came from.
- Text
Layout - Laid-out text. Coordinates: origin at the top-left of the layout box, y pointing down.
- Text
Span - A run of text with its own style; unset fields inherit the base style.
- Text
Style - How text is laid out.
Enums§
- Align
- Horizontal alignment of lines.
- Lang
- Language for syntax highlighting.
- Token
- Kind of a highlighted piece of code.
Constants§
Functions§
- highlight
- Splits
codeinto highlighted ranges covering all of it. - layout
- Lays out
text(cached by text and style). - layout_
rich - Lays out styled spans as one paragraph (cached).
- register_
font - Registers a font (TTF/OTF/TTC bytes, e.g. from
include_bytes!). Returns the family names it provides.