- From: John Daggett <jdaggett@mozilla.com>
- Date: Sun, 26 Jul 2009 12:01:40 -0700 (PDT)
- To: www-font <www-font@w3.org>
Tal Leming wrote: > > Some of the redundancy is shared with CSS; the @font-face declarations > > contain information about the format and the name of the font (to be > > used in 'font' and 'font-family'). What if there is a mismatch between > > the format declared in @font-face and inside the info.xml? The > > .webfont specification should specify who is right. > > We think that the CSS would specify "webfont" as the format. The User > Agent would look at the format specified in the info.xml and load it > appropriately. We thought that this would actually make it easier for > web authors. They wouldn't have to know the specifics about the core > font formats. Both HÃ¥kon's original remark and Tal's response aren't quite right here. The names and styles specified in @font-face rules are *completely* under author control, neither the name table contents or info.xml contents have or should have any effect on font usage or rendering. Example: @font-face { font-family: Wild Screaming Pigs; src: url(Gentium.ttf) format("truetype"); } body { font-family: Wild Screaming Pigs, Georgia, serif; } This is both for security reasons, so that the fonts used in one page have no effect on the rendering of a separate page using unrelated stylesheets, and to give authors control over how fonts are used in their pages. This is why the name table obfuscation methods work without affecting webpage usage. The format hint is optional, it really indicates the format a given font is *not*. If a format hint indicates that a font is a SVG font, no attempt is made to load it as a TrueType font. The user agent still needs to determine whether the font data is valid or not. Any format sniffing is confined to the set of formats defined by the format hint. In fact, my original reading was of the latest .webfont proposal was that loading a font with a given info.xml file would be the equivalent of loading the fontdata as a raw font. In other words, the contents of the info.xml file have no effect on load behavior or usage. Did I read this incorrectly?
Received on Sunday, 26 July 2009 19:02:21 UTC