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:
Jonas Jenwald 2021-05-07 12:07:30 +02:00
parent fc59a5f709
commit 30b2739adf

View File

@ -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 = [];