diff --git a/bower.json b/bower.json index 51e072e92..30fed8c76 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.136", + "version": "1.1.138", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 04937d56f..cd7c7b51d 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.136'; -PDFJS.build = 'd7aa95d'; +PDFJS.version = '1.1.138'; +PDFJS.build = '9098233'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -17907,16 +17907,23 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { // var x = pt[0]; // var y = pt[1]; + var charSpacing = 0; + if (textChunk.str.length > 0) { + // Apply char spacing only when there are chars. + // As a result there is only spacing between glyphs. + charSpacing = textState.charSpacing; + } + var tx = 0; var ty = 0; if (!font.vertical) { var w0 = glyphWidth * textState.fontMatrix[0]; - tx = (w0 * textState.fontSize + textState.charSpacing) * + tx = (w0 * textState.fontSize + charSpacing) * textState.textHScale; width += tx; } else { var w1 = glyphWidth * textState.fontMatrix[0]; - ty = w1 * textState.fontSize + textState.charSpacing; + ty = w1 * textState.fontSize + charSpacing; height += ty; } textState.translateTextMatrix(tx, ty); diff --git a/build/pdf.js b/build/pdf.js index 3ddfadb8e..be08f446d 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.136'; -PDFJS.build = 'd7aa95d'; +PDFJS.version = '1.1.138'; +PDFJS.build = '9098233'; (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 f86f8065a..473593986 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.136'; -PDFJS.build = 'd7aa95d'; +PDFJS.version = '1.1.138'; +PDFJS.build = '9098233'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -11554,16 +11554,23 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { // var x = pt[0]; // var y = pt[1]; + var charSpacing = 0; + if (textChunk.str.length > 0) { + // Apply char spacing only when there are chars. + // As a result there is only spacing between glyphs. + charSpacing = textState.charSpacing; + } + var tx = 0; var ty = 0; if (!font.vertical) { var w0 = glyphWidth * textState.fontMatrix[0]; - tx = (w0 * textState.fontSize + textState.charSpacing) * + tx = (w0 * textState.fontSize + charSpacing) * textState.textHScale; width += tx; } else { var w1 = glyphWidth * textState.fontMatrix[0]; - ty = w1 * textState.fontSize + textState.charSpacing; + ty = w1 * textState.fontSize + charSpacing; height += ty; } textState.translateTextMatrix(tx, ty); diff --git a/package.json b/package.json index 649abb06d..b72d22677 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.136", + "version": "1.1.138", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",