-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Accept url in fontManager.addfont #15936
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
Comments
I would prefer not. If we get into the business of downloading fonts, we also need to decide where to cache them, and for how long (or should we re-download the font every time?). (and I guess more things that I don't want to care about -- https? ftp? ...)
On the other hand addfont should probably raise if the font cannot be added (as in this case...) -- xref #15937. |
We don't need to cache it. If people care enough about caching, they would have downloaded it themselves. The purpose of |
Even if you don't care about caching, matplotlib needs to write that font somewhere to the filesystem. |
OK thanks for considering and the explanation. Feel free to close if this doesn't make sense. |
Thanks for the suggestion, at least this gave us #15937 so it's not all lost :) |
Bug report
Bug summary
In 3.2.0rc1,
fontManager.addfont
only accepts local paths. It'd be great to also accept urls, as to avoid requiring downloading a font file.Code for reproduction
Actual outcome
Expected outcome
No warning. Chart with Roboto labels.
This occurs when I instead download the file:
Matplotlib version
print(matplotlib.get_backend())
): module://ipykernel.pylab.backend_inlinejupyter core : 4.5.0 jupyter-notebook : 5.2.2
The text was updated successfully, but these errors were encountered: