-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Public API to modify mathtext font constants #9165
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
It's probably private because no one asked for it to be public, and we are actively trying to keep the public API as small as possible (and if it goes public it should be properly documented). Of course the funny thing is that the various constant classes are themselves public. FWIW having spent ~10s looking at it I'd guess the various classes should just be namedtuples (using |
This issue has been marked "inactive" because it has been 365 days since the last comment. If this issue is still present in recent Matplotlib releases, or the feature request is still wanted, please leave a comment and this label will be removed. If there are no updates in another 30 days, this issue will be automatically closed, but you are free to re-open or create a new issue if needed. We value issue reports, and this procedure is meant to help us resurface and prioritize issues that have not been addressed yet, not make them disappear. Thanks for your help! |
Hi matplotlib developers,
I recently needed to modify the mathtext font constants (the superscript height) of a non-standard font (Arial) and found that there is no public API to accomplish this. I did, however, find that I could do what I wanted by accessing the private
mathtext._font_constant_mapping
dictionary. A minimal working example is below:This works great, but I think there should be a public and documented method to customize mathtext font constants. Perhaps we should just remove the leading underscore of
_font_constant_mapping
to make it permanent and public? Also, I think that an example of the new public API should be added to the mathtext tutorial documentation.Thanks,
Tested with matplotlib 2.0.2 and python 3.6.2 running on Arch Linux.
The text was updated successfully, but these errors were encountered: