[whatwg] Canvas lack of drawString method
David Hyatt
hyatt at apple.com
Wed Oct 25 03:16:07 PDT 2006
Yeah I see what you mean. In addition to a drawText you probably
want something like a metricsForText API that would tell you the
extent of the string and the font metrics (line height, ascent,
descent, baseline).
dave
On Oct 25, 2006, at 3:10 AM, James Graham wrote:
> David Hyatt wrote:
>> I'm very reluctant to expose font metrics and information (yet).
>> I think once you start getting into specifying fonts, you open up
>> a can of worms that would make this sort of API addition a lot
>> harder.
>
> I still believe that any api that does not allow the author to
> query the size of the text bounding-box[1], i.e. the overall width
> and height of the box enclosing the text fragment, is useless for
> many of the use cases presented so far e.g. figure labelling as,
> without this information, it is impossible to ensure that adjacent
> text fragments do not overlap.
>
> [1] I mean that in a non-technical sense
>
> --
> "Eternity's a terrible thought. I mean, where's it all going to end?"
> -- Tom Stoppard, Rosencrantz and Guildenstern are Dead
More information about the whatwg
mailing list