Skip to content

Conversation

@anntzer
Copy link
Contributor

@anntzer anntzer commented Dec 29, 2025

Closes #28211 (although it doesn't implement \smash, which isn't really necessary). Goes on top of #30059 (some details of mathtext raster rendering are different prior to #30059 and I don't think it's really worth figuring out how to exactly write the code compatible with the old version).

The example in the given issue is supported via

from pylab import *
fig = figure(layout="constrained")
sfs = fig.subfigures(2)
ax0 = sfs[0].add_subplot()
ax0.plot([1, 2], label=r"$\rlap{\text{foo}}\phantom{\text{a longer label}}$")
sfs[0].legend(loc="outside right upper")
ax1 = sfs[1].add_subplot()
ax1.plot([1, 2], label="foo")
ax1.plot([2, 1], label="a longer label")
sfs[1].legend(loc="outside right upper")
show()
image

anntzer and others added 3 commits December 18, 2025 14:48
Directly render FT glyphs to the Agg buffer.  In particular, this
naturally provides, with no extra work, subpixel positioning of glyphs
(which could also have been implemented in the old framework, but would
have required careful tracking of subpixel offets).

Note that all baseline images should be regenerated.  The new APIs added
to FT2Font are also up to bikeshedding (but they are all private).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants