[instancer.solver] Use older lru_cache instead of cache

This commit is contained in:
Behdad Esfahbod 2022-08-09 15:08:29 -06:00
parent 8f6779d67e
commit 3c998785db

View File

@ -1,6 +1,6 @@
from fontTools.varLib.models import supportScalar, normalizeValue from fontTools.varLib.models import supportScalar, normalizeValue
from fontTools.misc.fixedTools import MAX_F2DOT14 from fontTools.misc.fixedTools import MAX_F2DOT14
from functools import cache from functools import lru_cache
__all__ = ['rebaseTent'] __all__ = ['rebaseTent']
@ -255,7 +255,7 @@ def _solve(tent, axisLimit, negative=False):
return out return out
@cache @lru_cache
def rebaseTent(tent, axisLimit): def rebaseTent(tent, axisLimit):
"""Given a tuple (lower,peak,upper) "tent" and new axis limits """Given a tuple (lower,peak,upper) "tent" and new axis limits
(axisMin,axisDefault,axisMax), solves how to represent the tent (axisMin,axisDefault,axisMax), solves how to represent the tent