Bug 114565

Summary: [GTK] MathML unusable
Product: WebKit Reporter: ManDay <manday>
Component: WebKitGTKAssignee: Nobody <webkit-unassigned>
Status: RESOLVED DUPLICATE    
Severity: Normal CC: alex, fred.wang, mcatanzaro, mrobinson
Priority: P3    
Version: 528+ (Nightly build)   
Hardware: PC   
OS: Linux   
Bug Depends on: 22621, 133604    
Bug Blocks:    
Attachments:
Description Flags
screen
none
Screenshot Nightly WebKitGTK+ none

Description ManDay 2013-04-13 09:19:58 PDT
webkit-gtk-1.10.2, MathML is unusable for must users.
Comment 1 ManDay 2013-04-13 09:20:46 PDT
Created attachment 197944 [details]
screen
Comment 2 Martin Robinson 2013-04-18 07:01:00 PDT
Do you have the styx fonts installed?
Comment 3 ManDay 2013-04-18 09:00:54 PDT
No.
Comment 4 Martin Robinson 2013-04-18 09:06:50 PDT
Can you install them and see if the rendering improves. MathML really demands a high-quality math font. Firefox has a nice prompt to install the fonts, but for WebKitGTK+ we may just rely on package manager suggestions.
Comment 5 ManDay 2013-04-18 09:30:28 PDT
> MathML really demands a high-quality math font.

Which I must already have, given that I had no problem with MathML in previous Webkit-versions.

However, I'll of course try whether this helps. Could you give me a link to the exact font you want me to install? Google gave no definite results to "Styx fonts".
Comment 6 Martin Robinson 2013-04-18 09:31:54 PDT
(In reply to comment #5)

> However, I'll of course try whether this helps. Could you give me a link to the exact font you want me to install? Google gave no definite results to "Styx fonts".

Apologies. I misspelled it. It's stix and on my system the package is otf-stix. Here's a link to the project page: http://www.stixfonts.org/
Comment 7 ManDay 2013-04-18 09:39:19 PDT
I installed stix from Gentoo's repositories and checked whether they were properly accepted by fc.

However, no effect on MathML, as I suspected.

Note: I haven't found anyone with 1.10.2 for whom MathML worked!
Comment 8 Martin Robinson 2013-04-18 09:41:24 PDT
(In reply to comment #7)
> I installed stix from Gentoo's repositories and checked whether they were properly accepted by fc.
> 
> However, no effect on MathML, as I suspected.
> 
> Note: I haven't found anyone with 1.10.2 for whom MathML worked!

Can you check whether it's working for you from the repository? I'm not sure if you're aware, but for 2.0 MathML is currently disabled by default due to security issues.
Comment 9 ManDay 2013-04-18 09:44:29 PDT
(In reply to comment #8)
> (In reply to comment #7)
> > I installed stix from Gentoo's repositories and checked whether they were properly accepted by fc.
> > 
> > However, no effect on MathML, as I suspected.
> > 
> > Note: I haven't found anyone with 1.10.2 for whom MathML worked!
> 
> Can you check whether it's working for you from the repository? I'm not sure if you're aware, but for 2.0 MathML is currently disabled by default due to security issues.

What do you mean try from the repository? Webkitgtk+'s repository? If so, which commit?
Comment 10 Martin Robinson 2013-04-18 09:55:54 PDT
(In reply to comment #9)

> What do you mean try from the repository? Webkitgtk+'s repository? If so, which commit?

Yes, do you mind compiling WebKit from subversion/git, or failing that getting a more recent version of WebKit from the site. I can show you how to re-enable MathML manually (it's a bit tricky). 1.10 is quite old now.
Comment 11 Frédéric Wang (:fredw) 2014-06-21 02:00:22 PDT
Created attachment 233518 [details]
Screenshot Nightly WebKitGTK+

After bug 133604, "Latin Modern Math" is used as the default font on Linux. I attach an updated screenshot with a trunk build. The reasoning here is that math people are likely to have a TeX distribution installed on their system and so a fortiori the Latin Modern font available, so missing math font for MathML becomes unlikely. This is of course not 100% sure and the result may be very different for each Linux distribution / user. I vaguely heard that the GUST group was working on another MATH font that could be installed by default on Linux. Another option to consider is autoinstallation via PackageKit (bug 22621).

Martin will correct me if I'm wrong, but I think stable WebKitGTK+ releases are each semester, so the recent MathML improvements are only likely to become available in early 2015.

Two more remarks:

* this is not really MathML rendering but MathML rendering "tweaked" by MathJax. In particular, I think the <mo> spacing is incorrect on the screenshot because of MathJax adds more space (https://github.com/mathjax/MathJax/blob/master/unpacked/jax/output/NativeMML/jax.js#L1359).

* Authors of extensions for WebKitGTK+ browsers might consider something like https://addons.mozilla.org/en-US/firefox/addon/mathjax-native-mathml/ (source: https://github.com/fred-wang/Mathzilla/tree/master/mathjax-native-mathml/data) if they want to force the native MathML output and remove some MathJax hacks.
Comment 12 Frédéric Wang (:fredw) 2016-03-14 03:49:56 PDT
Same comment as bug 38377 comment 10 applies, here.
Comment 13 Michael Catanzaro 2016-03-14 07:45:38 PDT

*** This bug has been marked as a duplicate of bug 38377 ***