RunLayout Class @beta
Represents the layout of a single run (text, fraction, or line break) within a line of text. Stores information about the run's position, style, and font within the line. Provides utilities for splitting text runs for word wrapping and converting to result objects.
Methods
| Name | Description | |
|---|---|---|
| canWrap(): this is { source: TextRun } | ||
| split(context: LayoutContext): RunLayout[] | ||
| stringify(): string | Compute a string representation, primarily for debugging purposes. | |
| toResult(): RunLayoutResult | ||
| create(source: Run, context: LayoutContext, cumulativeOverrides: TextStyleSettingsProps): RunLayout Static |
Properties
| Name | Type | Description | |
|---|---|---|---|
| charOffset | number | ||
| denominatorRange | Range2d | undefined | ||
| fontId | number | ||
| justificationRange | Range2d | undefined | ||
| numChars | number | ||
| numeratorRange | Range2d | undefined | ||
| offsetFromLine | { x: number, y: number } | ||
| range | Range2d | ||
| source | Run | ||
| style | TextStyleSettings |
Defined in
Last Updated: 24 October, 2025
Found something wrong, missing, or unclear on this page? Raise an issue in our repo.