Important information about the MathML fonts in Gecko 41

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Important information about the MathML fonts in Gecko 41

Frédéric WANG
Dear all,

As previously announced for Gecko 31, we are moving our math font
support towards OpenType fonts with a MATH table. Firefox 41 has been
released this week and I'd like to give important information for our
users. Of course this applies to other products based on Gecko such that
Thunderbird or SeaMonkey.

1) The first good news is that the the OS/2 USE_TYPO_METRICS is now
implemented in the Gecko versions relying on the GDI API, that is old
versions of Windows [1]. AFAIK, Firefox is thus the first browser to
fully support this OpenType feature after Internet Explorer. Also all
OpenType fonts but STIX have now enabled this bit which means that they
can be used without being affected by an "excessive line spacing bug" [2].

2) We have dropped support for "Standard Symbols L" and "MathJax fonts"
[3]. Support for "STIX General" (installed on Mac OSX) and the "Symbol"
font on Windows (XP does not have Cambria Math) has been kept for now.
Of course, we recommend to install OpenType fonts with a MATH table
instead [4].

3) Users willing to use LaTeX's default "Computer Modern" style should
install the latest Latin Modern Math fonts by the GUST e-foundry group [5].

4) Users willing to use the "STIX" style should install Khaled Hosny's
XITS fork [6]. Any version of STIX will provide very good Unicode
coverage for math & tech symbols but the current release has too many
bugs to be usable for math layout. Hopefully these will be fixed in
version 2, currently in development [7].

5) The enhancement request for math fonts on windows.uservoice.com has
already obtained 529 votes! Thank you and please continue to vote and
spread the word [8].

6) Last but not least, the old "font.mathfont-family" property from the
"about:config" menu has finally been removed. This used to provide a way
to configure your preferred fonts for MathML when one is not specified
by the page author. In Gecko 41, it has been replaced with new
properties that I won't mention here, since "about:config" not really
intended for users. Instead, just use the standard font preference menu
to set the "Serif" font for "Mathematics". See the attached screenshot.

Frédéric Wang (for the Mozilla MathML Project)

[1] http://www.microsoft.com/typography/otspec/os2.htm#fss
[2] https://bugzilla.mozilla.org/show_bug.cgi?id=947650
[3] https://bugzilla.mozilla.org/show_bug.cgi?id=1174143
[4] https://developer.mozilla.org/en-US/docs/Mozilla/MathML_Project/Fonts
[5] http://www.gust.org.pl/projects/e-foundry/lm-math
[6] https://github.com/khaledhosny/xits-math
[7] http://www.stixfonts.org/
[8]
https://windows.uservoice.com/forums/265757-windows-feature-suggestions/suggestions/9727281-add-new-math-fonts-latin-modern-math-and-stix-2

mathml-font-menu.png (75K) Download Attachment
signature.asc (836 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: Important information about the MathML fonts in Gecko 41

Murray Sargent
Frédéric noted that the STIX font doesn't support the OS/2 USE_TYPO_METRICS flag.

For math fonts, a workaround is to check if there's a MATH table and use the typo metrics if so. Another work around is to compare the type ascent/descent to the TEXTMETRIC ascent/descent and assume a high font is involved if the latter is significantly bigger (1.5 × or more). Here's a post (http://blogs.msdn.com/b/murrays/archive/2009/12/01/high-fonts-and-math-fonts.aspx#10023606) on high fonts which explains a little more.

Murray
Reply | Threaded
Open this post in threaded view
|

Re: Important information about the MathML fonts in Gecko 41

Frédéric WANG
Thank you for the suggestion and reference Murray.

Actually, the "check whether there is a MATH table" workaround has
already been used since Gecko 31, because many OpenType fonts with a
MATH table didn't set the OS/2 USE_TYPO_METRICS flag properly. However,
it's not really good to keep such "hacks" so this will be removed
starting with Gecko 43 (to be released at the end of the year):
https://bugzilla.mozilla.org/show_bug.cgi?id=1170782

From my testing of free math fonts and from what I heard (for non-free
math fonts), all the fonts with a MATH table but STIX sets the OS/2
USE_TYPO_METRICS flag. That's not much a problem for STIX since the
current release has bugs that prevent it to be usable for math layout
anyway and it's best to use the XITS fork. The STI Pub is aware of the
bugs and I'm confident that at least the  OS/2 USE_TYPO_METRICS bug will
be fixed in version 2.

On 09/23/2015 10:58 PM, Murray Sargent wrote:
> Frédéric noted that the STIX font doesn't support the OS/2 USE_TYPO_METRICS flag.
>
> For math fonts, a workaround is to check if there's a MATH table and use the typo metrics if so. Another work around is to compare the type ascent/descent to the TEXTMETRIC ascent/descent and assume a high font is involved if the latter is significantly bigger (1.5 × or more). Here's a post (http://blogs.msdn.com/b/murrays/archive/2009/12/01/high-fonts-and-math-fonts.aspx#10023606) on high fonts which explains a little more.
>
> Murray


--
Frédéric Wang
maths-informatique-jeux.com/blog/frederic



signature.asc (836 bytes) Download Attachment