<!--To help us understand and resolve your issue, please fill out the form to the best of your ability.--> <!--You can feel free to delete the sections that do not apply.--> ### Bug report **Bug summary** Matplotlib's mathtext appears not to take the size of the preceding glyph into account when positioning sub/superscripts. **Code for reproduction** <!--A minimum code snippet required to reproduce the bug. Please make sure to minimize the number of dependencies required, and provide any necessary plotted data. Avoid using threads, as Matplotlib is (explicitly) not thread-safe.--> ```python from pylab import * figtext(.4, .5, r"$\left[\frac{x}{y}\right]^2_n$") figtext(.5, .5, r"$\left[\frac{x}{y}\right]^2_n$", usetex=True) ``` **Actual outcome** <!--The output produced by the above code, which may be a screenshot, console output, etc.-->  Note that the baseline of the `2` is even lower than the baseline of the `x` in the mathtext case. **Expected outcome** Something approaching the usetex case. **Matplotlib version** <!--Please specify your platform and versions of the relevant libraries you are using:--> * Operating system: linux * Matplotlib version: master * Matplotlib backend (`print(matplotlib.get_backend())`): qt5agg * Python version: 38 * Jupyter version (if applicable): * Other libraries: <!--Please tell us how you installed matplotlib and python e.g., from source, pip, conda--> <!--If you installed from conda, please specify which channel you used if not the default-->