mathjax / MathJax-node

MathJax for Node
Apache License 2.0
616 stars 97 forks source link

Baseline problem with mjpage and CommonHTML under Safari #344

Open ischurov opened 7 years ago

ischurov commented 7 years ago

I have weird behaviour of MathJax-node, particularly MathJax-node-page, under Safari. Shortly speaking, letters are not vertically aligned properly.

Here is my input. Under ordinary MathJax, I have fine layout.

screen shot 2017-07-14 at 22 25 08

I save this input as test.html, then perform the following command:

./mjpage --output CommonHTML --fontURL https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/fonts/HTML-CSS < test.html > test_out.html

Then I have the following output. It renders rather badly under Safari. Look at vertical alignment of the characters.

screen shot 2017-07-14 at 22 28 13

I've tried the latest MathJax-node from github (as well as stable one from npm directory) with the same result. I can reproduce it under mobile Safari from my iPhone as well, but not from in Chrome.

pkra commented 7 years ago

Thanks for the report. I can confirm the issue.

Minimal example at https://codepen.io/pkra/pen/NvNJKy

pkra commented 7 years ago

On looking further into this, it looks related to https://github.com/mathjax/MathJax/issues/1710. On the one hand, zooming into mathjax-node output changes the glitching (sometimes better, sometimes worse). On the other hand, the live version has the same glitches when zooming in/out.

@dpvc what do you think?

dpvc commented 7 years ago

Sorry, this fell through the cracks for me. Yes, I suspect this is the known issue with Safari that you mention. There are problems with other WebKit browsers as well, but Safari handles some situations differently from Chrome, for example, and is particularly susceptible to these problems.

pkra commented 7 years ago

@dpvc thanks for confirming.