Skip to content
pixi-silk
GitHub repository
Interface

ShapedTextOptions

import type { ShapedTextOptions } from 'pixi-silk/i18n/shaper';

Options of createShapedText.

Properties#

PropertyTypeDescriptionDefined in
fallback?DynamicTextProviderDraws values the font has no glyph for (emoji, other scripts), such as the provider of createCanvasText from pixi-silk/i18n/canvas. Without it they draw as the font’s missing-glyph box.packages/pixi-silk/src/i18n/kb/text.ts:27
fontstring | ArrayBuffer | Uint8Array<ArrayBufferLike> | URLThe TrueType font to shape and draw with: bytes or a URL. Use the file the bundle was baked from, so slots match the baked text. CFF (.otf) fonts are not supported.packages/pixi-silk/src/i18n/kb/text.ts:15
range?numberDistance range of the run sprites in atlas pixels. Effects reach half of it. Default 12.packages/pixi-silk/src/i18n/kb/text.ts:21
scale?numberAtlas pixels per local pixel of the run sprites. Default 2.packages/pixi-silk/src/i18n/kb/text.ts:19
wasm?KbWasmSourceThe WebAssembly module. Default kb.wasm next to this module.packages/pixi-silk/src/i18n/kb/text.ts:17