Bug 701758 - Add stretchy operator table for MathJax fonts. r=karlt
authorFrédéric Wang <fred.wang@free.fr>
Tue, 28 Feb 2012 18:40:38 -0500
changeset 87949 1b6a03443c789433161e328a3d2c8c37fd13cdca
parent 87948 bca0ee06670c1bfc610c890f3cc4dfd41d51770a
child 87950 6a39c6d4fbf3f5c5c8d193cc9dfbe773626d13de
push id6590
push userryanvm@gmail.com
push dateTue, 28 Feb 2012 23:42:20 +0000
treeherdermozilla-inbound@6de9bc65b2ff [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs701758
milestone13.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 701758 - Add stretchy operator table for MathJax fonts. r=karlt
layout/mathml/Makefile.in
layout/mathml/mathfont.properties
layout/mathml/mathfontMathJax_Main.properties
modules/libpref/src/init/all.js
--- a/layout/mathml/Makefile.in
+++ b/layout/mathml/Makefile.in
@@ -90,16 +90,17 @@ include $(topsrcdir)/config/config.mk
 
 # we don't want the shared lib, but we want to force the creation of a static lib.
 # do we still want this? - DJF
 FORCE_STATIC_LIB = 1
 
 include $(topsrcdir)/config/rules.mk
 
 font_properties = \
+	mathfontMathJax_Main.properties \
 	mathfontUnicode.properties \
 	mathfontSTIXNonUnicode.properties \
 	mathfontSTIXSize1.properties \
 	mathfontSTIXSizeOneSym.properties \
 	mathfontAsanaMath.properties \
 	mathfontStandardSymbolsL.properties \
 	$(NULL)
 
--- a/layout/mathml/mathfont.properties
+++ b/layout/mathml/mathfont.properties
@@ -41,19 +41,19 @@
 #  Do not translate anything in this file
 
 # List of fonts that have corresponding properties files containing special
 # glyph tables for stretching MathML characters.  See the documentation at the
 # end of this file for details on the setup of the property file associated to
 # each font.  Do not include the Unicode table in this list.
 
 %ifdef XP_WIN
-font.mathfont-glyph-tables = STIXNonUnicode, STIXSizeOneSym, STIXSize1, Asana Math, Standard Symbols L, Symbol
+font.mathfont-glyph-tables = STIXNonUnicode, STIXSizeOneSym, STIXSize1, MathJax_Main, Asana Math, Standard Symbols L, Symbol
 %else
-font.mathfont-glyph-tables = STIXNonUnicode, STIXSizeOneSym, STIXSize1, Asana Math, Standard Symbols L
+font.mathfont-glyph-tables = STIXNonUnicode, STIXSizeOneSym, STIXSize1, MathJax_Main, Asana Math, Standard Symbols L
 %endif
 
 # The ordered list of fonts with which to attempt to stretch MathML
 # characters is controlled by setting pref("font.mathfont-family",
 # "CMSY10, CMEX10, ...") for example, or by setting the font-family list in
 # :-moz-math-stretchy in mathml.css.
 #
 # Preferred fonts for particular stretchy characters may be specified in
new file mode 100644
--- /dev/null
+++ b/layout/mathml/mathfontMathJax_Main.properties
@@ -0,0 +1,177 @@
+# ***** BEGIN LICENSE BLOCK *****
+# Version: MPL 1.1/GPL 2.0/LGPL 2.1
+#
+# The contents of this file are subject to the Mozilla Public License Version
+# 1.1 (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+# http://www.mozilla.org/MPL/
+#
+# Software distributed under the License is distributed on an "AS IS" basis,
+# WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+# for the specific language governing rights and limitations under the
+# License.
+#                                                                       
+# The Original Code is Mozilla MathML Project.                          
+#                                                                       
+# The Initial Developer of the Original Code is
+# The University of Queensland.
+# Portions created by the Initial Developer are Copyright (C) 2011
+# the Initial Developer. All Rights Reserved.
+#                                                                       
+# Contributor(s):                                                       
+#   Frederic Wang <fred.wang@free.fr>
+#
+# Alternatively, the contents of this file may be used under the terms of
+# either the GNU General Public License Version 2 or later (the "GPL"), or
+# the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
+# in which case the provisions of the GPL or the LGPL are applicable instead
+# of those above. If you wish to allow use of your version of this file only
+# under the terms of either the GPL or the LGPL, and not to allow others to
+# use your version of this file under the terms of the MPL, indicate your
+# decision by deleting the provisions above and replace them with the notice
+# and other provisions required by the GPL or the LGPL. If you do not delete
+# the provisions above, a recipient may use your version of this file under
+# the terms of any one of the MPL, the GPL or the LGPL.
+#
+# ***** END LICENSE BLOCK *****
+
+# Content below is generated from MathJaxFonts.html. Do not edit.
+
+external.1 = MathJax_Size1
+external.2 = MathJax_Size2
+external.3 = MathJax_Size3
+external.4 = MathJax_Size4
+external.5 = MathJax_AMS
+# external.6 = MathJax_Main-Bold
+
+\u0028 = \u239B@4\uFFFD\u239D@4\u239C@4\u0028\u0028@1\u0028@2\u0028@3\u0028@4
+\u0029 = \u239E@4\uFFFD\u23A0@4\u239F@4\u0029\u0029@1\u0029@2\u0029@3\u0029@4
+\u002F = \uFFFD\uFFFD\uFFFD\uFFFD\u002F\u002F@1\u002F@2\u002F@3\u002F@4
+\u005B = \u23A1@4\uFFFD\u23A3@4\u23A2@4\u005B\u005B@1\u005B@2\u005B@3\u005B@4
+\u005C = \uFFFD\uFFFD\uFFFD\uFFFD\u005C\u005C@1\u005C@2\u005C@3\u005C@4
+\u005D = \u23A4@4\uFFFD\u23A6@4\u23A5@4\u005D\u005D@1\u005D@2\u005D@3\u005D@4
+\u007B = \u23A7@4\u23A8@4\u23A9@4\u23AA@4\u007B\u007B@1\u007B@2\u007B@3\u007B@4
+\u007C = \uFFFD\uFFFD\uFFFD\u2223\u007C
+\u007D = \u23AB@4\u23AC@4\u23AD@4\u23AA@4\u007D\u007D@1\u007D@2\u007D@3\u007D@4
+\u00AF = \uFFFD\uFFFD\uFFFD\u00AF\u00AF
+\u02C6 = \uFFFD\uFFFD\uFFFD\uFFFD\u02C6\u02C6@1\u02C6@2\u02C6@3\u02C6@4
+\u02DC = \uFFFD\uFFFD\uFFFD\uFFFD\u02DC\u02DC@1\u02DC@2\u02DC@3\u02DC@4
+\u2016 = \uFFFD\uFFFD\uFFFD\u2225\u2016@1\u2016
+\u2190 = \u2190\uFFFD\uFFFD\u2212\u2190
+\u2191 = \u2191@1\uFFFD\uFFFD\u23D0@1\u2191
+\u2192 = \uFFFD\uFFFD\u2192\u2212\u2192
+\u2193 = \uFFFD\uFFFD\u2193@1\u23D0@1\u2193
+\u2194 = \u2190\uFFFD\u2192\u2212\u2194
+\u2195 = \u2191@1\uFFFD\u2193@1\u23D0@1\u2195
+\u21D0 = \u21D0\uFFFD\uFFFD\u003D\u21D0
+\u21D1 = \u21D1@1\uFFFD\uFFFD\u2016@1\u21D1
+\u21D2 = \uFFFD\uFFFD\u21D2\u003D\u21D2
+\u21D3 = \uFFFD\uFFFD\u21D3@1\u2016@1\u21D3
+\u21D4 = \u21D0\uFFFD\u21D2\u003D\u21D4
+\u21D5 = \u21D1@1\uFFFD\u21D3@1\u2016@1\u21D5
+\u2212 = \uFFFD\uFFFD\uFFFD\u2212\u2212
+\u221A = \uE001@4\uFFFD\u23B7@4\uE000@4\u221A\u221A@1\u221A@2\u221A@3\u221A@4
+\u2223 = \uFFFD\uFFFD\uFFFD\u2223\u2223
+\u2225 = \uFFFD\uFFFD\uFFFD\u2225\u2225
+\u2308 = \u23A1@4\uFFFD\uFFFD\u23A2@4\u2308\u2308@1\u2308@2\u2308@3\u2308@4
+\u2309 = \u23A4@4\uFFFD\uFFFD\u23A5@4\u2309\u2309@1\u2309@2\u2309@3\u2309@4
+\u230A = \uFFFD\uFFFD\u23A3@4\u23A2@4\u230A\u230A@1\u230A@2\u230A@3\u230A@4
+\u230B = \uFFFD\uFFFD\u23A6@4\u23A5@4\u230B\u230B@1\u230B@2\u230B@3\u230B@4
+\u23AA = \u23AA@4\uFFFD\u23AA@4\u23AA@4\u23AA@4
+\u23B0 = \u23A7@4\uFFFD\u23AD@4\u23AA@4\u23B0
+\u23B1 = \u23AB@4\uFFFD\u23A9@4\u23AA@4\u23B1
+\u23D0 = \uFFFD\uFFFD\uFFFD\u2223\u23D0@1\u23D0
+# \u23DE = \uE150@4(\uE153@4,\uE152@4)\uE151@4\uE154@4
+# \u23DF = \uE152@4(\uE151@4,\uE150@4)\uE153@4\uE154@4
+\u27E8 = \uFFFD\uFFFD\uFFFD\uFFFD\u27E8\u27E8@1\u27E8@2\u27E8@3\u27E8@4
+\u27E9 = \uFFFD\uFFFD\uFFFD\uFFFD\u27E9\u27E9@1\u27E9@2\u27E9@3\u27E9@4
+\u27EE = \u23A7@4\uFFFD\u23A9@4\u23AA@4\u27EE
+\u27EF = \u23AB@4\uFFFD\u23AD@4\u23AA@4\u27EF
+\u002D = \uFFFD\uFFFD\uFFFD\u2212\u002D
+\u005E = \uFFFD\uFFFD\uFFFD\uFFFD\u005E\u005E@1\u005E@2\u005E@3\u005E@4
+\u005F = \uFFFD\uFFFD\uFFFD\u2212\u005F
+\u007E = \uFFFD\uFFFD\uFFFD\uFFFD\u007E\u007E@1\u007E@2\u007E@3\u007E@4
+\u02C9 = \uFFFD\uFFFD\uFFFD\u00AF\u02C9
+\u0302 = \uFFFD\uFFFD\uFFFD\uFFFD\u0302\u0302@1\u0302@2\u0302@3\u0302@4
+\u0303 = \uFFFD\uFFFD\uFFFD\uFFFD\u0303\u0303@1\u0303@2\u0303@3\u0303@4
+\u0332 = \uFFFD\uFFFD\uFFFD\u2212\u0332
+\u2015 = \uFFFD\uFFFD\uFFFD\u2212\u2015
+\u2017 = \uFFFD\uFFFD\uFFFD\u2212\u2017
+\u203E = \uFFFD\uFFFD\uFFFD\u00AF\u203E
+\u2215 = \uFFFD\uFFFD\uFFFD\uFFFD\u2215\u2215@1\u2215@2\u2215@3\u2215@4
+\u2329 = \uFFFD\uFFFD\uFFFD\uFFFD\u2329\u2329@1\u2329@2\u2329@3\u2329@4
+\u232A = \uFFFD\uFFFD\uFFFD\uFFFD\u232A\u232A@1\u232A@2\u232A@3\u232A@4
+\u23AF = \uFFFD\uFFFD\uFFFD\u2212\u23AF
+\u2500 = \uFFFD\uFFFD\uFFFD\u2212\u2500
+\u2758 = \uFFFD\uFFFD\uFFFD\u2223\u2758
+\u3008 = \uFFFD\uFFFD\uFFFD\uFFFD\u3008\u3008@1\u3008@2\u3008@3\u3008@4
+\u3009 = \uFFFD\uFFFD\uFFFD\uFFFD\u3009\u3009@1\u3009@2\u3009@3\u3009@4
+# \uFE37 = \uE150@4(\uE153@4,\uE152@4)\uE151@4\uE154@4
+# \uFE38 = \uE152@4(\uE151@4,\uE150@4)\uE153@4\uE154@4
+\u003D = \uFFFD\uFFFD\uFFFD\u003D\u003D
+\u219E = \u219E@5\uFFFD\uFFFD\u2212\u219E@5
+\u21A0 = \uFFFD\uFFFD\u21A0@5\u2212\u21A0@5
+# \u21A4 = \u2190\uFFFD\u2223@1\u2212
+# \u21A5 = \u2191@1\uFFFD\u22A5@6\u23D0@1
+# \u21A6 = \u2223@1\uFFFD\u2192\u2212\u21A6
+# \u21A7 = \u22A4@6\uFFFD\u2193@1\u23D0@1
+# \u21B0 = \u21B0@5\uFFFD\uFFFD\u23D0@1\u21B0@5
+# \u21B1 = \u21B1@5\uFFFD\uFFFD\u23D0@1\u21B1@5
+\u21BC = \u21BC\uFFFD\uFFFD\u2212\u21BC
+\u21BD = \u21BD\uFFFD\uFFFD\u2212\u21BD
+# \u21BE = \u21BE@5\uFFFD\uFFFD\u23D0@1\u21BE@5
+# \u21BF = \u21BF@5\uFFFD\uFFFD\u23D0@1\u21BF@5
+\u21C0 = \uFFFD\uFFFD\u21C0\u2212\u21C0
+\u21C1 = \uFFFD\uFFFD\u21C1\u2212\u21C1
+# \u21C2 = \uFFFD\uFFFD\u21C2@5\u23D0@1\u21C2@5
+# \u21C3 = \uFFFD\uFFFD\u21C3@5\u23D0@1\u21C3@5
+\u21DA = \u21DA@5\uFFFD\uFFFD\u2261\u21DA@5
+\u21DB = \uFFFD\uFFFD\u21DB@5\u2261\u21DB@5
+# \u23B4 = \u250C@5\uFFFD\u2510@5\u2212
+# \u23B5 = \u2514@5\uFFFD\u2518@5\u2212
+\u23DC = \uE150@4\uFFFD\uE151@4\uE154@4\u23DC@5\u23DC
+\u23DD = \uE152@4\uFFFD\uE153@4\uE154@4\u23DD@5\u23DD
+# \u23E0 = \u02CA\uFFFD\u02CB\u02C9
+# \u23E1 = \u02CB\uFFFD\u02CA\u02C9
+# \u2906 = \u21D0\uFFFD\u2223@1\u003D
+# \u2907 = \u22A8@5\uFFFD\u21D2\u003D
+\u294E = \u21BC\uFFFD\u21C0\u2212
+# \u294F = \u21BE@5\uFFFD\u21C2@5\u23D0@1
+\u2950 = \u21BD\uFFFD\u21C1\u2212
+# \u2951 = \u21BF@5\uFFFD\u21C3@5\u23D0@1
+# \u295A = \u21BC\uFFFD\u2223@1\u2212
+# \u295B = \u2223@1\uFFFD\u21C0\u2212
+# \u295C = \u21BE@5\uFFFD\u22A5@6\u23D0@1
+# \u295D = \u22A4@6\uFFFD\u21C2@5\u23D0@1
+# \u295E = \u21BD\uFFFD\u2223@1\u2212
+# \u295F = \u2223@1\uFFFD\u21C1\u2212
+# \u2960 = \u21BF@5\uFFFD\u22A5@6\u23D0@1
+# \u2961 = \u22A4@6\uFFFD\u21C3@5\u23D0@1
+\u27F5 = \u2190\uFFFD\uFFFD\u2212\u27F5
+\u27F6 = \uFFFD\uFFFD\u2192\u2212\u27F6
+\u27F7 = \u2190\uFFFD\u2192\u2212\u27F7
+\u27F8 = \u21D0\uFFFD\uFFFD\u003D\u27F8
+\u27F9 = \uFFFD\uFFFD\u21D2\u003D\u27F9
+\u27FA = \u21D0\uFFFD\u21D2\u003D\u27FA
+# \u27FB = \u2190\uFFFD\u2223@1\u2212
+# \u27FC = \u2223@1\uFFFD\u2192\u2212\u27FC
+# \u27FD = \u21D0\uFFFD\u2223@1\u003D
+# \u27FE = \u22A8@5\uFFFD\u21D2\u003D
+\u0020 = \uFFFD\uFFFD\uFFFD\uFFFD\u0020@1\u0020@2
+\u00A0 = \uFFFD\uFFFD\uFFFD\uFFFD\u00A0@1\u00A0@2
+\u220F = \uFFFD\uFFFD\uFFFD\uFFFD\u220F@1\u220F@2
+\u2210 = \uFFFD\uFFFD\uFFFD\uFFFD\u2210@1\u2210@2
+\u2211 = \uFFFD\uFFFD\uFFFD\uFFFD\u2211@1\u2211@2
+\u222B = \uFFFD\uFFFD\uFFFD\uFFFD\u222B@1\u222B@2
+\u222C = \uFFFD\uFFFD\uFFFD\uFFFD\u222C@1\u222C@2
+\u222D = \uFFFD\uFFFD\uFFFD\uFFFD\u222D@1\u222D@2
+\u222E = \uFFFD\uFFFD\uFFFD\uFFFD\u222E@1\u222E@2
+\u22C0 = \uFFFD\uFFFD\uFFFD\uFFFD\u22C0@1\u22C0@2
+\u22C1 = \uFFFD\uFFFD\uFFFD\uFFFD\u22C1@1\u22C1@2
+\u22C2 = \uFFFD\uFFFD\uFFFD\uFFFD\u22C2@1\u22C2@2
+\u22C3 = \uFFFD\uFFFD\uFFFD\uFFFD\u22C3@1\u22C3@2
+\u2A00 = \uFFFD\uFFFD\uFFFD\uFFFD\u2A00@1\u2A00@2
+\u2A01 = \uFFFD\uFFFD\uFFFD\uFFFD\u2A01@1\u2A01@2
+\u2A02 = \uFFFD\uFFFD\uFFFD\uFFFD\u2A02@1\u2A02@2
+\u2A04 = \uFFFD\uFFFD\uFFFD\uFFFD\u2A04@1\u2A04@2
+\u2A06 = \uFFFD\uFFFD\uFFFD\uFFFD\u2A06@1\u2A06@2
--- a/modules/libpref/src/init/all.js
+++ b/modules/libpref/src/init/all.js
@@ -1215,17 +1215,17 @@ pref("intl.hyphenation-alias.bs-*", "sh"
 
 // Norwegian has two forms, Bokmål and Nynorsk, with "no" as a macrolanguage encompassing both.
 // For "no", we'll alias to "nb" (Bokmål) as that is the more widely used written form.
 pref("intl.hyphenation-alias.no", "nb");
 pref("intl.hyphenation-alias.no-*", "nb");
 pref("intl.hyphenation-alias.nb-*", "nb");
 pref("intl.hyphenation-alias.nn-*", "nn");
 
-pref("font.mathfont-family", "STIXNonUnicode, STIXSizeOneSym, STIXSize1, STIXGeneral, Asana Math, Standard Symbols L, DejaVu Sans, Cambria Math");
+pref("font.mathfont-family", "STIXNonUnicode, STIXSizeOneSym, STIXSize1, STIXGeneral, MathJax_Main, Asana Math, Standard Symbols L, DejaVu Sans, Cambria Math");
 
 // Some CJK fonts have bad underline offset, their CJK character glyphs are overlapped (or adjoined)  to its underline.
 // These fonts are ignored the underline offset, instead of it, the underline is lowered to bottom of its em descent.
 pref("font.blacklist.underline_offset", "FangSong,Gulim,GulimChe,MingLiU,MingLiU-ExtB,MingLiU_HKSCS,MingLiU-HKSCS-ExtB,MS Gothic,MS Mincho,MS PGothic,MS PMincho,MS UI Gothic,PMingLiU,PMingLiU-ExtB,SimHei,SimSun,SimSun-ExtB,Hei,Kai,Apple LiGothic,Apple LiSung,Osaka");
 
 pref("images.dither", "auto");
 pref("security.directory",              "");
 
@@ -1929,17 +1929,17 @@ pref("font.default.zh-TW", "sans-serif")
 pref("font.size.variable.zh-TW", 16);
 pref("font.size.fixed.zh-TW", 16);
 
 pref("font.default.zh-HK", "sans-serif");
 pref("font.size.variable.zh-HK", 16);
 pref("font.size.fixed.zh-HK", 16);
 
 // We have special support for Monotype Symbol on Windows.
-pref("font.mathfont-family", "STIXNonUnicode, STIXSizeOneSym, STIXSize1, STIXGeneral, Asana Math, Symbol, DejaVu Sans, Cambria Math");
+pref("font.mathfont-family", "STIXNonUnicode, STIXSizeOneSym, STIXSize1, STIXGeneral, MathJax_Main, Asana Math, Symbol, DejaVu Sans, Cambria Math");
 
 // cleartype settings - false implies default system settings 
 
 // use cleartype rendering for downloadable fonts (win xp only)
 pref("gfx.font_rendering.cleartype.use_for_downloadable_fonts", true);
 
 // use cleartype rendering for all fonts always (win xp only)
 pref("gfx.font_rendering.cleartype.always_use_for_content", false);
@@ -2457,17 +2457,17 @@ pref("font.default.zh-TW", "sans-serif")
 pref("font.size.variable.zh-TW", 15);
 pref("font.size.fixed.zh-TW", 16);
 
 pref("font.default.zh-HK", "sans-serif");
 pref("font.size.variable.zh-HK", 15);
 pref("font.size.fixed.zh-HK", 16);
 
 // Apple's Symbol is Unicode so use it
-pref("font.mathfont-family", "STIXNonUnicode, STIXSizeOneSym, STIXSize1, STIXGeneral, Asana Math, Symbol, DejaVu Sans, Cambria Math");
+pref("font.mathfont-family", "STIXNonUnicode, STIXSizeOneSym, STIXSize1, STIXGeneral, MathJax_Main, Asana Math, Symbol, DejaVu Sans, Cambria Math");
 
 // individual font faces to be treated as independent families
 // names are Postscript names of each face
 pref("font.single-face-list", "Osaka-Mono");
 
 // optimization hint for fonts with localized names to be read in at startup, otherwise read in at lookup miss
 // names are canonical family names (typically English names)
 pref("font.preload-names-list", "Hiragino Kaku Gothic Pro,Hiragino Mincho Pro,STSong");
@@ -2506,17 +2506,17 @@ pref("mousewheel.enable_pixel_scrolling"
 #endif
 
 #ifdef XP_OS2
 
 pref("ui.key.menuAccessKeyFocuses", true);
 
 pref("font.alias-list", "sans,sans-serif,serif,monospace,Tms Rmn,Helv,Courier,Times New Roman");
 
-pref("font.mathfont-family", "STIXNonUnicode, STIXSizeOneSym, STIXSize1, STIXGeneral, Asana Math, DejaVu Sans");
+pref("font.mathfont-family", "STIXNonUnicode, STIXSizeOneSym, STIXSize1, STIXGeneral, MathJax_Main, Asana Math, DejaVu Sans");
 
 // Languages only need lists if we have a default that might not be available.
 // Tms Rmn and Helv cannot be used by Thebes but the OS/2 version of FontConfig
 // maps them to Times New Roman and Helvetica, respectively. Those fonts and
 // Courier are available on OS/2 by default.
 
 pref("font.name.serif.ar", "Tms Rmn");
 pref("font.name.sans-serif.ar", "Helv");