pub struct FontSpec {
pub family: FontFamily,
pub size: f32,
pub weight: FontWeight,
pub style: FontStyle,
pub line_height: Option<f32>,
}Expand description
The font a piece of text is set in, taken from a computed style.
Fields§
§family: FontFamily§size: f32In pixels.
weight: FontWeight§style: FontStyle§line_height: Option<f32>The line box height in pixels, or None for the font’s own.
Implementations§
Source§impl FontSpec
impl FontSpec
pub fn from_style(style: &ComputedStyle) -> Self
Trait Implementations§
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