Browse Source

PDF.js version 1.2.79 - See mozilla/pdf.js@bb29e13307a813226e08db6db412b505ab9dc781

master v1.2.79
Pdf Bot 10 years ago
parent
commit
34341751e2
  1. 2
      bower.json
  2. 30
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 30
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

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

30
build/pdf.combined.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.2.77'; PDFJS.version = '1.2.79';
PDFJS.build = '9a830a7'; PDFJS.build = 'bb29e13';
(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
@ -25343,6 +25343,20 @@ var Font = (function FontClosure() {
tables.hhea.data[11] = 0xFF; tables.hhea.data[11] = 0xFF;
} }
// Extract some more font properties from the OpenType head and
// hhea tables; yMin and descent value are always negative.
var metricsOverride = {
unitsPerEm: int16(tables.head.data[18], tables.head.data[19]),
yMax: int16(tables.head.data[42], tables.head.data[43]),
yMin: int16(tables.head.data[38], tables.head.data[39]) - 0x10000,
ascent: int16(tables.hhea.data[4], tables.hhea.data[5]),
descent: int16(tables.hhea.data[6], tables.hhea.data[7]) - 0x10000
};
// PDF FontDescriptor metrics lie -- using data from actual font.
this.ascent = metricsOverride.ascent / metricsOverride.unitsPerEm;
this.descent = metricsOverride.descent / metricsOverride.unitsPerEm;
// The 'post' table has glyphs names. // The 'post' table has glyphs names.
if (tables.post) { if (tables.post) {
var valid = readPostScriptTable(tables.post, properties, numGlyphs); var valid = readPostScriptTable(tables.post, properties, numGlyphs);
@ -25509,20 +25523,10 @@ var Font = (function FontClosure() {
}; };
if (!tables['OS/2'] || !validateOS2Table(tables['OS/2'])) { if (!tables['OS/2'] || !validateOS2Table(tables['OS/2'])) {
// extract some more font properties from the OpenType head and
// hhea tables; yMin and descent value are always negative
var override = {
unitsPerEm: int16(tables.head.data[18], tables.head.data[19]),
yMax: int16(tables.head.data[42], tables.head.data[43]),
yMin: int16(tables.head.data[38], tables.head.data[39]) - 0x10000,
ascent: int16(tables.hhea.data[4], tables.hhea.data[5]),
descent: int16(tables.hhea.data[6], tables.hhea.data[7]) - 0x10000
};
tables['OS/2'] = { tables['OS/2'] = {
tag: 'OS/2', tag: 'OS/2',
data: createOS2Table(properties, newMapping.charCodeToGlyphId, data: createOS2Table(properties, newMapping.charCodeToGlyphId,
override) metricsOverride)
}; };
} }

4
build/pdf.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.2.77'; PDFJS.version = '1.2.79';
PDFJS.build = '9a830a7'; PDFJS.build = 'bb29e13';
(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

30
build/pdf.worker.js vendored

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.2.77'; PDFJS.version = '1.2.79';
PDFJS.build = '9a830a7'; PDFJS.build = 'bb29e13';
(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
@ -18763,6 +18763,20 @@ var Font = (function FontClosure() {
tables.hhea.data[11] = 0xFF; tables.hhea.data[11] = 0xFF;
} }
// Extract some more font properties from the OpenType head and
// hhea tables; yMin and descent value are always negative.
var metricsOverride = {
unitsPerEm: int16(tables.head.data[18], tables.head.data[19]),
yMax: int16(tables.head.data[42], tables.head.data[43]),
yMin: int16(tables.head.data[38], tables.head.data[39]) - 0x10000,
ascent: int16(tables.hhea.data[4], tables.hhea.data[5]),
descent: int16(tables.hhea.data[6], tables.hhea.data[7]) - 0x10000
};
// PDF FontDescriptor metrics lie -- using data from actual font.
this.ascent = metricsOverride.ascent / metricsOverride.unitsPerEm;
this.descent = metricsOverride.descent / metricsOverride.unitsPerEm;
// The 'post' table has glyphs names. // The 'post' table has glyphs names.
if (tables.post) { if (tables.post) {
var valid = readPostScriptTable(tables.post, properties, numGlyphs); var valid = readPostScriptTable(tables.post, properties, numGlyphs);
@ -18929,20 +18943,10 @@ var Font = (function FontClosure() {
}; };
if (!tables['OS/2'] || !validateOS2Table(tables['OS/2'])) { if (!tables['OS/2'] || !validateOS2Table(tables['OS/2'])) {
// extract some more font properties from the OpenType head and
// hhea tables; yMin and descent value are always negative
var override = {
unitsPerEm: int16(tables.head.data[18], tables.head.data[19]),
yMax: int16(tables.head.data[42], tables.head.data[43]),
yMin: int16(tables.head.data[38], tables.head.data[39]) - 0x10000,
ascent: int16(tables.hhea.data[4], tables.hhea.data[5]),
descent: int16(tables.hhea.data[6], tables.hhea.data[7]) - 0x10000
};
tables['OS/2'] = { tables['OS/2'] = {
tag: 'OS/2', tag: 'OS/2',
data: createOS2Table(properties, newMapping.charCodeToGlyphId, data: createOS2Table(properties, newMapping.charCodeToGlyphId,
override) metricsOverride)
}; };
} }

2
package.json

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