MathML:Fonts: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
(group Cambria Math and MATH table)
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Improve font installation ==
Various Unicode fonts are already installed by default on many systems and we should try to support them. However, we should also ensure that supported fonts are ''really'' installed so that users do not wonder why MathML is no working correctly on their system.
People proposed to add some kind of automated installation ({{bug|233950}}, {{bug|295193}}). One possible direction could be to use [https://bugzilla.mozilla.org/show_bug.cgi?id=295193#c12 downloadable fonts]. However, we need to modify nsMathMLChar to make these fonts usable in stretchy operators ({{bug|736010}}).
[fred] An [https://addons.mozilla.org/en-US/firefox/addon/mathml-fonts/ add-on adding mathematical fonts in WOFF format] is now available.
== OpenType MATH table and Unicode Fonts ==
The OpenType MATH table contains information about size variants of operators and how to build operators with several glyphs. The purpose is to directly read the table in the fonts that contain this information rather than maintaining our own mathfonts*.properties ({{bug|407059}}). This will allow us to get rid of mathfonts*.properties for STIX and Asana Math and give support for more mathematical unicode fonts:
* Cambria Math, which is distributed with many Microsoft product. See {{bug|372351}}
* Neo Euler, a free OpenType version of the [http://en.wikipedia.org/wiki/AMS_Euler|AMS Euler]. See {{bug|622576}}
* Latin Modern Math {{bug|736032}}
* XITS? See https://github.com/khaledhosny/xits-math/issues/7
* Probably more...
[fredw] Initial support for OpenType MATH fonts is implemented in Gecko 31.
== [DONE] Support for MathJax fonts ==
MathJax has its own Open Type fonts, which look closer to LaTeX fonts and thus are often preferred by MathJax users. That may be interesting to see if we can support them. They do not seem to contain an OpenType MATH table, though.
See {{bug|701758}}, {{bug|732834}} and {{bug|732832}}.
[fred] First fix pushed to add support for most stretchy construction in the MathJax fonts ({{bug|701758}})
[fred] Second fix pushed to use MathJax fonts in mathematical text ({{bug|732834}}). It improves a bit mathvariant support too ({{bug|114365}}).
[fred] MathJax fonts will be used by default in Firefox 13. However, it remains to fix {{bug|732832}} to get a complete support.
[fred] MathJax fonts will be deprecated in favor of modern OpenType MATH fonts for Gecko >= 31
== [DONE] Support for STIX fonts ==
== [DONE] Support for STIX fonts ==


Line 11: Line 45:
[fred] A third patch has been pushed to use [http://hg.mozilla.org/mozilla-central/rev/535903851195 STIX fonts 1.0]. It also adds size variants for integral symbols.
[fred] A third patch has been pushed to use [http://hg.mozilla.org/mozilla-central/rev/535903851195 STIX fonts 1.0]. It also adds size variants for integral symbols.


== Support for Asana Math ==
== [DONE] Support for Asana Math ==


Asana Math is available under the Open Font License and "includes almost all mathematical Unicode symbols". Unicode Mappings for [[MathML:CompositeChars_and_Variants|Composite Chars and Variants]] are provided, so it would be possible to support them by adding a  <tt>mathfontAsanaMath.properties</tt>. However, it would probably be better to directly read the OpenType MATH table.
Asana Math is available under the Open Font License and "includes almost all mathematical Unicode symbols". Unicode Mappings for [[MathML:CompositeChars_and_Variants|Composite Chars and Variants]] are provided, so it would be possible to support them by adding a  <tt>mathfontAsanaMath.properties</tt>. However, it would probably be better to directly read the OpenType MATH table.


See {{bug|407439}}
See {{bug|407439}}
== Support for More Unicode Fonts ==
Windows Vista and Office 2007 come with new fonts Cambria and Cambria Math. They are also installed as part of PowerPoint Viewer 2007 and the Microsoft Office Compatibility Pack. We can get support for some [[MathML:CompositeChars_and_Variants|Composite Chars and Variants]] by writing a <tt>mathfontCambriaMath.properties</tt>. However, we won't have access to the non-Unicode glyphs since there is no character maps for them. The ideal approach is to read the OpenType MATH table.
See {{bug|372351}}
The OpenType MATH table contains information about [[MathML:CompositeChars_and_Variants|Composite Chars and Variants]]. The purpose is to directly read the tables in the fonts that contain this information rather than maintaining our own mathfonts*.properties.
See {{bug|407059}} and [http://groups.google.com/group/mozilla.dev.tech.mathml/browse_thread/thread/e7fab78fb84cd391/e888fae8b5f3d4c3?show_docid=e888fae8b5f3d4c3|the thread on mozilla.dev.tech.mathml]
== Improve font installation ==
Various Unicode fonts are already installed by default on many systems and we should try to support them. However, we should also ensure that supported fonts are ''really'' installed so that users do not wonder why MathML is no working correctly on their system. In former versions of Mozilla, a pop-up dialog appeared and invited the user to go to the [https://developer.mozilla.org/en/Mozilla_MathML_Project/Fonts Fonts] for MathML-enabled Mozilla page. This dialog was really not a pleasant UI and is now disabled. It was suggested to replace this dialog by an information bar {{bug|309090}}. Also, people proposed to help users any further by adding some kind of automated installation {{bug|233950}} {{bug|295193}}. One possible direction could be to use [https://bugzilla.mozilla.org/show_bug.cgi?id=295193#c12 downloadable fonts].

Latest revision as of 10:01, 25 April 2014

Improve font installation

Various Unicode fonts are already installed by default on many systems and we should try to support them. However, we should also ensure that supported fonts are really installed so that users do not wonder why MathML is no working correctly on their system.

People proposed to add some kind of automated installation (bug 233950, bug 295193). One possible direction could be to use downloadable fonts. However, we need to modify nsMathMLChar to make these fonts usable in stretchy operators (bug 736010).

[fred] An add-on adding mathematical fonts in WOFF format is now available.

OpenType MATH table and Unicode Fonts

The OpenType MATH table contains information about size variants of operators and how to build operators with several glyphs. The purpose is to directly read the table in the fonts that contain this information rather than maintaining our own mathfonts*.properties (bug 407059). This will allow us to get rid of mathfonts*.properties for STIX and Asana Math and give support for more mathematical unicode fonts:

[fredw] Initial support for OpenType MATH fonts is implemented in Gecko 31.

[DONE] Support for MathJax fonts

MathJax has its own Open Type fonts, which look closer to LaTeX fonts and thus are often preferred by MathJax users. That may be interesting to see if we can support them. They do not seem to contain an OpenType MATH table, though.

See bug 701758, bug 732834 and bug 732832.

[fred] First fix pushed to add support for most stretchy construction in the MathJax fonts (bug 701758)

[fred] Second fix pushed to use MathJax fonts in mathematical text (bug 732834). It improves a bit mathvariant support too (bug 114365).

[fred] MathJax fonts will be used by default in Firefox 13. However, it remains to fix bug 732832 to get a complete support.

[fred] MathJax fonts will be deprecated in favor of modern OpenType MATH fonts for Gecko >= 31

[DONE] Support for STIX fonts

We are mainly relying on STIX Fonts to build Composite Chars and Variants. We should find other variants of characters and add entries for them.

See bug 407101 and bug 569195

[fred] A first patch has been pushed for angle brackets and large operators that should fix some bugs reported by users.

[fred] A second patch has been pushed for stretchy accents. This fixes all stretchy bugs reported by users, at least for small sizes.

[fred] A third patch has been pushed to use STIX fonts 1.0. It also adds size variants for integral symbols.

[DONE] Support for Asana Math

Asana Math is available under the Open Font License and "includes almost all mathematical Unicode symbols". Unicode Mappings for Composite Chars and Variants are provided, so it would be possible to support them by adding a mathfontAsanaMath.properties. However, it would probably be better to directly read the OpenType MATH table.

See bug 407439