From: Vivien Nicolas <21@vingtetun.org> Date: Tue, 14 Jun 2011 09:59:10 +0000 (+0200) Subject: Add support for brackets around the header emails X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=6a6753fd5e1068684488f95d9a16e98cc3c9ee80;p=pdf.js.git Add support for brackets around the header emails --- diff --git a/PDFFont.js b/PDFFont.js index 509d714..9c6c620 100644 --- a/PDFFont.js +++ b/PDFFont.js @@ -38,10 +38,14 @@ var Fonts = { this._active = this[aFontName]; }, - getUnicodeFor: function fonts_getUnicodeFor(aCode) { - var glyph = this._active.encoding[aCode]; - var unicode = "0x" + GlyphsUnicode[glyph]; - return unicode || aCode; + unicodeFromCode: function fonts_unicodeFromCode(aCode) { + var active = this._active; + if (!active) + return aCode; + + var difference = active.encoding[aCode]; + var unicode = GlyphsUnicode[difference]; + return unicode ? "0x" + unicode : aCode; } };