Take the FirstChar
/LastChar
properties into account when computing the hash in PartialEvaluator.preEvaluateFont
(issue 10665)
Without this some fonts may incorrectly end up with matching `hash`es, thus breaking rendering since we'll not actually try to load/parse some of the fonts.
This commit is contained in:
parent
a2a824ed01
commit
9077abc263
@ -2350,6 +2350,10 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
}
|
||||
}
|
||||
|
||||
const firstChar = (dict.get('FirstChar') || 0);
|
||||
const lastChar = (dict.get('LastChar') || (composite ? 0xFFFF : 0xFF));
|
||||
hash.update(`${firstChar}-${lastChar}`);
|
||||
|
||||
var toUnicode = dict.get('ToUnicode') || baseDict.get('ToUnicode');
|
||||
if (isStream(toUnicode)) {
|
||||
var stream = toUnicode.str || toUnicode;
|
||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -76,6 +76,7 @@
|
||||
!issue10388_reduced.pdf
|
||||
!issue10438_reduced.pdf
|
||||
!issue10529.pdf
|
||||
!issue10665_reduced.pdf
|
||||
!bad-PageLabels.pdf
|
||||
!decodeACSuccessive.pdf
|
||||
!filled-background.pdf
|
||||
|
BIN
test/pdfs/issue10665_reduced.pdf
Normal file
BIN
test/pdfs/issue10665_reduced.pdf
Normal file
Binary file not shown.
@ -2564,6 +2564,13 @@
|
||||
"link": false,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue10665",
|
||||
"file": "pdfs/issue10665_reduced.pdf",
|
||||
"md5": "4c8938c808153f6b3840e8a5eb68b804",
|
||||
"rounds": 1,
|
||||
"link": false,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue1466",
|
||||
"file": "pdfs/issue1466.pdf",
|
||||
"md5": "8a8877432e5bb10cfd50d60488d947bb",
|
||||
|
Loading…
Reference in New Issue
Block a user