Skip to content
pixi-silk
GitHub repository
Interface

LayoutOptions

import type { LayoutOptions } from 'pixi-silk/text';

What layoutText needs besides the text. Sizes are in local units.

Properties#

PropertyTypeDescriptionDefined in
align?TextAlignAlignment of the lines inside the widest line. Default left.text/layout.ts:23
ascentnumberFont ascent: baseline to the top of the line box.text/layout.ts:15
breakWords?booleanBreaks words that do not fit on a line of their own. Default false.text/layout.ts:29
descentnumberFont descent: baseline to the bottom of the line box.text/layout.ts:17
kerning?booleanApplies the font’s kerning. Default true.text/layout.ts:33
letterSpacing?numberExtra space after each character. Default 0.text/layout.ts:19
lineHeight?numberDistance between baselines. Default ascent + descent.text/layout.ts:21
tabularNumbers?booleanGives the digits 0 to 9 one width, so numbers do not jitter as they change. Default false.text/layout.ts:31
wordWrap?booleanBreaks lines longer than wordWrapWidth at spaces. Default false.text/layout.ts:25
wordWrapWidth?numberLine width that wordWrap breaks at. Default 100.text/layout.ts:27