Skip to main content

Module text

Module text 

Source

Re-exports§

pub use annotated_string::AnnotatedString;
pub use annotated_string::LinkAnnotation;
pub use annotated_string::LinkKey;
pub use annotated_string::RangeStyle;
pub use annotated_string::RenderString;
pub use annotated_string::StringAnnotation;
pub use annotated_string::shared_plain_annotated_string;
pub use decoration::Shadow;
pub use decoration::TextDecoration;
pub use draw_scope_text::AppContextTextMeasurer;
pub use draw_scope_text::draw_style_line_box;
pub use draw_scope_text::text_style_for_draw_style;
pub use font::FileBackedFontFamily;
pub use font::FontFamily;
pub use font::FontFile;
pub use font::FontStyle;
pub use font::FontSynthesis;
pub use font::FontWeight;
pub use font::LoadedTypefacePath;
pub use layout_options::TextLayoutOptions;
pub use layout_options::TextOptions;
pub use layout_options::TextOverflow;
pub use line_box::FontExtent;
pub use line_box::LineBox;
pub use line_box::line_box;
pub use measure::PreparedTextLayout;
pub use measure::TextLinePrefixWidths;
pub use measure::TextMeasurer;
pub use measure::TextMetrics;
pub use measure::first_baseline;
pub use measure::get_cursor_x_for_offset;
pub use measure::get_offset_for_position;
pub use measure::glyph_line_box;
pub use measure::layout_text;
pub use measure::measure_text;
pub use measure::measure_text_for_node;
pub use measure::measure_text_with_options;
pub use measure::measure_text_with_options_for_node;
pub use measure::offset_for_position_wrapped;
pub use measure::prepare_text_layout;
pub use measure::prepare_text_layout_for_node;
pub use measure::set_text_measurer;
pub use measure::wrapped_line_ranges;
pub use paragraph::Hyphens;
pub use paragraph::LineBreak;
pub use paragraph::ResolvedTextDirection;
pub use paragraph::TextAlign;
pub use paragraph::TextDirection;
pub use paragraph::TextIndent;
pub use paragraph::resolve_text_direction;
pub use style::BaselineShift;
pub use style::LocaleList;
pub use style::ParagraphStyle;
pub use style::PlatformParagraphStyle;
pub use style::PlatformSpanStyle;
pub use style::PlatformTextStyle;
pub use style::SpanStyle;
pub use style::TextDrawStyle;
pub use style::TextGeometricTransform;
pub use style::TextMotion;
pub use style::TextShaping;
pub use style::TextStyle;
pub use unit::TextUnit;
pub use crate::text_layout_result::TextLayoutResult;

Modules§

annotated_string
decoration
draw_scope_text
Bridge between DrawScope text and the framework text stack.
font
layout_options
line_box
Where a line of text sits inside the height it was given.
measure
paragraph
style
unit

Structs§

LineHeightStyle
The line-height policy lives with the drawing-side text types, because a DrawScope has to be able to name it too: a run drawn through a canvas and a Text composable on the same screen must resolve their line boxes by the same rule, and the only style a draw scope can carry is the flat one from cranpose-ui-graphics. How a line of text sits inside the height it was given.

Enums§

LineHeightAlignment
The line-height policy lives with the drawing-side text types, because a DrawScope has to be able to name it too: a run drawn through a canvas and a Text composable on the same screen must resolve their line boxes by the same rule, and the only style a draw scope can carry is the flat one from cranpose-ui-graphics. Where the leading — the difference between a line’s box and the font’s own ascent-plus-descent extent — is spent.
LineHeightMode
The line-height policy lives with the drawing-side text types, because a DrawScope has to be able to name it too: a run drawn through a canvas and a Text composable on the same screen must resolve their line boxes by the same rule, and the only style a draw scope can carry is the flat one from cranpose-ui-graphics. What a requested line height means when the font does not fit inside it.
LineHeightTrim
The line-height policy lives with the drawing-side text types, because a DrawScope has to be able to name it too: a run drawn through a canvas and a Text composable on the same screen must resolve their line boxes by the same rule, and the only style a draw scope can carry is the flat one from cranpose-ui-graphics. Which edges of a text block give their leading back.