Fix mathtext rendering of \| and sizing of | and \|#24239
Fix mathtext rendering of \| and sizing of | and \|#24239anntzer merged 1 commit intomatplotlib:mainfrom
\| and sizing of | and \|#24239Conversation
|
Since we have to update the test image, maybe we can drop the extra |
|
I think the idea is to test |
|
The new test images illustrates some of the issues, but others are missed. So the question is if we should also add tests for a single letter with Maybe @anntzer can weigh in on relevant test cases? |
|
It seems like getting rid of the following line sorts out the sizing, but I have not checked what else it breaks... matplotlib/lib/matplotlib/_mathtext.py Line 1458 in 68c78c9 |
|
I'll try to have a look, but can't do it right now. |
|
Figured out a way to get the vertical bar size correct. #23250 (comment) Added a second commit with that change so that one can see the differences. The rationale is to scale if there are no alternatives (or rather only a single alternative). (Make sure to squash the commits.) |
\|\| and sizing of | and \|
|
The drawback of the current approach of getting the size right is that the font size is changed, so wider bars, but probably still better than having too short ones... |
|
Looks good to me; just need a squash. |
PR Summary
Closes #23250
(Implements the less controversial part of #23685)
PR Checklist
Tests and Styling
pytestpasses).flake8-docstringsand runflake8 --docstring-convention=all).Documentation
doc/users/next_whats_new/(follow instructions in README.rst there).doc/api/next_api_changes/(follow instructions in README.rst there).