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

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

From: Dave Singer <singer@apple.com>
Date: Wed, 27 Aug 2008 14:09:22 -0700
Message-Id: <p06240846c4db728a2253@[17.202.35.52]>
To: Zack Weinberg <zweinberg@mozilla.com>, W3C Emailing list for WWW Style <www-style@w3.org>

At 12:47  -0700 27/08/08, Zack Weinberg wrote:
>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".

yes, semi-bold does exist in some fonts.

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

I agree that we need to appeal to broader general principles to 
answer the question.

The un-answerable question in the example is "is it more important to 
the designer/author that D be different from B or from C?  That is, 
should it be normal (different from C) or bold (different from B)?"

This cannot be answered.  We have to look at more general principles 
about when values in general get 'clamped' to the implemented range, 
or rounded to the closest implemented value, and so on, as you have 
above.
-- 
David Singer
Apple/QuickTime
Received on Wednesday, 27 August 2008 21:10:22 GMT

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