Skip to content

Commit 0a80831

Browse files
committed
Include cache version in fontlist cache filename.
1 parent 68c3913 commit 0a80831

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/matplotlib/font_manager.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -945,7 +945,7 @@ class FontManager(object):
945945
# Increment this version number whenever the font cache data
946946
# format or behavior has changed and requires a existing font
947947
# cache files to be rebuilt.
948-
__version__ = 201
948+
__version__ = 300
949949

950950
def __init__(self, size=None, weight='normal'):
951951
self._version = self.__version__
@@ -1333,7 +1333,8 @@ def findfont(prop, fontext='ttf'):
13331333

13341334
cachedir = get_cachedir()
13351335
if cachedir is not None:
1336-
_fmcache = os.path.join(cachedir, 'fontList.json')
1336+
_fmcache = os.path.join(
1337+
cachedir, 'fontlist-v{}.json'.format(FontManager.__version__))
13371338

13381339
fontManager = None
13391340

0 commit comments

Comments
 (0)