Skip to content

TextBoxOptions

Options of Surface.textBox.

readonly optional align?: any

Line alignment (default start).


readonly box: Rect

The box the lines are broken into.


readonly optional direction?: any

Paragraph direction.


readonly optional features?: readonly string[]

OpenType features.


readonly font: Font

The font (needs the text module).


readonly optional language?: string

Language (BCP 47).


readonly optional lineHeight?: number

Line height as a factor of the size (default 1.2).


readonly optional overflow?: any

What happens to text that doesn’t fit (default clip; error throws text-overflow).


readonly size: number

Size in points.


readonly optional tag?: Tag

The structure element the box is (as drawing it inside Surface.tag).