- From: Jonathan Kew <jonathan@jfkew.plus.com>
- Date: Fri, 10 Dec 2010 20:05:32 +0000
- To: Julio Gonzalez <juliog@apple.com>
- Cc: "www-font@w3.org" <www-font@w3.org>
On 10 Dec 2010, at 19:55, Julio Gonzalez wrote: > I'm only concerned with table ordering. I don't think there is anything that says a that a well-formed input font requires that tables be ordered by offset. I think there's a misunderstanding of what we're talking about here; tables are inherently "ordered by offset", surely. Those at a larger offset are necessarily located after those at a small offset within the file. > Only tag order should be preserved. Tag order in the sfnt directory *must* be ascending; this is required by the OpenType spec. (And so the WOFF spec follows this.) Table order is arbitrary, but the WOFF spec requires that the WOFF-packaged file preserve the order found in the input sfnt in order that a round-trip conversion (sfnt->woff->sfnt) can restore a file that is binary-identical to the original. Note that *table* order bears no relation to *tag* order in the directory. Table order is simply the order of the table "chunks" in the file, and can of course be deduced directly from the table offsets found in the directory. JK > If we mean "same order" as tag order, I see no issues. Otherwise, I feel we are adding a restriction that does not exist in current font specs. > > Julio > > On Dec 10, 2010, at 11:32 AM, Jonathan Kew <jonathan@jfkew.plus.com> wrote: > >> On 10 Dec 2010, at 18:53, Julio Gonzalez wrote: >> >>> Hi, >>> >>> On Section 5 (Font Data Tables) of the WOFF spec, there are two paragraphs that appear contradictory: >>> >>> "Font tables in WOFF files MUST be stored in the same order as the well-formed input font. The table order is implied by offset values in the table directory; sorting table directory entries into ascending offset value order produces a list of entries in an order equivalent to that of the font tables." >>> >>> Then later on the NOTE section, one sees: >>> >>> "In some cases, sites deploying WOFF files as Web fonts may wish to subset the character repertoire, optimize table ordering for efficient text layout or rasterization, or remove (or add) optional font tables depending on the particular features needed for a site. User agents might make similar modifications to the font during decoding, such as omitting tables that are not needed by their particular text display system." >>> >>> >>> "Optimizing table order for efficiency" violates the previous statement: "sorting table directory entries into ascending offset value order produces a list of entries in an order equivalent to that of the font tables." >>> >>> So, do we want to relax the following statement: "Font tables in WOFF files MUST be stored in the same order as the well-formed input font" to "Font tables in WOFF files MUST be stored in the same order as the input font"? The only thing that truly needs to be preserved is the tag order in the sfnt table directory. The offset values should be fair game for re-arrangement. >> >> No, I don't think we should relax this, as this would break the ability to reconstruct a binary-identical copy of the input sfnt. >> >> Operations such as subsetting, table order optimization, etc., mentioned in the note there would all be regarded as "pre-WOFFing" modifications to the font. For the purposes of the WOFF spec, the "input font" is the sfnt *after* any such modifications have been done to it. This is the font that can be restored in a 100% round-trip fashion (if desired) by the decoding operation. Any pre-WOFF optimizations (such as table order optimization) are *not* expected to be reversible. See also the final sentence of that NOTE. >> >> JK >>
Received on Friday, 10 December 2010 20:06:14 UTC