From df1e8c77021d00217c62c5338f9548d8417fd4bd Mon Sep 17 00:00:00 2001 From: Cosimo Lupo Date: Wed, 29 Nov 2017 11:59:04 +0000 Subject: [PATCH] [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 ``` --- Lib/fontTools/ttLib/tables/_p_o_s_t.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/fontTools/ttLib/tables/_p_o_s_t.py b/Lib/fontTools/ttLib/tables/_p_o_s_t.py index 5cf430ef6..ede62dabc 100644 --- a/Lib/fontTools/ttLib/tables/_p_o_s_t.py +++ b/Lib/fontTools/ttLib/tables/_p_o_s_t.py @@ -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):