RE: WOFF spec comments (was Re: Metadata Questions)

On Wednesday, November 10, 2010 2:52 PM Chris Lilley wrote:
> 
> On Wednesday, November 10, 2010, 6:03:06 PM, Vladimir wrote:
> 
> LV> 2. Clause 6, par. 4 (Extended metadata block)
> LV> The last sentence of the paragraph 4 says "If the metadata block
> LV> is not followed by a private data block, it MUST either be padded
> LV> with null bytes to the next 4-byte boundary, or contain no
> LV> additional padding after the end of the block."
> LV> It needs to be revised - it seems to say that the last block MUST
> LV> either be padded or not padded. (which one is true?)
> 
> I read it as saying there can be at most 0..3 bytes of padding, but no
> more; and that any padding must only be sufficient to take it to the
> next longword boundary.
> 

I believe this is what we want it to say, and the part of the sentence "it MUST ... be padded
with null bytes to the next 4-byte boundary" seems to says exactly that. The presence of "either ... or" kind of throws me off because it can be read as "If metadata block is not followed by a private data block, it MUST ... contain no additional padding", no matter the longword boundary. To be precise, we might want to remove the second "or" case and add "if necessary, it MUST be padded with null bytes to the next 4-byte boundary."

> I seem to recall discussion that the OT spec required padding between
> tables but was silent or ambiguous about padding after the last table.
> 

Yes, this is true, but in practice most of the tools do add padding for all tables, including the last one. We actually discuss this in the WOFF spec as well, in the par. 10 of clause 4 in the "Font table padding" (the text that is now normative).
I think that it would be good to be consistent and have the same requirement applied to all data blocks in the WOFF file.

Thank you,
Vlad

Received on Wednesday, 10 November 2010 20:13:09 UTC