HinTak / 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.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Warning W1113 does not divulge which glyph has degenerated contours

madig opened this issue · comments

One of our fonts triggers this: W1113 Degenerated contour(s), Number of glyphs with the warning = 1. I guess the code to find these contours is at https://github.com/HinTak/Font-Validator/blob/master/Glyph/GErr.cs#L980, however:

  1. I don't understand what the code does
  2. It doesn't seem to use indGlyphOwner to note down the specific glyph index

I'd prepare a patch to fix 2., but the specifics string doesn't even seem to be used in the report?!

(Sent to your at-users.sourceforge.net address)

Argh, I saw this problem while testing visual-studio-2008-built FontVal 2.1.3 with Microsoft's times - I 'll look into it at some point.

@madig : sorry it has taken a while. I think I can answer both question 1 and 2: the glyph id is kept by the caller, and also summary-filtered out by the caller, in OTFontFileVal/val_glyf.cs. What you want to do is to disable the filtering, which can be done by commenting out (I.e. prepend with "//") the line "GERR_CONT_DEGEN" in the struct m_namesInfoCnt near line 147.

As I said I saw it with Microsoft Times - there are 11 such glyphs, all in the u200x unicode range, for various sort of spaces. In all the cases, the glyph has a single contour with a single point, so the diagnosis is correct, though uninteresting. Removing the single contour would get the font smaller.

I had a quick look at some of the older reports I collected; many fonts have a non-zero summary count. I assume the small ones (10-ish or below) are the u200x spaces, but some fonts have summary counts in the 100's so cannot really be that.

You can have a go at commenting out that line and see what glyph id it says - I'd suggest start with a font with a high count.

I am okay pushing this change (the commenting) as 2.1.4, if you have trouble building/running with mono.

@madig : I tagged 2.1.4 a few days ago and just made the windows build and you can use that now. Wait a few days if you want/need the mac/linux builds.

@madig : the 2.1.4 mac/linux binaries with this fix are up . Would be interested in what you find - whether they are single point contours in the u200x unicode space range or something else.