mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Ensure that composite/non-composite fonts won't get the same hash
in PartialEvaluator.preEvaluateFont
To hopefully help prevent any future bugs, make sure that composite/non-composite fonts cannot accidentally get matching `hash`es. Given the differences between those font types, that's very unlikely to be useful or even correct in general.
This commit is contained in:
parent
fc59a5f709
commit
30b2739adf
1 changed files with 2 additions and 0 deletions
|
@ -3622,6 +3622,8 @@ class PartialEvaluator {
|
|||
}
|
||||
|
||||
if (composite) {
|
||||
hash.update("compositeFont");
|
||||
|
||||
const compositeWidths = dict.get("W") || baseDict.get("W");
|
||||
if (Array.isArray(compositeWidths)) {
|
||||
const widthsBuf = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue