Browse Source

PDF.js version 1.0.448

master v1.0.448
Yury Delendik 10 years ago
parent
commit
a040146ff5
  1. 2
      bower.json
  2. 24
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 24
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.0.444", "version": "1.0.448",
"keywords": [ "keywords": [
"Mozilla", "Mozilla",
"pdf", "pdf",

24
build/pdf.combined.js

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.444'; PDFJS.version = '1.0.448';
PDFJS.build = 'a20c390'; PDFJS.build = 'b5e5de0';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
@ -27210,6 +27210,7 @@ var Font = (function FontClosure() {
var toUnicode = properties.toUnicode; var toUnicode = properties.toUnicode;
var isSymbolic = !!(properties.flags & FontFlags.Symbolic); var isSymbolic = !!(properties.flags & FontFlags.Symbolic);
var isIdentityUnicode = properties.isIdentityUnicode; var isIdentityUnicode = properties.isIdentityUnicode;
var isCidFontType2 = (properties.type === 'CIDFontType2');
var newMap = Object.create(null); var newMap = Object.create(null);
var toFontChar = []; var toFontChar = [];
var usedFontCharCodes = []; var usedFontCharCodes = [];
@ -27220,12 +27221,18 @@ var Font = (function FontClosure() {
var fontCharCode = originalCharCode; var fontCharCode = originalCharCode;
// First try to map the value to a unicode position if a non identity map // First try to map the value to a unicode position if a non identity map
// was created. // was created.
if (!isIdentityUnicode && originalCharCode in toUnicode) { if (!isIdentityUnicode) {
if (toUnicode[originalCharCode] !== undefined) {
var unicode = toUnicode[fontCharCode]; var unicode = toUnicode[fontCharCode];
// TODO: Try to map ligatures to the correct spot. // TODO: Try to map ligatures to the correct spot.
if (unicode.length === 1) { if (unicode.length === 1) {
fontCharCode = unicode.charCodeAt(0); fontCharCode = unicode.charCodeAt(0);
} }
} else if (isCidFontType2) {
// For CIDFontType2, move characters not present in toUnicode
// to the private use area (fixes bug 1028735 and issue 4881).
fontCharCode = nextAvailableFontCharCode;
}
} }
// Try to move control characters, special characters and already mapped // Try to move control characters, special characters and already mapped
// characters to the private use area since they will not be drawn by // characters to the private use area since they will not be drawn by
@ -27233,7 +27240,7 @@ var Font = (function FontClosure() {
// font was symbolic and there is only an identity unicode map since the // font was symbolic and there is only an identity unicode map since the
// characters probably aren't in the correct position (fixes an issue // characters probably aren't in the correct position (fixes an issue
// with firefox and thuluthfont). // with firefox and thuluthfont).
if ((fontCharCode in usedFontCharCodes || if ((usedFontCharCodes[fontCharCode] !== undefined ||
fontCharCode <= 0x1f || // Control chars fontCharCode <= 0x1f || // Control chars
fontCharCode === 0x7F || // Control char fontCharCode === 0x7F || // Control char
fontCharCode === 0xAD || // Soft hyphen fontCharCode === 0xAD || // Soft hyphen
@ -27251,7 +27258,7 @@ var Font = (function FontClosure() {
nextAvailableFontCharCode = fontCharCode + 1; nextAvailableFontCharCode = fontCharCode + 1;
} }
} while (fontCharCode in usedFontCharCodes && } while (usedFontCharCodes[fontCharCode] !== undefined &&
nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END); nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END);
} }
@ -28625,8 +28632,9 @@ var Font = (function FontClosure() {
} }
var charCodeToGlyphId = [], charCode; var charCodeToGlyphId = [], charCode;
if (properties.type == 'CIDFontType2') { if (properties.type === 'CIDFontType2') {
var cidToGidMap = properties.cidToGidMap || []; var cidToGidMap = properties.cidToGidMap || [];
var cidToGidMapLength = cidToGidMap.length;
var cMap = properties.cMap.map; var cMap = properties.cMap.map;
for (charCode in cMap) { for (charCode in cMap) {
charCode |= 0; charCode |= 0;
@ -28634,9 +28642,9 @@ var Font = (function FontClosure() {
assert(cid.length === 1, 'Max size of CID is 65,535'); assert(cid.length === 1, 'Max size of CID is 65,535');
cid = cid.charCodeAt(0); cid = cid.charCodeAt(0);
var glyphId = -1; var glyphId = -1;
if (cidToGidMap.length === 0) { if (cidToGidMapLength === 0) {
glyphId = charCode; glyphId = charCode;
} else if (cid in cidToGidMap) { } else if (cidToGidMap[cid] !== undefined) {
glyphId = cidToGidMap[cid]; glyphId = cidToGidMap[cid];
} }
if (glyphId >= 0 && glyphId < numGlyphs) { if (glyphId >= 0 && glyphId < numGlyphs) {

4
build/pdf.js

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.444'; PDFJS.version = '1.0.448';
PDFJS.build = 'a20c390'; PDFJS.build = 'b5e5de0';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it

24
build/pdf.worker.js vendored

@ -21,8 +21,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.444'; PDFJS.version = '1.0.448';
PDFJS.build = 'a20c390'; PDFJS.build = 'b5e5de0';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
@ -22364,6 +22364,7 @@ var Font = (function FontClosure() {
var toUnicode = properties.toUnicode; var toUnicode = properties.toUnicode;
var isSymbolic = !!(properties.flags & FontFlags.Symbolic); var isSymbolic = !!(properties.flags & FontFlags.Symbolic);
var isIdentityUnicode = properties.isIdentityUnicode; var isIdentityUnicode = properties.isIdentityUnicode;
var isCidFontType2 = (properties.type === 'CIDFontType2');
var newMap = Object.create(null); var newMap = Object.create(null);
var toFontChar = []; var toFontChar = [];
var usedFontCharCodes = []; var usedFontCharCodes = [];
@ -22374,12 +22375,18 @@ var Font = (function FontClosure() {
var fontCharCode = originalCharCode; var fontCharCode = originalCharCode;
// First try to map the value to a unicode position if a non identity map // First try to map the value to a unicode position if a non identity map
// was created. // was created.
if (!isIdentityUnicode && originalCharCode in toUnicode) { if (!isIdentityUnicode) {
if (toUnicode[originalCharCode] !== undefined) {
var unicode = toUnicode[fontCharCode]; var unicode = toUnicode[fontCharCode];
// TODO: Try to map ligatures to the correct spot. // TODO: Try to map ligatures to the correct spot.
if (unicode.length === 1) { if (unicode.length === 1) {
fontCharCode = unicode.charCodeAt(0); fontCharCode = unicode.charCodeAt(0);
} }
} else if (isCidFontType2) {
// For CIDFontType2, move characters not present in toUnicode
// to the private use area (fixes bug 1028735 and issue 4881).
fontCharCode = nextAvailableFontCharCode;
}
} }
// Try to move control characters, special characters and already mapped // Try to move control characters, special characters and already mapped
// characters to the private use area since they will not be drawn by // characters to the private use area since they will not be drawn by
@ -22387,7 +22394,7 @@ var Font = (function FontClosure() {
// font was symbolic and there is only an identity unicode map since the // font was symbolic and there is only an identity unicode map since the
// characters probably aren't in the correct position (fixes an issue // characters probably aren't in the correct position (fixes an issue
// with firefox and thuluthfont). // with firefox and thuluthfont).
if ((fontCharCode in usedFontCharCodes || if ((usedFontCharCodes[fontCharCode] !== undefined ||
fontCharCode <= 0x1f || // Control chars fontCharCode <= 0x1f || // Control chars
fontCharCode === 0x7F || // Control char fontCharCode === 0x7F || // Control char
fontCharCode === 0xAD || // Soft hyphen fontCharCode === 0xAD || // Soft hyphen
@ -22405,7 +22412,7 @@ var Font = (function FontClosure() {
nextAvailableFontCharCode = fontCharCode + 1; nextAvailableFontCharCode = fontCharCode + 1;
} }
} while (fontCharCode in usedFontCharCodes && } while (usedFontCharCodes[fontCharCode] !== undefined &&
nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END); nextAvailableFontCharCode <= PRIVATE_USE_OFFSET_END);
} }
@ -23779,8 +23786,9 @@ var Font = (function FontClosure() {
} }
var charCodeToGlyphId = [], charCode; var charCodeToGlyphId = [], charCode;
if (properties.type == 'CIDFontType2') { if (properties.type === 'CIDFontType2') {
var cidToGidMap = properties.cidToGidMap || []; var cidToGidMap = properties.cidToGidMap || [];
var cidToGidMapLength = cidToGidMap.length;
var cMap = properties.cMap.map; var cMap = properties.cMap.map;
for (charCode in cMap) { for (charCode in cMap) {
charCode |= 0; charCode |= 0;
@ -23788,9 +23796,9 @@ var Font = (function FontClosure() {
assert(cid.length === 1, 'Max size of CID is 65,535'); assert(cid.length === 1, 'Max size of CID is 65,535');
cid = cid.charCodeAt(0); cid = cid.charCodeAt(0);
var glyphId = -1; var glyphId = -1;
if (cidToGidMap.length === 0) { if (cidToGidMapLength === 0) {
glyphId = charCode; glyphId = charCode;
} else if (cid in cidToGidMap) { } else if (cidToGidMap[cid] !== undefined) {
glyphId = cidToGidMap[cid]; glyphId = cidToGidMap[cid];
} }
if (glyphId >= 0 && glyphId < numGlyphs) { if (glyphId >= 0 && glyphId < numGlyphs) {

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.0.444", "version": "1.0.448",
"description": "Generic build of Mozilla's PDF.js library.", "description": "Generic build of Mozilla's PDF.js library.",
"keywords": [ "keywords": [
"Mozilla", "Mozilla",

Loading…
Cancel
Save