WOFF/WOFF2 math fonts and sample CSS stylesheets
Python CSS Makefile HTML M4
Switch branches/tags
Nothing to show
Clone or download
Permalink
Failed to load latest commit information.
Asana Update README ; use WOFF2 web fonts in the mathfonts.css files. Jan 22, 2016
Cambria Update the comments in mathfonts.css, to indicate that the -moz-* syn… Aug 25, 2014
DejaVu Replace DejaVuSerif and DejaVuSans with a single DejaVu directory usi… Jul 15, 2016
GNUFreeSans Update README ; use WOFF2 web fonts in the mathfonts.css files. Jan 22, 2016
GNUFreeSerif Update README ; use WOFF2 web fonts in the mathfonts.css files. Jan 22, 2016
LatinModern Update README ; use WOFF2 web fonts in the mathfonts.css files. Jan 22, 2016
Libertinus Update README ; use WOFF2 web fonts in the mathfonts.css files. Jan 22, 2016
LucidaBright Update the comments in mathfonts.css, to indicate that the -moz-* syn… Aug 25, 2014
Minion Update the comments in mathfonts.css, to indicate that the -moz-* syn… Aug 25, 2014
NeoEuler Update README ; use WOFF2 web fonts in the mathfonts.css files. Jan 22, 2016
STIX Add new release of STIX. Dec 10, 2016
TeXGyreBonum Update README ; use WOFF2 web fonts in the mathfonts.css files. Jan 22, 2016
TeXGyrePagella Update README ; use WOFF2 web fonts in the mathfonts.css files. Jan 22, 2016
TeXGyreSchola Update README ; use WOFF2 web fonts in the mathfonts.css files. Jan 22, 2016
TeXGyreTermes Update README ; use WOFF2 web fonts in the mathfonts.css files. Jan 22, 2016
XITS Update README ; use WOFF2 web fonts in the mathfonts.css files. Jan 22, 2016
webextension Fix syntax error in WebExtension CSS Apr 15, 2017
.gitignore Add command to generate webextension-mathml-fonts.zip Apr 9, 2017
CheckFont.py Use fontforge.unspecifiedMathValue instead of TEX_UNDEF. closes #2 Jan 22, 2016
GenerateHTMLTest.py Use fontforge.unspecifiedMathValue instead of TEX_UNDEF. closes #2 Jan 22, 2016
Makefile.in Add command to generate webextension-mathml-fonts.zip Apr 9, 2017
README.md Add new release of STIX. Dec 10, 2016
compress-font.py Use zopfli compression for WOFF files. Closes #7 Feb 1, 2016
configure Add command to generate webextension-mathml-fonts.zip Apr 9, 2017
configure.ac Add command to generate webextension-mathml-fonts.zip Apr 9, 2017
index.html Add new release of STIX. Dec 10, 2016

README.md

Mathematical Open Type fonts

License

This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, you can obtain one at http://mozilla.org/MPL/2.0/.

Description

This repository contains a script to fetch various open source OpenType fonts with a MATH table as well as the corresponding fonts to use for the surrounding text (if any). The fonts are converted into WOFF (with zopfli compression) and WOFF2 formats using fonttools, which may perform additional optimizations. It is expected that all the transformations preserve Functional Equivalence and so Reserved Font Names remain unchanged. The fonts are finally packaged with some documentation, a license and a mathfont.css stylesheet, so that you can easily use them on your Web site. Some proprietary fonts as well as incomplete open source fonts are also listed but they are not provided.

Warning

Note that only Gecko and WebKit have (more or less complete) support for MathML and the OpenType MATH table. The WOFF2 format is not supported by all web rendering engines. Also some (but not all) of the fonts provide old style numbers and calligraphic letters accessible via OpenType font features. Some CSS rules from the CSS Fonts Module Level are provided to help selecting the corresponding glyphs, but these are not implemented/enabled in all browsers yet. In general, it is recommended to try the most recent versions of browsers.

The following open source math fonts have issues and are not provided yet:

  • The Neo Euler font has design issues and has never been released.
  • The development version of GNU Free fonts contains an OpenType MATH table but this is not available in the release yet.

Using Math fonts on your Web site

Download the zip archive. Choose one family for your web site and place the corresponding subdirectory somewhere. Make your pages link to the mathfonts.css stylesheet. The MathML formulas will then render with the specified font. It's good to make them consistent with the surrounding text, especially for inline expressions. To do that, use the htmlmathparagraph class, e.g. <body class="htmlmathparagraph">. By default, the local fonts installed on the system will be used. For open source fonts, Web fonts in WOFF2 or WOFF format will be used as a fallback.

Most families provide old style numbers in the text font. You can use them via the oldstylenumbers class, e.g. <span class="oldstylenumbers">0123456789</span>. Some of the math fonts also provide calligraphic style for the script characters, that you can select with the calligraphic class e.g. <math><mi mathvariant="script" class="calligraphic">A</mi></math> or equivalently <math><mi class="calligraphic">𝒜</mi></math>.

Build Instructions

You need GNU Core Utilities (or equivalent on UNIX systems) as well as sed, grep, unzip, wget, fonttools, zopfli and brotli. Type the following command to build the font directories:

./configure
make

Use make clean to remove intermediary files and make distclean to remove all the files that are not tracked on GitHub.