[Pkg-javascript-commits] [pdf.js] 77/204: Fix Symbol fonts without font file but with Encoding dictionary (issue 5238)
David Prévot
taffit at moszumanska.debian.org
Sat Oct 25 18:50:34 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 b16c973d9d8acc95e3c14a075e1ea797fa94871b
Author: Jonas Jenwald <jonas.jenwald at gmail.com>
Date: Sun Aug 31 14:03:25 2014 +0200
Fix Symbol fonts without font file but with Encoding dictionary (issue 5238)
---
src/core/fonts.js | 7 +++++++
test/pdfs/.gitignore | 1 +
test/pdfs/issue5238.pdf | Bin 0 -> 1152 bytes
test/test_manifest.json | 7 +++++++
4 files changed, 15 insertions(+)
diff --git a/src/core/fonts.js b/src/core/fonts.js
index ccba800..541159d 100644
--- a/src/core/fonts.js
+++ b/src/core/fonts.js
@@ -2486,6 +2486,13 @@ var Font = (function FontClosure() {
}
this.toFontChar[charCode] = fontChar;
}
+ for (charCode in properties.differences) {
+ fontChar = GlyphsUnicode[properties.differences[charCode]];
+ if (!fontChar) {
+ continue;
+ }
+ this.toFontChar[charCode] = fontChar;
+ }
} else if (/Dingbats/i.test(fontName)) {
var dingbats = Encodings.ZapfDingbatsEncoding;
for (charCode in dingbats) {
diff --git a/test/pdfs/.gitignore b/test/pdfs/.gitignore
index 7a0ac07..2ac3d95 100644
--- a/test/pdfs/.gitignore
+++ b/test/pdfs/.gitignore
@@ -61,6 +61,7 @@
!issue4668.pdf
!issue5039.pdf
!issue5070.pdf
+!issue5238.pdf
!issue5244.pdf
!gradientfill.pdf
!bug903856.pdf
diff --git a/test/pdfs/issue5238.pdf b/test/pdfs/issue5238.pdf
new file mode 100644
index 0000000..a4ac44b
Binary files /dev/null and b/test/pdfs/issue5238.pdf differ
diff --git a/test/test_manifest.json b/test/test_manifest.json
index defee9e..85c99ed 100644
--- a/test/test_manifest.json
+++ b/test/test_manifest.json
@@ -471,6 +471,13 @@
"lastPage": 1,
"type": "eq"
},
+ { "id": "issue5238",
+ "file": "pdfs/issue5238.pdf",
+ "md5": "6ddecda00893be1793de20a70c83a3c2",
+ "rounds": 1,
+ "link": false,
+ "type": "eq"
+ },
{ "id": "txt2pdf",
"file": "pdfs/txt2pdf.pdf",
"md5": "02cefa0f5e8d96313bb05163b2f88c8c",
--
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