pub struct GlyphKey { /* private fields */ }Expand description
Cache key uniquely identifying a rasterized glyph bitmap.
Implementations§
Source§impl GlyphKey
Construction and compact 64-bit packing helpers for GlyphKey.
impl GlyphKey
Construction and compact 64-bit packing helpers for GlyphKey.
Sourcepub fn from_style(
codepoint: char,
physical_size: f32,
weight: FontWeight,
) -> Self
pub fn from_style( codepoint: char, physical_size: f32, weight: FontWeight, ) -> Self
Sourcepub fn from_text_style(
codepoint: char,
physical_size: f32,
style: TextStyle,
) -> Self
pub fn from_text_style( codepoint: char, physical_size: f32, style: TextStyle, ) -> Self
Builds a quantized GlyphKey capturing size, weight, monospace family, and italic slant from style.
§Arguments
char- Character to rasterize.f32- Effective physical font size in pixels.TextStyle- Active typography style.
§Returns
Self- Quantized cache key distinguishing sans, monospace, bold, and italic faces.
Source§impl GlyphKey
impl GlyphKey
pub fn get_codepoint(&self) -> char
pub fn get_size_tenths(&self) -> u16
pub fn get_bold(&self) -> bool
pub fn get_monospace(&self) -> bool
pub fn get_italic(&self) -> bool
Trait Implementations§
impl Copy for GlyphKey
impl Eq for GlyphKey
Source§impl Hash for GlyphKey
Single-word 64-bit hashing for GlyphKey.
impl Hash for GlyphKey
Single-word 64-bit hashing for GlyphKey.
Source§impl Ord for GlyphKey
Single-register 64-bit total ordering for GlyphKey.
impl Ord for GlyphKey
Single-register 64-bit total ordering 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 PartialEq for GlyphKey
Single-register 64-bit equality comparison for GlyphKey.
impl PartialEq for GlyphKey
Single-register 64-bit equality comparison for GlyphKey.
Source§impl PartialOrd for GlyphKey
Single-register 64-bit partial ordering for GlyphKey.
impl PartialOrd for GlyphKey
Single-register 64-bit partial ordering for GlyphKey.
Auto Trait Implementations§
impl Forget for GlyphKey
impl Freeze for GlyphKey
impl Move 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