]> git.parisson.com Git - pdf.js.git/commitdiff
Fix cff regression.
authorBrendan Dahl <brendan.dahl@gmail.com>
Thu, 29 Mar 2012 22:37:40 +0000 (15:37 -0700)
committerBrendan Dahl <brendan.dahl@gmail.com>
Thu, 29 Mar 2012 22:37:40 +0000 (15:37 -0700)
src/fonts.js
test/pdfs/issue1422.pdf.link [new file with mode: 0644]
test/test_manifest.json

index b756ff2eed0914589b8486b3ff306a6b169739a6..96fb7fabee22c330263f7181e81c1a8b5218b828 100644 (file)
@@ -4362,16 +4362,18 @@ var CFFCompiler = (function CFFCompilerClosure() {
       output.add(charStrings);
 
       if (cff.isCIDFont) {
+        // For some reason FDSelect must be in front of FDArray on windows. OSX
+        // and linux don't seem to care.
+        topDictTracker.setEntryLocation('FDSelect', [output.length], output);
+        var fdSelect = this.compileFDSelect(cff.fdSelect.raw);
+        output.add(fdSelect);
+
         var compiled = this.compileTopDicts(cff.fdArray, output.length);
         topDictTracker.setEntryLocation('FDArray', [output.length], output);
         output.add(compiled.output);
         var fontDictTrackers = compiled.trackers;
 
         this.compilePrivateDicts(cff.fdArray, fontDictTrackers, output);
-
-        topDictTracker.setEntryLocation('FDSelect', [output.length], output);
-        var fdSelect = this.compileFDSelect(cff.fdSelect.raw);
-        output.add(fdSelect);
       }
 
       this.compilePrivateDicts([cff.topDict], [topDictTracker], output);
diff --git a/test/pdfs/issue1422.pdf.link b/test/pdfs/issue1422.pdf.link
new file mode 100644 (file)
index 0000000..9f2ba3d
--- /dev/null
@@ -0,0 +1 @@
+http://www.cpi.si/files/cpi/userfiles/TrajnostniRazvoj/06_Prosti_cas.pdf
index a4c6defccd9325f2d364d2541384a5c91dfd6950..6459834cd887c1dca1981144270341ed668d1a77 100644 (file)
       "rounds": 1,
       "link": true,
       "type": "eq"
+    },
+    {  "id": "issue1422",
+      "file": "pdfs/issue1422.pdf",
+      "md5": "f7a732a86960b330b8108d5cdece19e3",
+      "rounds": 1,
+      "pageLimit": 1,
+      "link": true,
+      "type": "eq"
     }
 ]