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

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

From: John Daggett <jdaggett@mozilla.com>
Date: Wed, 11 Jun 2008 18:26:30 -0700 (PDT)
To: Andrey Mikhalev <amikhal@abisoft.spb.ru>
Cc: www-style@w3.org, "L. David Baron" <dbaron@dbaron.org>
Message-ID: <21646278.399711213233990895.JavaMail.root@cm-mail02.mozilla.org>

> imo both cases do not achieve desired effect, i.e. prevent weight
> inversion on font-family swing. if you won't bother with it, just return
> back to pretty simple CSS2 definition.

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

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.

> and i think w/o 'used font-family' thing on computation stage you cannot
> solve the problem; then no reason to keep neither sequence nor count of
> relative values.
> 
> so, why particular [weird?] impl must be freezed in spec?

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.

Regards,

John Daggett
Mozilla Japan
Received on Thursday, 12 June 2008 01:27:12 GMT

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