Oops, UFOLib's getGlyphSet does not have an items function

This commit is contained in:
Colin M. Ford 2023-04-05 18:21:17 -04:00
parent 4a991d1d89
commit 9c1380be96

View File

@ -471,10 +471,13 @@ def main(args=None):
names.append(basename(filename).rsplit(".", 1)[0])
if hasattr(fonts[0], "getGlyphSet"):
glyphsets = [dict(font.getGlyphSet().items()) for font in fonts]
else:
glyphsets = [dict(font.items()) for font in fonts]
glyphsets = []
for font in fonts:
if hasattr(font, "getGlyphSet"):
glyphset = font.getGlyphSet()
else:
glyphset = font
glyphsets.append({k:glyphset[k] for k in glyphset.keys()})
if not glyphs:
glyphs = set([gn for glyphset in glyphsets for gn in glyphset.keys()])