Skip to content

Commit

Permalink
Merge pull request #21278 from anntzer/addfontcache
Browse files Browse the repository at this point in the history
Clear findfont cache when calling addfont().
  • Loading branch information
QuLogic committed Oct 21, 2021
2 parents fea21af + 997b69e commit 7f92f6a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/matplotlib/font_manager.py
Expand Up @@ -1092,6 +1092,7 @@ def addfont(self, path):
font = ft2font.FT2Font(path)
prop = ttfFontProperty(font)
self.ttflist.append(prop)
self._findfont_cached.cache_clear()

@property
def defaultFont(self):
Expand Down

0 comments on commit 7f92f6a

Please sign in to comment.