diff --git a/src/core/fonts.js b/src/core/fonts.js index 964a80df2..43274086f 100644 --- a/src/core/fonts.js +++ b/src/core/fonts.js @@ -201,7 +201,7 @@ function adjustType1ToUnicode(properties, builtInEncoding) { for (const charCode in builtInEncoding) { if (properties.hasEncoding) { if ( - properties.differences.length === 0 || + properties.baseEncodingName || properties.differences[charCode] !== undefined ) { continue; // The font dictionary has an `Encoding`/`Differences` entry. diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore index a7aed6e8b..b83117441 100644 --- a/test/pdfs/.gitignore +++ b/test/pdfs/.gitignore @@ -399,6 +399,7 @@ !issue4461.pdf !issue4573.pdf !issue4722.pdf +!bug1811668_reduced.pdf !issue4800.pdf !issue9243.pdf !issue13147.pdf diff --git a/test/pdfs/bug1811668_reduced.pdf b/test/pdfs/bug1811668_reduced.pdf new file mode 100644 index 000000000..298675dbc Binary files /dev/null and b/test/pdfs/bug1811668_reduced.pdf differ diff --git a/test/test_manifest.json b/test/test_manifest.json index f40e08e5d..95bfd0141 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -1006,6 +1006,12 @@ "lastPage": 1, "type": "eq" }, + { "id": "bug1811668", + "file": "pdfs/bug1811668_reduced.pdf", + "md5": "87aa65d89aa0682cbe7b87152b884495", + "rounds": 1, + "type": "text" + }, { "id": "issue8092", "file": "pdfs/issue8092.pdf", "md5": "e4f3376b35fd132580246c3db1fbd738",