We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 6b33422 + 82eb374 commit 796023fCopy full SHA for 796023f
src/fonts.js
@@ -5684,7 +5684,15 @@ Type1Font.prototype = {
5684
var field = fields[i];
5685
if (!properties.privateData.hasOwnProperty(field))
5686
continue;
5687
- privateDict.setByName(field, properties.privateData[field]);
+ var value = properties.privateData[field];
5688
+ if (isArray(value)) {
5689
+ // All of the private dictionary array data in CFF must be stored as
5690
+ // "delta-encoded" numbers.
5691
+ for (var j = value.length - 1; j > 0; j--) {
5692
+ value[j] -= value[j - 1]; // ... difference from previous value
5693
+ }
5694
5695
+ privateDict.setByName(field, value);
5696
}
5697
cff.topDict.privateDict = privateDict;
5698
0 commit comments