Don't crash if the font has no embedded copyright (e.g. mononoki)

Fixes #92
This commit is contained in:
Rebecca Kelly 2021-09-04 08:51:57 -04:00 committed by Rebecca Kelly
parent 94189f84b8
commit 897124643d

View File

@ -242,7 +242,7 @@ def update_font_metadata(font, new_name):
print("Ligaturizing font %s (%s) as '%s'" % (
path.basename(font.path), old_name, new_name))
font.copyright += COPYRIGHT
font.copyright = (font.copyright or '') + COPYRIGHT
replace_sfnt(font, 'UniqueID', '%s; Ligaturized' % font.fullname)
replace_sfnt(font, 'Preferred Family', new_name)
replace_sfnt(font, 'Compatible Full', new_name)