AUDIO
Source snapshot · 12 October 2026

API reference / ravet_surface::paragraph

Module paragraph 

Expand description

Bounded local-font paragraph wrapping/shaping on UI or worker threads.

Line opportunities use pinned Unicode 15.0 data; paragraph bidi uses pinned Unicode 16.0 data. This is explicit single-font layout, not system fallback, dictionary breaking, discretionary hyphen insertion, justification or interactive input.

Structs§

ParagraphLayout
Owned immutable output retaining the original text, paragraph options and base direction. Font/shaping style identity remains caller-owned. Preparation allocates and repeatedly shapes candidate lines; backend transient work is not bounded by output caps and must never run in audio callbacks.
ParagraphLine
One logical line and its visual directional runs. The range excludes a hard separator, whose original bytes are retained separately. Baseline Y increases downwards, starting at zero; this is pen layout, not glyph ink bounds.
ParagraphOptions
Explicit finite positive width and baseline spacing, in shaping size units. Whitespace is retained, so trailing-space advance participates in wrapping.
ParagraphRun
One visual run; glyph clusters remain relative to its original logical slice. Glyph positions use run-local coordinates. Place the run after its line’s alignment/baseline offset and this run’s horizontal offset.

Enums§

TextAlignment
Physical horizontal alignment; independent of paragraph writing direction.

Constants§

MAXIMUM_PARAGRAPH_LINES
Maximum complete output lines, including empty lines after hard separators.
MAXIMUM_PARAGRAPH_RUNS
Maximum complete output directional runs across all lines.