Check for more missing tables in TrueType (sigh)
This commit is contained in:
parent
6d3d9e3b24
commit
5c4f26019e
9
fonts.js
9
fonts.js
@ -694,7 +694,7 @@ var TrueType = function(aName, aFile, aProperties) {
|
|||||||
// If any tables are still in the array this means some required tables are
|
// If any tables are still in the array this means some required tables are
|
||||||
// missing, which means that we need to rebuild the font in order to pass
|
// missing, which means that we need to rebuild the font in order to pass
|
||||||
// the sanitizer.
|
// the sanitizer.
|
||||||
if (requiredTables.length && requiredTables[0] == "OS/2") {
|
if (requiredTables.length == 1 && requiredTables[0] == "OS/2") {
|
||||||
var OS2 = [
|
var OS2 = [
|
||||||
0x00, 0x03, // version
|
0x00, 0x03, // version
|
||||||
0x02, 0x24, // xAvgCharWidth
|
0x02, 0x24, // xAvgCharWidth
|
||||||
@ -812,11 +812,10 @@ var TrueType = function(aName, aFile, aProperties) {
|
|||||||
|
|
||||||
this.data = fontData;
|
this.data = fontData;
|
||||||
return;
|
return;
|
||||||
} else if (requiredTables.lenght) {
|
} else if (requiredTables.length) {
|
||||||
error("Table " + requiredTables[0] + " is missing from the TrueType font");
|
warn("Missing " + requiredTables + " in the TrueType font");
|
||||||
} else {
|
|
||||||
this.data = aFile;
|
|
||||||
}
|
}
|
||||||
|
this.data = aFile;
|
||||||
};
|
};
|
||||||
|
|
||||||
TrueType.prototype = {
|
TrueType.prototype = {
|
||||||
|
Loading…
Reference in New Issue
Block a user