Browse Source

PDF.js version 1.3.54 - See mozilla/pdf.js@e180d01255a45529e48c279881285ba9c2485429

master v1.3.54
Pdf Bot 9 years ago
parent
commit
8a8af2dbca
  1. 2
      bower.json
  2. 19
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 19
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.3.52", "version": "1.3.54",
"main": [ "main": [
"build/pdf.js", "build/pdf.js",
"build/pdf.worker.js" "build/pdf.worker.js"

19
build/pdf.combined.js

@ -20,8 +20,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.3.52'; PDFJS.version = '1.3.54';
PDFJS.build = 'e93512f'; PDFJS.build = 'e180d01';
(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
@ -24573,11 +24573,15 @@ var Font = (function FontClosure() {
}; };
} }
function getRanges(glyphs) { function getRanges(glyphs, numGlyphs) {
// Array.sort() sorts by characters, not numerically, so convert to an // Array.sort() sorts by characters, not numerically, so convert to an
// array of characters. // array of characters.
var codes = []; var codes = [];
for (var charCode in glyphs) { for (var charCode in glyphs) {
// Remove an invalid glyph ID mappings to make OTS happy.
if (glyphs[charCode] >= numGlyphs) {
continue;
}
codes.push({ fontCharCode: charCode | 0, glyphId: glyphs[charCode] }); codes.push({ fontCharCode: charCode | 0, glyphId: glyphs[charCode] });
} }
codes.sort(function fontGetRangesSort(a, b) { codes.sort(function fontGetRangesSort(a, b) {
@ -24606,8 +24610,8 @@ var Font = (function FontClosure() {
return ranges; return ranges;
} }
function createCmapTable(glyphs) { function createCmapTable(glyphs, numGlyphs) {
var ranges = getRanges(glyphs); var ranges = getRanges(glyphs, numGlyphs);
var numTables = ranges[ranges.length - 1][1] > 0xFFFF ? 2 : 1; var numTables = ranges[ranges.length - 1][1] > 0xFFFF ? 2 : 1;
var cmap = '\x00\x00' + // version var cmap = '\x00\x00' + // version
string16(numTables) + // numTables string16(numTables) + // numTables
@ -26110,7 +26114,7 @@ var Font = (function FontClosure() {
this.toFontChar = newMapping.toFontChar; this.toFontChar = newMapping.toFontChar;
tables.cmap = { tables.cmap = {
tag: 'cmap', tag: 'cmap',
data: createCmapTable(newMapping.charCodeToGlyphId) data: createCmapTable(newMapping.charCodeToGlyphId, numGlyphs)
}; };
if (!tables['OS/2'] || !validateOS2Table(tables['OS/2'])) { if (!tables['OS/2'] || !validateOS2Table(tables['OS/2'])) {
@ -26248,7 +26252,8 @@ var Font = (function FontClosure() {
builder.addTable('OS/2', createOS2Table(properties, builder.addTable('OS/2', createOS2Table(properties,
newMapping.charCodeToGlyphId)); newMapping.charCodeToGlyphId));
// Character to glyphs mapping // Character to glyphs mapping
builder.addTable('cmap', createCmapTable(newMapping.charCodeToGlyphId)); builder.addTable('cmap', createCmapTable(newMapping.charCodeToGlyphId,
numGlyphs));
// Font header // Font header
builder.addTable('head', builder.addTable('head',
'\x00\x01\x00\x00' + // Version number '\x00\x01\x00\x00' + // Version number

4
build/pdf.js

@ -20,8 +20,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.3.52'; PDFJS.version = '1.3.54';
PDFJS.build = 'e93512f'; PDFJS.build = 'e180d01';
(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

19
build/pdf.worker.js vendored

@ -20,8 +20,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.3.52'; PDFJS.version = '1.3.54';
PDFJS.build = 'e93512f'; PDFJS.build = 'e180d01';
(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
@ -17462,11 +17462,15 @@ var Font = (function FontClosure() {
}; };
} }
function getRanges(glyphs) { function getRanges(glyphs, numGlyphs) {
// Array.sort() sorts by characters, not numerically, so convert to an // Array.sort() sorts by characters, not numerically, so convert to an
// array of characters. // array of characters.
var codes = []; var codes = [];
for (var charCode in glyphs) { for (var charCode in glyphs) {
// Remove an invalid glyph ID mappings to make OTS happy.
if (glyphs[charCode] >= numGlyphs) {
continue;
}
codes.push({ fontCharCode: charCode | 0, glyphId: glyphs[charCode] }); codes.push({ fontCharCode: charCode | 0, glyphId: glyphs[charCode] });
} }
codes.sort(function fontGetRangesSort(a, b) { codes.sort(function fontGetRangesSort(a, b) {
@ -17495,8 +17499,8 @@ var Font = (function FontClosure() {
return ranges; return ranges;
} }
function createCmapTable(glyphs) { function createCmapTable(glyphs, numGlyphs) {
var ranges = getRanges(glyphs); var ranges = getRanges(glyphs, numGlyphs);
var numTables = ranges[ranges.length - 1][1] > 0xFFFF ? 2 : 1; var numTables = ranges[ranges.length - 1][1] > 0xFFFF ? 2 : 1;
var cmap = '\x00\x00' + // version var cmap = '\x00\x00' + // version
string16(numTables) + // numTables string16(numTables) + // numTables
@ -18999,7 +19003,7 @@ var Font = (function FontClosure() {
this.toFontChar = newMapping.toFontChar; this.toFontChar = newMapping.toFontChar;
tables.cmap = { tables.cmap = {
tag: 'cmap', tag: 'cmap',
data: createCmapTable(newMapping.charCodeToGlyphId) data: createCmapTable(newMapping.charCodeToGlyphId, numGlyphs)
}; };
if (!tables['OS/2'] || !validateOS2Table(tables['OS/2'])) { if (!tables['OS/2'] || !validateOS2Table(tables['OS/2'])) {
@ -19137,7 +19141,8 @@ var Font = (function FontClosure() {
builder.addTable('OS/2', createOS2Table(properties, builder.addTable('OS/2', createOS2Table(properties,
newMapping.charCodeToGlyphId)); newMapping.charCodeToGlyphId));
// Character to glyphs mapping // Character to glyphs mapping
builder.addTable('cmap', createCmapTable(newMapping.charCodeToGlyphId)); builder.addTable('cmap', createCmapTable(newMapping.charCodeToGlyphId,
numGlyphs));
// Font header // Font header
builder.addTable('head', builder.addTable('head',
'\x00\x01\x00\x00' + // Version number '\x00\x01\x00\x00' + // Version number

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.3.52", "version": "1.3.54",
"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