Prowl.Quill’s rich text system lets you embed formatting and animation directives directly in a string using markup tags. The parser produces aDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ProwlEngine/Prowl.Quill/llms.txt
Use this file to discover all available pages before exploring further.
QuillRichText object that holds a pre-built glyph layout; drawing it each frame with an updated currentTime value brings animations to life — wavy text, typewriter reveals, colour pulses, and rainbow cycling all update automatically. Because layout is computed once at creation time, drawing is inexpensive and the same object can be safely reused across hundreds of frames.
QuillRichText struct
Size is in the same logical units as all other canvas coordinates. VisibleText strips every tag, making it easy to copy text to the clipboard or feed it to a screen reader. Reset() resets the internal animation anchor so effects like typewriter replay from the beginning on the next draw call.
Creating rich text
source, performs glyph layout at the current FramebufferScale, and returns a QuillRichText ready to draw. All dimensional fields in settings are specified in logical units; the canvas scales them to physical pixels internally for HiDPI output.
Size, and discards it. If you also need to draw the text, use CreateRichText + QuillRichText.Size instead to avoid parsing twice.
Drawing rich text
position (logical units). currentTime is in seconds and drives all time-based effects. The optional origin parameter is a normalised anchor: (0, 0) is the top-left of the text block, (0.5f, 0.5f) centres it, and (1, 1) anchors it at the bottom-right.
currentTime is the heartbeat of every animation effect. Pass DateTime.UtcNow.TimeOfDay.TotalSeconds or your game engine’s accumulated time to keep animations running smoothly. The first draw call after CreateRichText (or after Reset()) anchors the animation start to that currentTime value, so typewriter effects always begin at zero regardless of the absolute time you pass.Hit-testing links
true and sets href when point (in logical units) falls inside a <link> span. Pass the same position you used in DrawRichText as renderOffset. Set useScissor to true to automatically return false for points outside the current scissor region — useful for scrollable panels.
RichTextLayoutSettings
All fields listed below are in logical units unless noted as unitless ratios or speeds.Font selection
Font selection
| Field | Type | Description |
|---|---|---|
RegularFont | FontFile | Default body font |
BoldFont | FontFile | Font used by <b> |
ItalicFont | FontFile | Font used by <i> |
BoldItalicFont | FontFile | Font used by <b><i> |
MonoFont | FontFile | Font used by <mono> |
Layout
Layout
| Field | Type | Description |
|---|---|---|
PixelSize | float | Base font size in logical units |
LineHeight | float | Multiplier applied to line height |
LetterSpacing | float | Extra spacing between glyphs |
WordSpacing | float | Extra spacing between words |
TabSize | int | Width of a tab stop in spaces |
MaxWidth | float | Wrap width (0 = no wrapping) |
WrapMode | WrapMode | Word / character wrapping strategy |
Alignment | TextAlignment | Left / Centre / Right |
DefaultColor | FontColor | Base text colour |
Shake effect
Shake effect
| Field | Description |
|---|---|
DefaultShakeAmp | Amplitude of the random per-character displacement (logical units) |
DefaultShakeFreq | How many shake updates per second |
Wave effect
Wave effect
| Field | Description |
|---|---|
DefaultWaveAmp | Vertical amplitude of the sine wave (logical units) |
DefaultWaveFreq | Frequency of the wave cycle |
DefaultWavePhase | Phase offset between adjacent characters |
Rainbow effect
Rainbow effect
| Field | Description |
|---|---|
DefaultRainbowSpeed | How fast hue cycles (unitless) |
DefaultRainbowSpread | Hue spread across the text block |
DefaultRainbowSat | HSV saturation (0–1) |
DefaultRainbowValue | HSV value / brightness (0–1) |
Pulse, fade, jitter, and typewriter effects
Pulse, fade, jitter, and typewriter effects
| Field | Description |
|---|---|
DefaultPulseSpeed | Alpha/brightness pulse rate |
DefaultPulseAmp | Pulse amplitude (relative scale, not pixels) |
DefaultFadeSpeed | Fade-in speed |
DefaultJitterAmp | Random per-character jitter amplitude (logical units) |
DefaultJitterFreq | Jitter update rate |
DefaultTypewriterSpeed | Characters revealed per second |
DefaultTypewriterFadeIn | Fade-in duration for each revealed character |
Available tags
- Formatting
- Motion effects
- Colour effects
- Reveal effects
| Tag | Effect |
|---|---|
<b>…</b> | Bold text (uses BoldFont) |
<i>…</i> | Italic text (uses ItalicFont) |
<mono>…</mono> | Monospace text (uses MonoFont) |
<color=#RRGGBB>…</color> | Hex colour override |
<size=N>…</size> | Absolute font size in logical units |
Complete example
Configure layout settings
Fill in at minimum a
RegularFont and PixelSize. All other fields use sensible defaults.Measuring without drawing
size to centre a tooltip, size a background panel, or decide whether to scroll. Note that MeasureRichText creates and discards a full layout internally, so if you intend to draw the text too, call CreateRichText instead and read QuillRichText.Size.