Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e73142b

Browse files
committed
Merge pull request matplotlib#4418 from RealGeeks/master
FIX: font weight handling in svg Merged by hand to drop two merges from master into this branch
2 parents 62b5d78 + 7157fe3 commit e73142b

File tree

3 files changed

+415
-1
lines changed

3 files changed

+415
-1
lines changed

lib/matplotlib/backends/backend_svg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1030,7 +1030,7 @@ def _draw_text_as_text(self, gc, x, y, s, prop, angle, ismath, mtext=None):
10301030
style['font-size'] = six.text_type(fontsize) + 'px'
10311031
style['font-family'] = six.text_type(fontfamily)
10321032
style['font-style'] = prop.get_style().lower()
1033-
style['font-weight'] = prop.get_weight().lower()
1033+
style['font-weight'] = six.text_type(prop.get_weight()).lower()
10341034
attrib['style'] = generate_css(style)
10351035

10361036
if mtext and (angle == 0 or mtext.get_rotation_mode() == "anchor"):

0 commit comments

Comments
 (0)