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.

Structs§

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.