[webkit-dev] Proposal: Remove ENABLE(MATHML)

Frédéric WANG fred.wang at free.fr
Wed Oct 25 11:31:35 PDT 2017

On 25/10/2017 19:05, Maciej Stachowiak wrote:
> (1) Is it at all common to use MathML with a math font specified as a web font? Can you give an example?
I can't say whether it is "common" but I guess the trick is well known
by MathML users, since unfortunately many systems do not provide math
fonts by default. I have a github repo with known fonts at

As an example Jacques Distler uses STIX 2 WOFF on his blog:


Some people also bundle WOFF fonts in web apps or ebooks. Web fonts are
also used by browser addons e.g.
https://addons.mozilla.org/en-US/firefox/addon/mathml-fonts/ which allow
to workaround the lack of system fonts (and the impossibility to install
them for users).

Website using MathML often have a page with installation instructions
for math fonts, for example on NIST dlmf:

Note that I've seen similar things (WOFF fonts, addons, instructions)
for other languages in the past e.g.
https://addons.mozilla.org/en-US/firefox/addon/khmer-fonts-package/, so
again it's not specific to math.

> (2) Is it at all common to use MathML only to the extent that it's rendered fine without a math font?
Again, I'm not sure how common it is but I've seen some users happy with
basic MathML rendering for elementary calculations. I was also surprised
to see some people excited about my CSS stylesheet at
https://github.com/fred-wang/mathml.css that can render very basic math.
There are a lot of such formulas on Wikipedia, for sure for instance
https://en.wikipedia.org/wiki/Fraction_(mathematics) contains MathML
formulas that can be rendered without specialized math fonts.
> (3) In the cases above, is there usually an image fallback?
It really depends on the website. But definitely people using MathML
need some fallback (image, CSS layout, javascript layout, text etc).

How this fallback is triggered depends on the website, there is not any
real rule. IIUC, the argument mentioned earlier only considers the case
where an author would try to detect MathML support and automatically
fallback to an image otherwise. As I said, authors could also try to
detect availability of math fonts, or provide WOFF fallback (Distler's
blog), or have a page to explain how to install fonts (e.g. NIST dlmf),
or use image by default and explain how to enable MathML & install fonts
(e.g. Wikipedia), or provide LaTeX fallback in an <annotation> (my blog)

IMHO, platform owners should not speculate on what authors will do.
Disabling MathML just because of the lack of math fonts, does not seem a
good idea. On the one hand, if MathML is enabled page authors can still
decide to serve fallback content if they think the support is not good
enough on the user platform. On the other hand, if the platform owner
has disabled MathML, then there is no way for users/authors willing to
use MathML to force it to be enabled again...
> Why don't we wait to hear from port owners whether they would actually want to disable MathML for reason of compatibiltiy. Knowing answers to the above questions would help.
Sure. My email was to follow-up on
https://bugs.webkit.org/show_bug.cgi?id=177744 and the discussions at
the Web Engines Hackfest, so they are not forgotten. But there is no
hurry to remove the build flag for now.

Frédéric Wang - frederic-wang.fr

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20171025/5f4d01ed/attachment.bin>

More information about the webkit-dev mailing list