[Pkg-javascript-commits] [pdf.js] 43/141: Handle 'space' character correctly in MacRomanEncoding (bug 878026)

David Prévot taffit at moszumanska.debian.org
Sat Apr 19 22:40:28 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 8fc4ebd5cb6b1227344f0c1b35690332352fabaf
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date:   Mon Apr 7 20:50:27 2014 +0200

    Handle 'space' character correctly in MacRomanEncoding (bug 878026)
---
 src/core/fonts.js       |  2 +-
 test/pdfs/.gitignore    |  1 +
 test/pdfs/bug878026.pdf | 71 +++++++++++++++++++++++++++++++++++++++++++++++++
 test/test_manifest.json |  9 +++++++
 4 files changed, 82 insertions(+), 1 deletion(-)

diff --git a/src/core/fonts.js b/src/core/fonts.js
index e828073..d327393 100644
--- a/src/core/fonts.js
+++ b/src/core/fonts.js
@@ -158,7 +158,7 @@ var Encodings = {
     'summation', 'product', 'pi', 'integral', 'ordfeminine', 'ordmasculine',
     'Omega', 'ae', 'oslash', 'questiondown', 'exclamdown', 'logicalnot',
     'radical', 'florin', 'approxequal', 'Delta', 'guillemotleft',
-    'guillemotright', 'ellipsis', '', 'Agrave', 'Atilde', 'Otilde', 'OE',
+    'guillemotright', 'ellipsis', 'space', 'Agrave', 'Atilde', 'Otilde', 'OE',
     'oe', 'endash', 'emdash', 'quotedblleft', 'quotedblright', 'quoteleft',
     'quoteright', 'divide', 'lozenge', 'ydieresis', 'Ydieresis', 'fraction',
     'currency', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'daggerdbl',
diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore
index aa06cc0..be12d9e 100644
--- a/test/pdfs/.gitignore
+++ b/test/pdfs/.gitignore
@@ -59,6 +59,7 @@
 !noembed-eucjp.pdf
 !noembed-sjis.pdf
 !vertical.pdf
+!bug878026.pdf
 !issue3025.pdf
 !issue2099-1.pdf
 !issue3371.pdf
diff --git a/test/pdfs/bug878026.pdf b/test/pdfs/bug878026.pdf
new file mode 100644
index 0000000..35a6c75
--- /dev/null
+++ b/test/pdfs/bug878026.pdf
@@ -0,0 +1,71 @@
+%PDF-1.7
+43 0 obj
+<<
+/Type /Catalog
+/Pages 44 0 R
+>>
+endobj
+44 0 obj
+<<
+/Type /Pages
+/MediaBox [ 0 0 200 50 ]
+/Count 1
+/Kids [ 45 0 R ]
+>>
+endobj
+45 0 obj
+<<
+/Type /Page
+/Parent 44 0 R
+/Resources <<
+/Font <<
+/F1 46 0 R
+>>
+
+>>
+
+/Contents 47 0 R
+>>
+endobj
+46 0 obj
+<<
+/Type /Font
+/Subtype /Type1
+/Name /Fcpdf1
+/BaseFont /Times-Roman
+/Encoding /MacRomanEncoding
+>>
+endobj
+47 0 obj
+<<
+/Length 44
+>>
+stream
+BT
+10 20 TD
+/F1 20 Tf
+(Bug\312878026) Tj
+ET
+endstream
+endobj
+xref
+0 1
+0000000000 65535 f
+43 1
+0000000009 00000 n
+44 1
+0000000060 00000 n
+45 1
+0000000146 00000 n
+46 1
+0000000254 00000 n
+47 1
+0000000369 00000 n
+trailer
+<<
+/Size 5
+/Root 43 0 R
+>>
+startxref
+463
+%%EOF
\ No newline at end of file
diff --git a/test/test_manifest.json b/test/test_manifest.json
index 8de813f..625a420 100644
--- a/test/test_manifest.json
+++ b/test/test_manifest.json
@@ -343,6 +343,15 @@
        "rounds": 1,
        "type": "load"
     },
+    {  "id": "bug878026",
+       "file": "pdfs/bug878026.pdf",
+       "md5": "13072db0586f2b4e96de189e23fc7395",
+       "rounds": 1,
+       "link": false,
+       "firstPage": 1,
+       "lastPage": 1,
+       "type": "eq"
+    },
     {  "id": "jai-pdf",
        "file": "pdfs/jai.pdf",
        "md5": "1f5dd128c3757420a881a155f2f8ace3",

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