Skip to main content

glifo/atlas/
mod.rs

1// Copyright 2026 the Vello Authors
2// SPDX-License-Identifier: Apache-2.0 OR MIT
3
4//! Glyph bitmap atlas cache for efficient text rendering.
5//!
6//! This module provides a glyph bitmap atlas cache that:
7//! - Rasterizes glyphs once and reuses the bitmaps for subsequent draws
8//! - Packs glyph bitmaps into shared atlas images using guillotiere
9//! - Uses stable glyph keys for reliable cache hits
10//! - Supports multiple atlas pages for scalability
11//! - Implements simple age-based eviction
12//!
13//! The core type is [`GlyphAtlas`], which handles allocation, eviction,
14//! and pending-command queues.
15
16pub mod cache;
17pub mod commands;
18pub mod key;
19mod region;
20
21#[cfg(all(debug_assertions, feature = "std"))]
22pub use cache::GlyphCacheStats;
23pub use cache::{
24    AtlasConfig, GLYPH_PADDING, GlyphAtlas, GlyphCacheConfig, ImageCache, PendingBitmapUpload,
25    PendingClearRect,
26};
27pub use commands::{AtlasCommand, AtlasCommandRecorder, AtlasPaint};
28pub use key::GlyphCacheKey;
29pub use region::{AtlasSlot, RasterMetrics};