Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • Isn't that a lot more heavyweight (with getting the 2d context etc.) than creating a DOM element and specifying css properties for it? Commented Apr 18, 2013 at 14:14
  • 2
    This is a clean approach if you are already using canvas for something. But VERY SLOW. The measureText call alone takes about 8-10 ms (using Chrome). Commented Oct 18, 2013 at 19:45