[ufo] in fonts_to_quadratic, iterate over union of glyph names and convert compatibly glyphs with same name.
Don't use zip(*fonts) as defcon fonts are dictionary-like objects and the ordering of the glyphs returned by __iter__ method is undefined. Should fix #48
This commit is contained in:
parent
d46be588f1
commit
a5f93a06b9
@ -225,8 +225,8 @@ def fonts_to_quadratic(
|
||||
assert len(max_errors) == len(fonts)
|
||||
|
||||
modified = False
|
||||
for glyphs in zip(*fonts):
|
||||
name = glyphs[0].name
|
||||
for name in set().union(*(f.keys() for f in fonts)):
|
||||
glyphs = [font[name] for font in fonts if name in font]
|
||||
assert all(g.name == name for g in glyphs), 'Incompatible fonts'
|
||||
modified |= _glyphs_to_quadratic(
|
||||
glyphs, max_errors, reverse_direction, stats)
|
||||
|
Loading…
x
Reference in New Issue
Block a user