don't barf on empty name tables (!)

git-svn-id: svn://svn.code.sf.net/p/fonttools/code/trunk@349 4cde692c-a291-49d1-8350-778aa11640f8
This commit is contained in:
jvr 2002-09-12 19:07:39 +00:00
parent 848d25d97d
commit 3507eeb3d8

View File

@ -35,6 +35,10 @@ class table__n_a_m_e(DefaultTable.DefaultTable):
self.names.append(name)
def compile(self, ttFont):
if not hasattr(self, "names"):
# only happens when there are NO name table entries read
# from the TTX file
self.names = []
self.names.sort() # sort according to the spec; see NameRecord.__cmp__()
stringData = ""
format = 0