Skip to content

Commit 70b5687

Browse files
committed
Fix SVG text rendering bug affecting Mozilla-based viewers.
svn path=/branches/v0_91_maint/; revision=5088
1 parent 472ed1e commit 70b5687

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

CHANGELOG

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2008-04-28 Fix bug in SVG text with Mozilla-based viewers (the symbol
2+
tag is not supported) - MGD
3+
14
2008-04-24 Fix sub/superscripts when the size of the font has been
25
changed - MGD
36

lib/matplotlib/backends/backend_svg.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -390,7 +390,8 @@ def _add_char_def(self, prop, char):
390390
currx, curry = step[-2], -step[-1]
391391
path_data = ''.join(path_data)
392392
char_num = 'c_%s' % md5.new(path_data).hexdigest()
393-
path_element = '<symbol id="%s"><path d="%s"/></symbol>\n' % (char_num, ''.join(path_data))
393+
char_num = len(self._char_defs)
394+
path_element = '<path id="%s" d="%s"/>\n' % (char_num, ''.join(path_data))
394395
self._char_defs[char_id] = char_num
395396
return path_element
396397

0 commit comments

Comments
 (0)