@@ -552,7 +552,6 @@ class TruetypeFonts(Fonts):
552
552
A generic base class for all font setups that use Truetype fonts
553
553
(through ft2font)
554
554
"""
555
- basepath = os .path .join ( get_data_path (), 'fonts' )
556
555
_fonts = {}
557
556
558
557
class CachedFont :
@@ -686,7 +685,7 @@ def __init__(self, *args, **kwargs):
686
685
TruetypeFonts .__init__ (self , * args , ** kwargs )
687
686
if not len (self .fontmap ):
688
687
for key , val in self ._fontmap .iteritems ():
689
- fullpath = os . path . join ( self . basepath , 'ttf' , val + ".ttf" )
688
+ fullpath = findfont ( val )
690
689
self .fontmap [key ] = fullpath
691
690
self .fontmap [val ] = fullpath
692
691
@@ -913,7 +912,7 @@ def __init__(self, *args, **kwargs):
913
912
TruetypeFonts .__init__ (self , * args , ** kwargs )
914
913
if not len (self .fontmap ):
915
914
for key , name in self ._fontmap .iteritems ():
916
- fullpath = os . path . join ( self . basepath , 'ttf' , name + ".ttf" )
915
+ fullpath = findfont ( name )
917
916
self .fontmap [key ] = fullpath
918
917
self .fontmap [name ] = fullpath
919
918
0 commit comments