Reset old setup
If you had already installed MathML fonts for a previous version of Gecko, it is best to reset your setup:
- The STIX consortium provides several sets to use in various situations ; the recommended one is now the STIX Word (
STIX-BoldItalic.otfand more importantly
STIX-Math.otf) while the STIX General set (about 30 files) is now deprecated. Similarly, the MathJax TeX fonts are now deprecated in favor of the Latin Modern Math font which provides the style of the popular Computer Modern. If you don't need STIX General or MathJax TeX for another application, you can just uninstall them. At the moment, you can still use them but note that we plan to remove support for these fonts in the future. Support for MathJax TeX fonts has been removed from Gecko 41.0 (Firefox 41.0 / Thunderbird 41.0 / SeaMonkey 2.38).
- If you had install the MathML fonts package using the Windows installer, you can uninstall it (this will remove the STIX General, MathJax TeX and Asana Math fonts).
- If you had install the MathML fonts add-on, you can upgrade to version >= 2.1 to use the new XITS Math and Latin Modern Math fonts. It might be a good idea to check the instructions below and uninstall the add-on if it is no longer necessary.
- If you had previously changed the
font.mathfont-familypreference, then it is best to reset this to the default value. To do this, enter the URL
about:config, filter for
mathfont, and reset to the default value through the context menu on the preference.
On Windows 7 and higher, Cambria Math is installed by default and will be used for the MathML rendering so you do not have anything to do. If you are using Windows XP, you can obtain the Cambria Math font by installing Microsoft Office 2007+, Microsoft’s PowerPoint Viewer, or Microsoft’s Office Compatibility Pack. Otherwise you can install any fonts with a MATH table (follow Microsoft's instruction for Windows XP) and they may also be included in TeX distributions such as TeX Live or MikTeX.
Warning: Some fonts and some version of Windows are affected by rendering bug causing too much space above and below the lines of text in some MATH fonts.
On Mac, you must install any of the fonts with a MATH table. For example, you can install MacPorts and its texlive-fonts-recommended package (Latin Modern Math and TeX Gyre). An enhancement request has been submitted to Apple to make a MATH font installed by default (problem 16841023 for STIX and17021145 for Latin Modern).
On Linux, you must install any of the fonts with a MATH table. They are generally available from the package manager of many distributions, for example:
- Debian/Ubuntu/Mint and other Debian-based distributions:
fonts-lmodern(Latin Modern Math),
fonts-texgyre(TeX Gyre Math),
texlive-fonts-extra(XITS). Note that the
fonts-stixpackage in Debian stable (Wheezy) does not contain STIX Math yet, use XITS instead.
- On Fedora:
texlive-lm-math(Latin Modern Math),
texlive-tex-gyre-math(TeX Gyre Fonts),
texlive-asana-math/oflb-asana-math-fonts(Asana Math) or
- On openSUSE:
texlive-lm-math/ctan-latinmodern-fonts(Latin Modern Math),
texlive-tex-gyre-math(TeX Gyre Fonts),
texlive-xits(XITS Math) or
- On ArchLinux:
texlive-core(Latin Modern Math, TeX Gyre Math),
texlive-fontsextra(XITS Math, STIX Math, Asana Math).
- In general, a
texlivepackage is likely to provide the appropriate dependencies.
If you installed "vanilla" TeX Live you will need to inform your system of fonts provided by it:
$ mkdir ~/.fonts $ mdir ~/.fonts/OTF $ for f in $(find /path/to/your/texlive/texmf-dist/fonts/opentype/public/ -maxdepth 1 -mindepth 1); do ln -s $f ~/.fonts/OTF/; done # fc-cache ~/.fonts # mkfontscale ~/.fonts/OT # mkfontdir ~/.fonts/OTF
On other systems, consider installing a MATH font using your package manager Note that these fonts are generally delivered with TeX distributions such as TeX Live, but you might need to follow specific instructions so that your system is aware of the fonts. As a last resort, install the MathML fonts add-on.
Arabic Mathematical Alphabetic Symbols
Currently, very few fonts have appropriate glyphs for the Arabic Mathematical Alphabetic Symbols. If you are likely to need these characters, we recommend to install the XITS or Amiri fonts. A bug has been reported to the STIX consortium to add coverage for these characters.
Gecko's MathML layout algorithm has long been based on some TeX rules and private per-font tables. Unfortunately, this did not always work well with the modern OpenType/TrueType Unicode fonts used by browsers and installed by default on various systems. If one of the few mathematical fonts supported by Gecko were not installed on the user system, then the MathML rendering could be very poor.
Starting with Gecko 31 (Firefox 31.0 / Thunderbird 31.0 / SeaMonkey 2.28), it is recommended to use OpenType fonts that have a MATH table. This table is based on the TeX rules and was designed by Microsoft for Microsoft Word, it has been implemented in many modern TeX typesetting systems and is currently being standardized. See the implementation status on the Mozila wiki.
Here is a list of known fonts with a MATH table. Starting with Gecko 41.0 (Firefox 41.0 / Thunderbird 41.0 / SeaMonkey 2.38), you can use the advanced font preference menu to configure the default for mathematics. Alternatively, you can try the MathML-fontsettings add-on for Gecko 31 (Firefox 31.0 / Thunderbird 31.0 / SeaMonkey 2.28) and higher.
- Asana Math
- Cambria Math
- GNU FreeFont since november 2013 (not released yet)
- Latin Modern Math
- Linux Libertine (not released yet)
- Lucida Bright Math
- Minion Math
- Neo Euler (not released yet)
- STIX Math
- TeX Gyre Bonum Math
- TeX Gyre Pagella Math
- TeX Gyre Schola Math
- TeX Gyre Termes Math
- XITS Math
Using mathematical fonts on Web pages
Starting with Gecko 31.0 (Firefox 31.0 / Thunderbird 31.0 / SeaMonkey 2.28), it is now easy to set up the CSS style (and optional WOFF fonts) to use on your Web site. See the Authoring MathML page for details and try the MathML Torture Test. You can use FontForge and FontTools to edit the MATH table and create your own mathematical fonts.