Export (0) Print
Expand All

measureText method

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

HTML Canvas 2D Context, Section 11Internet Explorer 9

 

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.

 

 

Community Additions

ADD
Show:
© 2014 Microsoft