From 30b6be6531bd360b395e4f3019f5ef954722b607 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Thu, 7 Dec 2023 11:10:30 +0000 Subject: [PATCH] otRound the position when building a variable anchor --- Lib/ufo2ft/featureWriters/baseFeatureWriter.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Lib/ufo2ft/featureWriters/baseFeatureWriter.py b/Lib/ufo2ft/featureWriters/baseFeatureWriter.py index bfc8d2f4..32a15e4b 100644 --- a/Lib/ufo2ft/featureWriters/baseFeatureWriter.py +++ b/Lib/ufo2ft/featureWriters/baseFeatureWriter.py @@ -4,6 +4,7 @@ from fontTools.designspaceLib import DesignSpaceDocument from fontTools.feaLib.variableScalar import VariableScalar +from fontTools.misc.fixedTools import otRound from ufo2ft.constants import OPENTYPE_CATEGORIES_KEY from ufo2ft.errors import InvalidFeaturesData @@ -462,8 +463,8 @@ def _getAnchor(self, glyphName, anchorName, anchor=None): for anchor in glyph.anchors: if anchor.name == anchorName: location = get_userspace_location(designspace, source.location) - x_value.add_value(location, anchor.x) - y_value.add_value(location, anchor.y) + x_value.add_value(location, otRound(anchor.x)) + y_value.add_value(location, otRound(anchor.y)) found = True if not found: return None