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

fantasai <fantasai.lists@inkedblade.net> wrote:
> The spec isn't clear on what exactly happens here, so the CSSWG
> decided to ask web designers what they expect. So far I have two
> responses and they don't match. Anyone else have an opinion? :)

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

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.

zw

Received on Wednesday, 27 August 2008 19:49:05 UTC