Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit bfc1952

Browse filesBrowse files
committed
Fix doubly-included fonts in Postscript files.
svn path=/branches/v0_91_maint/; revision=4927
1 parent f0aa448 commit bfc1952
Copy full SHA for bfc1952

File tree

1 file changed

+2
-3
lines changed
Filter options

1 file changed

+2
-3
lines changed

‎lib/matplotlib/mathtext.py

Copy file name to clipboardExpand all lines: lib/matplotlib/mathtext.py
+2-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.