API reference
Every public class, method, and event in @codexo/exojs. Generated from source.
interfaceTextLineMetrics
@codexo/exojs / rendering / stable
One laid-out line, in the same local space as GlyphPlacement.
7
props
0
methods
0
events
Import
import { TextLineMetrics } from '@codexo/exojs'One laid-out line, in the same local space as GlyphPlacement.
Properties7
count: numberHow many glyphs this line placed. Zero for an empty line.
sourceEnd: numberUTF-16 offset one past this line's content. Whitespace a wrap dropped and characters an ellipsis replaced lie outside the range.
sourceStart: numberUTF-16 offset in the laid-out string where this line's content starts. The index space is the string handed to layoutText, before whitespace preprocessing and wrapping. This is what maps a caret or a selection onto a line, and it is the only thing that can: a soft wrap splits one string into several lines with no character to mark the break.
start: numberIndex of this line's first glyph in placements.
width: numberAdvance width of the line, with no trailing letter spacing. For a justified line this is the width AFTER justification (equal to the paragraph's widest line), not the line's natural pre-justify width.
x: numberPen origin of the line's first glyph, so the alignment offset is included.
y: numberTop of this line's box.
Source