Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions lib/matplotlib/backends/backend_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -1119,10 +1119,9 @@ def _draw_text_as_text(self, gc, x, y, s, prop, angle, ismath, mtext=None):
weight = fm.weight_dict[prop.get_weight()]
if weight != 400:
font_parts.append(f'{weight}')
font_parts.extend([
f'{short_float_fmt(prop.get_size())}px',
f'{prop.get_family()[0]!r}', # ensure quoting
])
font_parts.append(f'{short_float_fmt(prop.get_size())}px')
font_parts.append(", ".join([f'{prop.get_name()!r}'] +
prop.get_family()))
Comment thread
QuLogic marked this conversation as resolved.
Resolved
style['font'] = ' '.join(font_parts)
if prop.get_stretch() != 'normal':
style['font-stretch'] = prop.get_stretch()
Expand Down