MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / set_fontfamily

Method set_fontfamily

lib/matplotlib/text.py:1183–1205  ·  view source on GitHub ↗

Set the font family. Can be either a single string, or a list of strings in decreasing priority. Each string may be either a real font name or a generic font class name. If the latter, the specific font names will be looked up in the corresponding rcParams.

(self, fontname)

Source from the content-addressed store, hash-verified

1181 return self._linespacing
1182
1183 def set_fontfamily(self, fontname):
1184 """
1185 Set the font family. Can be either a single string, or a list of
1186 strings in decreasing priority. Each string may be either a real font
1187 name or a generic font class name. If the latter, the specific font
1188 names will be looked up in the corresponding rcParams.
1189
1190 If a `Text` instance is constructed with ``fontfamily=None``, then the
1191 font is set to :rc:`font.family`, and the
1192 same is done when `set_fontfamily()` is called on an existing
1193 `Text` instance.
1194
1195 Parameters
1196 ----------
1197 fontname : {FONTNAME, 'serif', 'sans-serif', 'cursive', 'fantasy', \
1198'monospace'}
1199
1200 See Also
1201 --------
1202 .font_manager.FontProperties.set_family
1203 """
1204 self._fontproperties.set_family(fontname)
1205 self.stale = True
1206
1207 def set_fontfeatures(self, features):
1208 """

Callers 1

set_fontnameMethod · 0.95

Calls 1

set_familyMethod · 0.80

Tested by

no test coverage detected