Re: [css3-fonts] Nested 'bolder' and 'lighter' question

fantasai <fantasai.lists@inkedblade.net> wrote:
> Zack Weinberg wrote:
> >  - Actual font weights are assigned to font-weight numbers by
> >    packing them as closely as possible around normal/400.  Thus, if
> >    your font has two weights (normal and bold) normal is used for
> >    100-400 and bold is used for 500-900; if it has three weights
> >    (normal, bold, extra-bold), normal is 100-400, bold is 500,
> >    extra-bold is 600+; and if it has three weights (light, normal,
> >    bold), they would take 100-300, 400, 500-900 respectively.
> > 
> >  - It may be appropriate to also change font-weight:bold to be
> >    equivalent to font-weight:500.  I'm not sure whether there
> >    are fonts out there with weights intermediate between what we
> >    usually call "normal" and "bold".
> 
> Have you looked at what's spec'd currently? Because it's more
> sophisticated than mapping directly to numbers. It's just undefined
> for the nested 'bolder'/'lighter' case.

Yeah, I have; I'm just not convinced it's better than the "pack them as
closely as possible around 400" rule.  The present wording is trying to
fit all of these constraints simultaneously:

1. The "normal" and "bold" keywords map to fixed numeric weights.

2. Those fixed numeric weights correspond to the underlying font weights
   intended as the default and the simple boldface, respectively.
   (This requires that those numbers are more than 100 apart, because
   some fonts have intermediate weights.)

3. The "lighter" and "bolder" keywords, except possibly when "lighter"
   is nested inside "bolder" or vice versa (that being the undefined
   case you originally brought up), will always change the visible
   weight when there is another underlying font weight available in
   that direction.

4. The "lighter" and "bolder" keywords make a simple arithmetic change
   to the inherited numeric weight.  (This isn't overtly in the wording
   but my web designer friend took it as a presupposition; from my
   implementor's perspective, anything else would be substantially more
   difficult, q.v. Moz bug 93725.)

I think one of these will have to give in order to achieve defined
behavior in all cases; I think #3 is the most important rule from the
designer's perspective, and #4 from the implementor's; thus my
proposal, which abandons #2 in some cases (when a font has weights
bolder than "bold" but not intermediate between "normal" and "bold").
Unfortunately, I'd guess that this is a common case, and this is why I
suggested changing "bold" to map to 500 instead of 700 - which would
break normal/semibold/bold, but we can't have it both ways...

zw

Received on Wednesday, 27 August 2008 21:39:14 UTC