File tree Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Expand file tree Collapse file tree 2 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -657,9 +657,6 @@ def __init__(self,
657
657
self .set_file (fname )
658
658
self .set_size (size )
659
659
660
- def _parse_fontconfig_pattern (self , pattern ):
661
- return parse_fontconfig_pattern (pattern )
662
-
663
660
def __hash__ (self ):
664
661
l = (tuple (self .get_family ()),
665
662
self .get_slant (),
@@ -850,7 +847,7 @@ def set_fontconfig_pattern(self, pattern):
850
847
This support does not depend on fontconfig; we are merely borrowing its
851
848
pattern syntax for use here.
852
849
"""
853
- for key , val in self . _parse_fontconfig_pattern (pattern ).items ():
850
+ for key , val in parse_fontconfig_pattern (pattern ).items ():
854
851
if type (val ) == list :
855
852
getattr (self , "set_" + key )(val [0 ])
856
853
else :
Original file line number Diff line number Diff line change @@ -153,19 +153,17 @@ def __init__(self,
153
153
color = rcParams ['text.color' ]
154
154
if fontproperties is None :
155
155
fontproperties = FontProperties ()
156
- elif isinstance (fontproperties , str ):
157
- fontproperties = FontProperties (fontproperties )
158
156
159
157
self ._text = ''
160
158
self .set_text (text )
161
159
self .set_color (color )
160
+ self .set_fontproperties (fontproperties )
162
161
self .set_usetex (usetex )
163
162
self .set_wrap (wrap )
164
163
self .set_verticalalignment (verticalalignment )
165
164
self .set_horizontalalignment (horizontalalignment )
166
165
self ._multialignment = multialignment
167
166
self ._rotation = rotation
168
- self ._fontproperties = fontproperties
169
167
self ._bbox_patch = None # a FancyBboxPatch instance
170
168
self ._renderer = None
171
169
if linespacing is None :
You can’t perform that action at this time.
0 commit comments