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

Skip to content

Commit 958c938

Browse files
committed
Merge pull request matplotlib#3496 from tacaswell/eps_fontname_bytes
BUG : fix str vs bytes issue in py3 in ps backend
2 parents 4896f46 + 181ce57 commit 958c938

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
@@ -764,7 +764,7 @@ def draw_text(self, gc, x, y, s, prop, angle, ismath=False, mtext=None):
764764
except KeyError:
765765
ps_name = sfnt[(3,1,0x0409,6)].decode(
766766
'utf-16be')
767-
ps_name = ps_name.encode('ascii', 'replace')
767+
ps_name = ps_name.encode('ascii', 'replace').decode('ascii')
768768
self.set_font(ps_name, prop.get_size_in_points())
769769

770770
cmap = font.get_charmap()

0 commit comments

Comments
 (0)