measureText method
[This documentation is preliminary and is subject to change.]
Returns a CanvasTextMetrics object that contains the width of the specified text.
![]() ![]() |
Syntax
var retval = CanvasRenderingContext2D.measureText(text);Standards information
- HTML Canvas 2D Context, Section 11
Parameters
- text [in]
-
Type: BSTR
The text to measure.
Return value
Type: ObjectThe width of the text, in CSS pixels.
See also
Build date: 2/14/2012

