x-height calculation incorrect in calibre viewer on windows with 2.6.0
Created by: kovidgoyal
I recently updated the version of mathjax included with calibre to 2.6.0. However, on windows it calculates the font x-height incorrectly. linux and OS X are fine.
I tried updating to 2.6.1 -- no change.
Note that calibre uses Qt WebKit to render HTML and if you want to play with the mathjax bundled with calibre you can find it in resources/viewer/mathjax in the calibre installation directory. It is unbundled, so it should be easy to modify and edit. A sample epub file which shows this problem is https://manual.calibre-ebook.com/_static/mathjax.epub
Simply open it in the calibre viewer and you will see that math is getting typeset at approx 50% of correct height. You can right click in the viewer and choose Inspect to get access to a javascript console.
I did a bit of debugging and I one difference I found is that the height of the ExSpan ins ~550px on linux and 300px on windows. However, changing .MathJax_SVG_ExBox to have height 120ex instead of 60ex does not affect rendering, so I'm not sure how to proceed. If you can tell me what I need to change to affect the x height calculation, I can probably special case it for calibre on windows.