8000 Use FontsInterface for agg backend · matplotlib/matplotlib@4f0b971 · GitHub
[go: up one dir, main page]

Skip to content

Commit 4f0b971

Browse files
committed
Use FontsInterface for agg backend
1 parent c160470 commit 4f0b971

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/backends/backend_agg.py

Lines changed: 3 additions & 3 deletions
9ED4
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
from matplotlib.backend_bases import (
3636
_Backend, _check_savefig_extra_args, FigureCanvasBase, FigureManagerBase,
3737
RendererBase)
38-
from matplotlib.font_manager import findfont, get_font
38+
from matplotlib.font_manager import get_font, find_fontsprop
3939
from matplotlib.ft2font import (LOAD_FORCE_AUTOHINT, LOAD_NO_HINTING,
4040
LOAD_DEFAULT, LOAD_NO_AUTOHINT)
4141
from matplotlib.mathtext import MathTextParser
@@ -251,8 +251,8 @@ def _get_agg_font(self, prop):
251251
"""
252252
Get the font for text instance t, caching for efficiency
253253
"""
254-
fname = findfont(prop)
255-
font = get_font(fname)
254+
finterface = find_fontsprop(prop)
255+
font = get_font(finterface)
256256

257257
font.clear()
258258
size = prop.get_size_in_points()

0 commit comments

Comments
 (0)
0