W3C home > Mailing lists > Public > public-html@w3.org > August 2009

Re: canvas text: ctx.font='inherit'

From: Ian Hickson <ian@hixie.ch>
Date: Sat, 1 Aug 2009 21:30:54 +0000 (UTC)
To: "L. David Baron" <dbaron@dbaron.org>
Cc: Boris Zbarsky <bzbarsky@MIT.EDU>, Simon Pieters <simonp@opera.com>, "public-html@w3.org" <public-html@w3.org>
Message-ID: <Pine.LNX.4.62.0908012129090.28566@hixie.dreamhostps.com>
On Sat, 1 Aug 2009, L. David Baron wrote:
> 
> So what you're saying is that we should compute the font as though
> the text were on an element with the following three CSS
> declarations:
>   font: 10px sans-serif;
>   font: /* as specified, except with 'inherit' or 'initial' forbidden */;
>   line-height: normal;
> and that that element should interpret relative values as though its
> parent were the canvas, unless the canvas is not in the DOM tree, in
> which case relative values should be relative to something whose
> font is '10px sans-serif'.

No, because that would still fail for this:

 context.font = '20px serif';
 content.font = 'invalid'; // or 'inherit' or 'initial'
 assert(content.font == '20px serif');

-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Saturday, 1 August 2009 21:31:31 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 9 May 2012 00:16:43 GMT