| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
Thank you for opening your first PR into Matplotlib!
If you have not heard from us in a while, please feel free to ping @matplotlib/developers or anyone who has commented on the PR. Most of our reviewers are volunteers and sometimes things fall through the cracks.
You can also join us on gitter for real-time discussion.
For details on testing, writing docs, and our review process, please see the developer guide
We strive to be a welcoming and open project. Please follow our Code of Conduct.
Sorry, something went wrong.
There was a problem hiding this comment.
I'm not sure why there's no "Check the rendered docs here!" GitHub Action check for this PR.. but this looks good, thanks!
Sorry, something went wrong.
|
Because Circle hasn't run a doc CI build at all. |
Sorry, something went wrong.
|
There seems to be a separate bug; that the Cursive font-family isn't found by CI: This is true for other PRs too (for example, the most recent #20949): Though It did use to find the cursive font-family for the previous builds (on stable): https://matplotlib.org/stable/gallery/userdemo/pgf_fonts.html |
Sorry, something went wrong.
|
/stable/ is built on my machine, not CI. You can't compare it to /devdocs/ or PR builds. |
Sorry, something went wrong.
|
It appears that we use Comic (Neue, Sans MS) because it's already listed in font.cursive, but it's not available on CI. Felipa is also listed in that font list, and is explicitly installed on CI, so maybe we should switch to that instead? |
Sorry, something went wrong.
|
As discussed during the dev call this is actually hiding a bug that I bisected back to #10339; the fix is clear looking at that PR, and should be something like diff --git i/lib/matplotlib/backends/backend_pgf.py w/lib/matplotlib/backends/backend_pgf.py
index 749da55966..8706fed514 100644
--- i/lib/matplotlib/backends/backend_pgf.py
+++ w/lib/matplotlib/backends/backend_pgf.py
@@ -50,9 +50,14 @@ def get_fontspec():
for family, command in zip(families, commands):
# 1) Forward slashes also work on Windows, so don't mess with
# backslashes. 2) The dirname needs to include a separator.
- path = pathlib.Path(fm.findfont(family))
- latex_fontspec.append(r"\%s{%s}[Path=\detokenize{%s}]" % (
- command, path.name, path.parent.as_posix() + "/"))
+ try:
+ path = pathlib.Path(
+ fm.findfont(family, fallback_to_default=False))
+ except ValueError:
+ pass
+ else:
+ latex_fontspec.append(r"\%s{%s}[Path=\detokenize{%s}]" % (
+ command, path.name, path.parent.as_posix() + "/"))
return "\n".join(latex_fontspec) |
Sorry, something went wrong.
There was a problem hiding this comment.
Per the above.
Sorry, something went wrong.
|
I'm moving to draft until the above is addressed. Thanks! |
Sorry, something went wrong.
|
I think this just needs the change to the example to be reverted, but otherwise looks good. |
Sorry, something went wrong.
|
Reverting the change does not seem to work. I can remove the empty list from the font specification again, otherwise I'm not sure how to fix this error. |
Sorry, something went wrong.
|
Actually there's another problem with the example, which is that it doesn't actulaly use the pgf backend (which is a pity...) |
Sorry, something went wrong.
|
I popped this back to draft, but feel free to put back on the queue |
Sorry, something went wrong.
|
@FranzForstmayr Can you squash this into one commit so we do not have the commit and it's reversion in the history? You can do this with git rebase -i. Please ask if you need help! |
Sorry, something went wrong.
Do not remove serif font family in pgf example to avoid Warning Add requested changes Revert "Fix matplotlib#20850" This reverts commit 0bff071.
|
Hmm, @FranzForstmayr did you intend to close this? |
Sorry, something went wrong.
|
Yes, as there is a more recent PR (#22111) about this topic. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Currently the pgf_plots example throws a warning that the pgf font serif is not found.
This PR fixes this behaviour.
Fixes #20850
PR Summary
PR Checklist