make sure Coverage instances have a 'glyphs' attribute

git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@379 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
jvr 2003-01-03 20:54:31 +00:00
parent 4170cfd5e9
commit 257fba7172

View File

@ -44,7 +44,9 @@ class Coverage(FormatSwitchingBaseTable):
assert 0, "unknown format: %s" % self.Format assert 0, "unknown format: %s" % self.Format
def preWrite(self, font): def preWrite(self, font):
glyphs = getattr(self, "glyphs", []) glyphs = getattr(self, "glyphs")
if glyphs is None:
glyphs = self.glyphs = []
format = 1 format = 1
rawTable = {"GlyphArray": glyphs} rawTable = {"GlyphArray": glyphs}
if glyphs: if glyphs: