Skip to content

Commit 07a24c5

Browse files
committed
Warn instead of fail for CID fonts
1 parent 665ff0d commit 07a24c5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/fonts.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4363,8 +4363,10 @@ var CFFParser = (function CFFParserClosure() {
43634363

43644364
// DirectWrite does not like CID fonts data. Trying to convert/flatten
43654365
// the font data and remove CID properties.
4366-
if (cff.fdArray.length !== 1)
4367-
error('Unable to normalize CID font in CFF data');
4366+
if (cff.fdArray.length !== 1) {
4367+
warn('Unable to normalize CID font in CFF data -- using font as is');
4368+
return cff;
4369+
}
43684370

43694371
var fontDict = cff.fdArray[0];
43704372
fontDict.setByKey(17, topDict.getByName('CharStrings'));

0 commit comments

Comments
 (0)