Skip to content

[Bug]: math_fontfamily="cm" prevents replacement of minus by unicode minus in \mathdefault #21687

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 Nov 20, 2021 · 0 comments · Fixed by #22507
Closed

Comments

@anntzer
Copy link
Contributor

anntzer commented Nov 20, 2021

Bug summary

All's in the title (and the examples).

Code for reproduction

from pylab import *
figtext(.5, .6, r"$\mathdefault{a-b}$", math_fontfamily="dejavusans")
figtext(.5, .5, r"$\mathdefault{a-b}$", math_fontfamily="cm")

Actual outcome

test
Both lines use the text default font of DejaVu Sans, but setting math_fontfamily to cm prevented replacement of minus by unicode minus.

Expected outcome

Unicode minus in both cases

Additional information

(I probably have a fix that'll come after tearing down most mathtext deprecations that expire in 3.6, namely getting rid of the math kwarg in the various font classes and instead make the minus->unicode_minus replacement earlier, during the parsing stage.)

Operating system

linux

Matplotlib Version

3.5

Matplotlib Backend

qt5agg

Python version

39

Jupyter version

ENOSUCHLIB

Installation

No response

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

Successfully merging a pull request may close this issue.

1 participant