pub struct GlyphCaches {
pub(crate) outline_cache: OutlineCache,
pub(crate) hinting_cache: HintCache,
pub(crate) underline_exclusions: Vec<(f64, f64)>,
pub(crate) glyph_atlas: GlyphAtlas,
}Expand description
Caches used for glyph rendering.
Contains renderer-agnostic caches (outline paths, hinting instances) alongside the glyph atlas bitmap cache.
Fields§
§outline_cache: OutlineCacheCaches glyph outlines (paths) for reuse.
hinting_cache: HintCacheCaches hinting instances for reuse.
underline_exclusions: Vec<(f64, f64)>Horizontal spans excluded from “ink-skipping” underlines. Cached to reuse one allocation.
glyph_atlas: GlyphAtlasCaches rasterized glyph bitmaps in atlas pages.
Implementations§
Source§impl GlyphCaches
impl GlyphCaches
Sourcepub fn maintain(&mut self, image_cache: &mut ImageCache)
pub fn maintain(&mut self, image_cache: &mut ImageCache)
Maintains the glyph caches by evicting unused cache entries.
The image_cache must be the same allocator passed to
GlyphRunBuilder::build so that evicted entries are deallocated from
the correct allocator.
Should be called once per scene rendering.
Trait Implementations§
Source§impl Debug for GlyphCaches
impl Debug for GlyphCaches
Source§impl Default for GlyphCaches
impl Default for GlyphCaches
Source§fn default() -> GlyphCaches
fn default() -> GlyphCaches
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GlyphCaches
impl RefUnwindSafe for GlyphCaches
impl Send for GlyphCaches
impl Sync for GlyphCaches
impl Unpin for GlyphCaches
impl UnsafeUnpin for GlyphCaches
impl UnwindSafe for GlyphCaches
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