pub struct BlockConfig {Show 18 fields
pub font_family: Option<String>,
pub font_size_pt: Option<f32>,
pub font_weight: Option<FontWeight>,
pub font_style: Option<FontStyleVariant>,
pub text_color: Option<Color>,
pub background_color: Option<Color>,
pub line_height: Option<f32>,
pub text_align: Option<TextAlignment>,
pub border: Option<BorderConfig>,
pub padding: Option<Sides<f32>>,
pub margin_before_pt: Option<f32>,
pub margin_after_pt: Option<f32>,
pub indent_pt: Option<f32>,
pub letter_spacing_pt: Option<f32>,
pub strikethrough: Option<bool>,
pub underline: Option<bool>,
pub small_caps: Option<bool>,
pub fallback_fonts: Option<Vec<String>>,
}Expand description
The workhorse style block. Applies to any flowable block: paragraph, heading, code block, blockquote, list, table cell, etc.
Fields§
§font_family: Option<String>§font_size_pt: Option<f32>§font_weight: Option<FontWeight>§font_style: Option<FontStyleVariant>§text_color: Option<Color>§background_color: Option<Color>§line_height: Option<f32>Multiplier of font_size_pt. 1.4 means the line advance is
font_size * 1.4.
text_align: Option<TextAlignment>§border: Option<BorderConfig>§padding: Option<Sides<f32>>§margin_before_pt: Option<f32>§margin_after_pt: Option<f32>§indent_pt: Option<f32>§letter_spacing_pt: Option<f32>§strikethrough: Option<bool>§underline: Option<bool>§small_caps: Option<bool>When true, every lowercase letter in this block’s text is
rendered uppercase at ~78% font size (faux small caps). Real
OpenType smcp substitution depends on the loaded font and is
a follow-up.
fallback_fonts: Option<Vec<String>>Ordered list of fallback font names. Codepoints not covered by
the primary body / code font are looked up in each fallback in
turn; the first font that has a glyph wins. Only the value on
the document [defaults] block is read by the renderer — the
field is accepted syntactically on per-block tables but ignored.
Trait Implementations§
Source§impl Clone for BlockConfig
impl Clone for BlockConfig
Source§impl Debug for BlockConfig
impl Debug for BlockConfig
Source§impl Default for BlockConfig
impl Default for BlockConfig
Source§impl<'de> Deserialize<'de> for BlockConfig
impl<'de> Deserialize<'de> for BlockConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for BlockConfig
impl RefUnwindSafe for BlockConfig
impl Send for BlockConfig
impl Sync for BlockConfig
impl Unpin for BlockConfig
impl UnsafeUnpin for BlockConfig
impl UnwindSafe for BlockConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more