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

Skip to content

Commit ffc55ae

Browse files
authored
Merge pull request #23526 from tacaswell/doc_font_family
DOC: make "family" less ambiguous in FontProperties docs
2 parents 12d3c8e + 6a3edb7 commit ffc55ae

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lib/matplotlib/font_manager.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -626,10 +626,10 @@ class FontProperties:
626626
specification and *math_fontfamily* for math fonts:
627627
628628
- family: A list of font names in decreasing order of priority.
629-
The items may include a generic font family name, either
630-
'sans-serif', 'serif', 'cursive', 'fantasy', or 'monospace'.
631-
In that case, the actual font to be used will be looked up
632-
from the associated rcParam. Default: :rc:`font.family`
629+
The items may include a generic font family name, either 'sans-serif',
630+
'serif', 'cursive', 'fantasy', or 'monospace'. In that case, the actual
631+
font to be used will be looked up from the associated rcParam during the
632+
search process in `.findfont`. Default: :rc:`font.family`
633633
634634
- style: Either 'normal', 'italic' or 'oblique'.
635635
Default: :rc:`font.style`
@@ -741,7 +741,11 @@ def __str__(self):
741741

742742
def get_family(self):
743743
"""
744-
Return a list of font names that comprise the font family.
744+
Return a list of individual font family names or generic family names.
745+
746+
The font families or generic font families (which will be resolved
747+
from their respective rcParams when searching for a matching font) in
748+
the order of preference.
745749
"""
746750
return self._family
747751

0 commit comments

Comments
 (0)