[merge] Fails if 'GSUB' table not present

Fixes https://github.com/behdad/fonttools/issues/135

Or does it?
This commit is contained in:
Behdad Esfahbod 2014-07-09 17:13:16 -04:00
parent bc7cf1fd5d
commit 68921c97ea

View File

@ -757,9 +757,15 @@ class Merger(object):
allTags = reduce(set.union, (list(font.keys()) for font in fonts), set())
allTags.remove('GlyphOrder')
allTags.remove('cmap')
allTags.remove('GSUB')
allTags = ['cmap', 'GSUB'] + list(allTags)
# Make sure we process cmap before GSUB as we have a dependency there.
if 'GSUB' in allTags:
allTags.remove('GSUB')
allTags = ['GSUB'] + list(allTags)
if 'cmap' in allTags:
allTags.remove('cmap')
allTags = ['cmap'] + list(allTags)
for tag in allTags:
tables = [font.get(tag, NotImplemented) for font in fonts]