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

Skip to content

slow_update #548

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 14 commits into from
Closed
Changes from 2 commits
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
10 changes: 6 additions & 4 deletions lib/matplotlib/backends/backend_svg.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def _get_hatch(self, gc, rgbFace):
else:
_, oid = oid
return oid

def _write_hatches(self):
if not len(self._hatchd):
return
Expand Down Expand Up @@ -445,7 +445,7 @@ def _write_clips(self):
writer.element('rect', x=str(x), y=str(y), width=str(w), height=str(h))
writer.end('clipPath')
writer.end('defs')

def _write_svgfonts(self):
if not rcParams['svg.fonttype'] == 'svgfont':
return
Expand Down Expand Up @@ -926,7 +926,8 @@ def _draw_text_as_text(self, gc, x, y, s, prop, angle, ismath):
fontstyle = prop.get_style()

attrib = {}
style['font-size'] = str(fontsize)
# Must add "px" to workaround a Firefox bug
style['font-size'] = str(fontsize) + 'px'
style['font-family'] = str(fontfamily)
style['font-style'] = prop.get_style().lower()
attrib['style'] = generate_css(style)
Expand Down Expand Up @@ -967,7 +968,8 @@ def _draw_text_as_text(self, gc, x, y, s, prop, angle, ismath):
spans = {}
for font, fontsize, thetext, new_x, new_y, metrics in svg_glyphs:
style = generate_css({
'font-size': str(fontsize),
# Must add "px" to work around a Firefox bug
'font-size': str(fontsize) + 'px',
'font-family': font.family_name,
'font-style': font.style_name.lower()})
if thetext == 32:
Expand Down