-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Improvements to make_icons.py. #14941
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
- Auto-download and cache fontawesome otf. - Support writing results to another directory (useful when testing, to not mess with the repo). Also, support for pathlib in font_manager (made necessary by the changes in make_icons.py -- specifically, backend_pdf's internals don't handle FontProperties.get_fname returning a Path).
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.
Just so that it has been said: This does not generate .ppm files anymore, which is fine by me.
|
||
fig = plt.figure(figsize=(1, 1)) | ||
fig.patch.set_alpha(0.0) | ||
text = fig.text(0.5, 0.48, chr(ccode), ha='center', va='center', | ||
fontproperties=prop) | ||
text.set_path_effects([patheffects.Normal()]) |
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 assume this did not have any effect, so removing is fine?
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.
The intent was probably to force the text to be rendered as a bezier rather than relying on a font file that may not exist in the end user's computer, but we set svg.fonttype to path so that also does the conversion, and the pdf backend takes care of embedding the font, so we should be good?
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 don't understand the details here, so relying on your investigation. But your question mark makes me wonder how sure you are...
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.
Looking at the code of patheffects.py I'm fairly confident that the description is correct, but to know what the original intent was, we would need to get @mdboom's input, if he still lurks aroud...
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.
Looks good (modulo the patheffects removal). Personally, I'd be defensive and leave this in because I don't understand that. But @tacaswell has approved and if you think, this is fine we can also go as is.
not mess with the repo).
Also, support for pathlib in font_manager (made necessary by the changes
in make_icons.py -- specifically, backend_pdf's internals don't handle
FontProperties.get_fname returning a Path).
Useful if you want to play with mplcairo wrt. #14939 (#14939 (comment)).
PR Summary
PR Checklist