aboutsummaryrefslogtreecommitdiff
path: root/Lib/fontTools/otlLib/builder.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/fontTools/otlLib/builder.py')
-rw-r--r--Lib/fontTools/otlLib/builder.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/fontTools/otlLib/builder.py b/Lib/fontTools/otlLib/builder.py
index 7e144451..029aa3fc 100644
--- a/Lib/fontTools/otlLib/builder.py
+++ b/Lib/fontTools/otlLib/builder.py
@@ -2574,7 +2574,8 @@ class ClassDefBuilder(object):
return
self.classes_.add(glyphs)
for glyph in glyphs:
- assert glyph not in self.glyphs_
+ if glyph in self.glyphs_:
+ raise OpenTypeLibError(f"Glyph {glyph} is already present in class.", None)
self.glyphs_[glyph] = glyphs
def classes(self):