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

[css3-fonts] new editor's draft

From: John Daggett <jdaggett@mozilla.com>
Date: Tue, 20 Jan 2009 01:16:27 -0800 (PST)
To: www-style <www-style@w3.org>
Message-ID: <24283409.6210531232442987747.JavaMail.root@cm-mail01.mozilla.org>


I've updated the Editor's Draft of the CSS3 Fonts spec to tighten up the definition of @font-face rules.

CSS3 Fonts Editor's Draft
http://dev.w3.org/csswg/css3-fonts/

Specific changes:

* For descriptors occurring multiple times in a single @font-face rule, only the last value is used, prior values are ignored.

* Use of src descriptor to control load behavior clarified.

* The character map for a downloaded font is the intersection of the unicode-range value, U+0-7FFFFFFF by default, and the actual character map contained in the font data.  This is WebKit latest behavior.

* Definition of unicode-range values and how errors are handled is clarified.

* Define which names are allowed with local().

I think this should clear up the problems David Baron brought up in Issue 71:

http://www.w3.org/Style/CSS/Tracker/issues/71

Original post:
http://lists.w3.org/Archives/Public/www-style/2008Nov/0077.html

Using Michael Day's example, assume that Times New Roman and Open Symbol exist on all platforms.

Example 1
===============================================

@font-face {
  font-family: MyFont;
  src: local("Times New Roman"), local("OpenSymbol"), ...
}

body { font-family: MyFont, sans-serif; }

If text contained symbol characters without glyphs in Times New Roman, glyphs from sans-serif would be used instead.  Open Symbol is never referenced.

Example 2
===============================================

@font-face {
  font-family: MyFont;
  src: local("OpenSymbol");
}

@font-face {
  font-family: MyFont;
  src: local("Times New Roman");
}

body { font-family: MyFont, sans-serif; }

If text contained symbol characters without glyphs in Times New Roman, glyphs from OpenSymbol would be used.

Defined this way, authors have the ability to control load behavior (example 1) and to control fallback behavior (example 2).

John Daggett
Mozilla Japan
Received on Tuesday, 20 January 2009 09:17:09 GMT

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