]> git.parisson.com Git - pdf.js.git/commitdiff
Fixing DescendantFonts object fetching (#600)
authornotmasteryet <async.processingjs@yahoo.com>
Sat, 8 Oct 2011 03:46:01 +0000 (22:46 -0500)
committernotmasteryet <async.processingjs@yahoo.com>
Sat, 8 Oct 2011 03:46:01 +0000 (22:46 -0500)
pdf.js
test/pdfs/Test-plusminus.pdf [new file with mode: 0644]
test/test_manifest.json

diff --git a/pdf.js b/pdf.js
index 943986e0d057d7df0907b83ec8f82bd50d9c6af2..6b7bf0cca0107441467b6c3c59433e1c0cc02d9f 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -4757,7 +4757,7 @@ var PartialEvaluator = (function partialEvaluator() {
         if (isRef(df))
           df = xref.fetch(df);
 
-        dict = xref.fetch(isRef(df) ? df : df[0]);
+        dict = xref.fetchIfRef(isRef(df) ? df : df[0]);
 
         type = dict.get('Subtype');
         assertWellFormed(isName(type), 'invalid font Subtype');
diff --git a/test/pdfs/Test-plusminus.pdf b/test/pdfs/Test-plusminus.pdf
new file mode 100644 (file)
index 0000000..50ae29a
Binary files /dev/null and b/test/pdfs/Test-plusminus.pdf differ
index f074c06c375e50085322c68b35fa8090f7be461a..9ad53e190424507c8d98b6bf6c21b17d03c93050 100644 (file)
        "rounds": 1,
        "type": "eq"
     },
+    {  "id": "plusminus",
+       "file": "pdfs/Test-plusminus.pdf",
+       "rounds": 1,
+       "type": "eq"
+    },
     {  "id": "openoffice-pdf",
        "file": "pdfs/DiwanProfile.pdf",
        "link": true,