Expand description
valo-text — typographer + paragraph layout, no GPU. The pipeline: style spans → per-character font fallback → bidi levels → harfrust shaping (endless line) → greedy wrapping with UAX #14 opportunities → per-line UAX #9 visual reorder → placed glyph runs. Glyph raster (swash alpha masks, SDF distance fields, skrifa outline paths) also lives here — CPU-only; the renderer’s atlas calls in.
Structs§
- Decoration
Decorationdescribes a line drawn relative to styled text.- FaceSet
FaceSetstores registered fonts and their global fallback order.- Font
Fontis one parsed font face or named variable-font instance.- Font
Attrs FontAttrsdescribes a face’s position within a font family.- Font
Collection FontCollectionowns registered faces and sources for resolving missing fonts.- Font
Demand FontDemanddescribes font requests that no registered face could satisfy.- FontId
FontIdidentifies a registered font within aFaceSetorFontCollection.- FontUid
FontUidis the process-unique identity of one font instance.- Glyph
Image GlyphImagecontains rasterized glyph pixels and baseline-relative placement.- Glyph
Stroke GlyphStrokedescribes an outline applied before rasterizing a glyph.- Line
Linecontains the visually ordered runs and metrics of one laid-out line.- Line
Metrics LineMetricsdescribes one laid-out line for caret and selection geometry.- Paragraph
Paragraphis the primary API for laying out and drawing text.- Paragraph
Builder ParagraphBuilderassembles styled text into aParagraphfor layout and drawing.- Paragraph
Style ParagraphStylecontrols layout behavior for a complete paragraph.- Placed
Glyph PlacedGlyphdescribes one shaped glyph positioned within a paragraph.- Placed
Run PlacedRungroups positioned glyphs sharing one font and paint style.- Position
With Affinity PositionWithAffinityidentifies where to place a caret in editable text.- Rasterizer
Rasterizerconverts font glyphs into CPU bitmap or distance-field images.- Shadow
Shadowdescribes a colored, offset copy painted beneath text.- Text
Style TextStylecontrols font selection and painting for a span of text.
Enums§
- Decoration
Kind DecorationKindselects where a text decoration is drawn.- Text
Align TextAligncontrols horizontal line placement within the layout width.- Text
Direction TextDirectionselects a paragraph’s base writing direction.- Variant
Caps VariantCapsselects an OpenType capitalization variant.
Constants§
- SDF_PAD
SDF_PADis the padding and maximum encoded distance around an SDF glyph.
Traits§
- Font
Source FontSourcelocates fonts that are not already registered.
Functions§
- glyph_
path glyph_pathreturns a glyph outline as a baseline-relative Valo path.
Type Aliases§
- Font
Data FontDatais shared, immutable font-file storage supplied by the host.