pub struct Font {
pub family: &'static str,
pub size: f32,
pub weight: u16,
}Expand description
A font: family, size and weight.
The family is resolved through fontconfig, so generic names such as
"sans-serif" and "monospace" work too.
Fields§
§family: &'static strThe family name, such as "Inter" or "sans-serif".
size: f32The size in logical pixels.
weight: u16The weight, from 100 (thin) through 400 (regular) and 700 (bold) to 900 (black).
Implementations§
Trait Implementations§
impl Copy for Font
impl StructuralPartialEq for Font
Auto Trait Implementations§
impl Forget for Font
impl Freeze for Font
impl Move for Font
impl RefUnwindSafe for Font
impl Send for Font
impl Sync for Font
impl Unpin for Font
impl UnsafeUnpin 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