Summary #
Implements a shelf-packing glyph texture atlas in the render crate for GPU-accelerated text rendering (Phase 12, issue 4/7).
- Shelf-packing allocator: Packs glyph bitmaps into R8 grayscale texture pages using a horizontal shelf algorithm. Configurable page size (default 1024×1024), with automatic overflow to new pages.
- Font integration: On-demand glyph rasterization via the existing
Font::get_glyph_bitmap()cache. Keyed by(glyph_id, quantized_size). - TexturedQuad API: Given a
TextLine, produces positioned textured quads with UV coordinates and text color — ready for the Metal renderer to consume. - Dirty tracking: Pages track modification state so the GPU texture is only re-uploaded when new glyphs are added.
- 19 unit tests covering allocation, shelf packing, page overflow, dirty flags, UV coordinates, and edge cases.
Implements issue 3mi4366fkxs2g