Skip to content

Commit

Permalink
[feaLib.variableScalar] fix value_at_location() method (#3491)
Browse files Browse the repository at this point in the history
  • Loading branch information
justvanrossum committed May 13, 2024
1 parent 0738c41 commit 24cb4e0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Lib/fontTools/feaLib/variableScalar.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,11 @@ def default(self):
return self.values[key]

def value_at_location(self, location, model_cache=None, avar=None):
loc = location
loc = Location(location)
if loc in self.values.keys():
return self.values[loc]
values = list(self.values.values())
loc = dict(self._normalized_location(loc))
return self.model(model_cache, avar).interpolateFromMasters(loc, values)

def model(self, model_cache=None, avar=None):
Expand Down

0 comments on commit 24cb4e0

Please sign in to comment.