Bug 38377 - mathml font display problems on linux
Summary: mathml font display problems on linux
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: MathML (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Linux
: P3 Normal
Assignee: Nobody
URL:
Keywords: Qt, QtTriaged
: 114565 (view as bug list)
Depends on: 22621 133604
Blocks: 3251
  Show dependency treegraph
 
Reported: 2010-04-29 23:21 PDT by Walter Werner
Modified: 2016-03-14 07:45 PDT (History)
12 users (show)

See Also:


Attachments
snapshot of the mathml testpage on ubuntu linux (228.95 KB, image/png)
2010-04-29 23:21 PDT, Walter Werner
no flags Details
Screenshot Nightly WebKitGTK+ (349.00 KB, image/png)
2014-06-21 02:13 PDT, Frédéric Wang (:fredw)
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Werner 2010-04-29 23:21:16 PDT
Created attachment 54783 [details]
snapshot of the mathml testpage on ubuntu linux

hello

First of all, thanks to Alex Milowski for fixing the Qt port, so it was possible for me to compile and try mathml out.


There is some font problems on linux system. I have tested with the Qt port on Ubuntu 9.10 and 10.04, it gave me with the test-page:

https://eyeasme.com/Joe/MathML/MathML_browser_test

the result you can see in the attached .png image. Alex also found a crash on mroot/msqrt on Linux.
Comment 1 Sriram 2010-06-08 10:59:34 PDT
Bug is reproducible with QTestBrowser.  I think this bug is P3
Comment 2 Martin Robinson 2010-08-04 18:26:00 PDT
(changed the component to MathML as this is a bug on more than just Qt)

I spent a little time looking at this today. At least part of the rendering problems are due to differences between the Symbol font on OS X machines and the symbol font included on Linux machines. The mathml.css files specifies the font for the math element thusly:

font-family: Symbol, "Times New Roman";

The OS X Symbol font has no glyph specified for normal ASCII alphabetic characters, so 'x' (unicode 0x78) is drawn using Times New Roman.  The Linux symbol replaces ASCII characters with equivalents from the Greek alphabet, so 'x' produces ξ.

Unfortunately, I don't think the Symbol font is suitable for platforms other than OS X.
Comment 3 Alex Milowski 2010-08-05 04:01:20 PDT
The change in bug 41961 provides change to use the STIX fonts.  See https://bug-41961-attachments.webkit.org/attachment.cgi?id=61678

This should help.

We may need to figure out how to make platform-specific choices as the Symbol font on other systems than the Mac may be a very bad choice.
Comment 4 Alex Milowski 2010-10-15 15:30:10 PDT
(In reply to comment #3)
> The change in bug 41961 provides change to use the STIX fonts.  See https://bug-41961-attachments.webkit.org/attachment.cgi?id=61678
> 
> This should help.


The use of the STIX fonts does, indeed, help.

The rendering of this page takes a very long time.  That's something very wrong with the algorithm for layout.  I suspect it is coming from the row layout algorithm for operator stretching.
Comment 5 Alex Milowski 2010-10-15 15:34:23 PDT
(In reply to comment #4)

> 
> The rendering of this page takes a very long time.  That's something very wrong with the algorithm for layout.  I suspect it is coming from the row layout algorithm for operator stretching.

The long rendering time also occurs on the Mac platform.
Comment 6 Martin Robinson 2010-10-15 15:35:57 PDT
Are the STIX fonts in the tree and used for tests now? Recently there were some some MathML tests failing on GTK+ bots because of font differences between the bots. I'm hoping that switching to STIX fonts will solve this issue.
Comment 7 Alex Milowski 2010-10-15 15:42:28 PDT
(In reply to comment #6)
> Are the STIX fonts in the tree and used for tests now? Recently there were some some MathML tests failing on GTK+ bots because of font differences between the bots. I'm hoping that switching to STIX fonts will solve this issue.

According to the Apple legal folks, we can't put the STIX fonts into the source tree because they use the SIL Font License.  They'd prefer that we don't expand the licenses under which content is distributed.

I've looked into trying to have the test system download and use fonts when the user runs the tests but I haven't really acted about that.  One problem is that some SIL Font License friendly organization needs to host the STIX fonts we use so the test system can download them.

The short term solution is to install them on the build bot.
Comment 8 Alex Milowski 2010-10-16 14:29:06 PDT
The long rendering time is the same issue as https://bugs.webkit.org/show_bug.cgi?id=43462
Comment 9 Frédéric Wang (:fredw) 2014-06-21 02:13:59 PDT
Created attachment 233519 [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).

I think the QT port is no longer supported. However, that the "missing fonts" issue might still apply to the GTK/EFL ports.
Comment 10 Frédéric Wang (:fredw) 2016-03-14 03:14:25 PDT
So this what was discussed recently on webkit-dev. Unless we really want to do autoinstallation as suggested in bug 22621, I guess this is really an OS bug rather than a WebKit bug ; so I think we can close this.

To install appropriate math fonts on Linux, see
https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/Fonts#Linux
Comment 11 Michael Catanzaro 2016-03-14 07:45:38 PDT
*** Bug 114565 has been marked as a duplicate of this bug. ***