RuntimeShaper
import type { RuntimeShaper } from 'pixi-silk/i18n';
A runtime shaper for one font file.
Properties#
| Property | Modifier | Type | Description | Defined in |
|---|---|---|---|---|
fontHash | readonly | string | 64-bit FNV-1a hash of the font file, 16 hex digits, as fontHash computes it. | packages/pixi-silk/src/i18n/shaper.ts:25 |
unitsPerEm | readonly | number | Units per em of the font. | packages/pixi-silk/src/i18n/shaper.ts:27 |
Methods#
shape()#
shape(text: string, options: {
direction: "ltr" | "rtl";
features?: string[];
language?: string;
script?: string;
}): ShapedGlyphOut[];
Shapes a run of one direction and script.
Parameters#
| Parameter | Type |
|---|---|
text | string |
options | { direction: "ltr" | "rtl"; features?: string[]; language?: string; script?: string; } |
options.direction | "ltr" | "rtl" |
options.features? | string[] |
options.language? | string |
options.script? | string |