Skip to content
pixi-silk
GitHub repository
Interface

TextInline

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

A box for an inline object, as SilkTextStyle.inlines lists them. Sizes are in local units.

Properties#

PropertyTypeDescriptionDefined in
align?InlineAlignVertical placement. middle centres the box on the middle of capital letters and digits, the place for icons next to numbers. In text with neither, such as Arabic, Chinese or lower case, it centres on the middle of the letters. center centres it on the line box. baseline puts its bottom on the baseline, top and bottom align it with the font’s ascent and descent. Default middle.packages/pixi-silk/src/text/SilkText.ts:153
heightnumberHeight of the object.packages/pixi-silk/src/text/SilkText.ts:145
margin?numberSpace left and right of the box. Default 0.packages/pixi-silk/src/text/SilkText.ts:157
offsetY?numberMoves the box down (positive) or up after alignment. Default 0.packages/pixi-silk/src/text/SilkText.ts:155
widthnumberWidth of the object.packages/pixi-silk/src/text/SilkText.ts:143