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

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

From: L. David Baron <dbaron@dbaron.org>
Date: Sat, 1 Aug 2009 07:54:40 -0700
To: Ian Hickson <ian@hixie.ch>
Cc: Boris Zbarsky <bzbarsky@MIT.EDU>, Simon Pieters <simonp@opera.com>, "public-html@w3.org" <public-html@w3.org>
Message-ID: <20090801145440.GA8897@pickering.dbaron.org>
On Saturday 2009-08-01 08:06 +0000, Ian Hickson wrote:
> Actually, not right. You should use the canvas as the parent, but if 
> there's a parse error you should leave the font unchanged. Sorry, I didn't 
> fully think through what you had written.

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
  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'.

Note that '10px sans-serif' shows up in two different places in this
description, and the difference between Firefox's current behavior
and this is (1) to introduce the first of those two places (we now
only have one) and (2) forbid inherit and initial.


L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/
Received on Saturday, 1 August 2009 14:55:27 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 29 October 2015 10:15:49 UTC