[webkit-dev] Fonts for WebKit tests on OS X?

Frédéric WANG fred.wang at free.fr
Fri Mar 11 06:30:26 PST 2016

*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

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,


[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
[5] http://stixfonts.org/
[6] http://www.gust.org.pl/projects/e-foundry/lm-math

-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot-run-safari.png
Type: image/png
Size: 46532 bytes
Desc: not available
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20160311/9f5722e4/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: screenshot-run-webkit-tests.png
Type: image/png
Size: 40313 bytes
Desc: not available
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20160311/9f5722e4/attachment-0001.png>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20160311/9f5722e4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.webkit.org/pipermail/webkit-dev/attachments/20160311/9f5722e4/attachment.sig>

More information about the webkit-dev mailing list