From 24cb4e0dcf7109fc2d23727e0b8f2ffe67c7b5a7 Mon Sep 17 00:00:00 2001 From: Just van Rossum Date: Mon, 13 May 2024 09:48:59 +0200 Subject: [PATCH] [feaLib.variableScalar] fix value_at_location() method (#3491) --- Lib/fontTools/feaLib/variableScalar.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/fontTools/feaLib/variableScalar.py b/Lib/fontTools/feaLib/variableScalar.py index c97b43542..96e7c0756 100644 --- a/Lib/fontTools/feaLib/variableScalar.py +++ b/Lib/fontTools/feaLib/variableScalar.py @@ -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):