SilkTextStyle
import type { SilkTextStyle } from 'pixi-silk/text';
The look of a SilkText. Every field can change later through its setter or SilkText.set.
Extended by#
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
aaWidth? | number | Width of the anti-aliasing ramp in device pixels. Larger is softer. Default 1. | text/SilkText.ts:94 |
align? | TextAlign | Alignment of the lines. Default left. | text/SilkText.ts:76 |
breakWords? | boolean | Breaks words that are wider than a line on their own. Default false. | text/SilkText.ts:82 |
dilate? | number | Grows (positive) or thins (negative) the glyphs, in local units. Default 0. | text/SilkText.ts:92 |
fill? | ColorSource | Gradient | A colour, or a pixi-silk gradient over the text box (linear, radial and conic). Default white. | text/SilkText.ts:70 |
fontFamily? | string | CSS font family list. Default system-ui, -apple-system, Segoe UI, Roboto, sans-serif. | text/SilkText.ts:62 |
fontSize? | number | Font size in local units. Default 16. | text/SilkText.ts:64 |
fontStyle? | "normal" | "italic" | "oblique" | normal, italic or oblique. Default normal. | text/SilkText.ts:68 |
fontWeight? | string | number | CSS font weight. Default 400. | text/SilkText.ts:66 |
kerning? | boolean | Applies the font’s kerning (measured from Canvas). Default true. | text/SilkText.ts:86 |
letterSpacing? | number | Extra space after each character, in local units. Default 0. | text/SilkText.ts:72 |
lineHeight? | number | Distance between baselines. 0 uses the font’s ascent plus descent, like PixiJS Text. Default 0. | text/SilkText.ts:74 |
outline? | TextOutline | null | A line around the glyphs. null for none. Default null. | text/SilkText.ts:88 |
shadow? | TextShadow | null | A drop shadow or glow under the glyphs. null for none. Default null. | text/SilkText.ts:90 |
tabularNumbers? | boolean | Gives the digits one width, like font-variant-numeric: tabular-nums, for readouts. Default false. | text/SilkText.ts:84 |
wordWrap? | boolean | Breaks lines at spaces to fit wordWrapWidth. Default false. | text/SilkText.ts:78 |
wordWrapWidth? | number | Width that wordWrap breaks lines at, in local units. Default 100. | text/SilkText.ts:80 |