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

> 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 UTC