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

On Wednesday 2009-08-05 01:08 +0000, Ian Hickson wrote:
> On Tue, 4 Aug 2009, L. David Baron wrote:
> > 
> > One more edge case:  I'm not sure how to convert the font-size
> > component in:
> >   ctx.font = "menu";
> > to pixels, since it doesn't really have a font-size component.  For
> > the ctx.font getter, should it stay as-is, should the whole thing be
> > computed, or did you intend to allow system fonts in the first
> > place?
> 
> I didn't think about system fonts. What would you recommend? It seems that 
> computing the whole thing on setting may be the most consistent behaviour.

I think so too, though I haven't had the chance to implement it yet.
(Implementation-wise, I think it may actually mean less work on
setting, and just reusing our computed style code for the getter.)

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/

Received on Tuesday, 11 August 2009 00:58:03 UTC