UniTextBuffers
Container for all intermediate and final buffers used during text processing.
Remarks
EnsureRentBuffers before processing and EnsureReturnBuffers when done.Gets or creates typed attribute data for the specified key, incrementing its reference count. The matching ReleaseAttributeData call decrements; the underlying data is freed only when the count reaches zero. This lets multiple modifier instances safely share one keyed channel — destroying one no longer pulls the buffer out from under the rest.
Gets or creates a PooledArrayAttribute<T> and clears it to codepoint count. Combines GetOrCreateAttributeData + EnsureCountAndClear into a single call.
public PooledBuffer<int> codepointsParsed Unicode codepoints from the input text.
public PooledBuffer<TextRun> runsText runs before shaping (segmented by script, direction, font).
public PooledBuffer<ShapedRun> shapedRunsShaped runs with glyph ranges and metrics.
public PooledBuffer<ShapedGlyph> shapedGlyphsShaped glyphs with glyph IDs, advances, and offsets.
public PooledBuffer<float> cpWidthsWidth of each codepoint for line breaking calculations.
public PooledBuffer<LineBreakType> breakOpportunitiesLine break types per codepoint (UAX #14).
public PooledBuffer<bool> graphemeBreaksGrapheme cluster boundaries per codepoint (UAX #29).
public PooledBuffer<TextLine> linesComputed text lines after line breaking.
public PooledBuffer<ShapedRun> orderedRunsRuns reordered for visual display within each line.
public PooledBuffer<PositionedGlyph> positionedGlyphsFinal positioned glyphs ready for rendering.
public PooledBuffer<TextRange> segmentBreaksSegment-level line break opportunities in codepoint space; filled by modifiers in the Shaped phase, consumed by line breaking. Text between consecutive entries wraps as a unit: it either fits entirely on the current line or starts a fresh one, and the entry's range — the delimiter — collapses when the break is taken on it (its codepoints stay in the line range but produce no glyphs and no width), the way trailing whitespace hangs at word-level breaks. A unit wider than the box wraps inside itself, and its lines accept no further units. A zero-length entry is a pure boundary with nothing to collapse.
public PooledBuffer<uint> virtualCodepointsVirtual codepoints for synthesized glyphs (e.g., modifiers).
public PooledBuffer<VirtualGlyph> virtualGlyphsPre-shaped glyph ids (with font) modifiers request for atlas rasterization when the id comes from OpenType shaping (GSUB), not a 1:1 codepoint lookup. Used by shaped ruby.
public PooledBuffer<PositionedGlyph> virtualPositionedGlyphsVirtual positioned glyphs injected by modifiers (ellipsis, list markers). Separate from positionedGlyphs to not affect hit testing / selection.
public PooledBuffer<byte> bidiLevelsBiDi embedding levels per codepoint (UAX #9).
public PooledBuffer<UnicodeScript> scriptsUnicode script per codepoint (UAX #24).
public PooledBuffer<float> startMarginsStart margins per codepoint (for list items, indentation).
public PooledBuffer<float> perLineAdvancesAdvance width per line for alignment calculations.
public PooledBuffer<float> perLineOverExtra leading reserved on each line's over (above) / under (below) side for tall boundary content such as over/under ruby; index 0 and the last entry double as the block's top / bottom reserve.
public PooledBuffer<float> perLineUnderExtra leading reserved on each line's over (above) / under (below) side for tall boundary content such as over/under ruby; index 0 and the last entry double as the block's top / bottom reserve.
public TextDirection baseDirectionThe resolved base paragraph direction.
