Skip to content

Commit c168f35

Browse files
committed
Clarify that findfont & _find_fonts_by_props return paths.
Especially the previous wording for _find_fonts_by_props ("find font families") was somewhat confusing, as "font families" are strings.
1 parent 2360c59 commit c168f35

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/matplotlib/font_manager.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ def score_size(self, size1, size2):
12351235
def findfont(self, prop, fontext='ttf', directory=None,
12361236
fallback_to_default=True, rebuild_if_missing=True):
12371237
"""
1238-
Find a font that most closely matches the given font properties.
1238+
Find the path to the font file most closely matching the given font properties.
12391239
12401240
Parameters
12411241
----------
@@ -1305,7 +1305,7 @@ def get_font_names(self):
13051305
def _find_fonts_by_props(self, prop, fontext='ttf', directory=None,
13061306
fallback_to_default=True, rebuild_if_missing=True):
13071307
"""
1308-
Find font families that most closely match the given properties.
1308+
Find the paths to the font files most closely matching the given properties.
13091309
13101310
Parameters
13111311
----------
@@ -1335,7 +1335,7 @@ def _find_fonts_by_props(self, prop, fontext='ttf', directory=None,
13351335
Returns
13361336
-------
13371337
list[str]
1338-
The paths of the fonts found
1338+
The paths of the fonts found.
13391339
13401340
Notes
13411341
-----

0 commit comments

Comments
 (0)