Skip to content

Commit

Permalink
otRound the position when building a variable anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
simoncozens authored and anthrotype committed Jan 10, 2024
1 parent a591759 commit 30b6be6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Lib/ufo2ft/featureWriters/baseFeatureWriter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 30b6be6

Please sign in to comment.