*TL;DR: Can you please indicate how to add fonts to use for WebKit tests
on OS X? This is is needed for existing and future MathML tests (and
actually pre-installing them on Mac/iOS would improve user experience).*

Dear all,

In the context of the MathML refactoring [1], I've recently been
reviewing test results on OS X. Unfortunately, many of existing tests or
tests that will be added by the current set of MathML refactoring
patches require a math font with an OpenType MATH table to work
properly. This is not the case of the obsolete STIXGeneral font families
that have been installed by default since OS X Lion [2]. Hence for now
those tests are just skipped or have incorrect text/PNG expectations. As
a comparison, the GTK port uses the Latin Modern Math font to ensure
consistent results [3].

I'm attaching a simple test-fonts.html page and I'm providing the
screenshots obtained when I use run-safari or run-webkit-tests with a
WebKit build integrating the MathML refactoring patches. From this
experiment, it seems that run-webkit-tests only use the pre-installed
system fonts (STIXGeneral) but not the fonts I installed manually on my
Mac. However, the latter are correctly selected with run-safari and then
you can see that the rendering of math equations is much better and
closer to the TeX references from the MathML torture test [4].

So my question: is there a way to ensure that WebKit tests are executed
with specific fonts on OS X without polluting the WebKit repo with big
math Web fonts?

If the solution is to have these math fonts pre-installed on OS X, then
that would also be great to enhance Safari user experience, as shown by
the attached screenshots. In that case, this is probably not the
business of WebKit developers but I'd like to suggest two math fonts
(also reported to Apple some years ago as problems number 16841023 and
17021145):

1) STIX Math [5], which has very good coverage for unicode symbols, is
supported by some tech companies, is released under SIL OFL and is the
next version of the STIXGeneral font families currently pre-installed on
OS X. Unfortunately the current 1.1 release has too many bugs and so is
not really usable for math layout, but version 2 will solve them and is
claimed to be released "soon".

2) Latin Modern Math [6], which has the Computer Modern style used by
default by TeX rendering engines and is used for WebKitGTK+ tests. This
font uses the LaTeX Project Public License + a Reserved Font Name clause
but the authors expressed their will to release it under SIL OFL, if
that can help.

Thank you,

Frédéric

[1] https://lists.webkit.org/pipermail/webkit-dev/2015-December/027840.html
[2] https://bugs.webkit.org/show_bug.cgi?id=41961
[3] https://github.com/mrobinson/webkitgtk-test-fonts
[4]
https://developer.mozilla.org/en-US/docs/Mozilla_MathML_Project/MathML_Torture_Test
[5] http://stixfonts.org/
[6] http://www.gust.org.pl/projects/e-foundry/lm-math

Title: Test fonts

Basic font-family test:

  • monospace: A
  • STIXGeneral: A
  • STIX Math: A
  • Latin Modern Math: A

MathML Torture test 19: x + ... + x ⏞ k times

MathML Torture test 14: ( ∂ 2 ∂ x 2 + ∂ 2 ∂ y 2 ) | φ ( x + i y ) | 2 = 0

Torture test 21: ∑ p  prime f ( p ) = ∫ t > 1 f ( t ) d π ( t )

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
webkit-dev mailing list
webkit-dev@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-dev

Reply via email to