]> git.parisson.com Git - pdf.js.git/commitdiff
Warn instead of fail for CID fonts
authorYury Delendik <ydelendik@mozilla.com>
Thu, 28 Jun 2012 12:51:18 +0000 (07:51 -0500)
committerYury Delendik <ydelendik@mozilla.com>
Thu, 28 Jun 2012 12:51:18 +0000 (07:51 -0500)
src/fonts.js

index e340ab3d9c56f597414e28be640a612dba8e0a4e..fd5c72dd21badb98428d7adb2ba07db5da2bbb3b 100644 (file)
@@ -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'));