Expand description
Floem’s high-level text API.
This module exposes the text types used by Floem views and editor code:
- styling attributes and font vocabulary re-exported from
floem_renderer::text - Parley alignment, cursor, selection, and wrapping vocabulary used directly by Floem
TextLayout, Floem’s layout wrapper around ParleyTextLayoutState, shared view state for overflow-aware text layout
TextLayout deliberately hides Parley’s concrete layout type from most
callers while still using Parley’s lower-level vocabulary types.
Structs§
- Attrs
- Text styling attributes used to configure font properties, color, and layout.
- Attrs
List - A list of text attributes with default styling and per-range overrides.
- Attrs
Owned - An owned version of
Attrsthat does not borrow the font family slice. - Cursor
- Defines a position with a text layout.
- Font
Weight - Visual weight class of a font, typically on a scale from 1.0 to 1000.0.
- Font
Width - Visual width of a font– a relative change from the normal aspect
ratio, typically in the range
0.5to2.0. - Glyph
- Glyph with an offset and advance.
- Glyph
RunProps - Rendering properties shared by a glyph run.
- Selection
- Defines a range within a text layout.
- Text
Layout - A Floem wrapper around a Parley text layout.
- Text
Layout State - Shared text layout state used by text-based views.
- Text
Overflow Changed - Event fired when a text view’s overflow state changes.
- Text
Selection - A
TextLayout-owned selection value.
Enums§
- Affinity
- Determines how a cursor attaches to a cluster.
- Alignment
- Alignment of a layout.
- Family
Owned - An owned font family identifier.
- Font
Style - Visual style or ‘slope’ of a font.
- Line
Height Value - Specifies how line height is computed for text layout.
- Overflow
Wrap - Control over “emergency” line-breaking.
- Text
Wrap Mode - Control over non-“emergency” line-breaking.
- Word
Break Strength - Word breaking strength (corresponds to https://drafts.csswg.org/css-text/#word-break-property).
Statics§
- FONT_
CONTEXT - Shared Parley font context used by Floem text layout construction.
Functions§
- paragraph_
ranges - Returns the byte ranges of the source text’s logical paragraphs.
Type Aliases§
- Normalized
Coord - Variable font design-space coordinate.