Expand description
On-canvas text via glyphon (ADR-0009), behind the non-default text feature.
A small, reusable seam: the frontend queues a list of positioned TextRuns
each frame; TextLayer shapes them and draws them in a second render pass
that loads (does not clear) the scene, so text composites over the visual in
the same frame. It lives in core — not the standalone — because that is
where the wgpu device/queue/surface live (ADR-0001: the frontend never sees a
backend); the text feature, not a crate boundary, keeps it out of the
plugin/default build. First consumer is Plan 0008’s browse overlay; Plan
0009’s HUD reuses the same seam rather than a throwaway.
Structs§
- Text
Layer - Owns glyphon’s font/atlas/renderer state plus a reusable buffer pool, and the
per-frame queue of runs. One instance per
super::Renderer. - TextRun
- A single positioned run of text the frontend queues for the current frame.
Coordinates are top-left device pixels (matching the diagnostics overlay);
coloris linear RGBA in0.0..=1.0. The public seam the overlay and a later HUD both fill.