From bf3d52af540b7cdabeac5644e2c5f37fb5ea6bf4 Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sat, 6 Dec 2014 08:18:42 -0500 Subject: [PATCH] Fix incorrect width for minus sign in delimiter data, and don't modify depth of the minus sign (was being done for arrow extenders, but do that for the extenders only). Resolves issue #937. --- .../jax/output/HTML-CSS/fonts/TeX/fontdata.js | 18 +++++++++--------- unpacked/jax/output/SVG/fonts/TeX/fontdata.js | 18 +++++++++--------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata.js b/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata.js index f4b3c45bc..dc545cc81 100644 --- a/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata.js +++ b/unpacked/jax/output/HTML-CSS/fonts/TeX/fontdata.js @@ -37,6 +37,8 @@ SIZE3 = "MathJax_Size3", SIZE4 = "MathJax_Size4"; var H = "H", V = "V", EXTRAH = {load:"extra", dir:H}, EXTRAV = {load:"extra", dir:V}; + var ARROWREP = [0x2212,MAIN,0,0,0,0,.1]; // add depth for arrow extender + var DARROWREP = [0x3D,MAIN,0,0,0,0,.1]; // add depth for arrow extender HTMLCSS.Augment({ FONTDATA: { @@ -372,7 +374,7 @@ }, 0x2190: // left arrow { - dir: H, HW: [[1,MAIN]], stretch: {left:[0x2190,MAIN],rep:[0x2212,MAIN]} + dir: H, HW: [[1,MAIN]], stretch: {left:[0x2190,MAIN], rep:ARROWREP} }, 0x2191: // \uparrow { @@ -380,7 +382,7 @@ }, 0x2192: // right arrow { - dir: H, HW: [[1,MAIN]], stretch: {rep:[0x2212,MAIN], right:[0x2192,MAIN]} + dir: H, HW: [[1,MAIN]], stretch: {rep:ARROWREP, right:[0x2192,MAIN]} }, 0x2193: // \downarrow { @@ -389,7 +391,7 @@ 0x2194: // left-right arrow { dir: H, HW: [[1,MAIN]], - stretch: {left:[0x2190,MAIN],rep:[0x2212,MAIN], right:[0x2192,MAIN]} + stretch: {left:[0x2190,MAIN], rep:ARROWREP, right:[0x2192,MAIN]} }, 0x2195: // \updownarrow { @@ -398,7 +400,7 @@ }, 0x21D0: // left double arrow { - dir: H, HW: [[1,MAIN]], stretch: {left:[0x21D0,MAIN],rep:[0x3D,MAIN]} + dir: H, HW: [[1,MAIN]], stretch: {left:[0x21D0,MAIN], rep:DARROWREP} }, 0x21D1: // \Uparrow { @@ -406,7 +408,7 @@ }, 0x21D2: // right double arrow { - dir: H, HW: [[1,MAIN]], stretch: {rep:[0x3D,MAIN], right:[0x21D2,MAIN]} + dir: H, HW: [[1,MAIN]], stretch: {rep:DARROWREP, right:[0x21D2,MAIN]} }, 0x21D3: // \Downarrow { @@ -415,7 +417,7 @@ 0x21D4: // left-right double arrow { dir: H, HW: [[1,MAIN]], - stretch: {left:[0x21D0,MAIN],rep:[0x3D,MAIN], right:[0x21D2,MAIN]} + stretch: {left:[0x21D0,MAIN], rep:DARROWREP, right:[0x21D2,MAIN]} }, 0x21D5: // \Updownarrow { @@ -424,7 +426,7 @@ }, 0x2212: // horizontal line { - dir: H, HW: [[.611,MAIN]], stretch: {rep:[0x2212,MAIN]} + dir: H, HW: [[.778,MAIN]], stretch: {rep:[0x2212,MAIN]} }, 0x221A: // \surd { @@ -1561,8 +1563,6 @@ HTMLCSS.FONTDATA.FONTS['MathJax_Main'][0x22F1][0] += 700; // adjust height for \ddots HTMLCSS.FONTDATA.FONTS['MathJax_Size4'][0xE154][0] += 200; // adjust height for brace extender HTMLCSS.FONTDATA.FONTS['MathJax_Size4'][0xE154][1] += 200; // adjust depth for brace extender - HTMLCSS.FONTDATA.FONTS['MathJax_Main'][0x2212][1] += 100; // adjust depth of minus (used as arrow extender) - HTMLCSS.FONTDATA.FONTS['MathJax_Main'][0x003D][1] += 100; // adjust depth of = (used as arrow extender) HTMLCSS.FONTDATA.FONTS['MathJax_Main'][0x2245][2] -= 222; // fix error in character's right bearing HTMLCSS.FONTDATA.FONTS['MathJax_Main'][0x2245][5] = {rfix:-222}; // fix error in character's right bearing MathJax.Hub.Register.LoadHook(HTMLCSS.fontDir+"/Main/Bold/MathOperators.js",function () { diff --git a/unpacked/jax/output/SVG/fonts/TeX/fontdata.js b/unpacked/jax/output/SVG/fonts/TeX/fontdata.js index 395fafcbd..5d0ee6135 100644 --- a/unpacked/jax/output/SVG/fonts/TeX/fontdata.js +++ b/unpacked/jax/output/SVG/fonts/TeX/fontdata.js @@ -38,6 +38,8 @@ SIZE4 = "MathJax_Size4"; var H = "H", V = "V", EXTRAH = {load:"extra", dir:H}, EXTRAV = {load:"extra", dir:V}; var STDHW = [[1000,MAIN],[1200,SIZE1],[1800,SIZE2],[2400,SIZE3],[3000,SIZE4]]; + var ARROWREP = [0x2212,MAIN,0,0,0,0,.1]; // add depth for arrow extender + var DARROWREP = [0x3D,MAIN,0,0,0,0,.1]; // add depth for arrow extender SVG.Augment({ FONTDATA: { @@ -371,7 +373,7 @@ }, 0x2190: // left arrow { - dir: H, HW: [[1000,MAIN]], stretch: {left:[0x2190,MAIN],rep:[0x2212,MAIN], fuzz:300} + dir: H, HW: [[1000,MAIN]], stretch: {left:[0x2190,MAIN], rep:ARROWREP, fuzz:300} }, 0x2191: // \uparrow { @@ -379,7 +381,7 @@ }, 0x2192: // right arrow { - dir: H, HW: [[1000,MAIN]], stretch: {rep:[0x2212,MAIN], right:[0x2192,MAIN], fuzz:300} + dir: H, HW: [[1000,MAIN]], stretch: {rep:ARROWREP, right:[0x2192,MAIN], fuzz:300} }, 0x2193: // \downarrow { @@ -388,7 +390,7 @@ 0x2194: // left-right arrow { dir: H, HW: [[1000,MAIN]], - stretch: {left:[0x2190,MAIN],rep:[0x2212,MAIN], right:[0x2192,MAIN], fuzz:300} + stretch: {left:[0x2190,MAIN], rep:ARROWREP, right:[0x2192,MAIN], fuzz:300} }, 0x2195: // \updownarrow { @@ -397,7 +399,7 @@ }, 0x21D0: // left double arrow { - dir: H, HW: [[1000,MAIN]], stretch: {left:[0x21D0,MAIN],rep:[0x3D,MAIN], fuzz:300} + dir: H, HW: [[1000,MAIN]], stretch: {left:[0x21D0,MAIN], rep:DARROWREP, fuzz:300} }, 0x21D1: // \Uparrow { @@ -405,7 +407,7 @@ }, 0x21D2: // right double arrow { - dir: H, HW: [[1000,MAIN]], stretch: {rep:[0x3D,MAIN], right:[0x21D2,MAIN], fuzz:300} + dir: H, HW: [[1000,MAIN]], stretch: {rep:DARROWREP, right:[0x21D2,MAIN], fuzz:300} }, 0x21D3: // \Downarrow { @@ -414,7 +416,7 @@ 0x21D4: // left-right double arrow { dir: H, HW: [[1000,MAIN]], - stretch: {left:[0x21D0,MAIN],rep:[0x3D,MAIN], right:[0x21D2,MAIN], fuzz:300} + stretch: {left:[0x21D0,MAIN], rep:DARROWREP, right:[0x21D2,MAIN], fuzz:300} }, 0x21D5: // \Updownarrow { @@ -423,7 +425,7 @@ }, 0x2212: // horizontal line { - dir: H, HW: [[611,MAIN]], stretch: {rep:[0x2212,MAIN], fuzz:300} + dir: H, HW: [[778,MAIN]], stretch: {rep:[0x2212,MAIN], fuzz:300} }, 0x221A: // \surd { @@ -1558,8 +1560,6 @@ SVG.FONTDATA.FONTS['MathJax_Main'][0x22EE][0] += 400; // adjust height for \vdots SVG.FONTDATA.FONTS['MathJax_Main'][0x22F1][0] += 700; // adjust height for \ddots - SVG.FONTDATA.FONTS['MathJax_Main'][0x2212][1] += 100; // adjust depth of minus (used as arrow extender) - SVG.FONTDATA.FONTS['MathJax_Main'][0x003D][1] += 100; // adjust depth of = (used as arrow extender) // // Add some spacing characters (more will come later)