Re: Authoring Tool Test Suite

On Monday, March 14, 2011, 4:44:46 PM, Tal 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 made some tests, with files that were very short. I then compressed them at the lowest compression level, 1.

Chris@brigindona ~/deflate-tests
$ gzip -1 *.txt


Chris@brigindona ~/deflate-tests
$ ls -la
total 4
drwxr-xr-x+ 1 Chris None  0 2011-03-16 19:00 .
drwxr-xr-x+ 1 Chris None  0 2011-03-16 18:59 ..
-rw-r--r--  1 Chris None 27 2011-03-16 19:00 a.txt.gz
-rw-r--r--  1 Chris None 29 2011-03-16 19:00 aa.txt.gz
-rw-r--r--  1 Chris None 29 2011-03-16 19:00 ab.txt.gz
-rw-r--r--  1 Chris None 31 2011-03-16 19:00 aba.txt.gz

a.txt contains a single byte with the letter 'a', and so on. These compress to 27 to 31 bytes.

Then test that the table is not compressed.

TL> http://dev.w3.org/webfonts/WOFF/spec/#conform-uncompressed

>> Tools MAY also opt to leave other tables uncompressed (e.g. all tables less than a certain size), in which case compLength will be equal to origLength for these tables as well.

Can't test this one, its a may.

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).

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.


-- 
 Chris Lilley   Technical Director, Interaction Domain                 
 W3C Graphics Activity Lead, Fonts Activity Lead
 Co-Chair, W3C Hypertext CG
 Member, CSS, WebFonts, SVG Working Groups

Received on Wednesday, 16 March 2011 18:07:12 UTC