]> 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)
committerJulian Viereck <julian.viereck@gmail.com>
Tue, 11 Oct 2011 20:07:54 +0000 (22:07 +0200)
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 8cddc97b9ceba91e075e1d1415c9cf1e1527d7c0..7530865c5e0ea2575d8a66da19e72ba2115120e4 100644 (file)
--- a/pdf.js
+++ b/pdf.js
@@ -5190,7 +5190,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 15771438cd41493b3d27160618de782d77c06486..43b799badc25dd82e8b5db97957697478b8e8722 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,