From: Adil Allawi Date: Tue, 4 Oct 2011 13:18:33 +0000 (+0100) Subject: Only offset glyphs that can fit into the private use area X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=3645ebe42c615e5782667e769506b49988a2a530;p=pdf.js.git Only offset glyphs that can fit into the private use area --- diff --git a/fonts.js b/fonts.js index a4af5fb..83e0771 100644 --- a/fonts.js +++ b/fonts.js @@ -1225,7 +1225,7 @@ var Font = (function Font() { for (i in encoding) { if (encoding.hasOwnProperty(i)) { var unicode = encoding[i].unicode; - if (unicode <= 0x1f || (unicode >= 127 && unicode <= kUnicodeCJKStart)) + if (unicode <= 0x1f || (unicode >= 127 && unicode <= kSizeOfGlyphArea)) encoding[i].unicode = unicode += cmapGlyphOffset; } } @@ -1233,7 +1233,7 @@ var Font = (function Font() { var glyphs = []; for (i = 1; i < numGlyphs; i++) { glyphs.push({ - unicode: i <= 0x1f || (i >= 127 && i < kUnicodeCJKStart) ? + unicode: i <= 0x1f || (i >= 127 && i < kSizeOfGlyphArea) ? i + cmapGlyphOffset : i }); }