From: Vivien Nicolas <21@vingtetun.org> Date: Sat, 10 Sep 2011 12:50:46 +0000 (+0200) Subject: Fix a small Type1 encoding parsing error that cause the first Type1 font of the Type1... X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=574bc87741e959cd7c70d14e73852760712bcf17;p=pdf.js.git Fix a small Type1 encoding parsing error that cause the first Type1 font of the Type1 spec to be rejected --- diff --git a/fonts.js b/fonts.js index 9f835f9..381f810 100755 --- a/fonts.js +++ b/fonts.js @@ -1845,10 +1845,10 @@ var Type1Parser = function() { if (token == 'dup') { var index = parseInt(getToken(), 10); var glyph = getToken(); - + if ('undefined' == typeof(properties.differences[index])) { var mapping = properties.encoding[index] || {}; - mapping.unicode = GlyphsUnicode[glyph] || j; + mapping.unicode = GlyphsUnicode[glyph] || index; properties.glyphs[glyph] = properties.encoding[index] = mapping; } getToken(); // read the in 'put'