I've never seen it explained why HTML5 canvas measureText() can only measure width, and not height, or baseline, ascent, descent, or the usual values that Windows, OSX, Linux, Java2D, and most platforms support. The method is practically useless for laying out text properly,
No answer, but somewhat related: TeX linebreak algorithm in Canvas. http://www.bramstein.com/project... - Nick Lothian