mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
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
4 changed files with 12 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue