From 81498e5baf5d9beeb413d3f8f9a65edcf84de5e7 Mon Sep 17 00:00:00 2001 From: Behdad Esfahbod Date: Sat, 20 May 2017 23:03:25 -0700 Subject: [PATCH] [varLib] Fix bug with recombining PairPosClass2 subtables that don't Ouch. I have no idea why I made two separate if's to begin with, but the continue should have also been aligned with the inner block... Fixes root cause of https://github.com/fonttools/fonttools/issues/914 but now we hit an unimplemented feature there... --- Lib/fontTools/varLib/merger.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Lib/fontTools/varLib/merger.py b/Lib/fontTools/varLib/merger.py index ba8e2166f..c80d43da7 100644 --- a/Lib/fontTools/varLib/merger.py +++ b/Lib/fontTools/varLib/merger.py @@ -581,13 +581,13 @@ def _Lookup_PairPos_subtables_canonicalize(lst, font): for subtable in it: oldtable = tail[-1] - if oldtable.Format == 2 and subtable.Format == 2: - if (oldtable.Class2Count == subtable.Class2Count and - oldtable.ClassDef2.classDefs == subtable.ClassDef2.classDefs and - oldtable.ValueFormat1 == subtable.ValueFormat1 and - oldtable.ValueFormat2 == subtable.ValueFormat2): - newtable = _Lookup_PairPosFormat2_subtables_recombine(oldtable, subtable, font) - tail[-1] = newtable + if (oldtable.Format == 2 and subtable.Format == 2 and + oldtable.Class2Count == subtable.Class2Count and + oldtable.ClassDef2.classDefs == subtable.ClassDef2.classDefs and + oldtable.ValueFormat1 == subtable.ValueFormat1 and + oldtable.ValueFormat2 == subtable.ValueFormat2): + newtable = _Lookup_PairPosFormat2_subtables_recombine(oldtable, subtable, font) + tail[-1] = newtable continue tail.append(subtable)