Bert's proposal for bolder/lighter

Bert's proposal for the bolder/lighter problem:
http://lists.w3.org/Archives/Public/www-style/2008Aug/0255.html

> Concretely: remove no text from 15.6, but add this bullet point before
> the two that define 'bolder' and 'lighter'. It says to only look at the
> first family:
> 
>    * Determine the font weight mappings of all fonts (of any style, size
>      or variant) in the first family in 'font-family' that has any fonts
>      available. Compute the used value of 'font-weight' using this set of
>      fonts, as follows:
> 
> The existing bullets could remain unchanged or cleaned up to avoid some
> confusion and ambiguities, as follows:
> 
>    * 'bolder' selects the next weight that is assigned to a font that is
>      darker than the *parent's weight* [was: inherited one]. If there is
>      no such weight, it simply results in the next darker numerical value
>      [remove: (and the font remains unchanged)], unless the inherited
>      value was '900' in which case the resulting weight is also '900'.
> 
>    * 'lighter' is similar, but works in the opposite direction: it
>      selects the next lighter keyword with a different font from the
>      *parent's weight* [was: inherited one], unless there is no such
>      font, in which case it selects the next lighter numerical value
>      [remove: (and keeps the font unchanged)].

In most instances I think this will work.  However, I think the spec
should incorporate wording to explicitly describe how synthetic bolding
affects the calculation of bolder and lighter.  Specifically, I would
add the wording below (changes denoted by **):

   * Determine the font weight mappings of all fonts (of any style, size
     or variant) in the first family in 'font-family' that has any fonts
     available. **For user agents that synthesize bold faces when
     rendering font families that lack actual bold faces, this list should
     include an entry with weight 700 for these synthesized faces.**
     Compute the used value of 'font-weight' using this set of fonts, as
     follows:

Another downside of Bert's wording is that you now push a set of
rendering time decisions such as available fonts, what generics map to,
etc. up into the style system, which is not ideal for systems that rely
on an underlying platform API to "do the right thing" given a set of
style-system inputs.  Opera/Webkit comments?

I think I still prefer font-weight to inherit with (weight value) plus
(relative steps of lighter/bolder).  We could definitely use Bert's
proposal as a way to solve the computed value problem.

John Daggett
Mozilla Japan

Received on Tuesday, 16 September 2008 05:35:17 UTC