Implement what-wg's new TextMetrics Interface #163

raweden opened this Issue Apr 29, 2012 · 2 comments

3 participants


What-WG recently update their specifications for the TextMetrics object. In the specification calls to ctx.measureText() now returns more detailed information about the text measured which also describes the height of the bounding box as well as measurement that are essential for drawing multi-line text, as it provides information that could be used to compute the vertical distance of the next line to be drawn.

What-WG's TextMetrics Interface (updated in April 2012)

tj commented Apr 29, 2012

I saw that, it would be great to get these in


Started work in a branch on my fork:


I'd already exposed some of these properties in the previous fork, but didn't conform to the new TextMetrics API.

I'm not sure how possible support for hangingBaseline, ideographicBaseline, fontBoundingBoxAscent or fontBoundingBoxDescent is. May need to switch to pango to support that (though that would be good as pango would enable glyph-fallback I think?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment