diff --git a/Lib/fontTools/ttLib/tables/_g_l_y_f.py b/Lib/fontTools/ttLib/tables/_g_l_y_f.py index 46cb2fd61..5c0e5f7f8 100644 --- a/Lib/fontTools/ttLib/tables/_g_l_y_f.py +++ b/Lib/fontTools/ttLib/tables/_g_l_y_f.py @@ -372,7 +372,7 @@ class table__g_l_y_f(DefaultTable.DefaultTable): ] def _getCoordinatesAndControls( - self, glyphName, hMetrics, vMetrics=None, roundCoordinates=True + self, glyphName, hMetrics, vMetrics=None, *, round=otRound ): """Return glyph coordinates and controls as expected by "gvar" table. @@ -446,8 +446,7 @@ class table__g_l_y_f(DefaultTable.DefaultTable): # Add phantom points for (left, right, top, bottom) positions. phantomPoints = self._getPhantomPoints(glyphName, hMetrics, vMetrics) coords.extend(phantomPoints) - if roundCoordinates: - coords.toInt() + coords.toInt(round=round) return coords, controls def _setCoordinates(self, glyphName, coord, hMetrics, vMetrics=None): diff --git a/Tests/varLib/instancer/instancer_test.py b/Tests/varLib/instancer/instancer_test.py index e574384de..ab64c379d 100644 --- a/Tests/varLib/instancer/instancer_test.py +++ b/Tests/varLib/instancer/instancer_test.py @@ -1,4 +1,5 @@ from fontTools.misc.fixedTools import floatToFixedToFloat +from fontTools.misc.roundTools import noRound from fontTools.misc.testTools import stripVariableItemsFromTTX from fontTools.misc.textTools import Tag from fontTools import ttLib @@ -57,7 +58,7 @@ def _get_coordinates(varfont, glyphname): varfont["hmtx"].metrics, varfont["vmtx"].metrics, # the tests expect float coordinates - roundCoordinates=False, + round=noRound, )[0] )