Please note, this is a STATIC archive of website developer.mozilla.org from 03 Nov 2016, cach3.com does not collect or store any user information, there is no "phishing" involved.

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.

安装说明

重置旧的安装程序

如果你已经安装过MathML之前的版本Gecko的字体,最好重新设定你的安装程序:

  • STIX 组合 提供了 several sets to use in various situations ; 现在推荐的是 STIX Word (STIX-Regular.otf, STIX-Bold.otf, STIX-BoldItalic.otf and more importantly STIX-Math.otf) ,而the STIX General set (about 30 files) 现在不推崇. 类似的, MathJax TeX fonts 现在不推荐,以支持能够提供受欢迎的Computer Modern样式的Latin Modern Math font . 如果你不需要为了其他的应用程序而使用STIX General or MathJax TeX , 你就可以卸载他们了. 当然, 你也可以仍然使用他们,但是要知道在将来,我们不在计划给这些字体提供支持了.
  • 如果你已经使用Windows installer安装了MathML fonts package, 你可以卸载他 (他会自己移除STIX General, MathJax TeX and Asana Math fonts).
  • 如果你已经安装了MathML fonts add-on, 你可以将他升级至 >= 2.1,这样就可使用新的 XITS Math and Latin Modern Math fonts. 如果他不是必要的,根据说明下载它是一个比较好的主意。
  • 如果你之前已经改变了font.mathfont-family的引用, 最好是重新设定为默认值. 为了做到这点, enter the URL about:config, filter for mathfont, 通过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. There are known bugs due to font-inflation.

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 in the ISO/IEC CD 14496-22 "Open Font Format" (see section 6.3.6). This is still a work-in-progress: there are known bugs in browsers & fonts and the fonts are not installed by default on many operating systems, but you can already start using these mathematical fonts instead of the old ones. 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 to edit the MATH table and create your own mathematical fonts.

文档标签和贡献者

 最后编辑者: yy316903631,