pub struct LayoutConfig {Show 22 fields
pub display_width: i32,
pub display_height: i32,
pub margin_left: i32,
pub margin_right: i32,
pub margin_top: i32,
pub margin_bottom: i32,
pub line_gap_px: i32,
pub paragraph_gap_px: i32,
pub heading_gap_px: i32,
pub heading_keep_with_next_lines: u8,
pub list_indent_px: i32,
pub first_line_indent_px: i32,
pub suppress_indent_after_heading: bool,
pub justify_min_words: usize,
pub justify_min_fill_ratio: f32,
pub min_line_height_px: i32,
pub max_line_height_px: i32,
pub soft_hyphen_policy: SoftHyphenPolicy,
pub page_chrome: PageChromeConfig,
pub typography: TypographyConfig,
pub object_layout: ObjectLayoutConfig,
pub render_intent: RenderIntent,
}Expand description
Layout configuration for page construction.
Fields§
§display_width: i32Physical display width.
display_height: i32Physical display height.
margin_left: i32Left margin.
margin_right: i32Right margin.
margin_top: i32Top margin.
margin_bottom: i32Bottom margin.
line_gap_px: i32Extra gap between lines.
paragraph_gap_px: i32Gap after paragraph/list item end.
heading_gap_px: i32Gap around heading blocks.
heading_keep_with_next_lines: u8Keep headings with at least this many subsequent lines.
list_indent_px: i32Left indent for list items.
first_line_indent_px: i32First-line indent for paragraph/body text.
suppress_indent_after_heading: boolSuppress first-line indent on paragraph immediately after a heading.
justify_min_words: usizeMinimum words for justification.
justify_min_fill_ratio: f32Required fill ratio for justification.
min_line_height_px: i32Minimum final line height in px.
max_line_height_px: i32Maximum final line height in px.
soft_hyphen_policy: SoftHyphenPolicySoft-hyphen handling policy.
page_chrome: PageChromeConfigPage chrome emission policy.
typography: TypographyConfigTypography policy surface.
object_layout: ObjectLayoutConfigNon-text object layout policy surface.
render_intent: RenderIntentTheme/render intent surface.
Implementations§
Source§impl LayoutConfig
impl LayoutConfig
Sourcepub fn for_display(width: i32, height: i32) -> Self
pub fn for_display(width: i32, height: i32) -> Self
Convenience for a display size with sensible defaults.
Trait Implementations§
Source§impl Clone for LayoutConfig
impl Clone for LayoutConfig
Source§fn clone(&self) -> LayoutConfig
fn clone(&self) -> LayoutConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more