pub struct Typography {
pub brand: FontFamilies,
pub plain: FontFamilies,
/* private fields */
}Expand description
Family names for the Material scale. The host resolves available fonts and measures the resulting text.
Fields§
§brand: FontFamiliesFont family stack used for Typeface::Brand roles.
plain: FontFamiliesFont family stack used for Typeface::Plain roles.
Implementations§
Source§impl Typography
impl Typography
Sourcepub fn with_text_scale(self, scale: f32) -> Self
pub fn with_text_scale(self, scale: f32) -> Self
Sets the theme’s text scale. The range is 1.0–2.0, with NaN using 1.0.
Sourcepub fn text_scale(&self) -> f32
pub fn text_scale(&self) -> f32
Returns the active text scale multiplier in 1.0..=2.0.
Sourcepub fn style(&self, role: TypeRole, emphasis: TypographyEmphasis) -> TypeStyle
pub fn style(&self, role: TypeRole, emphasis: TypographyEmphasis) -> TypeStyle
Resolves a Material role using the theme’s text scale.
Sourcepub fn scale_style(&self, style: TypeStyle) -> TypeStyle
pub fn scale_style(&self, style: TypeStyle) -> TypeStyle
Scales an unscaled style’s size, line height and tracking.
Sourcepub fn families(&self, typeface: Typeface) -> &FontFamilies
pub fn families(&self, typeface: Typeface) -> &FontFamilies
Returns the configured FontFamilies for a logical Typeface slot.
Trait Implementations§
Source§impl Clone for Typography
impl Clone for Typography
Source§impl Debug for Typography
impl Debug for Typography
Source§impl Default for Typography
impl Default for Typography
Source§impl<'de> Deserialize<'de> for Typography
impl<'de> Deserialize<'de> for Typography
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
Source§impl PartialEq for Typography
impl PartialEq for Typography
Source§impl Serialize for Typography
impl Serialize for Typography
impl StructuralPartialEq for Typography
Auto Trait Implementations§
impl Forget for Typography
impl Freeze for Typography
impl Move for Typography
impl RefUnwindSafe for Typography
impl Send for Typography
impl Sync for Typography
impl Unpin for Typography
impl UnsafeUnpin for Typography
impl UnwindSafe for Typography
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