Expand description
Text layout and rendering — monospace glyph sequences with rich text support.
TextBlock lays out a string as a grid of per-character glyphs in world or
screen space. Rich text markup [color:r,g,b]text[/color] is supported for
color changes mid-string. A typewriter effect is built in.
Structs§
- Char
Layout - A single character’s layout result.
- Marquee
- Horizontally scrolling marquee text.
- Scrolling
Text - A scrolling text display — think: terminal output, combat log, news ticker.
- Text
Block - A laid-out block of text. Position is the top-left corner in world/screen space.
- Text
Span - A run of text with uniform style.
- Typewriter
Block - A TextBlock with a typewriter reveal effect.
Enums§
Functions§
- parse_
rich_ text - Parses a simple markup string into a list of
TextSpans. - wrap_
text - Word-wrap
textto at mostmax_charsper line.