Merge pull request #15948 from Snuffleupagus/bug-1811668
Tweak `adjustType1ToUnicode` for fonts with a predefined *named* encoding (bug 1811668, PR 14050 follow-up)
This commit is contained in:
commit
edfdb693e5
@ -201,7 +201,7 @@ function adjustType1ToUnicode(properties, builtInEncoding) {
|
|||||||
for (const charCode in builtInEncoding) {
|
for (const charCode in builtInEncoding) {
|
||||||
if (properties.hasEncoding) {
|
if (properties.hasEncoding) {
|
||||||
if (
|
if (
|
||||||
properties.differences.length === 0 ||
|
properties.baseEncodingName ||
|
||||||
properties.differences[charCode] !== undefined
|
properties.differences[charCode] !== undefined
|
||||||
) {
|
) {
|
||||||
continue; // The font dictionary has an `Encoding`/`Differences` entry.
|
continue; // The font dictionary has an `Encoding`/`Differences` entry.
|
||||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -399,6 +399,7 @@
|
|||||||
!issue4461.pdf
|
!issue4461.pdf
|
||||||
!issue4573.pdf
|
!issue4573.pdf
|
||||||
!issue4722.pdf
|
!issue4722.pdf
|
||||||
|
!bug1811668_reduced.pdf
|
||||||
!issue4800.pdf
|
!issue4800.pdf
|
||||||
!issue9243.pdf
|
!issue9243.pdf
|
||||||
!issue13147.pdf
|
!issue13147.pdf
|
||||||
|
BIN
test/pdfs/bug1811668_reduced.pdf
Normal file
BIN
test/pdfs/bug1811668_reduced.pdf
Normal file
Binary file not shown.
@ -1006,6 +1006,12 @@
|
|||||||
"lastPage": 1,
|
"lastPage": 1,
|
||||||
"type": "eq"
|
"type": "eq"
|
||||||
},
|
},
|
||||||
|
{ "id": "bug1811668",
|
||||||
|
"file": "pdfs/bug1811668_reduced.pdf",
|
||||||
|
"md5": "87aa65d89aa0682cbe7b87152b884495",
|
||||||
|
"rounds": 1,
|
||||||
|
"type": "text"
|
||||||
|
},
|
||||||
{ "id": "issue8092",
|
{ "id": "issue8092",
|
||||||
"file": "pdfs/issue8092.pdf",
|
"file": "pdfs/issue8092.pdf",
|
||||||
"md5": "e4f3376b35fd132580246c3db1fbd738",
|
"md5": "e4f3376b35fd132580246c3db1fbd738",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user