Skip to content

Commit

Permalink
Add check that font name is valid. Resolves issue mathjax#615.
Browse files Browse the repository at this point in the history
  • Loading branch information
dpvc committed Mar 19, 2014
1 parent bb8c899 commit 13d7904
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions unpacked/jax/output/SVG/jax.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,10 @@

hideProcessedMath: true, // use display:none until all math is processed

fontNames: ["TeX","STIX","STIX-Web","Asana-Math",
"Gyre-Termes","Gyre-Pagella","Latin-Modern","Neo-Euler"],


Config: function () {
this.SUPER(arguments).Config.apply(this,arguments);
var settings = HUB.config.menuSettings, config = this.config, font = settings.font;
Expand All @@ -112,6 +116,7 @@
} else {
this.fontInUse = config.font || "TeX";
}
if (this.fontNames.indexOf(this.fontInUse) < 0) {this.fontInUse = "TeX"}
this.fontDir += "/" + this.fontInUse;
if (!this.require) {this.require = []}
this.require.push(this.fontDir+"/fontdata.js");
Expand Down

0 comments on commit 13d7904

Please sign in to comment.