From: notmasteryet Date: Wed, 7 Dec 2011 04:59:06 +0000 (-0600) Subject: Fix the unicode symbols on the text layer X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=9234c315d5869580ae14bb5e721a89a4f8225529;p=pdf.js.git Fix the unicode symbols on the text layer --- diff --git a/src/fonts.js b/src/fonts.js index fd461bc..52174b1 100644 --- a/src/fonts.js +++ b/src/fonts.js @@ -2142,7 +2142,8 @@ var Font = (function Font() { break; } - var unicodeChars = this.toUnicode ? this.toUnicode[charcode] : charcode; + var unicodeChars = !('toUnicode' in this) ? charcode : + this.toUnicode[charcode] || charcode; if (typeof unicodeChars === 'number') unicodeChars = String.fromCharCode(unicodeChars);