pub struct GlyphCacheKey {
pub font_face_id: FontFaceId,
pub glyph_id: u16,
pub size_bits: u32,
pub weight: u32,
pub hinted: bool,
}Fields§
§font_face_id: FontFaceId§glyph_id: u16§size_bits: u32§weight: u32Font weight (variation axis) so that e.g. Inter Regular and Inter
Bold produce separate cache entries even though they share the
same font_face_id and glyph_id in a variable font.
hinted: boolWhether the bitmap was rasterized with hinting. Rasters produced
under a raster scale (zoomed content) are unhinted, and the same
physical size can be reached both ways — 7px at raster_scale 2
and 14px at raster_scale 1 share size_bits but must not share
a bitmap.
Implementations§
Source§impl GlyphCacheKey
impl GlyphCacheKey
pub fn new(font_face_id: FontFaceId, glyph_id: u16, size_px: f32) -> Self
pub fn with_weight( font_face_id: FontFaceId, glyph_id: u16, size_px: f32, weight: u32, hinted: bool, ) -> Self
Trait Implementations§
Source§impl Clone for GlyphCacheKey
impl Clone for GlyphCacheKey
Source§fn clone(&self) -> GlyphCacheKey
fn clone(&self) -> GlyphCacheKey
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for GlyphCacheKey
Source§impl Debug for GlyphCacheKey
impl Debug for GlyphCacheKey
impl Eq for GlyphCacheKey
Source§impl Hash for GlyphCacheKey
impl Hash for GlyphCacheKey
Source§impl PartialEq for GlyphCacheKey
impl PartialEq for GlyphCacheKey
Source§fn eq(&self, other: &GlyphCacheKey) -> bool
fn eq(&self, other: &GlyphCacheKey) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for GlyphCacheKey
Auto Trait Implementations§
impl Freeze for GlyphCacheKey
impl RefUnwindSafe for GlyphCacheKey
impl Send for GlyphCacheKey
impl Sync for GlyphCacheKey
impl Unpin for GlyphCacheKey
impl UnsafeUnpin for GlyphCacheKey
impl UnwindSafe for GlyphCacheKey
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