pub struct HeadingStyle {
pub font_size: f32,
pub font_weight: f32,
pub space_before: f32,
pub space_after: f32,
pub color: Option<ColorRgb>,
pub font_families: Vec<String>,
}Fields§
§font_size: f32§font_weight: f32§space_before: f32§space_after: f32§color: Option<ColorRgb>Text colour for this heading level. Defaults to the document
body text_color when unset; set it (e.g. to a brand colour)
to tint headings independently of body text.
font_families: Vec<String>Font families for this element, in fallback order. Empty means
“inherit the document body families” (body_font_families, or
the bundled Noto defaults when that is also empty). Names must
be families the font collection knows — either system-installed
or exposed by a file listed in font_paths.
Note this REPLACES the body list rather than extending it, so a Latin-only face here will lose the multi-script fallbacks. List the scripts you need explicitly if the document is not Latin-only.
Trait Implementations§
Source§impl Clone for HeadingStyle
impl Clone for HeadingStyle
Source§impl Debug for HeadingStyle
impl Debug for HeadingStyle
Source§impl Default for HeadingStyle
impl Default for HeadingStyle
Source§impl<'de> Deserialize<'de> for HeadingStylewhere
HeadingStyle: Default,
impl<'de> Deserialize<'de> for HeadingStylewhere
HeadingStyle: Default,
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 Forget for HeadingStyle
impl Freeze for HeadingStyle
impl Move for HeadingStyle
impl RefUnwindSafe for HeadingStyle
impl Send for HeadingStyle
impl Sync for HeadingStyle
impl Unpin for HeadingStyle
impl UnsafeUnpin for HeadingStyle
impl UnwindSafe for HeadingStyle
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
impl<U, T> ToOwnedObj<U> for Twhere
U: FromObjRef<T>,
Source§fn to_owned_obj(&self, data: FontData<'_>) -> U
fn to_owned_obj(&self, data: FontData<'_>) -> U
Convert this type into
T, using the provided data to resolve any offsets.