mozilla

# Fonts for Mozilla's MathML engine

These instructions are for Gecko 31.0 (Firefox 31.0 / Thunderbird 31.0 / SeaMonkey 2.28) and higher. For former versions see Fonts for Mozilla 1.8, Fonts for Mozilla 1.9 or Fonts for Mozilla 2.0.

## Installation Instructions

### 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-Regular.otf, STIX-Bold.otf, STIX-BoldItalic.otf and 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.
• 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-family preference, 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.

### Windows

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.

### Mac

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).

### Linux

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), oflb-asana-math-fonts (Asana Math), texlive-fonts-extra (XITS). Note that the fonts-stix package 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 stix-math-fonts (STIX Math).
• On openSUSE: texlive-lm-math/ctan-latinmodern-fonts (Latin Modern Math), texlive-tex-gyre-math (TeX Gyre Fonts), texlive-Asana-Math (Asana Math), texlive-xits (XITS Math) or stix-fonts (STIX Math).
• On ArchLinux: texlive-core (Latin Modern Math, TeX Gyre Math), texlive-fontsextra (XITS Math, STIX Math, Asana Math).
• In general, a texlive package 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


### Android

You must use the MathML-fonts add-on. An enhancement request has been submitted to Google to make a MATH font installed by default. See this GitHub repository.

### Firefox OS

You must use the MathML-fonts add-on. We plan to bundle a MATH font in the default installation.

### Other systems

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.

## Fonts with a MATH table

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, 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. Firefox users can install the MathML-fontsettings add-on to configure which font to use to render mathematical formulas.

## 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.

## Document Tags and Contributors

Tags:
Contributors to this page: raniere, fscholz, Sheppy, trevorh, wgianopoulos, fred.wang, mc10
Last updated by: fred.wang,