W3C home > Mailing lists > Public > www-style@w3.org > September 2010

Re: [css3-fonts] @font-face matching and font-style descriptor

From: Christoph Päper <christoph.paeper@crissov.de>
Date: Thu, 16 Sep 2010 21:00:31 +0200
Message-Id: <AC5A9169-65CE-4D1B-A68F-424D93878AAC@crissov.de>
Cc: www-font <www-font@w3.org>
To: "www-style@w3.org list" <www-style@w3.org>
Christoph Päper:
> 
> Font Descriptor Values
> 
>  standard  := ‘inherent’ | ‘normal’ | ‘any’
>  <style>   := standard | [ [
>               ‘upright’ | ‘italic’ | ‘oblique’
>             ] ‘,’^ ]+
>  <weight>  := standard | [ [
>               ‘medium’ | ‘bold’ | ‘100’ | … | ‘900’
>             ] ‘,’^ ]+
>  <stretch> := standard | [ [
>               ‘?loose?’ | modifier? [ ‘condensed’ | ‘expanded’ ] 
>             ] ‘,’^ ]+
>  modifier  := [ ‘ultra’ | ‘extra’ | ‘semi’ ] ‘-’
>  <range>   := standard | [ urange ‘,’^ ]+

I’d suggest to further extend the descriptors: as far as necessary to fully describe even complex font families / typefaces. This message describes some of such extensions. These may or may not be reflected in regular CSS properties (of a future level).

Where the following proposed keywords are not canonic typographic jargon this is often because there’s hardly standardization among foundries, across borders and throughout times, so CSS has a comfortable degree of freedom to choose names, even less common or idiosyncratic ones – like it has done in the past. Although terms are based on Western / European typographic tradition, because they’re in English, they apply to many scripts.

  <style>   := standard | [ [
               ‘upright’ | ‘italic’ | ‘oblique’ | ‘cursive’
             ] ‘,’^ ]+

  <brokeness?>:= standard | [ [
               ‘stroke’ | ‘glyph’ | ‘word’ | ‘phrase’
             ] ‘,’^ ]+

‘italic’ is a combination of ‘oblique’ (slanted, sloped) and ‘cursive’ (swash?), e.g. Nara.
?‘venetian’? is a combination of ‘upright’ and ‘cursive’.
‘roman’ is a combination of ‘upright’ and ‘linear’.
‘gothic’ is a combination of ‘upright’ and ‘broken’.

  <weight>   := standard | [ [
                ‘medium’ | modifier? [ ‘light’ | ‘bold’ ]
              | ‘thin’ | ‘book’ | ‘heavy’
              | ‘100’ | … | ‘900’ | [ percent ‘-’^ ]
              ] ‘,’^ ]+

  ‘ultra-light’ = 100
  ‘extra-light’ = 200
  ‘light’       = 300
  ‘semi-light’  = 400
  ‘medium’      = 500
  ‘semi-bold’   = 600
  ‘bold’        = 700
  ‘extra-bold’  = 800
  ‘ultra-bold’  = 900

  ‘thin’   = ‘ultra-light’, ‘extra-light’        =  0%–25%
  ‘normal’ = ‘semi-light’                        = 35%–45%
  ‘book’   = ‘semi-light’, ‘medium’              = 35%–55%
  ‘plain’  = ‘semi-light’, ‘medium’, ‘semi-bold’ = 35%–65%
  ‘heavy’  = ‘ultra-bold’, ‘extra-bold’          = 75%–100%

At Typecon 2010 <http://people.mozilla.org/~jdaggett/css3fontstypecon2010.pdf#page=20>, the editor of this module cited ‘OS2.usWeightClass’ which identifies 100 with ‘thin’ and 200 with ‘ultra-light’ (and ‘extra-light’), but that is – though systematic – redundant for no reason, whereas my proposal is redundant in a useful way, and Helvetica Neue under OS X which is compatible with my light values, but has 900 as ‘black’ (and uses ‘regular’ for ‘normal’), but Adobe’s version seems to actually have quite different values (and many oher fonts probably too):

  ‘thin’ (250) < ‘ultra-light’ (275) < ‘light’ (300) < 
  ‘roman’ (400) < ‘medium’ (500) < 
  ‘bold’ (700) < ‘heavy’ (750) < ‘black’ (900)

Full granularity list (with modifier): 
  ‘ultra-light’ < ‘extra-light’ < ‘light’ < 
  ‘semi-light’ < ‘medium’ < ‘semi-bold’ <
  ‘bold’ < ‘extra-bold’ < ‘ultra-bold’
Reduced granularity list (without modifier):
  ‘thin’ < ‘light’ < ‘plain’ < ‘bold’ < ‘heavy’ (2-1-3-1-2)

The 4 normalized font weights for ‘bolder’ and ‘lighter’:
  ‘ultra-light’, ‘semi-light’ (‘normal’), ‘bold’, ‘ultra-bold’

                   lighter      bolder
  ‘ultra-light’ 100   ←  0%–35%  →   400 ‘semi-light’
  ‘ultra-light’ 100   ← 35%–55%  →   700 ‘bold’
  ‘semi-light’  400   ← 55%–75%  →   900 ‘ultra-bold’
  ‘bold’        700   ← 75%–100% →   900 ‘ultra-bold’

  ‘thin’, ‘light’ = ‘ultra-light’, ‘extra-light’, ‘light’
  ‘book’          = ‘semi-light’, ‘medium’
 (‘demi’)           ‘semi-bold’, ‘bold’
  ‘heavy’         = ‘extra-bold’, ‘ultra-bold’

  <stretch> := standard | [ [
               ‘loose’ | modifier? [ ‘condensed’ | ‘expanded’ ]
             | ‘narrow’ | ‘wide’ | ‘compressed’ | extended’
             ] ‘,’^ ]+

  ‘compressed’ = ‘ultra-condensed’, ‘extra-condensed’
  ‘narrow’     = ‘semi-condensed’, ‘condensed’
  ‘normal’     = ‘loose’
  ‘wide’       = ‘semi-expanded’, ‘expanded’
  ‘extended’   = ‘ultra-expanded’, ‘extra-expanded’

Full granularity list (with modifier): 
  ‘ultra-condensed’ < ‘extra-condensed’ < ‘condensed’ < 
  ‘semi-condensed’ < ‘loose’ < ‘semi-expanded’ < 
  ‘expanded’ < ‘extra-expanded’ < ‘ultra-expanded’
Reduced granularity list (without modifier):
  ‘compressed’ < ‘narrow’ < ‘loose’ < ‘wide’ < ‘extended’ (2-2-1-2-2)


There should also be descriptors to indicate whether this resource is appropriate for one of the generic font families (where not even ‘serif’ and ‘sans-serif’ are mutually exclusive anymore, also ‘monospace’, ‘fantasy’, ‘cursive’). That I haven’t figured out yet.
Received on Thursday, 16 September 2010 19:01:08 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:31 GMT