Skip to content
pixi-silk
GitHub repository
Function

fitText

import { fitText } from 'pixi-silk/ui/panel';
function fitText(
   label: SilkText, 
   text: string, 
   width: number
): boolean;

Sets label to text, cut with three dots to fit width. Returns true when it was cut. Long names in narrow rows stay on one line.

Parameters#

ParameterType
labelSilkText
textstring
widthnumber

Returns#

boolean