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

Skip to content

Commit 54cbf33

Browse files
committed
added the renderer dpi to the cache key for text
svn path=/trunk/matplotlib/; revision=6098
1 parent 1cc9ed6 commit 54cbf33

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/font_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -955,7 +955,7 @@ def findfont(self, prop, fontext='ttf'):
955955
fname = prop.get_file()
956956
if fname is not None:
957957
verbose.report('findfont returning %s'%fname, 'debug')
958-
return fname[0]
958+
return fname
959959

960960
if fontext == 'afm':
961961
fontdict = self.afmdict

lib/matplotlib/text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def get_prop_tup(self):
401401
return (x, y, self._text, self._color,
402402
self._verticalalignment, self._horizontalalignment,
403403
hash(self._fontproperties), self._rotation,
404-
self.figure.dpi, id(self._renderer)
404+
self.figure.dpi, id(self._renderer), self._renderer.dpi
405405
)
406406

407407
def get_text(self):

0 commit comments

Comments
 (0)