W3C home > Mailing lists > Public > www-style@w3.org > June 2008

Re: [CSS21] computed value of 'font-weight' is not precisely defined

From: Andrey Mikhalev <amikhal@abisoft.spb.ru>
Date: Mon, 16 Jun 2008 21:45:16 +0400 (MSD)
To: John Daggett <jdaggett@mozilla.com>
cc: www-style@w3.org, "L. David Baron" <dbaron@dbaron.org>
Message-ID: <Pine.LNX.4.63.0806162114310.20470@master.abisoft.spb.ru>


sorry i'm late, but better late...

On Wed, 11 Jun 2008, John Daggett wrote:

> I'm assuming you're talking about the CSS2 spec, not the CSS 2.1 spec:
>
> # Specifies the next weight that is assigned to a font that is darker than
> # the inherited one. If there is no such weight, it simply results in the
> # next darker numerical value (and the font remains unchanged), unless the
> # inherited value was '900', in which case the resulting weight is also
> # '900'.

yes, exactly.

> The wording is simple, the implementation is no less complex.  The 
> problem here is that what weights are available is a function of the 
> font family used and that can't be determined until actual text is 
> rendered.  Hence the need to pass along the relative values in some form 
> until the actual font family is determined.  David's Beijing taxi 
> example illustrates this part of the problem.

> How computed weight is determined needs to be specified so that 
> rendering is consistent across user agents.
>
> That said, I hate this problem because it's an edge case problem for 
> which there is no perfect solution.  So I would prefer a solution that 
> does not involve weird complexity as much as possible.

hmm. note about 'across user-agent' and 'not involve weird complexity':
in my [precious :)] thing embedded into e.g. b&w lcd +
only monospace and sans-serif burned, which implementation
'involve weird complexity'?
CSS2 is easy; CSS2.1 is over-engineering, even going to worse
presentation compatibility.

i cannot understand reason to put 'normative' impl into spec reflecting
mozilla/desktop - specific issues, just after two sentences 
'there is no guarantee', w/o any design rationales and desired behaviour.
agree, css2.1 font-weight is self-contradictory, but not in lines you 
mentioned.

btw, which CSSValue iface supposed to be for such 'computed value'?
and what [...] is DOMString getComputedStyle.fontWeight?

>
> Regards,
>
> John Daggett
> Mozilla Japan
>
>
>
>
Received on Monday, 16 June 2008 17:45:58 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:07 GMT