CanvasTextOptions
import type { CanvasTextOptions } from 'pixi-silk/i18n/canvas';
Options of createCanvasText.
Properties#
| Property | Type | Description | Defined in |
|---|---|---|---|
font? | "system" | CanvasFont | system uses the platform’s fonts: nothing to download, but the look may differ from the baked text. A CanvasFont downloads one font file first. Default system. | packages/pixi-silk/src/i18n/canvas.ts:23 |
range? | number | Distance range of the run sprites in atlas pixels. Effects reach half of it. Default 12. | packages/pixi-silk/src/i18n/canvas.ts:27 |
scale? | number | Atlas pixels per local pixel of the run sprites. Default 2. | packages/pixi-silk/src/i18n/canvas.ts:25 |
worker? | boolean | Draw run sprites in a worker on an OffscreenCanvas, so the main thread does no drawing or distance transform. Ignored where the platform has neither. Default true. | packages/pixi-silk/src/i18n/canvas.ts:32 |