Skip to main content

Crate oxframe_text

Crate oxframe_text 

Source
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§

GlyphInfo
Where a glyph came from.
TextLayout
Laid-out text. Coordinates: origin at the top-left of the layout box, y pointing down.
TextSpan
A run of text with its own style; unset fields inherit the base style.
TextStyle
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§

MONO
Built-in monospace family (JetBrains Mono).
SANS
Built-in sans-serif family (Inter).

Functions§

highlight
Splits code into 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.