]> git.parisson.com Git - pdf.js.git/commitdiff
Adjusts MacRoman switch heuristics threshold
authorYury Delendik <ydelendik@mozilla.com>
Fri, 18 May 2012 16:14:09 +0000 (11:14 -0500)
committerYury Delendik <ydelendik@mozilla.com>
Fri, 18 May 2012 16:15:44 +0000 (11:15 -0500)
src/fonts.js
test/pdfs/issue1709.pdf.link [new file with mode: 0644]
test/test_manifest.json

index 22037e7245bebbcfc1c723c0c88919ab7272d9b5..9e4189462323445991ee4ed97cb3cff38a0e6779 100644 (file)
@@ -1976,9 +1976,9 @@ var Font = (function FontClosure() {
             this.isSymbolicFont = false;
         }
 
-        // heuristics: if removed more than 2 glyphs encoding WinAnsiEncoding
-        // does not set properly
-        if (glyphsRemoved > 2) {
+        // heuristics: if removed more than 10 glyphs encoding WinAnsiEncoding
+        // does not set properly (broken PDFs have about 100 removed glyphs)
+        if (glyphsRemoved > 10) {
           warn('Switching TrueType encoding to MacRomanEncoding for ' +
                this.name + ' font');
           encoding = Encodings.MacRomanEncoding;
diff --git a/test/pdfs/issue1709.pdf.link b/test/pdfs/issue1709.pdf.link
new file mode 100644 (file)
index 0000000..ca5121b
--- /dev/null
@@ -0,0 +1 @@
+http://www.mft-online.de/files/medizinerreport_2012.pdf
index 5ec9e850fab959e37546b93a0552af7c0ac1718f..3caaf3bd410dc302388b42e164e3abeab305a3d8 100644 (file)
       "link": true,
       "type": "eq"
     },
+    {  "id": "issue1709",
+      "file": "pdfs/issue1709.pdf",
+      "md5": "84497bd23b7c82d03d2681a1cb1d9ed0",
+      "rounds": 1,
+      "pageLimit": 10,
+      "link": true,
+      "type": "eq"
+    },
     {  "id": "issue1015",
       "file": "pdfs/issue1015.pdf",
       "md5": "b61503d1b445742b665212866afb60e2",