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

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 UTC