measureText method

Returns a CanvasTextMetrics object that contains the width of the specified text.

 

Syntax

ICanvasTextMetrics retVal = object.measureText(text);

Parameters

  • text [in]
    Type: string

    The text to measure.

Standards information

Remarks

To get accurate measurements across different browsers, set the font and styles for text before getting your measurement. Measurements might still differ between browsers.