microsoft / Font-Validator

Font Validator is a tool for testing fonts prior to release. This testing ensures that fonts meet Microsoft's high quality standards and perform exceptionally well on Microsoft's platform.
Other
117 stars 41 forks source link

help/documentation for 21 of the 25 glyf Table errors were not released. #15

Closed HinTak closed 7 years ago

HinTak commented 8 years ago

I am preparing my talk next week on the Font Validator and includes a section about rendering, the glyf table test and rasterization test in particular, and try to make sure that I understand everything.

$ grep -E '(A|E|P|W|I)11' GenerateFValData/OurData.xml helpID="E1100" helpID="E1101" helpID="E1102" helpID="W1100"

$ grep -A 1 GERR_ Glyph/NS_Glyph.GErrStrings.resx | grep value

E1110: Misoriented contour
    <value>E1111: Intersecting contours</value>
    <value>E1112: Bounding box is incorrect</value>
    <value>E1113: Invalid glyph index of component</value>
    <value>E1114: Invalid index of knot in composite glyph</value>
    <value>E1115: Failure to load the component</value>
    <value>E1116: Component transform matrix is degenerated</value>
    <value>E1117: Shift of component either undefined or ambigously defined</value>
    <value>E1118: Circular dependency of composite glyph's components</value>
    <value>E1119: Wrapped contour(s) </value>
    <value>E1120: Duplicated contours</value>
    <value>E1121: Duplicated components of composite glyph</value>
    <value>W1110: Intersecting components of composite glyph</value>
    <value>W1111: Duplicated knots</value>
    <value>W1113: Degenerated contour(s)</value>
    <value>A1110: Application error</value>
    <value>A1111: Unable to perform test due to previously detected errors</value>
    <value>A1112: Test aborted</value>
    <value>A1113: Test failed because of unhandeled exception</value>
    <value>E1123: An empty component of the composite glyph</value>
    <value>W1112: Not all extremes are marked with the on-curve control points </value>

The glyf table test currently checks for 25 kind of errors, but only 4 of them are in the released documentation.

I consulted the 2003 binary's bundled chm and the private 2009's chm, and the 21 errors are documented there.

There are also a lot of figures for those 21 errors describing them.

I can recover the figures and the texts for the description of those 21 errrors from the chm's, but I'd prefer to have the source of them.

HinTak commented 8 years ago

A better listing of the 4 documented errors:

$ grep -A 4 -E '(A|E|P|W|I)11' GenerateFValData/OurData.xml | grep -E '(11|shortDesc)' helpID="E1100" shortDesc="Component's transform is ambigously defined" helpID="E1101" shortDesc="An exception occurred during glyph validation or loading of one of its components" helpID="E1102" shortDesc="Unable to start validation of 'glyf' table" helpID="W1100" shortDesc="Reserved bit is set to 1"

HinTak commented 8 years ago

The missing graphics and texts from the 21 glyf errors probably contribute a great deal to why the current chm is less than 1/2 the size of both the 2003 and 2009.

404716 fontvalidatorhelp.chm from 2003 408552 FontValidatorHelp.chm from 2009 192142 current FontValidatorHelp.chm

HinTak commented 8 years ago

Okay, recovered those files from the 2009 chm. That covers 18 of the 21 . The 2009 chm has a I1111 entry, which seems to correspond to A1111; A1113 does not seem to be used by the current code.

So the undocumented error codes are down to just A1110 and A1112.

The new merged/rebuilt chm is now 419288 bytes in size, which is quite a lot more reasonable.

HinTak commented 8 years ago

Also, there is no difference between the 2003 and 2009 versions of those 18 pages.

HinTak commented 8 years ago

Also, diff'ing the common part of 2009 and current (minus the part I know I added), there is no notable difference other than many "'" changed to "'" - except E2315. E2315 in 2009 was incomplete and current is.

So this just suggest that the private 2009 binary bundle I got is very close to what was eventually open-sourced. I am okay with accepting that that was no newer binary build than 2009 (i.e. the small E2315 diff never got made into a newer binary bundle).

HinTak commented 8 years ago

The additional glyf test related documentation is at: https://github.com/HinTak/Font-Validator/commit/812a561744778a0a5a83ef79f165ffb654b09093 and the re-built chm file at: https://github.com/HinTak/Font-Validator/commit/689a49ddef7eca72b814af9f7d096c434c41296c

Not sure about the graphics, but those html files in https://github.com/HinTak/Font-Validator/commit/812a561744778a0a5a83ef79f165ffb654b09093 should be eventually auto-generated from GenerateFValData/OurData.xml .

HinTak commented 7 years ago

Dont' think there is any more to be done; closing issues for the upcoming v2.1