From: Vivien Nicolas <21@vingtetun.org> Date: Fri, 26 Aug 2011 13:30:26 +0000 (+0200) Subject: If the glyph is not indexed, ignore it completely in getOrderedCharstrings X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=1cf4fc8782459d68bba9351dc539f7b7e70a8045;p=pdf.js.git If the glyph is not indexed, ignore it completely in getOrderedCharstrings --- diff --git a/fonts.js b/fonts.js index 43c0627..196e9f3 100755 --- a/fonts.js +++ b/fonts.js @@ -428,7 +428,7 @@ var Font = (function Font() { case 'CIDFontType2': this.mimetype = 'font/opentype'; - // Repair the TrueType file if it is can be damaged in the point of + // Repair the TrueType file. It is can be damaged in the point of // view of the sanitizer data = this.checkAndRepair(name, file, properties); break; @@ -1900,7 +1900,7 @@ CFF.prototype = { for (var i = 0; i < glyphs.length; i++) { var glyph = glyphs[i]; var unicode = properties.glyphs[glyph.glyph]; - if ('undefined' == typeof(unicode)) { + if (!unicode) { if (glyph.glyph != '.notdef') missings.push(glyph.glyph); } else {