pub struct GlyphKey {
pub face_id: u64,
pub font_index: u32,
pub px_size: u16,
pub glyph_id: u32,
pub scale_100: u16,
}Expand description
Cache key for one rasterized glyph in the text atlas.
§Examples
use ailloli_ui_render_wgpu::text::GlyphKey;
let key = GlyphKey { face_id: 3, font_index: 0, px_size: 16,
glyph_id: 42, scale_100: 200 };
assert_eq!((key.face_id, key.scale_100), (3, 200));Fields§
§face_id: u64Stable face identity supplied by the text system.
font_index: u32Face index inside a font collection.
px_size: u16Raster size in physical pixels, clamped to 8..=128 when used.
glyph_id: u32Font-specific glyph identifier; rasterization narrows it to u16.
scale_100: u16round(dpr * 100) to separate HiDPI cache buckets.
Trait Implementations§
impl Copy for GlyphKey
impl Eq 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 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.§impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
impl<A> IntoClickAction<A> for Awhere
A: Clone + 'static,
§fn into_click_action(self) -> ClickAction<A>
fn into_click_action(self) -> ClickAction<A>
Implements the into_click_action helper used by this module.
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more