Make testCollection properly mark STIX fonts as not having the style characters, and fix testing for STIX or MathJax at beginning of font names.

This commit is contained in:
Davide P. Cervone 2014-03-03 18:33:12 -05:00
parent ff8e052806
commit 4d4db67ad0

View File

@ -74,6 +74,7 @@
var font = {testString: "() {} []"};
font.family = {TeX:"MathJax_Size1", STIX:"STIXSizeOneSym"}[name] ||
name.replace(/-(Math)?/,"")+"MathJax_Size1";
if (name === "STIX") {font.noStyleChar = true}
return this.testFont(font);
},
@ -92,7 +93,7 @@
// This should be removed when the web fonts are fixed. FIXME
//
var family = font.familyFixed || font.family;
if (!family.match(/$(STIX|MathJax)|'/)) {
if (!family.match(/^(STIX|MathJax)|'/)) {
family = family.replace(/_/g," ").replace(/([a-z])([A-Z])/g,"$1 $2") + "','" + family + "-";
if (font.weight) {family += "Bold"}; if (font.style) {family += "Italic"}
if (!font.weight && !font.style) {family += "Regular"}