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

Skip to content

Commit 21cf88d

Browse files
committed
Merged revisions 4496-4498 via svnmerge from
http://matplotlib.svn.sf.net/svnroot/matplotlib/trunk/matplotlib ........ r4497 | mdboom | 2007-11-28 15:43:01 -0500 (Wed, 28 Nov 2007) | 2 lines Minor fix -- updating old \rm{} syntax to \mathrm{} syntax. ........ r4498 | mdboom | 2007-11-28 15:58:06 -0500 (Wed, 28 Nov 2007) | 2 lines Fix for STIX fonts with PDF backend. ........ svn path=/branches/transforms/; revision=4499
1 parent 3089c81 commit 21cf88d

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

examples/mathtext_demo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
ax.legend(("Foo", "Testing $x^2$"))
2424

25-
ax.set_title(r'$\Delta_i^j \hspace{0.4} \rm{versus} \hspace{0.4} \Delta_{i+1}^j$', fontsize=20)
25+
ax.set_title(r'$\Delta_i^j \hspace{0.4} \mathrm{versus} \hspace{0.4} \Delta_{i+1}^j$', fontsize=20)
2626
#fig.savefig('mathtext_demo')
2727

2828
show()

lib/matplotlib/backends/backend_pdf.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ def get_char_width(charcode):
719719
charprocDict['Type'] = Name('XObject')
720720
charprocDict['Subtype'] = Name('Form')
721721
charprocDict['BBox'] = bbox
722-
charprocObject = self.reserveObject('charProc for %s' % name)
722+
charprocObject = self.reserveObject('charProc')
723723
self.beginStream(charprocObject.id, None, charprocDict)
724724
self.currentstream.write(stream)
725725
self.endStream()
@@ -1308,6 +1308,7 @@ def draw_mathtext(self, gc, x, y, s, prop, angle):
13081308
fonttype = global_fonttype
13091309

13101310
if fonttype == 3 and num > 255:
1311+
self.file.fontName(fontname)
13111312
self.file.output(Op.gsave,
13121313
0.001 * fontsize, 0,
13131314
0, 0.001 * fontsize,

0 commit comments

Comments
 (0)