[merge] Downgrade duplicates-resolution missing-GSUB from assert to warn

This commit is contained in:
Behdad Esfahbod 2021-12-14 15:30:44 -07:00
parent 31dcd03bff
commit 584c748951

View File

@ -771,7 +771,10 @@ def merge(self, m, tables):
assert len(tables) == len(m.duplicateGlyphsPerFont)
for i,(table,dups) in enumerate(zip(tables, m.duplicateGlyphsPerFont)):
if not dups: continue
assert (table is not None and table is not NotImplemented), "Have duplicates to resolve for font %d but no GSUB: %s" % (i + 1, dups)
if table is None or table is NotImplemented:
log.warning("Have non-identical duplicates to resolve for font %d but no GSUB. Are duplicates intended?: %s" % (i + 1, dups))
continue
synthFeature = None
synthLookup = None
for script in table.table.ScriptList.ScriptRecord: