8000 Pass only first font for pdf_ps · matplotlib/matplotlib@a2da73d · GitHub
[go: up one dir, main page]

Skip to content

Commit a2da73d

Browse files
committed
Pass only first font for pdf_ps
1 parent 9d78831 commit a2da73d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matplotlib/backends/_backend_pdf_ps.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ def get_text_width_height_descent(self, s, prop, ismath):
108108
def _get_font_afm(self, prop):
109109
fname = font_manager.findfont(
110110
prop, fontext="afm", directory=self._afm_font_dir)
111+
112+
# TODO: allow multiple font caching
113+
# for now pass the first font
114+
fname = next(iter(fname.values()))
111115
return _cached_get_afm_from_fname(fname)
112116

113117
def _get_font_ttf(self, prop):

0 commit comments

Comments
 (0)
0