From 278029730e49a5668b2c757a60ec954b56dc1c26 Mon Sep 17 00:00:00 2001 From: Pdf Bot Date: Tue, 25 Aug 2015 17:51:00 +0100 Subject: [PATCH] PDF.js version 1.1.403 --- bower.json | 2 +- build/pdf.combined.js | 14 +++++++++----- build/pdf.js | 4 ++-- build/pdf.worker.js | 14 +++++++++----- package.json | 2 +- 5 files changed, 22 insertions(+), 14 deletions(-) diff --git a/bower.json b/bower.json index d4fa96dd9..e5f8faf52 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.401", + "version": "1.1.403", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index e539e8764..835f96c78 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.401'; -PDFJS.build = '5dcd409'; +PDFJS.version = '1.1.403'; +PDFJS.build = '88e0326'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -25064,9 +25064,10 @@ var Font = (function FontClosure() { if (!glyphName) { continue; } - var unicodeOrCharCode; + var unicodeOrCharCode, isUnicode = false; if (cmapPlatformId === 3 && cmapEncodingId === 1) { unicodeOrCharCode = GlyphsUnicode[glyphName]; + isUnicode = true; } else if (cmapPlatformId === 1 && cmapEncodingId === 0) { // TODO: the encoding needs to be updated with mac os table. unicodeOrCharCode = Encodings.MacRomanEncoding.indexOf(glyphName); @@ -25074,8 +25075,11 @@ var Font = (function FontClosure() { var found = false; for (i = 0; i < cmapMappingsLength; ++i) { - if (cmapMappings[i].charCode === unicodeOrCharCode && - hasGlyph(cmapMappings[i].glyphId, unicodeOrCharCode, -1)) { + if (cmapMappings[i].charCode !== unicodeOrCharCode) { + continue; + } + var code = isUnicode ? charCode : unicodeOrCharCode; + if (hasGlyph(cmapMappings[i].glyphId, code, -1)) { charCodeToGlyphId[charCode] = cmapMappings[i].glyphId; found = true; break; diff --git a/build/pdf.js b/build/pdf.js index db2d8ca53..928cc1bbf 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.401'; -PDFJS.build = '5dcd409'; +PDFJS.version = '1.1.403'; +PDFJS.build = '88e0326'; (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 7843cbc02..3c5fe5824 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.401'; -PDFJS.build = '5dcd409'; +PDFJS.version = '1.1.403'; +PDFJS.build = '88e0326'; (function pdfjsWrapper() { // Use strict in our context only - users might not want it @@ -18610,9 +18610,10 @@ var Font = (function FontClosure() { if (!glyphName) { continue; } - var unicodeOrCharCode; + var unicodeOrCharCode, isUnicode = false; if (cmapPlatformId === 3 && cmapEncodingId === 1) { unicodeOrCharCode = GlyphsUnicode[glyphName]; + isUnicode = true; } else if (cmapPlatformId === 1 && cmapEncodingId === 0) { // TODO: the encoding needs to be updated with mac os table. unicodeOrCharCode = Encodings.MacRomanEncoding.indexOf(glyphName); @@ -18620,8 +18621,11 @@ var Font = (function FontClosure() { var found = false; for (i = 0; i < cmapMappingsLength; ++i) { - if (cmapMappings[i].charCode === unicodeOrCharCode && - hasGlyph(cmapMappings[i].glyphId, unicodeOrCharCode, -1)) { + if (cmapMappings[i].charCode !== unicodeOrCharCode) { + continue; + } + var code = isUnicode ? charCode : unicodeOrCharCode; + if (hasGlyph(cmapMappings[i].glyphId, code, -1)) { charCodeToGlyphId[charCode] = cmapMappings[i].glyphId; found = true; break; diff --git a/package.json b/package.json index 8745a8178..e26cb1cea 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.1.401", + "version": "1.1.403", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [ "Mozilla",