[Pkg-javascript-commits] [pdf.js] 104/116: Relax the |isSymbolicFont| check for TrueType (3, 1) cmap tables (issue 5701)

David Prévot taffit at moszumanska.debian.org
Fri Mar 6 16:20:06 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository pdf.js.

commit 592890a7588367472b0db2b394eafda9a3a08006
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Thu Feb 5 15:25:23 2015 +0100

    Relax the |isSymbolicFont| check for TrueType (3, 1) cmap tables (issue 5701)
---
 src/core/fonts.js       |   6 ++++--
 test/pdfs/.gitignore    |   1 +
 test/pdfs/issue5701.pdf | Bin 0 -> 13993 bytes
 test/test_manifest.json |   7 +++++++
 4 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/src/core/fonts.js b/src/core/fonts.js
index a721b0b..1bcb10f 100644
--- a/src/core/fonts.js
+++ b/src/core/fonts.js
@@ -3184,9 +3184,11 @@ var Font = (function FontClosure() {
             useTable = true;
             // Continue the loop since there still may be a higher priority
             // table.
-          } else if (!isSymbolicFont && platformId === 3 && encodingId === 1) {
+          } else if (platformId === 3 && encodingId === 1) {
             useTable = true;
-            canBreak = true;
+            if (!isSymbolicFont) {
+              canBreak = true;
+            }
           } else if (isSymbolicFont && platformId === 3 && encodingId === 0) {
             useTable = true;
             canBreak = true;
diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore
index e894dab..4ebc877 100644
--- a/test/pdfs/.gitignore
+++ b/test/pdfs/.gitignore
@@ -115,3 +115,4 @@
 !issue5475.pdf
 !issue5481.pdf
 !issue5567.pdf
+!issue5701.pdf
diff --git a/test/pdfs/issue5701.pdf b/test/pdfs/issue5701.pdf
new file mode 100644
index 0000000..a9219b1
Binary files /dev/null and b/test/pdfs/issue5701.pdf differ
diff --git a/test/test_manifest.json b/test/test_manifest.json
index e61bce5..cf3ba18 100644
--- a/test/test_manifest.json
+++ b/test/test_manifest.json
@@ -1692,6 +1692,13 @@
        "type": "eq",
        "about": "Invisible Type3 font used for text selection and searching."
     },
+    {  "id": "issue5701",
+       "file": "pdfs/issue5701.pdf",
+       "md5": "7ec476aee12e8bd6be79140223d329c1",
+       "rounds": 1,
+       "link": false,
+       "type": "eq"
+    },
     {  "id": "issue5280",
       "file": "pdfs/issue5280.pdf",
       "md5": "0ea1230e2964e74cb6db063a89b78803",

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/pdf.js.git



More information about the Pkg-javascript-commits mailing list