[varLib.builder] fix calculation of VarData.NumShorts
The problem was that `break` statement: we stopped searching for SHORT columns in each delta set after finding the first, but rows can contain more than one in any order. Fixes https://github.com/googlei18n/fontmake/issues/271
This commit is contained in:
parent
989270afc5
commit
b2825ff6b3
@ -44,10 +44,8 @@ def calculateNumShorts(self, optimize=True):
|
||||
items = self.Item
|
||||
narrows = set(range(count))
|
||||
for item in items:
|
||||
for i in narrows:
|
||||
if not (-128 <= item[i] <= 127):
|
||||
narrows.remove(i)
|
||||
break
|
||||
wides = [i for i in narrows if not (-128 <= item[i] <= 127)]
|
||||
narrows.difference_update(wides)
|
||||
if not narrows:
|
||||
break
|
||||
if optimize:
|
||||
|
Loading…
x
Reference in New Issue
Block a user