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

Skip to content

Commit d22266f

Browse files
committed
Properly encode the fontname when using in findfont
1 parent fa05169 commit d22266f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_ps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ def set_font(self, fontname, fontsize, store=1):
284284
if (fontname,fontsize) != (self.fontname,self.fontsize):
285285
out = ("/%s findfont\n"
286286
"%1.3f scalefont\n"
287-
"setfont\n" % (fontname,fontsize))
287+
"setfont\n" % (fontname.decode('ascii'), fontsize))
288288

289289
self._pswriter.write(out)
290290
if store: self.fontname = fontname

0 commit comments

Comments
 (0)