[post] prune extra names already in standard Mac set

This should fix https://github.com/fonttools/fonttools/issues/1119

Running `ftxvalidator -T tt0004c_#1.ttf` no longer produces this error
message, but passes with 'NA'

```
Fatal
    post: The name data overflow the table bounds.
        kATSFontTestSeverityFatalError
```
This commit is contained in:
Cosimo Lupo 2017-11-29 11:59:04 +00:00
parent fea1c3ff6a
commit df1e8c7702

View File

@ -154,7 +154,8 @@ class table__p_o_s_t(DefaultTable.DefaultTable):
assert len(glyphOrder) == numGlyphs
indices = array.array("H")
extraDict = {}
extraNames = self.extraNames
extraNames = self.extraNames = [
n for n in self.extraNames if n not in standardGlyphOrder]
for i in range(len(extraNames)):
extraDict[extraNames[i]] = i
for glyphID in range(numGlyphs):