Re: Web font test cases: file linking vs. data URI embedding, CSS font stack subsets

Adam Twardoch wrote:

> 2. Firefox 3.5 performs fine on Mac and Windows with all four test
> cases. However, initially, my test font had a "name" table that was
> larger than (I don't remember what...) -- then Firefox on Windows did
> not load the font.

This is the result of the fix for KB 961371, for which Microsoft pushed out an update this past July.  To fix some type of buffer overflow problem in font embedding libraries a limit of 2500 characters has been imposed on embeddable fonts.  So fonts with a long license agreement in the license name record will run into this problem (e.g. OFL fonts such as Gentium or CharisSIL).

  http://support.microsoft.com/kb/961371

Any font used with IE in EOT form now needs to comply with this restriction.  The current version of Safari, when loading fonts via GDI[*], falls back to rewriting the name table on the fly when the load via the font embedding library fails.  Firefox 3.5 didn't do this but current trunk code does, as does the code in the upcoming beta release of Firefox 3.6.

Another small gotcha is that family names need to match full names (e.g. the bold face of the 'Bongo Fantastic' family needs to be named 'Bongo Fantastic Bold' and *not* 'BongoFantasticBold').

> 2. linked as external subsets (EOT and TTF)

I'm sure you're aware of this but I want to point out that breaking up fonts into separate subsets like this will break kerning and ligatures for pairs of glyphs that exist in different subsets.  Although IE does not, Firefox currently supports kerning and Webkit will hopefully in the near future.  So I would advise caution when using subsetting like this. 

John Daggett
Mozilla Japan

[*] By default Safari uses Windows GDI font rendering but a user can switch to using Apple's font rasterizer by changing the Font Anti-aliasing setting (General settings menu > Settings > Appearance tab).  When set to anything other than "Windows Standard", Apple's font rasterizer will be used.  Although Webkit is open-source, this library is closed-source, so other browsers use Windows GDI calls.

Received on Tuesday, 13 October 2009 02:05:12 UTC