Skip to content
pixi-silk
GitHub repository
Interface

CanvasTextOptions

import type { CanvasTextOptions } from 'pixi-silk/i18n/canvas';

Options of createCanvasText.

Properties#

PropertyTypeDescriptionDefined in
font?"system" | CanvasFontsystem 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?numberDistance range of the run sprites in atlas pixels. Effects reach half of it. Default 12.packages/pixi-silk/src/i18n/canvas.ts:27
scale?numberAtlas pixels per local pixel of the run sprites. Default 2.packages/pixi-silk/src/i18n/canvas.ts:25
worker?booleanDraw 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