-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
[Bug]: Incorrect mathtext rendering of r"$\|$"
with default (dejavu) math fontfamily
#23250
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
Comments
|
It is just to change matplotlib/lib/matplotlib/_mathtext_data.py Line 529 in ee7c4a0
to
But the base line images are incorrect:
The second b should have double vertical bars around it. |
And the problem holds for any other font than cm it seems. |
It would seem reasonable to fix the baseline image (preferably after #22881, as usual: here again, what really matters is that the right glyph gets embedded, not the exact glyph-to-path conversion). (I haven't checked that the proposed fix works, but it doesn't have to be complicated indeed.) |
I only checked the png output visually. The svg output actually didn't error I realize, so I should probably check that (pdf did error though). Primary problem of fixing it is right now that some of the other pngs error on my machine, so not sure it is a good idea to upload images with slightly off fonts (RMS in the range 1 to 3...). |
And that is because on my Windows machine, the svg tests are not executed. But I can confirm that the PDFs are now correct. |
Do you have inkscape installed? If so, svg tests should be executed (if not, please open a separate bug and let's fix that...). |
I have it installed, but, as so often for Windows, not in the PATH. I thought it could be related to something like that. Will try to sort it out. |
Now it breaks SVG as well, so as far as I call tell, it seems to fully work to simply change that. |
Anyways, this should probably be moved to a separate issue to keep track of it. |
Yes. I just installed 1.2 to check it, but got an error saying that the PATH was too long to modify. I solved it earlier by simply adding the correct path though. (I do not think there needs to be an issue for me being lazy/ignorant, or it would be a pretty long issue...) |
Well, we should at least document that inkscape needs to be installed with that option checked, as that seems like a useful piece of info for other newcomers... |
Maybe related. Today I realized that autoscaling of
|
Bug summary
r"$\|$"
should render as a double vertical bar, which it does with usetex or with math_fontfamily="cm", but not with the default "dejavusans" math_fontfamily.Code for reproduction
Actual outcome
Expected outcome
Double vertical bar in the first line too.
Additional information
No response
Operating system
arch
Matplotlib Version
3.6.0.dev2423+gd0bef3b3d7
Matplotlib Backend
qt5agg
Python version
3.10
Jupyter version
ENOSUCHLIB
Installation
git checkout
The text was updated successfully, but these errors were encountered: