Skip to main content

Crate valo_text

Crate valo_text 

Source
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
Decoration describes a line drawn relative to styled text.
FaceSet
FaceSet stores registered fonts and their global fallback order.
Font
Font is one parsed font face or named variable-font instance.
FontAttrs
FontAttrs describes a face’s position within a font family.
FontCollection
FontCollection owns registered faces and sources for resolving missing fonts.
FontDemand
FontDemand describes font requests that no registered face could satisfy.
FontId
FontId identifies a registered font within a FaceSet or FontCollection.
FontUid
FontUid is the process-unique identity of one font instance.
GlyphImage
GlyphImage contains rasterized glyph pixels and baseline-relative placement.
GlyphStroke
GlyphStroke describes an outline applied before rasterizing a glyph.
Line
Line contains the visually ordered runs and metrics of one laid-out line.
LineMetrics
LineMetrics describes one laid-out line for caret and selection geometry.
Paragraph
Paragraph is the primary API for laying out and drawing text.
ParagraphBuilder
ParagraphBuilder assembles styled text into a Paragraph for layout and drawing.
ParagraphStyle
ParagraphStyle controls layout behavior for a complete paragraph.
PlacedGlyph
PlacedGlyph describes one shaped glyph positioned within a paragraph.
PlacedRun
PlacedRun groups positioned glyphs sharing one font and paint style.
PositionWithAffinity
PositionWithAffinity identifies where to place a caret in editable text.
Rasterizer
Rasterizer converts font glyphs into CPU bitmap or distance-field images.
Shadow
Shadow describes a colored, offset copy painted beneath text.
TextStyle
TextStyle controls font selection and painting for a span of text.

Enums§

DecorationKind
DecorationKind selects where a text decoration is drawn.
TextAlign
TextAlign controls horizontal line placement within the layout width.
TextDirection
TextDirection selects a paragraph’s base writing direction.
VariantCaps
VariantCaps selects an OpenType capitalization variant.

Constants§

SDF_PAD
SDF_PAD is the padding and maximum encoded distance around an SDF glyph.

Traits§

FontSource
FontSource locates fonts that are not already registered.

Functions§

glyph_path
glyph_path returns a glyph outline as a baseline-relative Valo path.

Type Aliases§

FontData
FontData is shared, immutable font-file storage supplied by the host.