diff --git a/src/core/fonts.js b/src/core/fonts.js index cbd9c1f35..93cd088be 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -2252,7 +2252,7 @@ var Font = (function FontClosure() { var isTrueType = !tables['CFF ']; if (!isTrueType) { // OpenType font - if ((header.version === 'OTTO' && properties.type !== 'CIDFontType2') || + if ((header.version === 'OTTO' && !properties.composite) || !tables['head'] || !tables['hhea'] || !tables['maxp'] || !tables['post']) { // no major tables: throwing everything at CFFFont @@ -2397,7 +2397,7 @@ var Font = (function FontClosure() { return false; } - if (properties.type === 'CIDFontType2') { + if (properties.composite) { var cidToGidMap = properties.cidToGidMap || []; var isCidToGidMapEmpty = cidToGidMap.length === 0; diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index 29e59377e..236db80c9 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -44,6 +44,7 @@ !issue7835.pdf !issue7855.pdf !issue7872.pdf +!issue7901.pdf !bad-PageLabels.pdf !filled-background.pdf !ArabicCIDTrueType.pdf diff --git a/test/pdfs/issue7901.pdf b/test/pdfs/issue7901.pdf new file mode 100644 index 000000000..864c5c4f5 Binary files /dev/null and b/test/pdfs/issue7901.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index 732bca438..50d5306c8 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -1113,6 +1113,13 @@ "rounds": 1, "type": "eq" }, + { "id": "issue7901", + "file": "pdfs/issue7901.pdf", + "md5": "16059a3af6e81ae9272daa57ea03e6e9", + "rounds": 1, + "link": false, + "type": "eq" + }, { "id": "tutorial", "file": "pdfs/tutorial.pdf", "md5": "6e122f618c27f3aa9a689423e3be6b8d",