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: FontFamilies§plain: FontFamiliesImplementations§
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.
pub fn text_scale(&self) -> f32
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.
pub fn families(&self, typeface: Typeface) -> &FontFamilies
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 PartialEq for Typography
impl PartialEq 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