W3C home > Mailing lists > Public > www-style@w3.org > January 1996

RE: FW: Font-family specification

From: Chris Wilson (PSD) <cwilso@microsoft.com>
Date: Wed, 31 Jan 1996 09:10:43 -0800
Message-Id: <c=US%a=_%p=msft%l=RED-73-MSG960131091044ZE005900@red-01-imc.itg.microsoft.com>
To: "www-style@w3.org" <www-style@w3.org>
I would highly recommend doing both - changing separators from whitespace to 
commas, and recommending the use of quotes to wrap font family names.  The 
reason for this is evident when you consider an example with more than one 
font-family:
    font: 12pt/14pt "New Century Schoolbook" "Serif" bold
Without explicitly doing compares for all weight strings, plus numeric 
values (font-weight can be a number), plus all font-style strings, you can't 
tell if the last word is a font family name, a font weight, or a font style. 
 (Before you say, "but quotes could be required," think: what are you going 
to do if someone says, "Roman" without quotes?  Really ignore it 
completely?)  To detect whether it is a weight or style (which you need to 
do anyway, since weight is optional), you need only compare it to the four 
font styles (normal, italic, oblique and small-caps).  The above example 
becomes less ambiguous when you say:
    font: 12pt/14pt "New Century Schoolbook", "Serif" bold
Now, any strings not preceded by a comma are ignored as font families.

	-Chris
Chris Wilson
cwilso@microsoft.com


----------
From: 	www-style@w3.org[SMTP:www-style@w3.org]
Sent: 	Wednesday, January 31, 1996 8:41 AM
To: 	www-style@w3.org
Subject: 	Re: FW: Font-family specification

Thanks to Chris and others for pointing out potential problems with
the current font specification in CSS1 [1]. There have been 2 proposed
solutions:

 - introducing commas to separate font families, e.g.:

    font-family: new century schoolbook, serif;

 - quoting font familiy names with spaces in them, e.g.:

    font-family: "new century schoolbook" serif;

Both these would solve the problem for the 'font-family' property, but
only the latter would work in the compound 'font' property. E.g., for the
hypothetical font family 'best in bold':

    font: 12pt/14pt best in bold 

Here, it would be ambigous if 'bold' is a part of the font family name
or a value to the 'font-weight' parameter. Unless better solutions are
suggested, I'll add quoting of font family names to the next version
of the specification.

[1] http://www.w3.org/pub/WWW/TR/WD-css1-951222.html

Regards,

-h&kon

Hakon W Lie, W3C/INRIA, Sophia-Antipolis, France
http://www.w3.org/People/howcome  howcome@w3.org
Received on Wednesday, 31 January 1996 12:11:25 GMT

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