[varLib.merger] Fix recombining of multiple PairPosFormat2 subtables

Gosh!  This is the kind of thinko that doesn't happen with less dynamic languages...

Good one hour of debugging at TYPO Labs. Glad this one is fixed finally!

Fixes https://github.com/fonttools/fonttools/issues/888
This commit is contained in:
Behdad Esfahbod 2017-04-06 15:29:13 +02:00
parent 4c07266971
commit 86549315fd

View File

@ -533,7 +533,7 @@ def _Lookup_PairPosFormat2_subtables_recombine(a, b, font):
self.Class1Count = a.Class1Count + b.Class1Count self.Class1Count = a.Class1Count + b.Class1Count
self.ClassDef1 = ot.ClassDef() self.ClassDef1 = ot.ClassDef()
classDefs = ot.ClassDef1.classDefs = {} classDefs = self.ClassDef1.classDefs = {}
offset = a.Class1Count offset = a.Class1Count
# First subtable overrides any possible shared glyph, so add b first. # First subtable overrides any possible shared glyph, so add b first.
sets = _ClassDef_invert(b.ClassDef1, allGlyphs=b.Coverage.glyphs) sets = _ClassDef_invert(b.ClassDef1, allGlyphs=b.Coverage.glyphs)