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.
@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 usetex text in the Agg backend. I think it's correct now.
Well, the agg backend calculates the descent of every line by itself, so I guess it does not matter what "_get_layout" returns.
Technically, _get_text function can return incorrect result as it assumes all the lines have same descent, although chance of this to happen will be miniscule.
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 _get_textbox doesn't assume all the lines have the same descent -- it uses the y positions of each line as returned by _get_layout and doesn't really need the descent from each line. It only needs to deal with the descent of the bottom line to determine the position of the box. So I think this is correct.
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.
I will open a separate issue which may not need to be a release blocker.
@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 v1.3.x once all of the tests are passing (a4fdc89).
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.
Fix Issue #2060: Text bbox alignment
Fix multiline spacing so it takes into account extra sub/superscripts