diff --git a/Lib/fontTools/otlLib/builder.py b/Lib/fontTools/otlLib/builder.py index aa8649b49..91579fdc1 100644 --- a/Lib/fontTools/otlLib/builder.py +++ b/Lib/fontTools/otlLib/builder.py @@ -343,6 +343,8 @@ class ChainContextualBuilder(LookupBuilder): w["LookupType"] = CountReference( {"LookupType": st.LookupType}, "LookupType" ) + # We need to make a copy here because compiling + # modifies the subtable (finalizing formats etc.) copy.deepcopy(st).compile(w, self.font) size += len(w.getAllData()) return size