[css3-fonts] new editor's draft

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 UTC