www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 4a024c2984072e1fa0677d84bc1aed51c24d760b
parent fc7aa04a44d0c875c5c92a6e6f7703247015df81
Author: Davide P. Cervone <dpvc@union.edu>
Date:   Mon, 18 Mar 2013 19:09:54 -0400

Wait for SVG to set the fontDir value before setting up the loadhooks or calling loadCompete.  This allows fontdata.js to be included in combined configuration files.  Resolves issue #413.

Diffstat:
Munpacked/jax/output/SVG/fonts/TeX/fontdata.js | 28+++++++++++++++-------------
1 file changed, 15 insertions(+), 13 deletions(-)

diff --git a/unpacked/jax/output/SVG/fonts/TeX/fontdata.js b/unpacked/jax/output/SVG/fonts/TeX/fontdata.js @@ -22,8 +22,8 @@ * limitations under the License. */ -(function (SVG,MML,AJAX) { - var VERSION = "2.1"; +(function (SVG,MML,AJAX,HUB) { + var VERSION = "2.1.1"; var MAIN = "MathJax_Main", BOLD = "MathJax_Main-bold", @@ -1563,17 +1563,19 @@ 0xEEE8: [0,0,25,0,0,{space:1}] }); - MathJax.Hub.Register.LoadHook(SVG.fontDir+"/Size4/Regular/Main.js",function () { - SVG.FONTDATA.FONTS['MathJax_Size4'][0xE154][0] += 200; // adjust height for brace extender - SVG.FONTDATA.FONTS['MathJax_Size4'][0xE154][1] += 200; // adjust depth for brace extender - }); - - SVG.FONTDATA.FONTS['MathJax_Main'][0x2245][2] -= 222; // fix incorrect right bearing in font - MathJax.Hub.Register.LoadHook(SVG.fontDir+"/Main/Bold/MathOperators.js",function () { - SVG.FONTDATA.FONTS['MathJax_Main-bold'][0x2245][2] -= 106; // fix incorrect right bearing in font - }); + HUB.Register.StartupHook("SVG Jax Require",function () { + HUB.Register.LoadHook(SVG.fontDir+"/Size4/Regular/Main.js",function () { + SVG.FONTDATA.FONTS['MathJax_Size4'][0xE154][0] += 200; // adjust height for brace extender + SVG.FONTDATA.FONTS['MathJax_Size4'][0xE154][1] += 200; // adjust depth for brace extender + }); + + SVG.FONTDATA.FONTS['MathJax_Main'][0x2245][2] -= 222; // fix incorrect right bearing in font + HUB.Register.LoadHook(SVG.fontDir+"/Main/Bold/MathOperators.js",function () { + SVG.FONTDATA.FONTS['MathJax_Main-bold'][0x2245][2] -= 106; // fix incorrect right bearing in font + }); - AJAX.loadComplete(SVG.fontDir + "/fontdata.js"); + AJAX.loadComplete(SVG.fontDir + "/fontdata.js"); + }); -})(MathJax.OutputJax.SVG,MathJax.ElementJax.mml,MathJax.Ajax); +})(MathJax.OutputJax.SVG,MathJax.ElementJax.mml,MathJax.Ajax,MathJax.Hub);