commit ead271e0e6dfae6940d309d8521e08e31278858b parent 26ebc33c37762f625d07c11f6c2260d0043f7ed6 Author: Davide P. Cervone <dpvc@union.edu> Date: Sun, 2 Aug 2015 15:14:14 -0400 Change fonts from having ascent=descent to having midpoint at .25em, and adjust font handling to do offsets from that. Diffstat:
61 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_AMS-Regular.eot b/fonts/HTML-CSS/TeX/eot/MathJax_AMS-Regular.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Caligraphic-Bold.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Caligraphic-Bold.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Caligraphic-Regular.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Caligraphic-Regular.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Fraktur-Bold.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Fraktur-Bold.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Fraktur-Regular.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Fraktur-Regular.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Main-Bold.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Main-Bold.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Main-Italic.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Main-Italic.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Main-Regular.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Main-Regular.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Math-BoldItalic.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Math-BoldItalic.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Math-Italic.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Math-Italic.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Math-Regular.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Math-Regular.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Bold.eot b/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Bold.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Italic.eot b/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Italic.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Regular.eot b/fonts/HTML-CSS/TeX/eot/MathJax_SansSerif-Regular.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Script-Regular.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Script-Regular.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Size1-Regular.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Size1-Regular.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Size2-Regular.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Size2-Regular.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Size3-Regular.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Size3-Regular.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Size4-Regular.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Size4-Regular.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/eot/MathJax_Typewriter-Regular.eot b/fonts/HTML-CSS/TeX/eot/MathJax_Typewriter-Regular.eot Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_AMS-Regular.otf b/fonts/HTML-CSS/TeX/otf/MathJax_AMS-Regular.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Bold.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Bold.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Regular.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Caligraphic-Regular.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Fraktur-Bold.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Fraktur-Bold.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Fraktur-Regular.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Fraktur-Regular.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Main-Bold.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Main-Bold.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Main-Italic.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Main-Italic.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Main-Regular.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Main-Regular.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Math-BoldItalic.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Math-BoldItalic.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Math-Italic.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Math-Italic.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Math-Regular.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Math-Regular.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Bold.otf b/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Bold.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Italic.otf b/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Italic.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Regular.otf b/fonts/HTML-CSS/TeX/otf/MathJax_SansSerif-Regular.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Script-Regular.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Script-Regular.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Size1-Regular.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Size1-Regular.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Size2-Regular.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Size2-Regular.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Size3-Regular.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Size3-Regular.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Size4-Regular.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Size4-Regular.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/otf/MathJax_Typewriter-Regular.otf b/fonts/HTML-CSS/TeX/otf/MathJax_Typewriter-Regular.otf Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff b/fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Bold.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Bold.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Caligraphic-Regular.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Regular.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Regular.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Math-BoldItalic.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Math-BoldItalic.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Math-Regular.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Math-Regular.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Bold.woff b/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Bold.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff b/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Italic.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Regular.woff b/fonts/HTML-CSS/TeX/woff/MathJax_SansSerif-Regular.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Script-Regular.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Script-Regular.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Size1-Regular.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Size2-Regular.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Size3-Regular.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Size4-Regular.woff Binary files differ. diff --git a/fonts/HTML-CSS/TeX/woff/MathJax_Typewriter-Regular.woff b/fonts/HTML-CSS/TeX/woff/MathJax_Typewriter-Regular.woff Binary files differ. diff --git a/unpacked/jax/output/CommonHTML/jax.js b/unpacked/jax/output/CommonHTML/jax.js @@ -33,7 +33,7 @@ var EVENT, TOUCH, HOVER; // filled in later - var AXISHEIGHT = .25, + var CENTERLINE = .25, STRUTHEIGHT = 1, AFUZZ = .08, HFUZZ = .025, DFUZZ = .025; // adjustments to bounding box of character boxes @@ -62,7 +62,7 @@ }, "mjx-math": { - "display": "inline-block", + "display": "inline-block", "border-collapse":"collapse" }, "mjx-math *": {display:"inline-block", "text-align":"left"}, @@ -823,7 +823,7 @@ }, // - // Get the height, depth and width of a character + // Get the height, depth, and width of a character // (height and depth are of the font, not the character). // WARNING: causes reflow of the page! // @@ -939,9 +939,10 @@ } if (list.length) this.addCharList(node.firstChild,list,bbox); bbox.clean(); - if (bbox.d < 0) {bbox.D = bbox.d; bbox.d = 0} - if (bbox.h || bbox.a) node.firstChild.style[bbox.h < 0 ? "marginTop" : "paddingTop"] = this.Em(bbox.h-(bbox.a||0)); - if (bbox.d) node.firstChild.style[bbox.d < 0 ? "marginBottom": "paddingBottom"] = this.Em(bbox.d); + if (bbox.a == null) bbox.a = CENTERLINE; + if (bbox.d + bbox.a < 0) {bbox.D = bbox.d; bbox.d = -bbox.a} + if (bbox.h - bbox.a) node.firstChild.style[bbox.h - bbox.a < 0 ? "marginTop" : "paddingTop"] = this.Em(bbox.h-bbox.a); + if (bbox.d + bbox.a) node.firstChild.style[bbox.d + bbox.a < 0 ? "marginBottom": "paddingBottom"] = this.Em(bbox.d+bbox.a); return bbox; }, @@ -996,7 +997,7 @@ var s = 1.1*(H - h)/k + .3; // space to cover by extender s /= (ebox.h+ebox.d); // scale factor; this.Transform(ext, - "translateY("+CHTML.Em(-ebox.d+.25)+") scaleY("+s.toFixed(3).replace(/0+$/,"")+")", + "translateY("+CHTML.Em(-ebox.d+.25-s*CENTERLINE)+") scaleY("+s.toFixed(3).replace(/0+$/,"")+")", "left "+CHTML.Em(ebox.d) ); ext.style.paddingTop=ext.style.paddingBottom = 0; @@ -1073,8 +1074,9 @@ this.adjustHeights([left,ext,mid,ext2,right],hbox); if (ebox.D) ebox.d = ebox.D; hbox.t = hbox.h; hbox.b = hbox.d; - if (hbox.h !== ebox.h) node.style.marginTop = CHTML.Em(ebox.h - hbox.h); - if (hbox.d !== ebox.d) node.style.marginBottom = CHTML.Em(ebox.d - hbox.d); + var mt = ebox.h - hbox.h - CENTERLINE, mb = ebox.d - hbox.d + CENTERLINE; + if (mt) node.style.marginTop = CHTML.Em(mt); + if (mb) node.style.marginBottom = CHTML.Em(mb); hbox.h = ebox.h; hbox.d = ebox.d; if (BBOX) {hbox.scale = BBOX.scale; hbox.rscale = BBOX.rscale} return hbox; @@ -2061,7 +2063,7 @@ stack.appendChild(over); stack.appendChild(base); } if (obox.D) obox.d = obox.D; - if (obox.d < 0) { + if (obox.d + CENTERLINE < 0) { // // For negative depths, set the height and align to top // in order to avoid extra baseline space @@ -2112,7 +2114,7 @@ node.firstChild.lastChild.appendChild(under); } if (ubox.D) ubox.d = ubox.D; - if (ubox.d < 0) { + if (ubox.d + CENTERLINE < 0) { // // For negative depths, set the height and align to top // in order to avoid extra baseline space