]> git.parisson.com Git - pdf.js.git/commitdiff
Be more flexible about Subrs parsing
authorVivien Nicolas <21@vingtetun.org>
Fri, 2 Sep 2011 12:21:48 +0000 (14:21 +0200)
committerVivien Nicolas <21@vingtetun.org>
Fri, 2 Sep 2011 12:21:48 +0000 (14:21 +0200)
fonts.js

index 5aa549e659993438b8d997b6ad6a0d402efb8602..4b119dc20c11521d99bfcfcbf64a9636818302e7 100755 (executable)
--- a/fonts.js
+++ b/fonts.js
@@ -1633,7 +1633,7 @@ var Type1Parser = function() {
               getToken(); // read in 'array'
               for (var j = 0; j < num; ++j) {
                 var t = getToken(); // read in 'dup'
-                if (t == 'ND' || t == '|-') 
+                if (t == 'ND' || t == '|-' || t == 'noaccess'
                   break;
                 var index = parseInt(getToken());
                 if (index > j)
@@ -1645,7 +1645,9 @@ var Type1Parser = function() {
                 var encoded = decrypt(data, kCharStringsEncryptionKey, lenIV);
                 var str = decodeCharString(encoded);
                 i = i + 1 + length;
-                getToken(); //read in 'NP'
+                t = getToken(); //read in 'NP'
+                if (t == 'noaccess')
+                  getToken(); //read in 'put'
                 program.subrs[index] = str.charstring;
               }
               break;