TestPlan20-Decoder

From Fonts WG

Plan for testing all the assertions which apply to decoders for WOFF 2.0. Some of these assertions were previously User Agent tests.

Text color highlights on this page are as follows: red text indicates questions that need to be addressed by the Working Group, gray text indicates portions of the test suite that are not yet implemented and blue text indicates initial ideas about how the tests can be presented to User Agents.

Testable Assertions

mustRestoreCollectionOffsetTables

Round-trip a font collection file (with no DISG in it!) through WOFF2 encoder / decoder and verify that the output file has the same number of font entries in the font collection and that each font entry is represented by the same set of font tables.

mustFixCollection

Round-trip a font collection file with DSIG table present through WOFF2 encoder / decoder and verify that the output file has the same number of font entries in the font collection and that DSIG table entry was deleted. Check the font collection header format and if it's set to version 2.0 make sure that it was either modified to have the TTC Header fields {ulDsigTag, ulDsigLength, ulDsigOffset} set to zeros, or that TTC Header was converted to version 1.0.

mustRestoreFontOrder

Round-trip a font collection file through WOFF2 encoder / decoder, and verify that the output file has the same order of font entries in the font collection as it was present in the original input file.

mustProduceOFF

Run all the decoded files produced by the file format tests through a font validator to confirm the OFF structure validity.

mustCalculateCheckSum

Put decoded font through an OFF validator.

mustRecalculateHeadCheckSum

See note above.

mustRecordLocaOffsets

Reusing the font created for mustReconstructLoca test, create another one that utilizes long 'loca' entry format. Capture the output of decoder for both fonts and verify that the 'loca' entry format matches what is indicated by the indexFormat field.

mustReconstructLSBs

Reusing the input font created for mustEliminateLSBs (AT) test, round-trip the font file through WOFF2 encoder / decoder, and verify that the output file has the same 'hmtx' table entries as it was encoded in the original input file.