diff --git a/src/core/fonts.js b/src/core/fonts.js index 08f5c08c9..5dfbab374 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -4053,7 +4053,7 @@ var Font = (function FontClosure() { var isTrueType = !tables['CFF ']; if (!isTrueType) { // OpenType font - if (header.version === 'OTTO' || + if ((header.version === 'OTTO' && properties.type !== 'CIDFontType2') || !tables.head || !tables.hhea || !tables.maxp || !tables.post) { // no major tables: throwing everything at CFFFont cffFile = new Stream(tables['CFF '].data); diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index a79dc29b0..c4258e0c4 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -132,6 +132,8 @@ !issue4800.pdf !issue4801.pdf !issue5334.pdf +!bug1186827.pdf +!issue215.pdf !issue5540.pdf !issue5549.pdf !issue5475.pdf diff --git a/test/pdfs/bug1186827.pdf b/test/pdfs/bug1186827.pdf new file mode 100644 index 000000000..a3a5be3ba Binary files /dev/null and b/test/pdfs/bug1186827.pdf differ diff --git a/test/pdfs/issue215.pdf b/test/pdfs/issue215.pdf new file mode 100644 index 000000000..fa970e1bd Binary files /dev/null and b/test/pdfs/issue215.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index 5ecd5b7b2..dc7872d3a 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -435,6 +435,20 @@ "link": false, "type": "eq" }, + { "id": "bug1186827", + "file": "pdfs/bug1186827.pdf", + "md5": "6c5526ae1a9d66cb517153001afc196e", + "rounds": 1, + "link": false, + "type": "eq" + }, + { "id": "issue215", + "file": "pdfs/issue215.pdf", + "md5": "31f3dc60ecf008987d970edfd2b1df61", + "rounds": 1, + "link": false, + "type": "eq" + }, { "id": "bug850854", "file": "pdfs/bug850854.pdf", "md5": "346a034a80120d123b9fefc42bcb11da",