W3C home > Mailing lists > Public > www-style@w3.org > December 2003

Generic fonts and Panose numbers

From: Ernest Cline <ernestcline@mindspring.com>
Date: Sat, 20 Dec 2003 21:02:37 -0500
Message-ID: <410-22003120212237453@mindspring.com>
To: "W3C CSS List" <www-style@w3.org>


We need a better way of defining generic fonts in CSS.

Suppose an author wishes to specify that he wishes
something like "sans-serif monospace".  There is no good
way of doing so in CSS.

The best he could hope to do would be something
like the following.

* {font-family: "\E000", "\E001", "\E002", "\E003", "\E004"}
@font-face {
  font-family: "\E000"
  panose-1: 2 11 0 9 0 0 0 0 0 0;
}
@font-face {
  font-family: "\E001"
  panose-1: 2 12 0 9 0 0 0 0 0 0;
}
@font-face {
  font-family: "\E002"
  panose-1: 2 13 0 9 0 0 0 0 0 0;
}
@font-face {
  font-family: "\E003"
  panose-1: 2 14 0 9 0 0 0 0 0 0;
}
@font-face {
  font-family: "\E004"
  panose-1: 2 15 0 9 0 0 0 0 0 0;
}

The names of the "fonts" were chosen to be in the Private
Use Area so as to minimize the chance of a conflict, but
that could still happen if for similar reasons, a system used
such font names to specify system fonts.

Also, the restriction to a single Panose 1  value for the
'panose-1' descriptor  forces a distinction between these values,
favoring one style of sans-serif monospace fonts over another,
even when the author has no preference but the user might.

This is because of the restriction:

"A comma-separated list is not permitted for this descriptor,
because the Panose-1 system can indicate that a range of
values are matched."

The problem is that the Panose system only allows a single
type of range indicated by the "0" digit to indicate that any
value is acceptable.  No other type of range is possible.

Indeed, of the five current generic families, only two, "cursive"
and "fantasy" correspond to a single Panose number.

The other three are combinations of multiple Panose numbers:

serif:
2 2 0 0 0 0 0 0 0 0
2 3 0 0 0 0 0 0 0 0
2 4 0 0 0 0 0 0 0 0
2 5 0 0 0 0 0 0 0 0
2 6 0 0 0 0 0 0 0 0
2 7 0 0 0 0 0 0 0 0
2 8 0 0 0 0 0 0 0 0
2 9 0 0 0 0 0 0 0 0
2 10 0 0 0 0 0 0 0 0

sans-serif
2 11 0 0 0 0 0 0 0 0
2 12 0 0 0 0 0 0 0 0
2 13 0 0 0 0 0 0 0 0
2 14 0 0 0 0 0 0 0 0
2 15 0 0 0 0 0 0 0 0

monospace:
2 0 0 9 0 0 0 0 0 0
3 0 0 3 0 0 0 0 0 0
4 0 0 9 0 0 0 0 0 0

This clearly shows that the groupings that people think of
are not neatly categorized by a single Panose number.

As an interim step, I suggest that for Web Fonts, that
the 'panose-1' descriptor be changed to allow multiple values.
We also might consider adding additional keywords
for the 'font-family' property such as:
venetian, garalde, transitional, didone, slab-serif, brush,
script, and black-letter that have a clear meaning
(altho it is true, only in a European typescript context) 

Of all these, the one I think is most useful is "black-letter"
as it is distinct from "cursive".  Indeed the Panose
values for black letter fonts fall into the "fantasy" range
altho for black letter,  a single Panose number will serve:
4 0 0 0 0 0 0 0 14 0.  However,  based on the level of
existing CSS implementations, an additional value for
'font-family' is much likelier to be supported than Web Fonts.

Ernest Cline
ernestcline@mindspring.com
Received on Saturday, 20 December 2003 21:02:38 GMT

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