From 07a24c55896f533fa85a297bf232b75ba7222e7a Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Thu, 28 Jun 2012 07:51:18 -0500 Subject: [PATCH] Warn instead of fail for CID fonts --- src/fonts.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/fonts.js b/src/fonts.js index e340ab3d9..fd5c72dd2 100644 --- a/src/fonts.js +++ b/src/fonts.js @@ -4363,8 +4363,10 @@ var CFFParser = (function CFFParserClosure() { // DirectWrite does not like CID fonts data. Trying to convert/flatten // the font data and remove CID properties. - if (cff.fdArray.length !== 1) - error('Unable to normalize CID font in CFF data'); + if (cff.fdArray.length !== 1) { + warn('Unable to normalize CID font in CFF data -- using font as is'); + return cff; + } var fontDict = cff.fdArray[0]; fontDict.setByKey(17, topDict.getByName('CharStrings'));