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
incorrect bbox of text #2070
incorrect bbox of text #2070
Conversation
@leejjoon: Can you have a look at this fix? |
I think it is better to return the list of decent values, instead just returning the last one. I made a pull request to your repo. On the other hand, there are a few changes that I do not understand in you commit 4aed809. I will make some inline comments there. |
I don't know if it makes sense to return the list of descender values. Only the last one (the bottom one) is necessary for proper text alignment in the agg backend. The vector backends don't even need that. So I'd prefer to leave it in this simpler state. |
I think I've fixed the post-transformation problem. It was hidden because there was a bug just before final text display of |
Well, the agg backend calculates the descent of every line by itself, so I guess it does not matter what "_get_layout" returns. So, I guess this is a minor issue and I am fine with merging this if my inline comment of patheffect is addressed. |
I believe I have addressed all of your comments. There is a rudimentary fix in here to expand the spacing when things get taller than "normal". There are a lot of things that could be fixed up about text layout, but I think I'll save that for a MEP -- this is just enough to get by to make the cut for 1.3.0. |
The |
While there are a few issues that I do not completely agree with you, I think we can go ahead and merge it for 1.3.0 release. |
@leejjoon: Thanks for pushing on getting the spacing right. I have added commit a4fdc89 to address the issue in #2078. This may not have been how you implemented, but it seems to have the correct net effect, without breaking too many of the regression tests. (It improves mathtext alignment, so a number of the mathtext tests needed to be updated.) |
The tests look much better, and in general there is an equal amount of magic in text as there was before. I'm 👍 for the change for |
Ok -- I've updated all the tests (I think some were failing on Travis but not for me due to the additional differences caused by a different libfreetype). We'll see how that goes, then I'd like to squash the commits to reduce the amount of new test data added to the main repo before merging. |
With current master, frames around texts are incorrectly located.
Here is some test output.
In v1.2.x branch, the results are correct.
The frames are shifted in the master branch. Note that they have too much room toward the top of the texts.
These outputs are created with usetex=False. With usetex=True, the results are still incorrect, but the shifted direction of frames are different.
I am labeling this as a v1.3.x blocker, but change as you wish.