From b0860a8c2b778c580aa2ddb5fa71f04555dcbbea Mon Sep 17 00:00:00 2001 From: Just Date: Tue, 4 Jan 2000 14:02:05 +0000 Subject: [PATCH] added some initializer in case the table is empty. git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@49 4cde692c-a291-49d1-8350-778aa11640f8 --- Lib/fontTools/ttLib/tables/T_S_I__1.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Lib/fontTools/ttLib/tables/T_S_I__1.py b/Lib/fontTools/ttLib/tables/T_S_I__1.py index 8ee4e160e..e402129c4 100644 --- a/Lib/fontTools/ttLib/tables/T_S_I__1.py +++ b/Lib/fontTools/ttLib/tables/T_S_I__1.py @@ -36,6 +36,9 @@ class table_T_S_I__1(DefaultTable.DefaultTable): self.extraPrograms[self.extras[extraCode]] = text def compile(self, ttFont): + if not hasattr(self, "glyphPrograms"): + self.glyphPrograms = {} + self.extraPrograms = {} data = '' indextable = ttFont[self.indextable] glyphNames = ttFont.getGlyphOrder()