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

Skip to content

Commit 157a059

Browse files
committed
Merged revisions 4926-4927 via svnmerge from
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_91_maint ........ r4927 | mdboom | 2008-02-01 14:13:09 -0500 (Fri, 01 Feb 2008) | 2 lines Fix doubly-included fonts in Postscript files. ........ svn path=/trunk/matplotlib/; revision=4928
1 parent b463b11 commit 157a059

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

lib/matplotlib/mathtext.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -552,7 +552,6 @@ class TruetypeFonts(Fonts):
552552
A generic base class for all font setups that use Truetype fonts
553553
(through ft2font)
554554
"""
555-
basepath = os.path.join( get_data_path(), 'fonts' )
556555
_fonts = {}
557556

558557
class CachedFont:
@@ -686,7 +685,7 @@ def __init__(self, *args, **kwargs):
686685
TruetypeFonts.__init__(self, *args, **kwargs)
687686
if not len(self.fontmap):
688687
for key, val in self._fontmap.iteritems():
689-
fullpath = os.path.join(self.basepath, 'ttf', val + ".ttf")
688+
fullpath = findfont(val)
690689
self.fontmap[key] = fullpath
691690
self.fontmap[val] = fullpath
692691

@@ -913,7 +912,7 @@ def __init__(self, *args, **kwargs):
913912
TruetypeFonts.__init__(self, *args, **kwargs)
914913
if not len(self.fontmap):
915914
for key, name in self._fontmap.iteritems():
916-
fullpath = os.path.join(self.basepath, 'ttf', name + ".ttf")
915+
fullpath = findfont(name)
917916
self.fontmap[key] = fullpath
918917
self.fontmap[name] = fullpath
919918

0 commit comments

Comments
 (0)