W3C home > Mailing lists > Public > www-style@w3.org > May 2009

Re: [CSS21] last edition: pity

From: John Daggett <jdaggett@mozilla.com>
Date: Sun, 10 May 2009 19:04:50 -0700 (PDT)
To: www-style@w3.org
Message-ID: <11015011.32501242007490289.JavaMail.root@cm-mail01.mozilla.org>
Hi Thomas,

> Maybe I'm missing something, but isn't all this font weight stuff kind
> of meaningless given that the notion of "family" is
> undefined/platform-specific, and the same set of fonts can and will be
> one family on Mac and several families on Windows GDI?
> That is, on Mac (and in Windows Presentation Foundation), you can have
> a very large number of different weights in one family. As a practical
> matter, in GDI you can have only two, a "regular" and a "bold." (Yes,
> technically you could have more, but since about half of all GDI apps
> would deal badly with the multi-weight family, including Microsoft
> Office, nobody makes such fonts.)

You've actually brought this up before back in March and I responded
with details then:


We also discussed the topic of style linking at the March F2F, the
discussion is in the section "Grouping fonts into font families":


The simple answer to your question is that the CSS font model is
font-format agnostic, it is not specific to OpenType/TrueType fonts, it
simply defines a set of commonly used font property axes (i.e. weight,
slant, width, etc.) and a process for selecting a face based on these
properties.  Obviously OpenType/TrueType fonts represent the vast
majority of fonts that are used in user agents today so it's crucial
that user agents handle style linking of platform fonts consistently.
The underlying problem is not just GDI but the OpenType specification
itself, which defines family linking differently for Mac vs. Windows
(i.e. Mac uses just the 'family' name record whereas Windows uses
several different name records and explicitly enforces a restriction of
just four faces per family name record on Windows but not on Mac!!).

>From the March post:

  So the question boils down to "how do we get richer font family
  groupings on Windows?".  I think the answer to that is that user agents
  on Windows need to move towards grouping font faces by "Preferred
  Family" if it exists, which means pulling data out of font tables. 
  Current versions of Windows don't ship with extended font families so
  this really only affects folks who have installed fonts or use Adobe
  apps that install extended font families.

Along with the Mac, font families created with @font-face are
specifically *not* subject to these funky family grouping restrictions,
so font weight can be used to reference all available Helvetica Neue
faces under Mac OS X and can be used to reference all seven weights
of the open-source M+ font family via @font-face rules:

The above test page as rendered in Webkit, FF 3.5 beta:


Even when only two faces are available, the spec still needs to define
how bolder/lighter work when nested, as other have pointed out.


John Daggett
Mozilla Japan

P.S. For more details on font family records across platforms, see the
definition of the "Font Family", "Preferred Family" and "WWS Family
Name" name ID's in the OpenType name table:


Note the difference with the original definition in the TrueType spec:


OpenType 1.6:

"Font Family name. Up to four fonts can share the Font Family name,
forming a font style linking group (regular, italic, bold, bold italic -
as defined by OS/2.fsSelection bit settings)."

Original TrueType: 

"Font Family. This string is the font family name the user sees on
Macintosh platforms."
Received on Monday, 11 May 2009 02:05:32 UTC

This archive was generated by hypermail 2.3.1 : Monday, 2 May 2016 14:38:26 UTC