Re: Authoring Tool Test Suite

On Mar 16, 2011, at 2:06 PM, Chris Lilley wrote:

> TL> http://dev.w3.org/webfonts/WOFF/spec/#conform-compressedlarger
> 
>>> If the length of a compressed font table would be the same as or greater than the length of the input font table, the font table MUST be stored uncompressed in the WOFF file and the compLength set equal to the origLength.
> 
> I believe this is easy enough to test, create some tables which are very short and would be bigger if gzipped.

I added this one. It contains a non-standard "TEST" table that consists of one null byte.


> TL> http://dev.w3.org/webfonts/WOFF/spec/#conform-ascending
> 
>>> WOFF-producing tools MUST produce a table directory with entries in ascending tag value order.
> 
> Provide a few SFNT with a selection of tables (perhaps one with some commn tables, one with some common and uncommon ones, one with common and made-up ones) and check the created WOFF to ensure that tables are in ascending order as required by WOFF (and by OpenType).

The tables in the base font are:

	CFF
	OS/2
	cmap
	head
	hhea
	hmtx
	maxp
	name
	post

I could add some non-standard tables with these names:

	1AAA
	2AAA
	A1AA
	A2AA
	AA1A
	AA2A
	AAA1
	AAA2
	AAAA
	AAAB
	AABA
	ABAA
	BAAA
	8ZZZ
	9ZZZ
	Z8ZZ
	Z9ZZ
	ZZ8Z
	ZZ9Z
	ZZZ8
	ZZZ9
	YZZZ
	ZYZZ
	ZZYZ
	ZZZY
	ZZZZ
	1aaa
	2aaa
	a1aa
	a2aa
	aa1a
	aa2a
	aaa1
	aaa2
	aaaa
	aaab
	aaba
	abaa
	baaa
	8zzz
	9zzz
	z8zz
	z9zz
	zz8z
	zz9z
	zzz8
	zzz9
	yzzz
	zyzz
	zzyz
	zzzy
	zzzz

Do you think this would be enough for a test?


> TL> http://dev.w3.org/webfonts/WOFF/spec/#conform-identical
> 
>>> The result of creating a WOFF file and then decoding this to regenerate an sfnt font MUST result in a final font that is bitwise-identical to the well-formed input font.
> 
> TL> I suppose that for this one we can create one or more valid SFNT
> TL> files for an authoring tool to roundtrip. Is that the best way to handle this assertion?
> 
> I would think so.

At the end of the last call I mentioned that we could provide not only the SFNT files but also small scripts that would validate the results of these tricky test cases. I've been thinking about this more and I think it would be easier to simply say "Pass the result of the conversion of this test case through the WOFF validator and check to make sure that X is valid." I can modify the validator to optionally take an SFNT for byte-for-byte reconstruction checking. I think that would cover everything we need.

Tal

Received on Tuesday, 22 March 2011 11:53:43 UTC