From b02e1904d79cb4e596eaa9f3d67eb3af67932ca5 Mon Sep 17 00:00:00 2001 From: Pdf Bot Date: Wed, 13 May 2015 20:11:24 +0100 Subject: [PATCH] PDF.js version 1.1.126 --- bower.json | 2 +- build/pdf.combined.js | 17 +++++++++++++++-- build/pdf.js | 4 ++-- build/pdf.worker.js | 17 +++++++++++++++-- package.json | 2 +- 5 files changed, 34 insertions(+), 8 deletions(-) diff --git a/bower.json b/bower.json index aac3b7094..76faac391 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.124", + "version": "1.1.126", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index e294670a7..0275c34e8 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.1.124'; -PDFJS.build = 'd87c1ec'; +PDFJS.version = '1.1.126'; +PDFJS.build = 'b34366d'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -17834,6 +17834,17 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { var tsm = [textState.fontSize * textState.textHScale, 0, 0, textState.fontSize, 0, textState.textRise]; + + if (font.isType3Font && + textState.fontMatrix !== FONT_IDENTITY_MATRIX && + textState.fontSize === 1) { + var glyphHeight = font.bbox[3] - font.bbox[1]; + if (glyphHeight > 0) { + glyphHeight = glyphHeight * textState.fontMatrix[3]; + tsm[3] *= glyphHeight; + } + } + var trm = textChunk.transform = Util.transform(textState.ctm, Util.transform(textState.textMatrix, tsm)); if (!font.vertical) { @@ -18517,6 +18528,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { // is a tagged pdf. Create a barbebones one to get by. descriptor = new Dict(null); descriptor.set('FontName', Name.get(type)); + descriptor.set('FontBBox', dict.get('FontBBox')); } else { // Before PDF 1.5 if the font was one of the base 14 fonts, having a // FontDescriptor was not required. @@ -22936,6 +22948,7 @@ var Font = (function FontClosure() { this.ascent = properties.ascent / PDF_GLYPH_SPACE_UNITS; this.descent = properties.descent / PDF_GLYPH_SPACE_UNITS; this.fontMatrix = properties.fontMatrix; + this.bbox = properties.bbox; this.toUnicode = properties.toUnicode = this.buildToUnicode(properties); diff --git a/build/pdf.js b/build/pdf.js index 94f6f3546..a1f9738d4 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.1.124'; -PDFJS.build = 'd87c1ec'; +PDFJS.version = '1.1.126'; +PDFJS.build = 'b34366d'; (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 9d5209fd9..c78af7d4a 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') { (typeof window !== 'undefined' ? window : this).PDFJS = {}; } -PDFJS.version = '1.1.124'; -PDFJS.build = 'd87c1ec'; +PDFJS.version = '1.1.126'; +PDFJS.build = 'b34366d'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -11481,6 +11481,17 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { var tsm = [textState.fontSize * textState.textHScale, 0, 0, textState.fontSize, 0, textState.textRise]; + + if (font.isType3Font && + textState.fontMatrix !== FONT_IDENTITY_MATRIX && + textState.fontSize === 1) { + var glyphHeight = font.bbox[3] - font.bbox[1]; + if (glyphHeight > 0) { + glyphHeight = glyphHeight * textState.fontMatrix[3]; + tsm[3] *= glyphHeight; + } + } + var trm = textChunk.transform = Util.transform(textState.ctm, Util.transform(textState.textMatrix, tsm)); if (!font.vertical) { @@ -12164,6 +12175,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { // is a tagged pdf. Create a barbebones one to get by. descriptor = new Dict(null); descriptor.set('FontName', Name.get(type)); + descriptor.set('FontBBox', dict.get('FontBBox')); } else { // Before PDF 1.5 if the font was one of the base 14 fonts, having a // FontDescriptor was not required. @@ -16583,6 +16595,7 @@ var Font = (function FontClosure() { this.ascent = properties.ascent / PDF_GLYPH_SPACE_UNITS; this.descent = properties.descent / PDF_GLYPH_SPACE_UNITS; this.fontMatrix = properties.fontMatrix; + this.bbox = properties.bbox; this.toUnicode = properties.toUnicode = this.buildToUnicode(properties); diff --git a/package.json b/package.json index 4a7bc66b5..4175a47c0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.124", + "version": "1.1.126", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",