Expand description
Stroked / outlined text rendering (M-TEXT.7 / AUT-81).
Text that has to stay readable over a busy screen recording needs a high-contrast outline. The standard CSS-style technique — stamp the rendered text texture multiple times in the stroke color at small offsets around a center, then stamp the fill color on top — works without a shader change.
Output of stroked_text_sprites is a Vec<Sprite> ready to be
attached to a crate::Container. The container’s transform
handles position / scale; offsets are emitted in local NDC so
the container scale doesn’t break stroke geometry.
Structs§
- Stroked
Text Layer - Builder for a stroked-text composition.
Constants§
- STROKE_
OFFSETS 🔒 - Eight unit-vectors at 45° spacing — the offsets used to stamp the stroke ring. More directions = smoother edges but more sprite nodes per stroke.
Functions§
- stroked_
text_ sprites - Produce a list of sprites that, when attached to a container,
render the given text-texture with
fillinterior andstrokeoutline at the configuredstroke_width_ndc.