pub struct GlyphAtlas { /* private fields */ }Expand description
Memoized glyph rasterization cache shared across frames to avoid redundant glyph work.
Implementations§
Source§impl GlyphAtlas
Caching lookup operations for GlyphAtlas.
impl GlyphAtlas
Caching lookup operations for GlyphAtlas.
Sourcepub fn get_or_rasterize(&mut self, key: GlyphKey) -> &RasterizedGlyph
pub fn get_or_rasterize(&mut self, key: GlyphKey) -> &RasterizedGlyph
Sourcepub fn get_or_rasterize_with(
&mut self,
key: GlyphKey,
provider: &dyn SystemFontProvider,
) -> &RasterizedGlyph
pub fn get_or_rasterize_with( &mut self, key: GlyphKey, provider: &dyn SystemFontProvider, ) -> &RasterizedGlyph
Returns the cached RasterizedGlyph for key, rasterizing through provider on a miss.
§Arguments
&Self- Mutable reference to the glyph atlas.GlyphKey- Quantized glyph lookup key.&dyn SystemFontProvider- Native or deterministic font rasterization provider.
§Returns
&RasterizedGlyph- Cached coverage bitmap and pixel metrics.
Sourcepub fn pack_rgba_atlas(&self) -> PackedGlyphAtlas
pub fn pack_rgba_atlas(&self) -> PackedGlyphAtlas
Source§impl GlyphAtlas
impl GlyphAtlas
pub fn get_revision(&self) -> u64
Trait Implementations§
Source§impl Clone for GlyphAtlas
impl Clone for GlyphAtlas
Source§impl Debug for GlyphAtlas
impl Debug for GlyphAtlas
Auto Trait Implementations§
impl Forget for GlyphAtlas
impl Freeze for GlyphAtlas
impl Move for GlyphAtlas
impl RefUnwindSafe for GlyphAtlas
impl Send for GlyphAtlas
impl Sync for GlyphAtlas
impl Unpin for GlyphAtlas
impl UnsafeUnpin for GlyphAtlas
impl UnwindSafe for GlyphAtlas
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