Update HTML-CSS fonts to be usable by CommonHTML, and remove the CommonHTML fonts. Update @font-face to include the new formats.

This commit is contained in:
Davide P. Cervone 2015-04-17 16:01:57 -04:00
parent 8f20749a48
commit 562786da5e
85 changed files with 12 additions and 4 deletions

View File

@ -32,7 +32,7 @@ MathJax.OutputJax.CommonHTML = MathJax.OutputJax({
extensionDir: MathJax.OutputJax.extensionDir + "/CommonHTML",
autoloadDir: MathJax.OutputJax.directory + "/CommonHTML/autoload",
fontDir: MathJax.OutputJax.directory + "/CommonHTML/fonts", // fontname added later
webfontDir: MathJax.OutputJax.fontDir + "/CommonHTML", // fontname added later
webfontDir: MathJax.OutputJax.fontDir + "/HTML-CSS", // fontname added later
config: {
matchFontHeight: true, // try to match math font height to surrounding font?

View File

@ -1632,7 +1632,9 @@
};
(function () {
var STYLES = CHTML.config.styles, FONTS = CHTML.FONTDATA.FONTS;
var DIR = AJAX.fileURL(CHTML.webfontDir+"/TeX/otf");
var OTFDIR = AJAX.fileURL(CHTML.webfontDir+"/TeX/otf"),
EOTDIR = AJAX.fileURL(CHTML.webfontDir+"/TeX/eot"),
WOFFDIR = AJAX.fileURL(CHTML.webfontDir+"/TeX/woff");
var faces = [];
for (var name in FONTS) {if (FONTS.hasOwnProperty(name)) {
var family = CHTML.FONTDATA.familyName(name), FAMILY = family;
@ -1661,9 +1663,15 @@
}
//
// The web font, if no local font found
// ### FIXME: add more formats to src
//
font = {"font-family":family+"w", src:"url('"+DIR+"/"+name+"-"+variant+".otf')"};
font = {"font-family":family+"w",
src: [
// "url('"+EOTDIR+"/"+name+"-"+variant+".eot?#iefix') format('embedded-opentype')",
"url('"+EOTDIR+"/"+name+"-"+variant+".eot') format('embedded-opentype')",
"url('"+WOFFDIR+"/"+name+"-"+variant+".woff') format('woff')",
"url('"+OTFDIR+"/"+name+"-"+variant+".otf') format('opentype')"
].join(", ")
};
faces.push(font);
//
// A class that looks for the local and web fonts