Skip to main content

Module richtext

Module richtext 

Expand description

RichTextLayout — attributed, word-wrapped, hit-testable text layout. The toolkit’s rich-text primitive (cosmic-text under the hood): per-run bold/italic, underlines, wrapping to a width, caret geometry, selection rectangles, and point↔offset hit-testing. Render it with crate::text_render::TextRenderer::draw_rich.

Modules§

inline_emoji
A workspace’s own emoji inside text: :name: drawn as its picture.

Structs§

InkReach
How far the ink of a layout’s rows reaches past their own bands: above a row’s top and below its bottom, in the layout’s units. Zero where every glyph stays inside its row.
RichSpan
A styled inline run. size/family override the block defaults per run.
RichTextLayout
A laid-out block of attributed text.

Enums§

BaselineShift
Per-run baseline shift, for superscript / subscript runs.
FontFamily
A generic font family the toolkit can resolve from system fonts.
TextAlign
Horizontal alignment of a block.