API reference

Every public class, method, and event in @codexo/exojs. Generated from source.

I

interfaceTextLayoutResult

@codexo/exojs / rendering / stable

Result of a full text layout pass: quad placements plus both extents. Text has two honest sizes and they are not interchangeable. The advance is what a layout wants - it answers "how much room does this string take up in the flow". The ink is what the GPU wants - it answers "which rectangle do these glyphs actually cover", padding, outline reach and all.

4
props
0
methods
0
events
Import
import { TextLayoutResult } from '@codexo/exojs'

Result of a full text layout pass: quad placements plus both extents.

Text has two honest sizes and they are not interchangeable. The advance is what a layout wants - it answers "how much room does this string take up in the flow". The ink is what the GPU wants - it answers "which rectangle do these glyphs actually cover", padding, outline reach and all.

Properties4
Advance extent - where the cursor ends up. Width is the widest line's advance (letterSpacing and kerning included, no trailing gap), height is lineCount * (fontSize * lineHeight + leading). This is the measure a caller wants for layout, panel sizing and caret placement.
ink: { height: number; width: number; x: number; y: number }
Ink extent - the union of the glyph quads, in the same local space as placements. Carries SDF padding and therefore outline/shadow reach, and its minimum is not necessarily zero. This is the node's local bounds.
One entry per laid-out line, in order, including lines that placed no glyph at all. A caret or a hit test needs the lines a string broke into, which the placement array alone cannot answer: a line break places no glyph, and an empty line places nothing.
Source