pub enum Font {
System {
size: FontSize,
design: Option<FontDesign>,
weight: Option<FontWeight>,
},
Custom {
name: String,
size: f64,
},
}
Expand description
An abstract/platform-dependent font.
Variants§
Implementations§
Source§impl Font
impl Font
pub const EXTRA_LARGE_TITLE2: Self
pub const EXTRA_LARGE_TITLE: Self
pub const LARGE_TITLE: Self
pub const TITLE: Self
pub const TITLE2: Self
pub const TITLE3: Self
pub const HEADLINE: Self
pub const SUBHEADLINE: Self
pub const BODY: Self
pub const CALLOUT: Self
pub const CAPTION: Self
pub const CAPTION2: Self
pub const FOOTNOTE: Self
pub fn system( size: impl Into<FontSize>, design: Option<FontDesign>, weight: Option<FontWeight>, ) -> Self
pub fn custom(name: impl Into<String>, size: impl Into<f64>) -> Self
pub fn with_size(size: impl Into<FontSize>) -> Self
pub const fn with_level(level: FontLevel) -> Self
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Font
impl<'de> Deserialize<'de> for Font
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 Font
Auto Trait Implementations§
impl Freeze for Font
impl RefUnwindSafe for Font
impl Send for Font
impl Sync for Font
impl Unpin for Font
impl UnwindSafe for Font
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