]> git.parisson.com Git - pdf.js.git/commitdiff
Don't error out for FontFile3 descriptors.
authorChris Jones <jones.chris.g@gmail.com>
Tue, 21 Jun 2011 20:40:21 +0000 (13:40 -0700)
committerChris Jones <jones.chris.g@gmail.com>
Tue, 21 Jun 2011 20:40:21 +0000 (13:40 -0700)
pdf.js

diff --git a/pdf.js b/pdf.js
index fff135816ee134b9b6696e405cf7a7c14fc1d00e..cffb1c0fabf72540509b51023554a86412f65852 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -784,6 +784,9 @@ var Dict = (function() {
         get2: function(key1, key2) {
             return this.get(key1) || this.get(key2);
         },
+        get3: function(key1, key2, key3) {
+            return this.get(key1) || this.get(key2) || this.get(key3);
+        },
         has: function(key) {
             return key in this.map;
         },
@@ -2255,7 +2258,7 @@ var CanvasGraphics = (function() {
             assertWellFormed(IsName(fontName), "invalid font name");
             fontName = fontName.name.replace("+", "_");
 
-            var fontFile = descriptor.get2("FontFile", "FontFile2");
+            var fontFile = descriptor.get3("FontFile", "FontFile2", "FontFile3");
             if (!fontFile)
                 error("FontFile not found for font: " + fontName);
             fontFile = xref.fetchIfRef(fontFile);