From c6662d12e1bc354ace66c4650160d05b4b22cfa8 Mon Sep 17 00:00:00 2001 From: notmasteryet Date: Sat, 21 Jan 2012 17:18:36 -0600 Subject: [PATCH] Changing glyphNameMap and GlyphUnicode lookup order --- src/fonts.js | 5 ++--- test/pdfs/issue1096.pdf.link | 1 + test/test_manifest.json | 8 ++++++++ 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 test/pdfs/issue1096.pdf.link diff --git a/src/fonts.js b/src/fonts.js index f96c15458..adcedd55c 100644 --- a/src/fonts.js +++ b/src/fonts.js @@ -2235,9 +2235,8 @@ var Font = (function FontClosure() { } // MacRoman encoding address by re-encoding the cmap table - unicode = glyphName in GlyphsUnicode ? - GlyphsUnicode[glyphName] : - this.glyphNameMap[glyphName]; + unicode = glyphName in this.glyphNameMap ? + this.glyphNameMap[glyphName] : GlyphsUnicode[glyphName]; break; default: warn('Unsupported font type: ' + this.type); diff --git a/test/pdfs/issue1096.pdf.link b/test/pdfs/issue1096.pdf.link new file mode 100644 index 000000000..aa07f14dd --- /dev/null +++ b/test/pdfs/issue1096.pdf.link @@ -0,0 +1 @@ +http://www.faithaliveresources.org/Content/Site135/FilesSamples/105315400440pdf_00000009843.pdf diff --git a/test/test_manifest.json b/test/test_manifest.json index 5bc344abf..648d1b49b 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -402,6 +402,14 @@ "link": true, "type": "eq" }, + { "id": "issue1096", + "file": "pdfs/issue1096.pdf", + "md5": "7f75d2b4b93c78d401ff39e8c1b00612", + "rounds": 1, + "pageLimit": 10, + "link": true, + "type": "eq" + }, { "id": "liveprogramming", "file": "pdfs/liveprogramming.pdf", "md5": "7bd4dad1188232ef597d36fd72c33e52",