[feaLib.variableScalar] fix value_at_location() method (#3491)

This commit is contained in:
Just van Rossum 2024-05-13 09:48:59 +02:00 committed by GitHub
parent 0738c41dfb
commit 24cb4e0dcf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -75,10 +75,11 @@ class VariableScalar:
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):