From 301a6795db8bae7f433a368022fd1486a0df15e7 Mon Sep 17 00:00:00 2001 From: notmasteryet Date: Wed, 7 Dec 2011 23:30:48 -0600 Subject: [PATCH] (#906) fixing glyph width defined by glyph name --- src/fonts.js | 4 ++-- test/pdfs/bpl13210.pdf.link | 1 + test/test_manifest.json | 8 ++++++++ 3 files changed, 11 insertions(+), 2 deletions(-) create mode 100644 test/pdfs/bpl13210.pdf.link diff --git a/src/fonts.js b/src/fonts.js index 1a4366c19..2343f530c 100644 --- a/src/fonts.js +++ b/src/fonts.js @@ -2102,9 +2102,9 @@ var Font = (function Font() { break; case 'Type1': var glyphName = this.differences[charcode] || this.encoding[charcode]; + if (!isNum(width)) + width = this.widths[glyphName]; if (this.noUnicodeAdaptation) { - if (!isNum(width)) - width = this.widths[glyphName]; unicode = GlyphsUnicode[glyphName] || charcode; break; } diff --git a/test/pdfs/bpl13210.pdf.link b/test/pdfs/bpl13210.pdf.link new file mode 100644 index 000000000..7cde56a22 --- /dev/null +++ b/test/pdfs/bpl13210.pdf.link @@ -0,0 +1 @@ +http://h20000.www2.hp.com/bc/docs/support/SupportManual/bpl13210/bpl13210.pdf diff --git a/test/test_manifest.json b/test/test_manifest.json index bd50068f7..31cd8e0a1 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -296,6 +296,14 @@ "rounds": 1, "type": "eq" }, + { "id": "bpl13210", + "file": "pdfs/bpl13210.pdf", + "md5": "8a08512baa9fa95378d9ad4b995947c7", + "link": true, + "pageLimit": 5, + "rounds": 1, + "type": "eq" + }, { "id": "tutorial", "file": "pdfs/tutorial.pdf", "md5": "6e122f618c27f3aa9a689423e3be6b8d",