pub struct FontId(pub u16);Expand description
Identifies a font within one TextEngine.
Small and Copy because it ends up in every glyph cache key, and because M5’s
C ABI has to carry it across extern "C" without a pointer.
Tuple Fields§
§0: u16Implementations§
Source§impl FontId
impl FontId
Sourcepub const DEFAULT: FontId
pub const DEFAULT: FontId
The face a style that names none is drawn in.
Not a face itself — a redirection. Every TextStyle this workspace
builds without naming a font carries this, and it resolves through
TextEngine::default_font at glyph
time. Until somebody calls
set_default_font it is the
built-in bitmap face, which is what an embedded board with no fonts
installed gets and why it is always registered first.
Trait Implementations§
impl Copy for FontId
impl Eq for FontId
Source§impl Ord for FontId
impl Ord for FontId
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for FontId
impl PartialOrd for FontId
impl StructuralPartialEq for FontId
Auto Trait Implementations§
impl Freeze for FontId
impl RefUnwindSafe for FontId
impl Send for FontId
impl Sync for FontId
impl Unpin for FontId
impl UnsafeUnpin for FontId
impl UnwindSafe for FontId
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