Add WOFF fonts and use them in browsers that support them; fix error in font reporting in About box

This commit is contained in:
Davide P. Cervone 2012-01-19 10:18:52 -05:00
parent 705bfe74e6
commit afb4257a83
24 changed files with 10 additions and 6 deletions

File diff suppressed because one or more lines are too long

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.

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.

File diff suppressed because one or more lines are too long

View File

@ -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",{

View File

@ -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.
@ -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"}
@ -2632,7 +2636,7 @@
zeroWidthBug: (mode < 8),
FontFaceBug: true,
msieFontCSSBug: browser.isIE9,
allowWebFonts: "eot"
allowWebFonts: (mode >= 9 ? "woff" : "eot")
});
},