- From: Adam Twardoch (List) <list.adam@twardoch.com>
- Date: Fri, 18 Oct 2013 21:57:17 +0200
- To: public-webfonts-wg@w3.org
Hm... hm... Well...
So: Looking at the WOFF 1.0 spec (http://www.w3.org/TR/WOFF/ ) I just
realized that the WOFF container currently can host a TTF and OTF but I
don't think it can host a TTC or OTC.
Currently, we have a WOFF Header which is functionally equivalent to the
first portion of the SFNT Offset Table. It holds, among others, the
original SFNT version ("flavor", i.e. either \00\01\00\00 or OTTO), and
numTables.
The WOFF Header is followed by a Table directory which defines offsets
to each SFNT table, thus being functionally equivalent to Table
directory portion of the SFNT Offset Table. That's good enough for TTF
or OTF, which only have one Table directory.
But in Font Collections (TTC and OTC), there is a TTC Header which
defines the "flavor" as "ttcf", defines the numFonts and then provides a
list of offsets to each font's SFNT Offset Table.
So perhaps, in order to simplify things, WOFF 2 could be set up to
ALWAYS be thought of as a "Font Collection"? I mean, one can easily
imagine to have a TTC or OTC to just have one font -- it'd be a
perfectly valid "Font Collection". Not really necessary, but would be fine.
The Font Collection really adds very very minimal overhead to the SFNT
structure. So perhaps we could leave WOFF 1.0 as it is, and clearly say
that WOFF 1.0 is "only good to host a single SFNT font", but when
defining WOFF 2.0, we could by definition make it TTC/OTC-compatible, by
redefining the WOFF Header so that it always includes a "numFonts"
(which in most cases will be =1), followed by a *Font directory* (which
defines offsets to each font's Table directory), followed by an array of
the Table directories of all fonts.
The metadata and the private block could remain singular, i.e. one per
WOFF.
I realize that this would constitute a major change in how WOFF 2 is
constructed, though, so perhaps it's not the best idea to do it right now.
Best,
Adam
--
May success attend your efforts,
-- Adam Twardoch
(Remove "list." from e-mail address to contact me directly.)
Received on Friday, 18 October 2013 19:57:46 UTC