[iOS] MathJax characters misaligned

At least in iPad OS and presumably in MacOS as well, (some) characters aren‘t aligned with the baseline.

This bug is a known MathJax Issue, however a solution has to be implemented internally to fix the Issue, because settings have to be altered upon loading MathJax. It happens because of RoundOf issues in WebKit.

Steps to reproduce

  1. Write some consequensive letters (best observed in \text{})
  2. Observe misaligned characters

Expected result

All letters should share a baseline

Actual result

Instead, the letters appear vertically offset:

  • Screenshot of the bug: image

Environment

This issue can be observed in iOS and isn‘t bound to Obsidian.
I‘m sadly not able to test this in MacOS, but according to the MathJax Bug-Report it should be present there as well.


Additional information

The solution is given in above mentioned Issue and here.

You may either add:

MathJax = {
  chtml: {
    mtextInheritFont: true
  }
}

or

MathJax = {
  chtml: {
    mtextFont: Times
  }
}

to inherit the Editor-Font or define a manual font, which doesn‘t have such issues.

Setting this on WebKit systems should resolve the issue!

On mac we use chrome not webkit, so it doesn’t happen.
I think we’ll wait for the upstream fix.