diff --git a/src/core/fonts.js b/src/core/fonts.js index 54a53d99e..faaf294d9 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -2144,11 +2144,12 @@ var Font = (function FontClosure() { var isTrueType = !tables['CFF ']; if (!isTrueType) { - // OpenType font - if ((header.version === 'OTTO' && !properties.composite) || + // OpenType font (skip composite fonts with non-default CID to GID map). + if ((header.version === 'OTTO' && + !(properties.composite && properties.cidToGidMap)) || !tables['head'] || !tables['hhea'] || !tables['maxp'] || !tables['post']) { - // no major tables: throwing everything at CFFFont + // No major tables: throwing everything at `CFFFont`. cffFile = new Stream(tables['CFF '].data); cff = new CFFFont(cffFile, properties); diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index abaf1da18..7e2075e6c 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -52,6 +52,7 @@ !issue8125.pdf !issue8372.pdf !issue8424.pdf +!issue8480.pdf !bad-PageLabels.pdf !filled-background.pdf !ArabicCIDTrueType.pdf diff --git a/test/pdfs/issue8480.pdf b/test/pdfs/issue8480.pdf new file mode 100644 index 000000000..bb1773285 Binary files /dev/null and b/test/pdfs/issue8480.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index 2b07ae514..4c98490d4 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -1149,6 +1149,13 @@ "link": false, "type": "eq" }, + { "id": "issue8480", + "file": "pdfs/issue8480.pdf", + "md5": "769bc07bf8041d95667f2d32aaf75665", + "rounds": 1, + "link": false, + "type": "eq" + }, { "id": "tutorial", "file": "pdfs/tutorial.pdf", "md5": "6e122f618c27f3aa9a689423e3be6b8d",