JavaScripture
Contribute via GitHub Feedback

TextMetrics : Object

Contains sizing information for text drawn in a CanvasRenderingContext2D. Obtained through measureText().

Instance Properties

width : Number  

The width of the text in pixels.

Example:

Run

Results: