]> git.parisson.com Git - pdf.js.git/commitdiff
Add support for brackets around the header emails
authorVivien Nicolas <21@vingtetun.org>
Tue, 14 Jun 2011 09:59:10 +0000 (11:59 +0200)
committerVivien Nicolas <21@vingtetun.org>
Tue, 14 Jun 2011 09:59:10 +0000 (11:59 +0200)
PDFFont.js

index 509d714fe4982d507f794259452ab2079db465f4..9c6c620bb7d1a486ebd2234c6137dd2a33def0d7 100644 (file)
@@ -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;
   }
 };