[MNT]: Improve readability of _mathtext_data.stix_virtual_fonts table · Issue #25738 · matplotlib/matplotlib · GitHub
Skip to content

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

Description

@anntzer

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions