From 035ba3da1c4b47c36ccd5d183f724c17ea6e4d57 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Mon, 22 Sep 2014 16:23:36 -0500 Subject: [PATCH] PDF.js version 1.0.207 --- bower.json | 2 +- build/pdf.combined.js | 27 +++++++++++++++++++-------- build/pdf.js | 6 +++--- build/pdf.worker.js | 25 ++++++++++++++++++------- package.json | 2 +- 5 files changed, 42 insertions(+), 20 deletions(-) diff --git a/bower.json b/bower.json index aef81bd7b..b5b484597 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.205", + "version": "1.0.207", "keywords": [ "Mozilla", "pdf", diff --git a/build/pdf.combined.js b/build/pdf.combined.js index a9682c306..a7cfa7e8b 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.205'; -PDFJS.build = '179f423'; +PDFJS.version = '1.0.207'; +PDFJS.build = '048c6d9'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -6547,7 +6547,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { } }, - paintChar: function (character, x, y) { + paintChar: function CanvasGraphics_paintChar(character, x, y) { var ctx = this.ctx; var current = this.current; var font = current.font; @@ -20346,11 +20346,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { var isAddToPathSet = !!(state.textRenderingMode & TextRenderingMode.ADD_TO_PATH_FLAG); if (font.data && (isAddToPathSet || PDFJS.disableFontFace)) { - for (var i = 0; i < glyphs.length; i++) { - if (glyphs[i] === null) { - continue; - } - var fontChar = glyphs[i].fontChar; + var buildPath = function (fontChar) { if (!font.renderer.hasBuiltPath(fontChar)) { var path = font.renderer.getPathJs(fontChar); this.handler.send('commonobj', [ @@ -20359,6 +20355,21 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { path ]); } + }.bind(this); + + for (var i = 0, ii = glyphs.length; i < ii; i++) { + var glyph = glyphs[i]; + if (glyph === null) { + continue; + } + buildPath(glyph.fontChar); + + // If the glyph has an accent we need to build a path for its + // fontChar too, otherwise CanvasGraphics_paintChar will fail. + var accent = glyph.accent; + if (accent && accent.fontChar) { + buildPath(accent.fontChar); + } } } diff --git a/build/pdf.js b/build/pdf.js index 8a50ff1d6..64373d2d2 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.205'; -PDFJS.build = '179f423'; +PDFJS.version = '1.0.207'; +PDFJS.build = '048c6d9'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -6595,7 +6595,7 @@ var CanvasGraphics = (function CanvasGraphicsClosure() { } }, - paintChar: function (character, x, y) { + paintChar: function CanvasGraphics_paintChar(character, x, y) { var ctx = this.ctx; var current = this.current; var font = current.font; diff --git a/build/pdf.worker.js b/build/pdf.worker.js index b5d022af9..3c6de43f2 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.0.205'; -PDFJS.build = '179f423'; +PDFJS.version = '1.0.207'; +PDFJS.build = '048c6d9'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -15753,11 +15753,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { var isAddToPathSet = !!(state.textRenderingMode & TextRenderingMode.ADD_TO_PATH_FLAG); if (font.data && (isAddToPathSet || PDFJS.disableFontFace)) { - for (var i = 0; i < glyphs.length; i++) { - if (glyphs[i] === null) { - continue; - } - var fontChar = glyphs[i].fontChar; + var buildPath = function (fontChar) { if (!font.renderer.hasBuiltPath(fontChar)) { var path = font.renderer.getPathJs(fontChar); this.handler.send('commonobj', [ @@ -15766,6 +15762,21 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { path ]); } + }.bind(this); + + for (var i = 0, ii = glyphs.length; i < ii; i++) { + var glyph = glyphs[i]; + if (glyph === null) { + continue; + } + buildPath(glyph.fontChar); + + // If the glyph has an accent we need to build a path for its + // fontChar too, otherwise CanvasGraphics_paintChar will fail. + var accent = glyph.accent; + if (accent && accent.fontChar) { + buildPath(accent.fontChar); + } } } diff --git a/package.json b/package.json index 34b47f182..a4dd679e7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.205", + "version": "1.0.207", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",