W3C home > Mailing lists > Public > www-style@w3.org > March 2012

RE: [css3-font] unquoted font family names with whitespace

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Fri, 16 Mar 2012 22:19:42 +0000
To: Simon Pieters <simonp@opera.com>
CC: "www-style@w3.org" <www-style@w3.org>
Message-ID: <3C4041FF83E1E04A986B6DC50F01782907B31D2F@TK5EX14MBXC295.redmond.corp.microsoft.com>

[Simon Pieters:]
> 
> "To avoid mistakes in escaping, it is recommended to quote font family
> names that contain white space, digits, or punctuation characters other
> than hyphens:"
> 
> http://dev.w3.org/csswg/css3-fonts/#propdef-font-family

> http://www.w3.org/TR/CSS21/fonts.html#font-family-prop

> 
> What mistake in escaping can one do when a font family name contains
> whitespace? Whitespace doesn't need escaping (unless a font has something
> funny like a tab character or two subsequent spaces, but such fonts don't
> exist). Unquoted font family names with spaces work fine. Don't recommend
> quoting them.
> 
> Unescaped unquoted font family names that start with a digit or contain
> punctuation characters other than hyphen will break *even if there is no
> whitespace*.
> 
> Suggested wording:
> 
> To avoid mistakes in escaping, it is recommended to quote font family
> names that contain words that start with digits or contains punctuation
> characters other than hyphens:
> 
> body { font-family: "Amalgamate O (outlined)", serif }
> 
> <BODY STYLE="font-family: '21st Century', fantasy">
> 
> --
My understanding is that this was good general advice since unquoted font 
family names may be somewhat more ambiguous in the font shorthand.

Received on Friday, 16 March 2012 22:20:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 22 May 2012 03:48:52 GMT