Merge pull request #11698 from Snuffleupagus/issue-11697

Don't accidentally accept invalid glyphNames which *appear* to follow the Cdd{d}/cdd{d} format in `PartialEvaluator._buildSimpleFontToUnicode` (issue 11697)
This commit is contained in:
Tim van der Meij 2020-03-15 13:36:09 +01:00 committed by GitHub
commit 1bc5cef2b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 2 deletions

View File

@ -2574,7 +2574,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
code = unicode;
}
}
if (code) {
if (code > 0 && Number.isInteger(code)) {
// If `baseEncodingName` is one the predefined encodings, and `code`
// equals `charcode`, using the glyph defined in the baseEncoding
// seems to yield a better `toUnicode` mapping (fixes issue 5070).

View File

@ -288,6 +288,7 @@
!issue2537r.pdf
!bug946506.pdf
!issue3885.pdf
!issue11697_reduced.pdf
!bug859204.pdf
!annotation-tx.pdf
!annotation-tx2.pdf

Binary file not shown.

View File

@ -3369,6 +3369,13 @@
"type": "eq",
"about": "The same PDF file as in bug1175943."
},
{ "id": "issue11697",
"file": "pdfs/issue11697_reduced.pdf",
"md5": "5b3793a76f92b357bd8ccc02e1c54ba0",
"rounds": 1,
"link": false,
"type": "eq"
},
{ "id": "issue1878",
"file": "pdfs/issue1878.pdf",
"md5": "b4fb0ce7c19368e7104dce3d0d34bcb3",
@ -4428,5 +4435,5 @@
"md5": "f84ce8b7414f6a18e75a6ce69c902501",
"rounds": 1,
"type": "eq"
}
}
]