Title: [199773] trunk/Source/WebCore
Revision
199773
Author
[email protected]
Date
2016-04-20 08:43:51 -0700 (Wed, 20 Apr 2016)

Log Message

Use OpenType MATH fonts by default
https://bugs.webkit.org/show_bug.cgi?id=133603

Patch by Frederic Wang <[email protected]> on 2016-04-20
Reviewed by Alejandro G. Castro.

No new tests. This is already tested by pixel tests like roots.xhtml.
However, new math fonts are not used during test execution.

* css/mathml.css:
(math): We use only a list of known OpenType fonts with a MATH table but keep some pre-installed fallback fonts for OS X and iOS.

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (199772 => 199773)


--- trunk/Source/WebCore/ChangeLog	2016-04-20 15:03:05 UTC (rev 199772)
+++ trunk/Source/WebCore/ChangeLog	2016-04-20 15:43:51 UTC (rev 199773)
@@ -1,3 +1,16 @@
+2016-04-20  Frederic Wang  <[email protected]>
+
+        Use OpenType MATH fonts by default
+        https://bugs.webkit.org/show_bug.cgi?id=133603
+
+        Reviewed by Alejandro G. Castro.
+
+        No new tests. This is already tested by pixel tests like roots.xhtml.
+        However, new math fonts are not used during test execution.
+
+        * css/mathml.css:
+        (math): We use only a list of known OpenType fonts with a MATH table but keep some pre-installed fallback fonts for OS X and iOS.
+
 2016-04-20  Claudio Saavedra  <[email protected]>
 
         [GTK] Move GTK+-independent platform code to platform/glib

Modified: trunk/Source/WebCore/css/mathml.css (199772 => 199773)


--- trunk/Source/WebCore/css/mathml.css	2016-04-20 15:03:05 UTC (rev 199772)
+++ trunk/Source/WebCore/css/mathml.css	2016-04-20 15:43:51 UTC (rev 199773)
@@ -12,14 +12,32 @@
     line-height: 1.0;
 }
 
-/* Keep font-family and other defaults here consistent with http://mxr.mozilla.org/mozilla-central/source/layout/mathml/mathml.css and feedback from www-math. */
+/* Fonts with appropriate Unicode coverage and OpenType features are required for good math rendering.
+   Consequently the default font-family on the <math> tag is not inherited but set to a list of known math fonts.
+   See http://trac.webkit.org/wiki/MathML/Fonts.
+   FIXME: OS X and iOS do not have such fonts pre-installed (bugs 17021145, 16841023 and 16843041 from Apple bug tracker).
+   Hence we also append some system fonts to provide minimal Unicode coverage and limited operator stretching.
+*/
 math {
+    font-family: "Latin Modern Math",
+                 "XITS Math",
+                 "STIX Math",
+                 "Libertinus Math",
+                 "TeX Gyre Bonum Math",
+                 "TeX Gyre Pagella Math",
+                 "TeX Gyre Schola",
+                 "TeX Gyre Termes Math",
+                 "Cambria Math",
+                 "Asana Math",
+                 "Lucida Bright Math",
+                 "Minion Math",
+                 STIXGeneral,
+                 STIXSizeOneSym,
 #if defined(WTF_PLATFORM_IOS) && WTF_PLATFORM_IOS
-    /* We explicitly include the font Symbol as it's the iOS equivalent of font STIXGeneral. */
-    font-family: STIXGeneral, Symbol, "Times New Roman", sans-serif;
-#else
-    font-family: "Latin Modern Math", MathJax_Main, STIXGeneral, STIXSizeOneSym, "DejaVu Sans", "DejaVu Serif", Cambria, "Cambria Math", "Lucida Sans Unicode", "Arial Unicode MS", "Lucida Grande", OpenSymbol, "Standard Symbols L", Times, serif;
+                 Symbol,
+                 "Times New Roman",
 #endif
+                 serif;
 }
 
 math {
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to