Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Implement what-wg's new TextMetrics Interface #163

Open
raweden opened this Issue · 2 comments

3 participants

@raweden

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
tj commented

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

@c-spencer

Started work in a branch on my fork:

c-spencer@e06ed99

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
Something went wrong with that request. Please try again.