pub struct TextStrutStyle {
pub font: Option<FontId>,
pub size: Option<Px>,
pub line_height: Option<Px>,
pub line_height_em: Option<f32>,
pub leading_distribution: Option<TextLeadingDistribution>,
pub force: bool,
}Expand description
Paragraph-level strut style used to stabilize line box metrics across fallback runs.
This is a mechanism-only surface. Ecosystem presets (e.g. fret-ui-kit::typography) decide
when to enable it (see ADR 0287 and related workstreams).
Fields§
§font: Option<FontId>Optional font override used for strut metrics (defaults to TextStyle.font).
size: Option<Px>Optional font size override used for strut metrics (defaults to TextStyle.size).
line_height: Option<Px>Optional line height override, in logical px.
line_height_em: Option<f32>Optional line height override, expressed as a multiple of the effective size.
leading_distribution: Option<TextLeadingDistribution>Optional leading distribution override (defaults to TextStyle.leading_distribution).
force: boolIf true, force the strut line box even when the style’s policy is ExpandToFit.
This mirrors the intent of Flutter’s forceStrutHeight: stabilize layout for UI-like
multiline surfaces, at the cost of potential glyph ink clipping.
Trait Implementations§
Source§impl Clone for TextStrutStyle
impl Clone for TextStrutStyle
Source§fn clone(&self) -> TextStrutStyle
fn clone(&self) -> TextStrutStyle
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more