From 6a3edb7638f9b02ff3c158774fde0e3b10c0e0db Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Sat, 30 Jul 2022 18:40:33 -0400 Subject: [PATCH] DOC: make "family" less ambiguous in FontProperties docs Addresses part of #23492 --- lib/matplotlib/font_manager.py | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/matplotlib/font_manager.py b/lib/matplotlib/font_manager.py index f57fc9c051b0..3d386b1cbde3 100644 --- a/lib/matplotlib/font_manager.py +++ b/lib/matplotlib/font_manager.py @@ -626,10 +626,10 @@ class FontProperties: specification and *math_fontfamily* for math fonts: - family: A list of font names in decreasing order of priority. - The items may include a generic font family name, either - 'sans-serif', 'serif', 'cursive', 'fantasy', or 'monospace'. - In that case, the actual font to be used will be looked up - from the associated rcParam. Default: :rc:`font.family` + The items may include a generic font family name, either 'sans-serif', + 'serif', 'cursive', 'fantasy', or 'monospace'. In that case, the actual + font to be used will be looked up from the associated rcParam during the + search process in `.findfont`. Default: :rc:`font.family` - style: Either 'normal', 'italic' or 'oblique'. Default: :rc:`font.style` @@ -741,7 +741,11 @@ def __str__(self): def get_family(self): """ - Return a list of font names that comprise the font family. + Return a list of individual font family names or generic family names. + + The font families or generic font families (which will be resolved + from their respective rcParams when searching for a matching font) in + the order of preference. """ return self._family