As stated in our manifesto, mathematical fonts are extremely important to provide good mathematical rendering. In a previous announcement, we mentioned the publication of a “MathML in HTML5” implementation note, relying on Open Font Format 3 and more specifically the OpenType MATH table introduced by Microsoft. Initially used for Microsoft Word, this table was later implemented in modern TeX typesetting engines such as XeTeX, LuaTeX or ConTeXt. During a crowdfunding project from 2014, one of our directors submitted patches to Mozilla, Apple and Google in order to implement parsing for the OpenType MATH table in Gecko, WebKit and OTS respectively. This opened the way to better mathematical rendering in browsers. Gecko and WebKit already use this table for their MathML support.
Left: Noto Serif (no MATH table) ; Right: Latin Modern Math (MATH table)
The use of math fonts with an OpenType MATH table has been the opportunity for the MathML community to build relationships with font designers. We would like to thank Microsoft for creating the Cambria Math and making it available on Windows systems. In particular, Murray Sargent was very helpful in private discussions on the MATH table and he was involved in its submission for standardization in Open Font Format 3. Khaled Hosny by his long experience in mathematical typesetting, familiarity with Arabic notations and deep knowledge of font formats has also provided prominent support to MathML implementers. Several of his fonts are freely available on his GitHub repository. The work of the GUST e-foundry group was also instrumental in providing a modernization of the classical Computer Modern font as well as many other math fonts, some of them still in development. Thanks also to the STI Pub Consortium for designing and distributing the STIX Math font and its impressive Unicode coverage for mathematical and technical symbols. We are involved in the discussion for the development of STIX 2 and we are confident that this next release will be usable for MathML rendering soon. Finally, other designers have created fonts with a MATH table and we are very grateful for their effort.
Left: "Windows" metrics ; Right: Typo metrics
An important issues raised during the discussion with the font designers is the interpretation of vertical font metrics. The Open Font Format contains three different metrics but only the “typo” metrics are really relevant for mathematical rendering. Especially, some metrics used on Windows must take into account the tallest glyphs of the font which can be excessively large in the case of a mathematical font (e.g. when it contains big integrals). To solve that issue, Microsoft introduced a USE_TYPO_METRICS bit that tells implementers to really use the “typo” metrics. The MathML Association has thus been involved in implementing this feature in Web rendering engines with the help of Mozilla and Apple developers. More specifically, patches for Gecko landed in May while patches for WebKit landed during the past two weeks. The USE_TYPO_METRICS bit is thus taken into account on all platforms in the current Firefox release. The same is true for WebKit Nightly with the exception of iOS and OS X where for now it only applies to fonts with a MATH table.
The OpenType MATH table and USE_TYPO_METRICS feature were two of the requirements of the “MathML in HTML5” implementation note. We will continue to support the projects of font designers and encourage OS vendors to make mathematical fonts widely available. Collaborating with browser vendors to improve the use of the MATH table for MathML rendering is also one of our top priority. We already had encouraging discussions with some WebKit developers and we will announce more in future updates. Stay tuned!