pub struct Font { /* private fields */ }Expand description
Represents a font family name along with the font glyph source.
Implementations
sourceimpl Font
impl Font
sourcepub const NOTO: Self = Self::from_bytes("Noto", Self::NOTO_TTF)
pub const NOTO: Self = Self::from_bytes("Noto", Self::NOTO_TTF)
Noto Sans Regular - an open-source used by Linux and Google.
sourcepub const EMULOGIC: Self = Self::from_bytes("Emulogic", Self::EMULOGIC_TTF)
pub const EMULOGIC: Self = Self::from_bytes("Emulogic", Self::EMULOGIC_TTF)
Emulogic - a bold, retro gaming pixel font by Freaky Fonts.
sourcepub const INCONSOLATA: Self = Self::from_bytes("Inconsolata", Self::INCONSOLATA_TTF)
pub const INCONSOLATA: Self = Self::from_bytes("Inconsolata", Self::INCONSOLATA_TTF)
Inconsolata - an open-source monospace font designed for source code and terminals.
sourcepub const fn named(name: &'static str) -> Self
pub const fn named(name: &'static str) -> Self
Constructs a new Font instance with a given name.
sourcepub const fn from_bytes(name: &'static str, bytes: &'static [u8]) -> Self
pub const fn from_bytes(name: &'static str, bytes: &'static [u8]) -> Self
Constructs a new Font instance from a static byte array.
Trait Implementations
impl Eq for Font
impl StructuralEq for Font
impl StructuralPartialEq for Font
Auto Trait Implementations
impl RefUnwindSafe for Font
impl Send for Font
impl Sync for Font
impl Unpin for Font
impl UnwindSafe for Font
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more