[WOFF] Checksums, IDs, and Local Cacheing

Hi, Folks-

I see that there are a few different "font identifier" mechanisms in WOFF:

1) The font name

2) The majorVersion and minorVersion of the font

3) "sfnt-based fonts store a checksum for each table in the table 

4) "and an overall checksum for the entire font in the head table"

5) "uniqueid element" "A unique identifier string for the font."

#1, #2, #4, and #5 apply to the whole font, while #3 is per table.

I had a brief conversation about WOFF with someone (whose name is lost 
in the mists of time) at Web Directions South in Sydney a couple weeks 
ago, and he wondered if there was a way to cache Web fonts locally, but 
still identify their ranges in case of glyph subsetting.

This also struck me as particularly helpful for places with poor or 
expensive bandwidth, which sometimes happen to coincide with locales 
where there are frequently very few available fonts for the local 
language, so being able to identify a particular font as being cached 
locally is of increased value (that is, the chance that a given font is 
already cached is higher, and the cost of downloading it again is 
relatively greater).  It would be great if a given font wouldn't have to 
be downloaded multiple times.

Obviously, the name of the font (even with consideration for the major 
and minor versions) is not a good identifier... there are many duplicate 
names for different font families (how many are named "LED", for 
example) so you can't be sure it's the same font, and particular glyphs 
may be changed by the font user so you can't be sure the font doesn't 
have some specialized purpose from the original, tables may have been 
stripped or subsetted, etc.

However, the checksum, in combination with the font name, might be a 
good way to uniquely identify a font, such that a designer could 
indicate it in their CSS @font-face rule:

   @font-face {
     font-family: "Obscure Serif Bold";
     src: url("http://www.example.com/resources/ObscureSeBd.woff");
     checksum: "8675309";

A user who had visited that site before, or who had visited a site using 
that same font, would have it in their cache, saving them from 
downloading it yet again, and saving the bandwidth for the server.

I think this is more an issue for CSS with @font-face, but I thought I'd 
bring it up here for consideration first.  I suspect there may be issues 
with how cacheing works, or other problems I haven't foreseen, but I 
thought it was worth asking.

-Doug Schepers
W3C Team Contact, SVG and WebApps WGs

Received on Saturday, 24 October 2009 04:22:47 UTC