TextMeasurer
import type { TextMeasurer } from 'pixi-silk/text';
Widths of characters at the size being laid out, in local units.
Methods#
advance()#
advance(char: string): number;
Advance width of one character, without kerning or letter spacing.
Parameters#
| Parameter | Type |
|---|---|
char | string |
Returns#
number
kerning()#
kerning(a: string, b: string): number;
Extra space between two characters (negative pulls them together).
Parameters#
| Parameter | Type |
|---|---|
a | string |
b | string |
Returns#
number