Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[MNT]: Improve readability of _mathtext_data.stix_virtual_fonts table #25738

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

Closed
anntzer opened this issue Apr 20, 2023 · 0 comments · Fixed by #26830
Closed

[MNT]: Improve readability of _mathtext_data.stix_virtual_fonts table #25738

anntzer opened this issue Apr 20, 2023 · 0 comments · Fixed by #26830

Comments

@anntzer
Copy link
Contributor

anntzer commented Apr 20, 2023

Summary

Reviewing https://github.com/matplotlib/matplotlib/pull/25359/files#diff-49ee499471e3397e95aa265c6694a643c8c16c625c700da06b9c3c58db69fc52 I noted that an annoying part is just looking at the codepoint values. One idea to improve readability would be to replace lines such as

(0x0393, 0x03a9, 'bfit', 0x1d71E), # \Gamma-\Omega

by

("\N{GREEK CAPITAL LETTER GAMMA}", "\N{GREEK CAPITAL LETTER OMEGA}", "bfit",
 "\N{MATHEMATICAL BOLD ITALIC CAPITAL GAMMA}"),

which seems much more self-documenting (and adapting the table reading code to support that seems easy enough and have negligible cost -- just a matter of calling ord() in a few places).

Proposed fix

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants