Skip to content

Commit 575f2dd

Browse files
committed
Remove cid dictionary values for normalized fonts.
1 parent a96be1f commit 575f2dd

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/fonts.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5577,7 +5577,14 @@ var CFFParser = (function CFFParserClosure() {
55775577
}
55785578

55795579
var fontDict = cff.fdArray[0];
5580+
// Make the sanitizer happy and remove anything that is only for CID
5581+
// fonts.
55805582
fontDict.setByKey(17, topDict.getByName('CharStrings'));
5583+
fontDict.removeByName('CIDFontVersion');
5584+
fontDict.removeByName('CIDFontRevision');
5585+
fontDict.removeByName('CIDFontType');
5586+
fontDict.removeByName('CIDCount');
5587+
fontDict.removeByName('UIDBase');
55815588
cff.topDict = fontDict;
55825589
cff.isCIDFont = false;
55835590
delete cff.fdArray;

test/pdfs/cid_cff.pdf

19.5 KB
Binary file not shown.

test/test_manifest.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -769,5 +769,11 @@
769769
"md5": "9f11e815b485f7f0e1fa5c116c636cf9",
770770
"rounds": 1,
771771
"type": "eq"
772+
},
773+
{ "id": "cid_cff",
774+
"file": "pdfs/cid_cff.pdf",
775+
"md5": "a19a18eaa626262cc45e0760004d6de9",
776+
"rounds": 1,
777+
"type": "eq"
772778
}
773779
]

0 commit comments

Comments
 (0)