Fix class2defs self overlapping glyphsets

This commit is contained in:
Martin Hosken 2020-12-01 23:38:12 +07:00
parent 47c85d9afa
commit 75f314b149

View File

@ -2558,11 +2558,13 @@ class ClassDefBuilder(object):
if isinstance(glyphs, (set, frozenset)):
glyphs = sorted(glyphs)
glyphs = tuple(glyphs)
tempglyphs = set()
if glyphs in self.classes_:
return True
for glyph in glyphs:
if glyph in self.glyphs_:
if glyph in self.glyphs_ or glyph in tempglyphs:
return False
tempglyphs.add(glyph)
return True
def add(self, glyphs):