-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Better document font.<generic-family> rcParams entries. #18683
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hmm, I dunno, this maybe works as a bit of documentation of alternatives. |
I think improving the prose is more useful? In practice I would guess for 99% of the people who really want to set these they'll set it to a single value anyways... |
I'm in favor of adding the generic class back to the list so if something catastrophic does happen, we at least try to fallback to the correct class of font before we hit DejaVu serif, 👍 to this going in either way though. |
But that last fallback can never actually succeed, right? (At least I don't have a font whose family name is just "serif" or just "monospace".) Or can it? |
🐑 your right font family is something we invented, not a thing that the fonts report about them selves. |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually 👎 on this change. I've, in the past, uncommented this line and re-ordered it just to see the changes. If you remove the list folks don't know what other options there are. I appreciate that these may not be always available, etc, but still, I think the list is useful.
matplotlibrc.template
Outdated
## for when rendering text with usetex), or one of the following five generic | ||
## values: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
## for when rendering text with usetex), or one of the following five generic | |
## values: | |
## when rendering text with usetex), or one of the following five generic | |
## values: |
fair point re: documentation usefulness. I restored the old value and reworded the surrounding doc (and commit message) accordingly. |
Because DejaVu is shipped with Matplotlib, searching font.serif will
never go beyond the first item (
DejaVu Serif
), and likewise forfont.sans-serif and font.monospace. So delete the entries which are
clearly never used. (If someone really wants to strip the fonts in a
custom distribution of Matplotlib, and not provide DejaVu separately,
they'll have to adapt the list as desired -- they already need to fix
the last-resort fallback to DejaVu in font_manager.py anyways.)
Also reword the description of
font.family
.PR Summary
PR Checklist
pytest
passes).flake8
on changed files to check).flake8-docstrings
andpydocstyle<4
and runflake8 --docstring-convention=all
).doc/users/next_whats_new/
(follow instructions in README.rst there).doc/api/next_api_changes/
(follow instructions in README.rst there).