W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2008

[whatwg] Text APIs on <canvas>

From: Ian Hickson <ian@hixie.ch>
Date: Wed, 7 May 2008 20:01:10 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0805071958410.9075@hixie.dreamhostps.com>
On Wed, 7 May 2008, Tim Johansson wrote:
> On Tue, 06 May 2008 05:10:41 +0200, Ian Hickson <ian at hixie.ch> wrote:
> > I have introduced the following APIs:
> > 
> >    context.font
> >    context.textAlign
> >    context.textBaseline
> >    context.fillText()
> >    context.strokeText()
> strokeText more or less requires a scalable font, which is not available 
> in all fonts (and frequently not in mobile phones). I cannot see any 
> comments on what should happen when the specified font is not capable of 
> generating a stroke. I guess doing a fill instead is the only sensible 
> thing to do (as the author has no way of knowing which fonts are 
> available and/or scalable and it's bad if text disappears).
> Stroking text is complicated as it is generally less common to have 
> support for it in the font library. I would prefer to see stroking 
> removed from the spec as it will not work well with all fonts/devices.

The idea is that only scalable (vector) fonts should be used, since 
otherwise things will quickly look ugly. I've made the spec require this.

Going forward the spec is likely to require effects such as adding text to 
paths, which will require vector data for all fonts used anyway. I don't 
want to mislead implementators into thinking bitmap fonts are in any way 
an option in this day and age.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Wednesday, 7 May 2008 13:01:10 UTC

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