Skip to content

Commit

Permalink
Add WOFF fonts and use them in browsers that support them; fix error …
Browse files Browse the repository at this point in the history
…in font reporting in About box
  • Loading branch information
dpvc committed Jan 19, 2012
1 parent 705bfe7 commit afb4257
Show file tree
Hide file tree
Showing 24 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion extensions/MathMenu.js

Large diffs are not rendered by default.

Binary file added fonts/HTML-CSS/TeX/woff/MathJax_AMS-Regular.woff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added fonts/HTML-CSS/TeX/woff/MathJax_Fraktur-Bold.woff
Binary file not shown.
Binary file not shown.
Binary file added fonts/HTML-CSS/TeX/woff/MathJax_Main-Bold.woff
Binary file not shown.
Binary file added fonts/HTML-CSS/TeX/woff/MathJax_Main-Italic.woff
Binary file not shown.
Binary file added fonts/HTML-CSS/TeX/woff/MathJax_Main-Regular.woff
Binary file not shown.
Binary file not shown.
Binary file added fonts/HTML-CSS/TeX/woff/MathJax_Math-Italic.woff
Binary file not shown.
Binary file added fonts/HTML-CSS/TeX/woff/MathJax_Math-Regular.woff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion jax/output/HTML-CSS/jax.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion unpacked/extensions/MathMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -603,7 +603,7 @@
MENU.About.GetJax(jax,MathJax.Extension,"Extension",true);
jax.push(["div",{style:{"border-top":"groove 2px",margin:".25em 0"}}],["center",{},[
HUB.Browser + " v"+HUB.Browser.version +
(HTMLCSS.webFonts ? " \u2014 "+HTMLCSS.allowWebFonts+" fonts" : "")
(HTMLCSS.webFonts && !HTMLCSS.imgFonts ? " \u2014 "+HTMLCSS.allowWebFonts+" fonts" : "")
]]);
MENU.About.div = MENU.Background(MENU.About);
var about = HTML.addElement(MENU.About.div,"div",{
Expand Down
10 changes: 7 additions & 3 deletions unpacked/jax/output/HTML-CSS/jax.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*
* ---------------------------------------------------------------------
*
* Copyright (c) 2009-2011 Design Science, Inc.
* Copyright (c) 2009-2012 Design Science, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -176,7 +176,11 @@
"font-family": FONT.family,
src: "url('"+dir+"/"+fullname+"')"
};
if (type === "svg") def.src += " format('svg')";
if (type === "otf") {
def.src += " format('opentype')";
dir = AJAX.fileURL(HTMLCSS.webfontDir+"/woff"); // add woff fonts as well
def.src = "url('"+dir+"/"+fullname.replace(/otf$/,"woff")+"') format('woff'), "+def.src;
} else if (type !== "eot") {def.src += " format('"+type+"')"}
if (!(HTMLCSS.FontFaceBug && FONT.isWebFont)) {
if (name.match(/-bold/)) {def["font-weight"] = "bold"}
if (name.match(/-italic/)) {def["font-style"] = "italic"}
Expand Down Expand Up @@ -2632,7 +2636,7 @@
zeroWidthBug: (mode < 8),
FontFaceBug: true,
msieFontCSSBug: browser.isIE9,
allowWebFonts: "eot"
allowWebFonts: (mode >= 9 ? "woff" : "eot")
});
},

Expand Down

0 comments on commit afb4257

Please sign in to comment.