LogoPixi’VN
pixi-jsFunctions

Function: measureHtmlText()

> measureHtmlText(text, style, fontStyleCSS?, htmlTextRenderData?): Size

Defined in: node_modules/pixi.js/lib/scene/text-html/utils/measureHtmlText.d.ts:14

Internal

Measures the HTML text without actually generating an image. This is used to calculate the size of the text.

Parameters

text

string

The text to measure

style

HTMLTextStyle

The style to use

fontStyleCSS?

string

The font css to use

htmlTextRenderData?

HTMLTextRenderData

The HTMLTextRenderData to write the SVG to

Returns

Size

  • The size of the text