diff --git a/Lib/fontTools/ttLib/tables/_g_l_y_f.py b/Lib/fontTools/ttLib/tables/_g_l_y_f.py index 9886d7ab3..b8ed20d5e 100644 --- a/Lib/fontTools/ttLib/tables/_g_l_y_f.py +++ b/Lib/fontTools/ttLib/tables/_g_l_y_f.py @@ -1506,12 +1506,12 @@ class GlyphCoordinates(object): p = self._checkFloat(p) self._a.extend(p) - def toInt(self): + def toInt(self, *, round=otRound): if not self.isFloat(): return a = array.array("h") for n in self._a: - a.append(otRound(n)) + a.append(round(n)) self._a = a def relativeToAbsolute(self): @@ -1626,9 +1626,9 @@ class GlyphCoordinates(object): for i in range(len(a)): a[i] = -a[i] return r - def __round__(self): + def __round__(self, *, round=otRound): r = self.copy() - r.toInt() + r.toInt(round=round) return r def __add__(self, other): return self.copy().__iadd__(other)