[varLib] Minor

This commit is contained in:
Behdad Esfahbod 2017-05-31 19:00:33 -04:00
parent c79c27a841
commit 7db5868dba

View File

@ -202,11 +202,11 @@ def _SetCoordinates(font, glyphName, coord):
font["hmtx"].metrics[glyphName] = horizontalAdvanceWidth, leftSideBearing
def _all_interpolatable_in_between(deltas, coords, j, i, tolerance):
assert i - j >= 2
def _all_interpolatable_in_between(deltas, coords, i, j, tolerance):
assert j - i >= 2
from fontTools.varLib.mutator import _iup_segment
interp = _iup_segment(coords[j+1:i], coords[j], deltas[j], coords[i], deltas[i])
deltas = deltas[j+1:i]
interp = _iup_segment(coords[i+1:j], coords[i], deltas[i], coords[j], deltas[j])
deltas = deltas[i+1:j]
assert len(deltas) == len(interp)