pub struct LineHeightStyle {
pub alignment: LineHeightAlignment,
pub trim: LineHeightTrim,
pub mode: LineHeightMode,
}Expand description
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, and what a
paragraph gives back at its edges.
Text is laid out by AOSP’s StaticLayout rule, as Jetpack Compose lays it
out: whole-pixel metrics, the leading placed by alignment, and the
leading above the first line and below the last given back by trim. The
Default is Compose’s own, which is what a style that names none gets.
Fields§
§alignment: LineHeightAlignmentWhere the leading of each line is spent.
trim: LineHeightTrimWhich edges of the text block give their leading back.
mode: LineHeightModeWhat a requested line height means when the font does not fit inside it.
Trait Implementations§
Source§impl Clone for LineHeightStyle
impl Clone for LineHeightStyle
Source§fn clone(&self) -> LineHeightStyle
fn clone(&self) -> LineHeightStyle
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more