pub struct FontSpec {
pub family: Option<String>,
pub size: Option<f32>,
pub weight: Option<u16>,
}Expand description
Font specification: family name, size, and weight.
All fields are optional to support partial overlays — a FontSpec with
only size set will only override the size when merged.
Fields§
§family: Option<String>Font family name (e.g., “Inter”, “Noto Sans”).
size: Option<f32>Font size in logical pixels.
weight: Option<u16>CSS font weight (100–900).
Implementations§
Trait Implementations§
Source§impl<'de> Deserialize<'de> for FontSpec
impl<'de> Deserialize<'de> for FontSpec
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
impl StructuralPartialEq for FontSpec
Auto Trait Implementations§
impl Freeze for FontSpec
impl RefUnwindSafe for FontSpec
impl Send for FontSpec
impl Sync for FontSpec
impl Unpin for FontSpec
impl UnsafeUnpin for FontSpec
impl UnwindSafe for FontSpec
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