Work around Opera's translation of font-weight:normal to font-weight:400

This commit is contained in:
Davide P. Cervone 2012-02-08 14:18:45 -05:00
parent 69bd9305c9
commit fe8c5b9899
8 changed files with 10 additions and 8 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1307,9 +1307,11 @@
if (text.length == 1 && font.skew && font.skew[n]) {span.bbox.skew = font.skew[n]}
},
checkFont: function (font,style) {
var weight = (style.fontWeight||"normal");
if (weight.match(/^\d+$/)) {weight = (parseInt(weight) >= 600 ? "bold" : "normal")}
return (font.family.replace(/'/g,"") === style.fontFamily.replace(/'/g,"") &&
(font.style||"normal") === (style.fontStyle||"normal") &&
(font.weight||"normal") === (style.fontWeight||"normal"));
(font.weight||"normal") === weight);
},
handleFont: function (span,font,force) {