pub struct SoftwareGlyphRasterCache { /* private fields */ }Expand description
A cache of rasterized glyph masks and kerning pairs, kept across frames.
Implementations§
Source§impl SoftwareGlyphRasterCache
impl SoftwareGlyphRasterCache
Sourcepub fn with_capacity_at_least_one(capacity: usize) -> Self
pub fn with_capacity_at_least_one(capacity: usize) -> Self
Creates a cache that holds up to capacity glyph masks, and at least one.
Sourcepub fn stats(&self) -> SoftwareGlyphRasterCacheStats
pub fn stats(&self) -> SoftwareGlyphRasterCacheStats
Current counters of the cache.
Sourcepub fn atlas_glyph_for_placement(
&mut self,
placement: &SoftwareGlyphAtlasPlacement,
) -> Option<SoftwareGlyphAtlasGlyph>
pub fn atlas_glyph_for_placement( &mut self, placement: &SoftwareGlyphAtlasPlacement, ) -> Option<SoftwareGlyphAtlasGlyph>
Returns the cached glyph for placement with its mask, or None when the mask has left the
cache.
Auto Trait Implementations§
impl Freeze for SoftwareGlyphRasterCache
impl RefUnwindSafe for SoftwareGlyphRasterCache
impl Send for SoftwareGlyphRasterCache
impl Sync for SoftwareGlyphRasterCache
impl Unpin for SoftwareGlyphRasterCache
impl UnsafeUnpin for SoftwareGlyphRasterCache
impl UnwindSafe for SoftwareGlyphRasterCache
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