parse: function cff_parse() {
var header = this.parseHeader();
var properties = this.properties;
+
var nameIndex = this.parseIndex(header.endPos);
+ this.sanitizeName(nameIndex);
var dictIndex = this.parseIndex(nameIndex.endPos);
if (dictIndex.length != 1)
}
return dict;
},
+ sanitizeName: function cff_sanitizeName(nameIndex) {
+ // There should really only be one font, but loop to make sure.
+ for (var i = 0, ii = nameIndex.length; i < ii; ++i) {
+ var data = nameIndex.get(i).data;
+ var length = data.length;
+ if (length > 127)
+ warn('Font had name longer than 127 chars, will be rejected.');
+ // Only certain chars are permitted in the font name. Set them all to
+ // 'A' to avoid being rejected.
+ for (var j = 0; j < length; ++j)
+ data[j] = 65;
+ }
+ },
getStrings: function cff_getStrings(stringIndex) {
function bytesToString(bytesArray) {
var str = '';
"link": true,
"type": "eq"
},
+ { "id": "issue925",
+ "file": "pdfs/issue925.pdf",
+ "md5": "f58fe943090aff89dcc8e771bc0db4c2",
+ "rounds": 1,
+ "link": true,
+ "type": "eq"
+ },
{ "id": "issue1133",
"file": "pdfs/issue1133.pdf",
"md5": "d1b61580cb100e3df93d33703af1773a",