Expand description
Experimental Parley interop: flat LTR lines, resolved-face metrics and
grayscale rasterization, with an opt-in PlatformTextSystem backend.
Re-exports§
Modules§
- typeset
typeset(): a text element shaped by the installed Parley engine.
Structs§
- Face
Registry - Registry of resolved font instances. IDs are stable for this registry’s lifetime and must not be shared with another registry or reused after reset. Retain one registry per text backend, not per line or frame.
- Glyph
Rasterizer - Grayscale outline and color glyph rasterization. Retain one instance per backend/scaler thread. Retains 64 hinting instances and one prepared outline for bounds-to-raster reuse. GPUI’s TextSystem and sprite atlas retain bounds and final glyph bitmaps.
- Paragraph
Layout - One immutable reflow, used for every geometry query in this text revision.
- Paragraph
Options - Paragraph-wide options that affect shaping and line breaking.
- Paragraph
Shape - Immutable shaped data. Caller retains it across width changes; no cache here.
- Parley
Text System - Experimental flat-LTR backend with an opt-in paragraph path. Select fonts before constructing GPUI; GPUI owns the font-metric, line-layout, wrapping and final raster caches.
- Registered
Face - Font bytes, collection index and variation location used by shaping. Rasterization uses this instance rather than resolving a family again.
- Text
Language - A content language parsed from a BCP 47 tag.
- Text
Position - Paragraph-relative UTF-8 position; providers validate and snap cluster edges.
- Variation
Preview - A preview policy for one fixed font descriptor and one bounded set of requested instances. Quantization happens before font resolution, so shaping and rendering see the same coordinates. No font IDs or atlas tiles are evicted.
Enums§
- Text
Direction - Base direction of a paragraph: the order of its lines’ runs and its start edge.
- Visual
Direction - Physical horizontal movement, independent of logical text direction.
Functions§
- line_
layout - Convert a scale-1, start-aligned Parley line into GPUI’s baseline-relative glyph records. The caller owns/reuses Parley’s font and layout contexts.
Type Aliases§
- Layout
Error Handler - Called on an uncached rejected layout, outside the backend lock. No source text is included in the diagnostic. Install before constructing GPUI caches.