fitText()
pixi-wheels / index / fitText
Function: fitText()
function fitText(
text: Text,
box: Size,
options?: FitOptions & {
minFontSize?: number;
}
): number;
Defined in: utils/fit.ts:66
Fit a Text by lowering its font size instead of scaling its transform, so
glyphs stay sharp. Leaves the scale at 1. Returns the font size it settled
on. Up to four measure passes; minFontSize (default 6) is the floor.
Parameters#
| Parameter | Type |
|---|---|
text | Text |
box | Size |
options | FitOptions & { minFontSize?: number; } |
Returns#
number