Skip to main content

Module layout

Module layout 

Source
Expand description

Text layout: measurement, word wrapping, and bounded alignment.

The entry point is TextLayout, a builder that accepts a Line and layout parameters, then either measures the result or renders it into a Terminal.

Only available when the egc feature is enabled (requires alloc).

Structsยง

TextLayout
Builder for laying out a Line within a bounded Rect.
TextMetrics
The display dimensions of a laid-out block of text.
WrappedGlyph ๐Ÿ”’
One grapheme on a wrapped line, ready to be placed or measured.
WrappedLine ๐Ÿ”’
A line produced by the word-wrap pass.

Enumsยง

HAlign
Horizontal alignment within a bounded rectangle.
VAlign
Vertical alignment within a bounded rectangle.

Functionsยง

wrap_line ๐Ÿ”’
Greedy word-wrap over a Lineโ€™s spans.