[Pkg-javascript-commits] [pdf.js] 86/204: Add support for MMType1 fonts with embedded font files

David Prévot taffit at moszumanska.debian.org
Sat Oct 25 18:50:35 UTC 2014


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

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

commit 3c759e296a81241be7443d9b2d33fe7f1b39019c
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Thu Sep 18 16:10:46 2014 +0200

    Add support for MMType1 fonts with embedded font files
---
 src/core/fonts.js       |   3 +++
 test/pdfs/.gitignore    |   1 +
 test/pdfs/mmtype1.pdf   | Bin 0 -> 8044 bytes
 test/test_manifest.json |   7 +++++++
 4 files changed, 11 insertions(+)

diff --git a/src/core/fonts.js b/src/core/fonts.js
index ccba800..eff8181 100644
--- a/src/core/fonts.js
+++ b/src/core/fonts.js
@@ -2546,6 +2546,9 @@ var Font = (function FontClosure() {
 
     var data;
     switch (type) {
+      case 'MMType1':
+        info('MMType1 font (' + name + '), falling back to Type1.');
+        /* falls through */
       case 'Type1':
       case 'CIDFontType0':
         this.mimetype = 'font/opentype';
diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore
index 7a0ac07..94c9c87 100644
--- a/test/pdfs/.gitignore
+++ b/test/pdfs/.gitignore
@@ -55,6 +55,7 @@
 !helloworld-bad.pdf
 !zerowidthline.pdf
 !bug868745.pdf
+!mmtype1.pdf
 !bug864847.pdf
 !issue1002.pdf
 !issue925.pdf
diff --git a/test/pdfs/mmtype1.pdf b/test/pdfs/mmtype1.pdf
new file mode 100644
index 0000000..8478606
Binary files /dev/null and b/test/pdfs/mmtype1.pdf differ
diff --git a/test/test_manifest.json b/test/test_manifest.json
index defee9e..00db553 100644
--- a/test/test_manifest.json
+++ b/test/test_manifest.json
@@ -235,6 +235,13 @@
        "rounds": 1,
        "type": "eq"
     },
+    {  "id": "mmtype1",
+       "file": "pdfs/mmtype1.pdf",
+       "md5": "7d632263d28bc2ff05ee0cc426966a5a",
+       "link": false,
+       "rounds": 1,
+       "type": "eq"
+    },
     {  "id": "openoffice-pdf",
        "file": "pdfs/DiwanProfile.pdf",
        "md5": "55d0c6a1a6d26c9ec9dcecaa7a471e0e",

-- 
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