Skip to content

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

@anntzer

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy