Interfaces

GlyphPosition

Where a point in paragraph coordinates falls, as an insertion point.

Properties

index

index: number;

The insertion point, as a UTF-8 byte offset into the string. Always where a caret goes - never a glyph index to advance past.


leading

leading: boolean;

Which half produced it: true when the point fell on the leading half of the glyph that starts at index, false when it fell on the trailing half of the glyph that ends there, or past the end of the line. That is the affinity a caret needs at a wrap, where one offset has two positions.


line

line: number;

Which line the point resolved to, after clamping.

On this page