pub struct GlyphKey {
pub font: u64,
pub glyph: u16,
pub size: u16,
}Expand description
What identifies a glyph in the atlas.
A font identifier alongside the glyph index, because glyph indices are per font and two fonts will disagree about what index seven means. Size is in whole pixels: a cache keyed by a float would miss on values that differ only in their last bit, and rasterizing at a rounded size is what a caller is doing anyway.
Fields§
§font: u64§glyph: u16§size: u16Trait Implementations§
impl Copy for GlyphKey
impl Eq for GlyphKey
Source§impl Ord for GlyphKey
impl Ord for GlyphKey
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 GlyphKey
impl PartialOrd for GlyphKey
impl StructuralPartialEq for GlyphKey
Auto Trait Implementations§
impl Freeze for GlyphKey
impl RefUnwindSafe for GlyphKey
impl Send for GlyphKey
impl Sync for GlyphKey
impl Unpin for GlyphKey
impl UnsafeUnpin for GlyphKey
impl UnwindSafe for GlyphKey
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