8000 Reword FontProperties docstring. · matplotlib/matplotlib@ee00b9b · GitHub
[go: up one dir, main page]

Skip to content

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ee00b9b

Browse files
committed
Reword FontProperties docstring.
- Indicate each default property when it occurs, rather than at the end (where it's unclear what each instance of "normal" means); also fix the default size. - List supported math_fontfamilies using the same inline list as other properties, which avoids having `and` getting highlighted as a Python keyword in the rendered docs.
1 parent 5ba3911 commit ee00b9b

File tree

1 file changed

+8
-14
lines changed

1 file changed

+8
-14
lines changed

lib/matplotlib/font_manager.py

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -578,38 +578,32 @@ class FontProperties:
578578
579579
- family: A list of font names in decreasing order of priority.
580580
The items may include a generic font family name, either
581-
'serif', 'sans-serif', 'cursive', 'fantasy', or 'monospace'.
581+
'sans-serif' (default), 'serif', 'cursive', 'fantasy', or 'monospace'.
582582
In that case, the actual font to be used will be looked up
583583
from the associated rcParam.
584584
585-
- style: Either 'normal', 'italic' or 'oblique'.
585+
- style: Either 'normal' (default), 'italic' or 'oblique'.
586586
587-
- variant: Either 'normal' or 'small-caps'.
587+
- variant: Either 'normal' (default) or 'small-caps'.
588588
589589
- stretch: A numeric value in the range 0-1000 or one of
590590
'ultra-condensed', 'extra-condensed', 'condensed',
591-
'semi-condensed', 'normal', 'semi-expanded', 'expanded',
591+
'semi-condensed', 'normal' (default), 'semi-expanded', 'expanded',
592592
'extra-expanded' or 'ultra-expanded'.
593593
594594
- weight: A numeric value in the range 0-1000 or one of
595-
'ultralight', 'light', 'normal', 'regular', 'book', 'medium',
595+
'ultralight', 'light', 'normal' (default), 'regular', 'book', 'medium',
596596
'roman', 'semibold', 'demibold', 'demi', 'bold', 'heavy',
597597
'extra bold', 'black'.
598598
599599
- size: Either an relative value of 'xx-small', 'x-small',
600600
'small', 'medium', 'large', 'x-large', 'xx-large' or an
601-
absolute font size, e.g., 12.
601+
absolute font size, e.g., 10 (default).
602602
603603
- math_fontfamily: The family of fonts used to render math text; overrides
604604
:rc:`mathtext.fontset`. Supported values are the same as the ones
605-
supported by :rc:`mathtext.fontset` ::
606-
607-
'dejavusans', 'dejavuserif', 'cm', 'stix', 'stixsans' and 'custom'.
608-
609-
The default font property for TrueType fonts (as specified in the
610-
default rcParams) is ::
611-
612-
sans-serif, normal, normal, normal, normal, scalable.
605+
supported by :rc:`mathtext.fontset`: 'dejavusans', 'dejavuserif', 'cm',
606+
'stix', 'stixsans' and 'custom'.
613607
614608
Alternatively, a font may be specified using the absolute path to a font
615609
file, by using the *fname* kwarg. However, in this case, it is typically

0 commit comments

Comments
 (0)
0