Skip to content

Commit 140257e

Browse files
committed
ENH: add font fallback support to svg
1 parent d613370 commit 140257e

File tree

5 files changed

+499
-7
lines changed

5 files changed

+499
-7
lines changed

lib/matplotlib/backends/backend_svg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1130,7 +1130,8 @@ def _draw_text_as_text(self, gc, x, y, s, prop, angle, ismath, mtext=None):
11301130
font_parts.append(f'{weight}')
11311131
font_parts.extend([
11321132
f'{_short_float_fmt(prop.get_size())}px',
1133-
f'{prop.get_family()[0]!r}', # ensure quoting
1133+
# ensure quoting
1134+
f'{", ".join(repr(f) for f in prop.get_family())}',
11341135
])
11351136
style['font'] = ' '.join(font_parts)
11361137
if prop.get_stretch() != 'normal':

0 commit comments

Comments
 (0)