Skip to main content

Module text

Module text 

Source
Expand description

Text rendering infrastructure.

This module provides glyph rasterization, atlas generation, and caching for rendering text with TrueType/OpenType fonts.

§Architecture

  1. Rasterizer (rasterizer) - wraps fontdue to produce per-glyph grayscale bitmaps with metrics.
  2. Glyph Atlas (glyph_atlas) - packs rasterized glyphs into a single RGBA8 texture atlas with UV lookup.
  3. Atlas Cache (atlas_cache) - caches generated atlases by (font handle, pixel size) to avoid repeated rasterization.

Re-exports§

pub use atlas_cache::GlyphAtlasCache;
pub use glyph_atlas::GlyphAtlas;
pub use glyph_atlas::GlyphInfo;
pub use glyph_atlas::UvRect;
pub use rasterizer::GlyphMetrics;
pub use rasterizer::RasterizedGlyph;

Modules§

atlas_cache
Glyph atlas caching layer.
glyph_atlas
Glyph atlas generation.
rasterizer
Glyph rasterization wrapper around fontdue.