Skip to content

More font rendering issues of mathtext #4987

@WeatherGod

Description

@WeatherGod

As noted by @zblz in #4873:

Yes, the kerning for the f is particularly tight, but it is tight everywhere, as you mention for the
regular f and numerals 2 and 9 (and that's why I added them to that line), so it is not an issue with
the sub/super script. I tried to minimize it for cm, where it looks pretty good, but did not manage for
stix of stixsans. Maybe the kerning for the f should be slightly widened elsewhere to match TeX. I
added a modification of the superscript kerning that takes into account how much the last character
rises above the x-height to try and mitigate this, but it is tricky: if it is correct for the italic f, it is too
wide for, e.g., $E^0$ (which is already slightly wider than tex), so I tried to reach a compromise.

The prime issue only happens for stix and stixsans, where it seems to match $\prime$ to an already
superscripted prime, as opposed to a nice and big prime for TeX and cm. This I also believe is
outside the scope of this PR, but should definitely be fixed so they are consistent.

All in reference to these images:
mathtex-cm
LaTeX
mathtext-stix
mathtext-stixsans

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions