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

Zack Weinberg wrote:
> I talked this over with a friend who's a web designer, and we came up
> with, um, a proposal replacing all the rules for font-weight.  It
> happens to make Text D bold in the case where there are only two
> weights in the font.  It goes like this:
>  - The effect of font-weight:bolder is to add 100 to the inherited
>    value of font-weight; so normal/400 becomes 500, 500 becomes 600,
>    and so on.
>  - Similarly, font-weight:lighter subtracts 100 from the inherited
>    value.
>  - 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.
>  - We didn't discuss what happens if you apply "lighter" to an
>    inherited value of 100, or "bolder" to an inherited value of 900.
>    I can make a case for having them saturate or for having them
>    just keep incrementing/decrementing but saying that all out-of-range
>    values are equivalent to the limits.
>  - 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.

> Tangentially, I would add that whatever rules are adopted for
> font-weight:bolder/lighter, the WG should make sure to
> apply the same rules to font-stretch:wider/narrower.

Of course.


Received on Wednesday, 27 August 2008 20:59:27 UTC