Revision 479103 of Fuentes para el motor Mozilla MathML

  • Enlace amigable (slug) de la revisión: Mozilla/MathML_Project/Fonts
  • Título de la revisión: Fuentes para el motor Mozilla MathML
  • Id de la revisión: 479103
  • Creada:
  • Creador: voylinux
  • ¿Es la revisión actual? No
  • Comentario

Contenido de la revisión

Nota: Estas instrucciones son para Gecko 2.0 (Firefox 4) y posteriores. For former versions see Fonts for Mozilla 1.8 or Fonts for Mozilla 1.9.

Instrucciones rápidas

  • Prueba esta página de prueba para determinar rápidamente si necesitas o no instalar fuentes adicionales. También es posible que quieras probar el Mozilla MathML  para probar tu instalación con casos reales.
  • En windows: usar este instalador de fuentes de MathML.
  • En Mac OS X Lion (10.7) y superiores, las funetes STIX fonts ya están instaladas, así que no necesitas hacer nada. También hay una fuente experimental en {{ Bug("770005") }}.
  • En la mayoría de distribuciones Linux, puedes instalar fuentes STIX y Asana fonts desde tu gestor de paquetes. Las fuentes MathJax también están disponibles en Debian testing y distribuciones derivadas como Ubuntu o Mint.
  • En Android, Gecko 15.0 {{ geckoRelease("15.0") }} o superior:instala el  complemento MathML-fonts.
  • En otros casos, instala las fuentes contenidas en este archivo zip.
  • Si aun así no es posible y estás usando Gecko 15.0 {{ geckoRelease("15.0") }} o superior, considera instalar el   complemento de fuentes MathML-fonts.

Resumen

Las fórmulas matemáticas hacen uso de numerosos símbolos representados por caracteres Unicode específicos. Mozilla puede mostrar cualquiera de estos símbolos si están instaladas las fuentes Unicode adecuadas. Además, de acuerdo con las  recomendaciones de la W3C sobre funetes en CSS2 , los autores pueden especificar una lista concreta de fuentes que prefieren (utilizando la propiedad font-family de CSS), con la seguridad de que el motor de fuentes de Mozilla's buscará una fuente alternativa cuando las especificadas no se encuentren en el sistema de un usario en particular. Si en último caso no se encontrase un fuente adecuada para un caracter en particular, Mozilla mostrará en su lugar una caja con la representación hexadecimal  del código Unicode que apunta al caracter.

Some mathematical operators are also drawn by using glyphs for larger variants of the character (e.g. summation symbol) or by assembling glyphs for a few pieces of the character (e.g braces). These variant or part glyphs do not in general have Unicode assignments, and so font-specific support is required for some characters. Mozilla has general support for the common delimiters and arrows that have the necessary Unicode assignments. For other characters, Mozilla has font-specific support. In general, if the necessary glyphs are not available on the system then Mozilla tries to stretch symbols using scale transforms, but that may result in a less pleasant rendering.

To see MathML as intended, you need sufficient font support, which may mean installing some fonts. Note that some Web sites may provide the required mathematical fonts as Web fonts. In that case, you will see the correct rendering on these pages if you use Gecko 15.0 {{ geckoRelease("15.0") }} or greater.

Main fonts

The STIX Fonts Project has been developing a comprehensive set of fonts that cover all the symbols in MathML and also contains glyphs to stretch mathematical operators. They are available under the SIL Open Font License and should be installed for best MathML rendering. Note that currently, only the fonts in /Fonts/STIX-General/ are used for stretching mathematical operators with STIX fonts. Asana Math is also freely available under the SIL Open Font License and has good support for mathematical characters. Starting in Gecko 7.0 {{ geckoRelease("7.0") }}, Mozilla can also use the glyphs contained in that font for stretchy operators. Starting in Gecko 13.0 {{ geckoRelease("13.0") }}, MathJax fonts are used as the default fonts for mathematical text and symbol stretching. These fonts are freely available under the Apache License. They are close to LaTeX rendering and should look more familiar to scientists. MathJax fonts also improves support for mathvariant attribute (e.g. to write double-struck, script or fraktur text).

All the fonts mentioned above may already be installed by default on your system or can easily be installed via your software manager. For convenience we provide a zip archive of MathML fonts. The fonts may be installed by extracting the font files (which have the .otf extension) from the zip archive, then following instructions for Microsoft Windows, or copying the files to a ~/Library/Fonts folder on Mac OS X, or to a ~/.fonts/ directory (which may need to be created) on Unix/Linux systems. Alternatively, follow dafont's "How to install a font". These fonts are OpenType PostScript fonts, which are supported by most modern operating systems. However some operating systems may not support these fonts. On such systems, it will be necessary to convert the fonts to a supported format. For example Asana Math is available in TrueType format and there is an unofficial TrueType conversion for STIX fonts.

Other fonts

The following fonts are not necessary when the above fonts are installed, but are worth noting because of their Unicode support for many mathematical characters.

  • DejaVu Serif and DejaVu Sans are freely available and installed with many Linux distributions. They contain support for many mathematical characters, and Mozilla will display some MathML reasonably on systems with these fonts installed, even without STIX fonts. The font only contains glyphs for stretchy operators that have Unicode assignments.

  • Cambria Math is preinstalled on Microsoft Windows Vista, and also comes with Miscrosoft Office 2007 or Microsoft PowerPoint Viewer 2007. The font has good support for mathematical characters, and so, with any of these products installed, Mozilla will be able to display some MathML reasonably even without STIX fonts. The font contains the necessary glyphs for stretchy operators but Mozilla does not yet make use of all of these. The license allows you to "use this font as permitted by the EULA for the product in which this font is included to display and print content", so consulting your lawyer is recommended if considering installing this on systems without the associated product.

Future work (please help!)

  • Some OpenType fonts include a MATH table as an extension to OpenType that would enable selecting glyphs for stretchy operators in a not-so-font-specific manner, but Mozilla does not yet make use of this. This includes Cambria Math, Neo Euler, STIX 1.1, LM Math, Lucida fonts, Asana Math and probably more.
  • An experimental Mac OS X Installer is available on {{ Bug("770005") }}.
  • Implement an UI to automatically download fonts. Some patches are available on {{ Bug("295193") }}.
    • For Linux distributions, one could use the PackageKit DBUS API ({{ Bug("467729") }}).
    • For Mobile platforms, see {{ Bug("648548") }}.
  • Other related bugs: suggest MathJax/Asana on Debian, Math fonts on Android.

Reset old preferences

If users have previously changed the "font.mathfont-family" preference for a previous version of Mozilla, 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.

 

Fuente de la revisión

<div class="note">
  Nota: Estas instrucciones son para Gecko 2.0 (Firefox 4) y posteriores. For former versions see<a href="/en/Mozilla_MathML_Project/FontsMozilla1.8" title="en/Mozilla MathML Project/FontsMozilla1.8"> Fonts for Mozilla 1.8</a> or <a href="/en/Mozilla_MathML_Project/Fonts_for_Mozilla_1.9's_MathML_engine" title="en/Mozilla_MathML_Project/FontsMozilla1.9">Fonts for Mozilla 1.9</a>.</div>
<h2 id="Instrucciones_r.C3.A1pidas">Instrucciones rápidas</h2>
<ul>
  <li>Prueba esta <a href="https://developer.mozilla.org/en-US/docs/Mozilla_MathML_Project/Fonts/Test" title="http://www.maths-informatique-jeux.com/font-testing.html">página de prueba</a> para determinar rápidamente si necesitas o no instalar fuentes adicionales. También es posible que quieras probar el <a class="external" href="https://developer.mozilla.org/en-US/docs/Mozilla_MathML_Project/MathML_Torture_Test" title="http://www.mozilla.org/projects/mathml/demo/texvsmml.html">Mozilla MathML&nbsp;</a> para probar tu instalación con casos reales.</li>
  <li>En windows: usar este <a href="https://developer.mozilla.org/@api/deki/files/6388/=MathML-fonts.msi" title="https://developer.mozilla.org/@api/deki/files/6388/=MathML-fonts.msi">instalador de fuentes de MathML</a>.</li>
  <li>En Mac OS X Lion (10.7) y superiores, las funetes STIX fonts ya están instaladas, así que no necesitas hacer nada. También hay una fuente experimental en {{ Bug("770005") }}.</li>
  <li>En la mayoría de distribuciones Linux, puedes instalar fuentes STIX y Asana fonts desde tu gestor de paquetes. Las fuentes MathJax también están disponibles en Debian testing y distribuciones derivadas como Ubuntu o Mint.</li>
  <li>En Android, Gecko 15.0 {{ geckoRelease("15.0") }} o superior:instala el&nbsp; <a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/mathml-fonts/" title="https://addons.mozilla.org/en-US/firefox/addon/mathml-fonts/">complemento MathML-fonts</a>.</li>
  <li>En otros casos, instala las fuentes contenidas en este <a href="/@api/deki/files/6182/=MathML-fonts.zip" title="MathML-fonts.zip">archivo zip</a>.</li>
  <li>Si aun así no es posible y estás usando Gecko 15.0 {{ geckoRelease("15.0") }} o superior, considera instalar el&nbsp;&nbsp; <a class="link-https" href="https://addons.mozilla.org/en-US/firefox/addon/mathml-fonts/" title="https://addons.mozilla.org/en-US/firefox/addon/mathml-fonts/">complemento de fuentes MathML-fonts</a>.</li>
</ul>
<h2 id="Resumen">Resumen</h2>
<p>Las fórmulas matemáticas hacen uso de numerosos símbolos representados por caracteres Unicode específicos. Mozilla puede mostrar cualquiera de estos símbolos si están instaladas las fuentes Unicode adecuadas. Además, de acuerdo con las&nbsp; <a class="external" href="http://www.w3.org/TR/REC-CSS2/fonts.html">recomendaciones de la W3C sobre funetes en CSS2 </a>, los autores pueden especificar una lista concreta de fuentes que prefieren (utilizando la propiedad <em>font-family</em> de CSS), con la seguridad de que el motor de fuentes de Mozilla's buscará una fuente alternativa cuando las especificadas no se encuentren en el sistema de un usario en particular. Si en último caso no se encontrase un fuente adecuada para un caracter en particular, Mozilla mostrará en su lugar una caja con la representación hexadecimal&nbsp; del código Unicode que apunta al caracter.</p>
<p>Some mathematical operators are also drawn by using glyphs for larger variants of the character (e.g. summation symbol) or by assembling glyphs for a few pieces of the character (e.g braces). These variant or part glyphs do not in general have Unicode assignments, and so font-specific support is required for some characters. Mozilla has general support for the common delimiters and arrows that have the necessary Unicode assignments. For other characters, Mozilla has font-specific support. In general, if the necessary glyphs are not available on the system then Mozilla tries to stretch symbols using scale transforms, but that may result in a less pleasant rendering.</p>
<p>To see MathML as intended, you need sufficient font support, which may mean installing some fonts. Note that some Web sites may provide the required mathematical fonts as Web fonts. In that case, you will see the correct rendering on these pages if you use Gecko 15.0 {{ geckoRelease("15.0") }} or greater.</p>
<h2 id="Main_fonts">Main fonts</h2>
<p>The <a class="external" href="http://www.stixfonts.org/">STIX Fonts Project</a> has been developing a comprehensive set of fonts that cover all the symbols in MathML and also contains glyphs to stretch mathematical operators. They are available under the <a class="external" href="http://scripts.sil.org/OFL" rel="external" target="_blank" title="http://scripts.sil.org/OFL">SIL Open Font License</a> and should be installed for best MathML rendering. Note that currently, only the fonts in <code>/Fonts/STIX-General/</code> are used for stretching mathematical operators with STIX fonts. <a class="external" href="http://www.ctan.org/tex-archive/fonts/Asana-Math/" rel="external" target="_blank" title="http://www.ctan.org/tex-archive/fonts/Asana-Math/">Asana Math</a> is also freely available under the <a class="external" href="http://scripts.sil.org/OFL" rel="external" target="_blank" title="http://scripts.sil.org/OFL">SIL Open Font License</a> and has good support for mathematical characters. Starting in Gecko 7.0 {{ geckoRelease("7.0") }}, Mozilla can also use the glyphs contained in that font for stretchy operators. Starting in Gecko 13.0 {{ geckoRelease("13.0") }}, <a class="external" href="http://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/" title="http://cdn.mathjax.org/mathjax/latest/fonts/HTML-CSS/TeX/otf/">MathJax fonts</a> are used as the default fonts for mathematical text and symbol stretching. These fonts are freely available under the <a class="external" href="http://cdn.mathjax.org/mathjax/latest/LICENSE" title="http://cdn.mathjax.org/mathjax/latest/LICENSE">Apache License</a>. They are close to LaTeX rendering and should look more familiar to scientists. MathJax fonts also improves support for <a href="/en/MathML/Element/mi#attr-mathvariant" title="https://developer.mozilla.org/en/MathML/Element/mi#attr-mathvariant">mathvariant</a> attribute (e.g. to write double-struck, script or fraktur text).</p>
<p>All the fonts mentioned above may already be installed by default on your system or can easily be installed via your software manager. For convenience we provide a <a href="/@api/deki/files/6182/=MathML-fonts.zip" title="MathML-fonts.zip">zip archive of MathML fonts</a>. The fonts may be installed by extracting the font files (which have the <code>.otf</code> extension) from the zip archive, then following <a class="external" href="http://www.microsoft.com/typography/ttfinst/ttfinst.htm">instructions for Microsoft Windows</a>, or copying the files to a <code>~/Library/Fonts</code> folder on Mac OS X, or to a <code>~/.fonts/</code> directory (which may need to be created) on Unix/Linux systems. Alternatively, follow <a class="external" href="http://www.dafont.com/faq.php">dafont's "How to install a font"</a>. These fonts are OpenType PostScript fonts, which are supported by most modern operating systems. However some operating systems may not support these fonts. On such systems, it will be necessary to convert the fonts to a supported format. For example Asana Math is available in <a class="external" href="http://mirrors.ctan.org/fonts/Asana-Math/Asana-Math.ttf" title="http://mirrors.ctan.org/fonts/Asana-Math/Asana-Math.ttf">TrueType format</a> and there is <a class="external" href="http://olegueret.googlepages.com/stixfonts-ttf">an unofficial TrueType conversion</a> for STIX fonts.</p>
<h2 id="Other_fonts">Other fonts</h2>
<p>The following fonts are not necessary when the above fonts are installed, but are worth noting because of their Unicode support for many mathematical characters.</p>
<ul>
  <li>
    <p><a class="external" href="http://dejavu.sourceforge.net/">DejaVu Serif and DejaVu Sans</a> are <a class="external" href="http://dejavu.sourceforge.net/wiki/index.php/License">freely available</a> and installed with many Linux distributions. They contain support for many mathematical characters, and Mozilla will display some MathML reasonably on systems with these fonts installed, even without STIX fonts. The font only contains glyphs for stretchy operators that have Unicode assignments.</p>
  </li>
  <li>
    <p>Cambria Math is preinstalled on Microsoft Windows Vista, and also comes with Miscrosoft Office 2007 or <a class="external" href="http://www.microsoft.com/downloads/details.aspx?FamilyID=048dc840-14e1-467d-8dca-19d2a8fd7485">Microsoft PowerPoint Viewer 2007</a>. The font has good support for mathematical characters, and so, with any of these products installed, Mozilla will be able to display some MathML reasonably even without STIX fonts. The font contains the necessary glyphs for stretchy operators but Mozilla does <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=372351">not yet</a> make use of all of these. The license allows you to "use this font as permitted by the EULA for the product in which this font is included to display and print content", so consulting your lawyer is recommended if considering installing this on systems without the associated product.</p>
  </li>
</ul>
<h2 id="Future_work_(please_help!)">Future work (please help!)</h2>
<ul>
  <li>Some OpenType fonts include a MATH table as an extension to OpenType that would enable selecting glyphs for stretchy operators in a not-so-font-specific manner, but Mozilla does <a class="link-https" href="https://bugzilla.mozilla.org/show_bug.cgi?id=407059">not yet</a> make use of this. This includes <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=372351" title="/en-US/docs/">Cambria Math</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=622576" title="/en-US/docs/">Neo Euler</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=693968" title="/en-US/docs/">STIX 1.1</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=736032" title="/en-US/docs/">LM Math</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=737788" title="/en-US/docs/">Lucida fonts</a>, <a href="https://bugzilla.mozilla.org/show_bug.cgi?id=407439" title="/en-US/docs/">Asana Math</a> and probably more.</li>
  <li>An experimental <span id="summary_alias_container"><span id="short_desc_nonedit_display">Mac OS X Installer</span></span> is available on {{ Bug("770005") }}.</li>
  <li>Implement an UI to automatically download fonts. Some patches are available on {{ Bug("295193") }}.
    <ul>
      <li>For Linux distributions, one could use the PackageKit DBUS API ({{ Bug("467729") }}).</li>
      <li>For Mobile platforms, see {{ Bug("648548") }}.</li>
    </ul>
  </li>
  <li>Other related bugs: <a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=697277" title="/en-US/docs/">suggest MathJax/Asana on Debian</a>, <a href="https://code.google.com/p/android/issues/detail?id=36011" title="/en-US/docs/">Math fonts on Android</a>.</li>
</ul>
<h2 id="Reset_old_preferences">Reset old preferences</h2>
<p>If users have previously changed the "font.mathfont-family" preference for a previous version of Mozilla, 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.</p>
<div id="cke_pastebin" style="position: absolute; top: 56.8667px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">
  &nbsp;</div>
Revertir a esta revisión