From ad7f083c44ee13a7ee6bccd81f37e9a8da4446d4 Mon Sep 17 00:00:00 2001 From: Yury Delendik Date: Mon, 22 Sep 2014 16:28:15 -0500 Subject: [PATCH] PDF.js version 1.0.425 --- bower.json | 2 +- build/pdf.combined.js | 19 +++++++++++++------ build/pdf.js | 4 ++-- build/pdf.worker.js | 19 +++++++++++++------ package.json | 2 +- 5 files changed, 30 insertions(+), 16 deletions(-) diff --git a/bower.json b/bower.json index 4d3723bf0..5ed3b58df 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.423", + "version": "1.0.425", "keywords": [ "Mozilla", "pdf", diff --git a/build/pdf.combined.js b/build/pdf.combined.js index bfff2df31..b0540a061 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.423'; -PDFJS.build = '6d86c92'; +PDFJS.version = '1.0.425'; +PDFJS.build = 'c28839b'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -26897,7 +26897,7 @@ var Glyph = (function GlyphClosure() { */ var Font = (function FontClosure() { function Font(name, file, properties) { - var charCode; + var charCode, glyphName; this.name = name; this.loadedName = properties.loadedName; @@ -26998,13 +26998,20 @@ var Font = (function FontClosure() { } else if (isStandardFont) { this.toFontChar = []; for (charCode in properties.defaultEncoding) { - var glyphName = properties.differences[charCode] || - properties.defaultEncoding[charCode]; + glyphName = (properties.differences[charCode] || + properties.defaultEncoding[charCode]); this.toFontChar[charCode] = GlyphsUnicode[glyphName]; } } else { + var unicodeCharCode, notCidFont = (type.indexOf('CIDFontType') === -1); for (charCode in this.toUnicode) { - this.toFontChar[charCode] = this.toUnicode[charCode].charCodeAt(0); + unicodeCharCode = this.toUnicode[charCode].charCodeAt(0); + if (notCidFont) { + glyphName = (properties.differences[charCode] || + properties.defaultEncoding[charCode]); + unicodeCharCode = (GlyphsUnicode[glyphName] || unicodeCharCode); + } + this.toFontChar[charCode] = unicodeCharCode; } } this.loadedName = fontName.split('-')[0]; diff --git a/build/pdf.js b/build/pdf.js index 70675ec41..ebf25158d 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.423'; -PDFJS.build = '6d86c92'; +PDFJS.version = '1.0.425'; +PDFJS.build = 'c28839b'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it diff --git a/build/pdf.worker.js b/build/pdf.worker.js index bf67fc878..365a61739 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.423'; -PDFJS.build = '6d86c92'; +PDFJS.version = '1.0.425'; +PDFJS.build = 'c28839b'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -22061,7 +22061,7 @@ var Glyph = (function GlyphClosure() { */ var Font = (function FontClosure() { function Font(name, file, properties) { - var charCode; + var charCode, glyphName; this.name = name; this.loadedName = properties.loadedName; @@ -22162,13 +22162,20 @@ var Font = (function FontClosure() { } else if (isStandardFont) { this.toFontChar = []; for (charCode in properties.defaultEncoding) { - var glyphName = properties.differences[charCode] || - properties.defaultEncoding[charCode]; + glyphName = (properties.differences[charCode] || + properties.defaultEncoding[charCode]); this.toFontChar[charCode] = GlyphsUnicode[glyphName]; } } else { + var unicodeCharCode, notCidFont = (type.indexOf('CIDFontType') === -1); for (charCode in this.toUnicode) { - this.toFontChar[charCode] = this.toUnicode[charCode].charCodeAt(0); + unicodeCharCode = this.toUnicode[charCode].charCodeAt(0); + if (notCidFont) { + glyphName = (properties.differences[charCode] || + properties.defaultEncoding[charCode]); + unicodeCharCode = (GlyphsUnicode[glyphName] || unicodeCharCode); + } + this.toFontChar[charCode] = unicodeCharCode; } } this.loadedName = fontName.split('-')[0]; diff --git a/package.json b/package.json index 31f753d00..ac2b28b2a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.0.423", + "version": "1.0.425", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",