RESOLVED FIXED Bug 133604
[GTK][EFL] Use OpenType MATH fonts by default
https://bugs.webkit.org/show_bug.cgi?id=133604
Summary [GTK][EFL] Use OpenType MATH fonts by default
Frédéric Wang (:fredw)
Reported 2014-06-07 06:32:51 PDT
See bug 133603 for the general discussion. I'll submit a patch when bug 119038 is fixed. One issue to consider is that the rendering of references depending on which math fonts are installed locally and on the bots.
Attachments
Patch (1.12 KB, patch)
2014-06-18 01:22 PDT, Frédéric Wang (:fredw)
no flags
Screenshot of the MathML torture test with Nightly WebKitGTK+ (1.12 KB, patch)
2014-06-18 01:25 PDT, Frédéric Wang (:fredw)
no flags
Screenshot of the MathML torture test with Nightly WebKitGTK+ (158.75 KB, image/png)
2014-06-18 01:26 PDT, Frédéric Wang (:fredw)
no flags
Patch (2.17 KB, patch)
2014-06-19 02:08 PDT, Frédéric Wang (:fredw)
cfleizach: review+
Frédéric Wang (:fredw)
Comment 1 2014-06-18 01:22:35 PDT
Created attachment 233295 [details] Patch I tried to follow what is done for IOS and add a conditional defined(WTF_PLATFORM_GTK) && WTF_PLATFORM_GTK rule in mathml.css. However, that does not seem to work. @Martin, any idea why?
Frédéric Wang (:fredw)
Comment 2 2014-06-18 01:25:50 PDT
Created attachment 233296 [details] Screenshot of the MathML torture test with Nightly WebKitGTK+ Here is a screenshot of the torture test with WebKitGTK+, the patch applied and Latin Modern Math installed. As you can see the large operators and horizontal braces now stretch and the radicals are drawn with glyphs. However, math fonts do not have italic style only italic mathvariant in the Math Alpha Num table so italic variables are not "beautiful" (bug 108778).
Frédéric Wang (:fredw)
Comment 3 2014-06-18 01:26:49 PDT
Created attachment 233297 [details] Screenshot of the MathML torture test with Nightly WebKitGTK+
Frédéric Wang (:fredw)
Comment 4 2014-06-18 15:14:48 PDT
So after discussion with Martin on IRC, I think we'll just try to add "Latin Modern Math" as the first font of font-family. That should hopefully not change the test reference for platforms where the font is not installed. For GTK/EFL, we will need to ensure that the bots have "Latin Modern Math" installed. It should be freely available on most Linux distributions since it is included in texlive: https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/Fonts#Linux. We can also drop the woff font from http://trac.webkit.org/browser/trunk/LayoutTests/mathml/opentype once it is available on the systems. Martin said he could help to install "Latin Modern Math" on the GTK bots. @Gyuyoung Kim: could you please take care of the EFL bots?
Frédéric Wang (:fredw)
Comment 5 2014-06-19 02:08:41 PDT
Created attachment 233355 [details] Patch (note: I have not been able to build EFL again today) I just tested locally and as I understand the WebKit test runner seems to force the use of the STIX fonts, so it should not be problematic to take the patch even if the bots are not ready yet. The tests for the OpenType MATH support is done in LayoutTests/mathml/opentype/ but for now a Web font version of Latin Modern Math is used, so we don't need to have them installed on the system to run the tests. @Martin, could you please review this?
Gyuyoung Kim
Comment 6 2014-06-19 02:13:20 PDT
(In reply to comment #4) > So after discussion with Martin on IRC, I think we'll just try to add "Latin Modern Math" as the first font of font-family. That should hopefully not change the test reference for platforms where the font is not installed. For GTK/EFL, we will need to ensure that the bots have "Latin Modern Math" installed. It should be freely available on most Linux distributions since it is included in texlive: https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/Fonts#Linux. We can also drop the woff font from http://trac.webkit.org/browser/trunk/LayoutTests/mathml/opentype once it is available on the systems. > > Martin said he could help to install "Latin Modern Math" on the GTK bots. > > @Gyuyoung Kim: could you please take care of the EFL bots? What should I help you on the EFL bots ? Do you need to install "Latin Modern Math" font to the EFL bots ?
Frédéric Wang (:fredw)
Comment 7 2014-06-19 02:20:57 PDT
(In reply to comment #6) > What should I help you on the EFL bots ? Do you need to install "Latin Modern Math" font to the EFL bots ? Yes, I need help to install "Latin Modern Math" on the EFL bots and to rebaseline the references of a few MathML pixel tests after the patch. That way, we could later drop latinmodern-math.woff from the source: http://trac.webkit.org/browser/trunk/LayoutTests/mathml/opentype. However, as I said in comment 5 the WebKit test runner seems to force the use of STIX fonts (at least on the GTK port) so the patch won't actually change the MathML rendering for now. I'm not really sure about that, though, nor whether it is the case for test execution on EFL.
Martin Robinson
Comment 8 2014-06-19 09:55:47 PDT
I've installed these fonts on the GTK+ bots.
Frédéric Wang (:fredw)
Comment 9 2014-06-19 13:30:00 PDT
@Gyuyoung Kim: after discussion with Martin, installing fonts on the bots is not really necessary to run the tests. We only need to update https://github.com/mrobinson/webkitgtk-test-fonts. Does the EFL port uses that repository or something similar?
Gyuyoung Kim
Comment 10 2014-06-19 22:32:05 PDT
(In reply to comment #9) > @Gyuyoung Kim: after discussion with Martin, installing fonts on the bots is not really necessary to run the tests. We only need to update https://github.com/mrobinson/webkitgtk-test-fonts. Does the EFL port uses that repository or something similar? EFL port is using below test font. If you need to update the test font, I will update EFL port font according to your update. http://github.com/downloads/mrobinson/webkitgtk-test-fonts/webkitgtk-test-fonts-0.0.3.tar.gz
Frédéric Wang (:fredw)
Comment 11 2014-06-21 01:08:09 PDT
Note You need to log in before you can comment on or make changes to this bug.