Calculate text to fit within a box, and optionally wrap the text into several lines.
wrapText(textProperties: IFontStyle, text: string, maxWidth: number): string
- The text properties for which to calculate the width.
- The text for which to calculate the width.
- The maximum available width for the text.
- An array containing the original text divided into several lines.
- Each line text width is no longer than the maxWidth value.