Skip to main content

euv_core/font/atlas/
struct.rs

1use super::*;
2
3/// Memoized glyph rasterization cache shared across frames to avoid redundant glyph work.
4#[derive(Clone, Data, Debug, Default)]
5pub struct GlyphAtlas {
6    /// Cached rasterized glyph bitmaps indexed by quantized `GlyphKey`.
7    #[get(pub(crate))]
8    #[get_mut(pub(crate))]
9    #[set(pub(crate))]
10    pub(crate) glyphs: HashMap<GlyphKey, RasterizedGlyph>,
11    /// Monotonic counter incremented when new glyphs are inserted for GPU texture sync.
12    #[get(type(copy))]
13    #[get_mut(pub(crate))]
14    #[set(pub(crate))]
15    pub(crate) revision: u64,
16}