From 09ce98092b62e166d99e2f0ceb9a926d18a89e6b Mon Sep 17 00:00:00 2001 From: "Davide P. Cervone" Date: Sun, 4 May 2014 15:24:49 -0400 Subject: [PATCH] Move generic font and fontdata to main jax object so that we are sure to have one (it will be overwritten when the actual font data are loaded). --- unpacked/jax/output/HTML-CSS/jax.js | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/unpacked/jax/output/HTML-CSS/jax.js b/unpacked/jax/output/HTML-CSS/jax.js index 788382e85..71aca8a81 100644 --- a/unpacked/jax/output/HTML-CSS/jax.js +++ b/unpacked/jax/output/HTML-CSS/jax.js @@ -380,6 +380,16 @@ NeoEulerWeb: "Neo-Euler" }, + fontInUse: "generic", + FONTDATA: { + TeX_factor: 1, baselineskip: 1.2, lineH: .8, lineD: .2, ffLineH: .8, + FONTS: {}, + VARIANT: { + "normal": {fonts:[]}, "-generic-variant": {fonts:[]}, + "-largeOp": {fonts:[]}, "-smallOp": {fonts:[]} + }, RANGES: [], DELIMITERS: {}, RULECHAR: 0x2D, REMAP: {} + }, + Config: function () { if (!this.require) {this.require = []} this.Font = FONTTEST(); this.SUPER(arguments).Config.call(this); @@ -414,15 +424,6 @@ } else { MESSAGE(["CantFindFontUsing","Can't find a valid font using %1", "["+this.config.availableFonts.join(", ")+"]"],null,3000); - this.fontInUse = "generic"; - this.FONTDATA = { - TeX_factor: 1, baselineskip: 1.2, lineH: .8, lineD: .2, ffLineH: .8, - FONTS: {}, - VARIANT: { - "normal": {fonts:[]}, "-generic-variant": {fonts:[]}, - "-largeOp": {fonts:[]}, "-smallOp": {fonts:[]} - }, RANGES: [], DELIMITERS: {}, RULECHAR: 0x2D, REMAP: {} - }; HUB.Startup.signal.Post("HTML-CSS Jax - no valid font"); } this.require.push(MathJax.OutputJax.extensionDir+"/MathEvents.js");