]> git.parisson.com Git - pdf.js.git/commitdiff
Properly bypass Type3 fonts (ref #577)
authornotmasteryet <async.processingjs@yahoo.com>
Sun, 2 Oct 2011 21:53:22 +0000 (16:53 -0500)
committernotmasteryet <async.processingjs@yahoo.com>
Sun, 2 Oct 2011 21:53:22 +0000 (16:53 -0500)
pdf.js

diff --git a/pdf.js b/pdf.js
index ae8984907d6fca2f03b75b8800cfbb03ce36743d..4632ae9422604ed93253215e4d2400a8e650dc64 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -4563,6 +4563,8 @@ var PartialEvaluator = (function partialEvaluator() {
             break;
           default:
             warn('Unknown type of font: ' + type);
+            baseEncoding = [];
+            break;
         }
       }
 
@@ -4749,9 +4751,7 @@ var PartialEvaluator = (function partialEvaluator() {
       // This case is here for compatibility.
       var descriptor = xref.fetchIfRef(dict.get('FontDescriptor'));
       if (!descriptor) {
-        var baseFontName = dict.get('BaseFont');
-        if (!isName(baseFontName))
-          return null;
+        var baseFontName = dict.get('BaseFont') || new Name('sans-serif');
 
         // Using base font name as a font name.
         baseFontName = baseFontName.name.replace(/,/g, '_');