W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2010

[whatwg] Adding descent to TextMetrics

From: Charles Pritchard <chuck@jumis.com>
Date: Thu, 08 Jul 2010 13:49:41 -0700
Message-ID: <4C3639E5.6090600@jumis.com>

We've been doing some work with html line boxes; mainly, mixed font 
styles in a text area,
using the HTML Canvas element. While Canvas fillText does have the 
textBaseline attribute,
in order to set the current alignment, it does not provide enough 
metrics through the measureText
function for us to exploit the textBaseline attribute across fonts 
(sizes and styles).

Adding descent, to the measureText object would allow us to do more.
Currently, TextMetrics only returns "width". I'm proposing adding 
"descent" to that list.

-Charles
Received on Thursday, 8 July 2010 13:49:41 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:59:24 UTC