Skip to content

Commit 7f92f6a

Browse files
authored
Merge pull request #21278 from anntzer/addfontcache
Clear findfont cache when calling addfont().
2 parents fea21af + 997b69e commit 7f92f6a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/matplotlib/font_manager.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1092,6 +1092,7 @@ def addfont(self, path):
10921092
font = ft2font.FT2Font(path)
10931093
prop = ttfFontProperty(font)
10941094
self.ttflist.append(prop)
1095+
self._findfont_cached.cache_clear()
10951096

10961097
@property
10971098
def defaultFont(self):

0 commit comments

Comments
 (0)