Closed
Description
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
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