From: notmasteryet Date: Sun, 4 Dec 2011 19:51:12 +0000 (-0600) Subject: (#867) Set Type3 font encoding; enable text selection testing X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=3ea81bf0a6b2d8643c7416cab2bd4be28bb909c7;p=pdf.js.git (#867) Set Type3 font encoding; enable text selection testing --- diff --git a/src/fonts.js b/src/fonts.js index 672739e..cc24f30 100644 --- a/src/fonts.js +++ b/src/fonts.js @@ -765,8 +765,10 @@ var Font = (function Font() { this.fontMatrix = properties.fontMatrix; this.widthMultiplier = 1.0; - if (properties.type == 'Type3') + if (properties.type == 'Type3') { + this.encoding = properties.baseEncoding; return; + } // Trying to fix encoding using glyph CIDSystemInfo. this.loadCidToUnicode(properties); @@ -2152,7 +2154,7 @@ var Font = (function Font() { }; }, - charsToGlyphs: function fonts_chars2Glyphs(chars) { + charsToGlyphs: function fonts_charsToGlyphs(chars) { var charsCache = this.charsCache; var glyphs; diff --git a/test/driver.js b/test/driver.js index ffaf0b5..83f80eb 100644 --- a/test/driver.js +++ b/test/driver.js @@ -167,7 +167,8 @@ function nextPage(task, loadError) { if (error) failureMessage = 'render : ' + error.message; snapshotCurrentPage(task, failureMessage); - } + }, + true ); } catch (e) { failure = 'page setup : ' + e.toString();