pdfjs-dist 2.1.266 → 2.2.228
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of pdfjs-dist might be problematic. Click here for more details.
- package/CODE_OF_CONDUCT.md +15 -0
- package/bower.json +1 -1
- package/build/pdf.js +3349 -2324
- package/build/pdf.js.map +1 -1
- package/build/pdf.min.js +1 -1
- package/build/pdf.worker.js +2804 -1975
- package/build/pdf.worker.js.map +1 -1
- package/build/pdf.worker.min.js +1 -1
- package/image_decoders/pdf.image_decoders.js +431 -511
- package/image_decoders/pdf.image_decoders.js.map +1 -1
- package/image_decoders/pdf.image_decoders.min.js +1 -1
- package/lib/core/annotation.js +294 -224
- package/lib/core/arithmetic_decoder.js +1 -1
- package/lib/core/bidi.js +1 -1
- package/lib/core/ccitt.js +1 -1
- package/lib/core/ccitt_stream.js +1 -1
- package/lib/core/cff_parser.js +61 -12
- package/lib/core/charsets.js +1 -1
- package/lib/core/chunked_stream.js +24 -14
- package/lib/core/cmap.js +17 -13
- package/lib/core/colorspace.js +1 -1
- package/lib/core/core_utils.js +147 -0
- package/lib/core/crypto.js +1 -1
- package/lib/core/document.js +47 -40
- package/lib/core/encodings.js +1 -1
- package/lib/core/evaluator.js +346 -279
- package/lib/core/font_renderer.js +1 -1
- package/lib/core/fonts.js +23 -11
- package/lib/core/function.js +1 -1
- package/lib/core/glyphlist.js +2 -2
- package/lib/core/image.js +2 -2
- package/lib/core/image_utils.js +111 -0
- package/lib/core/jbig2.js +1 -1
- package/lib/core/jbig2_stream.js +1 -1
- package/lib/core/jpeg_stream.js +1 -1
- package/lib/core/jpg.js +2 -1
- package/lib/core/jpx.js +1 -1
- package/lib/core/jpx_stream.js +1 -1
- package/lib/core/metrics.js +13 -13
- package/lib/core/murmurhash3.js +37 -33
- package/lib/core/obj.js +245 -41
- package/lib/core/operator_list.js +43 -32
- package/lib/core/parser.js +228 -133
- package/lib/core/pattern.js +4 -2
- package/lib/core/pdf_manager.js +17 -15
- package/lib/core/primitives.js +40 -6
- package/lib/core/ps_parser.js +1 -1
- package/lib/core/standard_fonts.js +9 -9
- package/lib/core/stream.js +1 -1
- package/lib/core/type1_parser.js +1 -1
- package/lib/core/unicode.js +2 -2
- package/lib/core/worker.js +54 -171
- package/lib/core/worker_stream.js +277 -0
- package/lib/display/annotation_layer.js +112 -33
- package/lib/display/api.js +211 -123
- package/lib/display/api_compatibility.js +1 -1
- package/lib/display/canvas.js +40 -19
- package/lib/display/content_disposition.js +1 -1
- package/lib/display/display_utils.js +747 -0
- package/lib/display/fetch_stream.js +19 -12
- package/lib/display/font_loader.js +11 -8
- package/lib/display/metadata.js +1 -1
- package/lib/display/network.js +563 -521
- package/lib/display/network_utils.js +1 -1
- package/lib/display/node_stream.js +21 -12
- package/lib/display/pattern_helper.js +24 -25
- package/lib/display/svg.js +1068 -565
- package/lib/display/text_layer.js +24 -14
- package/lib/display/transport_stream.js +192 -70
- package/lib/display/webgl.js +1 -1
- package/lib/display/worker_options.js +1 -1
- package/lib/display/xml_parser.js +1 -1
- package/lib/examples/node/domstubs.js +4 -1
- package/lib/pdf.js +20 -15
- package/lib/pdf.worker.js +3 -3
- package/lib/shared/compatibility.js +6 -6
- package/lib/shared/global_scope.js +1 -1
- package/lib/shared/is_node.js +2 -2
- package/lib/shared/message_handler.js +7 -7
- package/lib/shared/streams_polyfill.js +1 -1
- package/lib/shared/url_polyfill.js +1 -1
- package/lib/shared/util.js +13 -125
- package/lib/test/unit/annotation_spec.js +278 -93
- package/lib/test/unit/api_spec.js +198 -188
- package/lib/test/unit/bidi_spec.js +1 -1
- package/lib/test/unit/cff_parser_spec.js +15 -1
- package/lib/test/unit/clitests_helper.js +3 -3
- package/lib/test/unit/cmap_spec.js +20 -20
- package/lib/test/unit/colorspace_spec.js +17 -12
- package/lib/test/unit/core_utils_spec.js +191 -0
- package/lib/test/unit/crypto_spec.js +1 -1
- package/lib/test/unit/custom_spec.js +8 -8
- package/lib/test/unit/display_svg_spec.js +8 -8
- package/lib/test/unit/display_utils_spec.js +273 -0
- package/lib/test/unit/document_spec.js +7 -12
- package/lib/test/unit/encodings_spec.js +5 -5
- package/lib/test/unit/evaluator_spec.js +8 -10
- package/lib/test/unit/fetch_stream_spec.js +109 -0
- package/lib/test/unit/function_spec.js +1 -1
- package/lib/test/unit/jasmine-boot.js +4 -4
- package/lib/test/unit/message_handler_spec.js +1 -1
- package/lib/test/unit/metadata_spec.js +1 -1
- package/lib/test/unit/murmurhash3_spec.js +1 -1
- package/lib/test/unit/network_spec.js +5 -55
- package/lib/test/unit/network_utils_spec.js +51 -1
- package/lib/test/unit/node_stream_spec.js +8 -8
- package/lib/test/unit/parser_spec.js +150 -86
- package/lib/test/unit/pdf_find_controller_spec.js +1 -1
- package/lib/test/unit/pdf_find_utils_spec.js +1 -1
- package/lib/test/unit/pdf_history_spec.js +1 -1
- package/lib/test/unit/primitives_spec.js +30 -17
- package/lib/test/unit/stream_spec.js +1 -1
- package/lib/test/unit/test_utils.js +197 -43
- package/lib/test/unit/testreporter.js +1 -1
- package/lib/test/unit/type1_parser_spec.js +1 -1
- package/lib/test/unit/ui_utils_spec.js +20 -20
- package/lib/test/unit/unicode_spec.js +5 -5
- package/lib/test/unit/util_spec.js +1 -164
- package/lib/web/annotation_layer_builder.js +1 -1
- package/lib/web/app.js +104 -60
- package/lib/web/app_options.js +45 -37
- package/lib/web/base_viewer.js +7 -7
- package/lib/web/chromecom.js +8 -8
- package/lib/web/debugger.js +7 -7
- package/lib/web/download_manager.js +3 -2
- package/lib/web/firefox_print_service.js +4 -2
- package/lib/web/firefoxcom.js +50 -19
- package/lib/web/genericcom.js +8 -8
- package/lib/web/genericl10n.js +10 -10
- package/lib/web/grab_to_pan.js +3 -1
- package/lib/web/interfaces.js +13 -13
- package/lib/web/overlay_manager.js +10 -10
- package/lib/web/password_prompt.js +2 -2
- package/lib/web/pdf_attachment_viewer.js +1 -1
- package/lib/web/pdf_cursor_tools.js +1 -1
- package/lib/web/pdf_document_properties.js +188 -119
- package/lib/web/pdf_find_bar.js +1 -1
- package/lib/web/pdf_find_controller.js +3 -3
- package/lib/web/pdf_find_utils.js +1 -1
- package/lib/web/pdf_history.js +1 -1
- package/lib/web/pdf_link_service.js +2 -2
- package/lib/web/pdf_outline_viewer.js +53 -28
- package/lib/web/pdf_page_view.js +9 -18
- package/lib/web/pdf_presentation_mode.js +1 -1
- package/lib/web/pdf_print_service.js +5 -3
- package/lib/web/pdf_rendering_queue.js +4 -7
- package/lib/web/pdf_sidebar.js +24 -17
- package/lib/web/pdf_sidebar_resizer.js +1 -1
- package/lib/web/pdf_single_page_viewer.js +1 -1
- package/lib/web/pdf_thumbnail_view.js +2 -2
- package/lib/web/pdf_thumbnail_viewer.js +3 -3
- package/lib/web/pdf_viewer.component.js +3 -3
- package/lib/web/pdf_viewer.js +3 -3
- package/lib/web/preferences.js +30 -30
- package/lib/web/secondary_toolbar.js +1 -1
- package/lib/web/text_layer_builder.js +23 -45
- package/lib/web/toolbar.js +1 -1
- package/lib/web/ui_utils.js +14 -14
- package/lib/web/view_history.js +15 -15
- package/lib/web/viewer_compatibility.js +1 -1
- package/package.json +1 -1
- package/web/pdf_viewer.css +21 -10
- package/web/pdf_viewer.js +126 -194
- package/web/pdf_viewer.js.map +1 -1
- package/lib/display/dom_utils.js +0 -494
- package/lib/test/unit/dom_utils_spec.js +0 -89
package/lib/core/pdf_manager.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* @licstart The following is the entire license notice for the
|
3
3
|
* Javascript code in this page
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2019 Mozilla Foundation
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
* you may not use this file except in compliance with the License.
|
@@ -32,11 +32,13 @@ var _util = require("../shared/util");
|
|
32
32
|
|
33
33
|
var _chunked_stream = require("./chunked_stream");
|
34
34
|
|
35
|
+
var _core_utils = require("./core_utils");
|
36
|
+
|
35
37
|
var _document = require("./document");
|
36
38
|
|
37
39
|
var _stream = require("./stream");
|
38
40
|
|
39
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
41
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
40
42
|
|
41
43
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
42
44
|
|
@@ -44,12 +46,12 @@ function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) ===
|
|
44
46
|
|
45
47
|
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
46
48
|
|
49
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
50
|
+
|
47
51
|
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
48
52
|
|
49
53
|
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
50
54
|
|
51
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
52
|
-
|
53
55
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
|
54
56
|
|
55
57
|
function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
|
@@ -111,8 +113,8 @@ function () {
|
|
111
113
|
value: function () {
|
112
114
|
var _ensure = _asyncToGenerator(
|
113
115
|
/*#__PURE__*/
|
114
|
-
_regenerator
|
115
|
-
return _regenerator
|
116
|
+
_regenerator["default"].mark(function _callee(obj, prop, args) {
|
117
|
+
return _regenerator["default"].wrap(function _callee$(_context) {
|
116
118
|
while (1) {
|
117
119
|
switch (_context.prev = _context.next) {
|
118
120
|
case 0:
|
@@ -123,7 +125,7 @@ function () {
|
|
123
125
|
return _context.stop();
|
124
126
|
}
|
125
127
|
}
|
126
|
-
}, _callee
|
128
|
+
}, _callee);
|
127
129
|
}));
|
128
130
|
|
129
131
|
function ensure(_x, _x2, _x3) {
|
@@ -205,7 +207,7 @@ function (_BasePdfManager) {
|
|
205
207
|
_this._docBaseUrl = docBaseUrl;
|
206
208
|
_this.evaluatorOptions = evaluatorOptions;
|
207
209
|
var stream = new _stream.Stream(data);
|
208
|
-
_this.pdfDocument = new _document.PDFDocument(_assertThisInitialized(
|
210
|
+
_this.pdfDocument = new _document.PDFDocument(_assertThisInitialized(_this), stream);
|
209
211
|
_this._loadedStreamPromise = Promise.resolve(stream);
|
210
212
|
return _this;
|
211
213
|
}
|
@@ -215,9 +217,9 @@ function (_BasePdfManager) {
|
|
215
217
|
value: function () {
|
216
218
|
var _ensure2 = _asyncToGenerator(
|
217
219
|
/*#__PURE__*/
|
218
|
-
_regenerator
|
220
|
+
_regenerator["default"].mark(function _callee2(obj, prop, args) {
|
219
221
|
var value;
|
220
|
-
return _regenerator
|
222
|
+
return _regenerator["default"].wrap(function _callee2$(_context2) {
|
221
223
|
while (1) {
|
222
224
|
switch (_context2.prev = _context2.next) {
|
223
225
|
case 0:
|
@@ -238,7 +240,7 @@ function (_BasePdfManager) {
|
|
238
240
|
return _context2.stop();
|
239
241
|
}
|
240
242
|
}
|
241
|
-
}, _callee2
|
243
|
+
}, _callee2);
|
242
244
|
}));
|
243
245
|
|
244
246
|
function ensure(_x4, _x5, _x6) {
|
@@ -292,7 +294,7 @@ function (_BasePdfManager2) {
|
|
292
294
|
disableAutoFetch: args.disableAutoFetch,
|
293
295
|
rangeChunkSize: args.rangeChunkSize
|
294
296
|
});
|
295
|
-
_this2.pdfDocument = new _document.PDFDocument(_assertThisInitialized(
|
297
|
+
_this2.pdfDocument = new _document.PDFDocument(_assertThisInitialized(_this2), _this2.streamManager.getStream());
|
296
298
|
return _this2;
|
297
299
|
}
|
298
300
|
|
@@ -301,9 +303,9 @@ function (_BasePdfManager2) {
|
|
301
303
|
value: function () {
|
302
304
|
var _ensure3 = _asyncToGenerator(
|
303
305
|
/*#__PURE__*/
|
304
|
-
_regenerator
|
306
|
+
_regenerator["default"].mark(function _callee3(obj, prop, args) {
|
305
307
|
var value;
|
306
|
-
return _regenerator
|
308
|
+
return _regenerator["default"].wrap(function _callee3$(_context3) {
|
307
309
|
while (1) {
|
308
310
|
switch (_context3.prev = _context3.next) {
|
309
311
|
case 0:
|
@@ -324,7 +326,7 @@ function (_BasePdfManager2) {
|
|
324
326
|
_context3.prev = 7;
|
325
327
|
_context3.t0 = _context3["catch"](0);
|
326
328
|
|
327
|
-
if (_context3.t0 instanceof
|
329
|
+
if (_context3.t0 instanceof _core_utils.MissingDataException) {
|
328
330
|
_context3.next = 11;
|
329
331
|
break;
|
330
332
|
}
|
package/lib/core/primitives.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* @licstart The following is the entire license notice for the
|
3
3
|
* Javascript code in this page
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2019 Mozilla Foundation
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
* you may not use this file except in compliance with the License.
|
@@ -24,6 +24,7 @@
|
|
24
24
|
Object.defineProperty(exports, "__esModule", {
|
25
25
|
value: true
|
26
26
|
});
|
27
|
+
exports.clearPrimitiveCaches = clearPrimitiveCaches;
|
27
28
|
exports.isEOF = isEOF;
|
28
29
|
exports.isCmd = isCmd;
|
29
30
|
exports.isDict = isDict;
|
@@ -33,42 +34,54 @@ exports.isRefsEqual = isRefsEqual;
|
|
33
34
|
exports.isStream = isStream;
|
34
35
|
exports.RefSetCache = exports.RefSet = exports.Ref = exports.Name = exports.Dict = exports.Cmd = exports.EOF = void 0;
|
35
36
|
|
37
|
+
var _util = require("../shared/util");
|
38
|
+
|
36
39
|
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
37
40
|
|
38
41
|
var EOF = {};
|
39
42
|
exports.EOF = EOF;
|
40
43
|
|
41
44
|
var Name = function NameClosure() {
|
45
|
+
var nameCache = Object.create(null);
|
46
|
+
|
42
47
|
function Name(name) {
|
43
48
|
this.name = name;
|
44
49
|
}
|
45
50
|
|
46
51
|
Name.prototype = {};
|
47
|
-
var nameCache = Object.create(null);
|
48
52
|
|
49
53
|
Name.get = function Name_get(name) {
|
50
54
|
var nameValue = nameCache[name];
|
51
55
|
return nameValue ? nameValue : nameCache[name] = new Name(name);
|
52
56
|
};
|
53
57
|
|
58
|
+
Name._clearCache = function () {
|
59
|
+
nameCache = Object.create(null);
|
60
|
+
};
|
61
|
+
|
54
62
|
return Name;
|
55
63
|
}();
|
56
64
|
|
57
65
|
exports.Name = Name;
|
58
66
|
|
59
67
|
var Cmd = function CmdClosure() {
|
68
|
+
var cmdCache = Object.create(null);
|
69
|
+
|
60
70
|
function Cmd(cmd) {
|
61
71
|
this.cmd = cmd;
|
62
72
|
}
|
63
73
|
|
64
74
|
Cmd.prototype = {};
|
65
|
-
var cmdCache = Object.create(null);
|
66
75
|
|
67
76
|
Cmd.get = function Cmd_get(cmd) {
|
68
77
|
var cmdValue = cmdCache[cmd];
|
69
78
|
return cmdValue ? cmdValue : cmdCache[cmd] = new Cmd(cmd);
|
70
79
|
};
|
71
80
|
|
81
|
+
Cmd._clearCache = function () {
|
82
|
+
cmdCache = Object.create(null);
|
83
|
+
};
|
84
|
+
|
72
85
|
return Cmd;
|
73
86
|
}();
|
74
87
|
|
@@ -205,6 +218,8 @@ var Dict = function DictClosure() {
|
|
205
218
|
exports.Dict = Dict;
|
206
219
|
|
207
220
|
var Ref = function RefClosure() {
|
221
|
+
var refCache = Object.create(null);
|
222
|
+
|
208
223
|
function Ref(num, gen) {
|
209
224
|
this.num = num;
|
210
225
|
this.gen = gen;
|
@@ -212,13 +227,24 @@ var Ref = function RefClosure() {
|
|
212
227
|
|
213
228
|
Ref.prototype = {
|
214
229
|
toString: function Ref_toString() {
|
215
|
-
if (this.gen
|
216
|
-
return "".concat(this.num, "R")
|
230
|
+
if (this.gen === 0) {
|
231
|
+
return "".concat(this.num, "R");
|
217
232
|
}
|
218
233
|
|
219
|
-
return "".concat(this.num, "R");
|
234
|
+
return "".concat(this.num, "R").concat(this.gen);
|
220
235
|
}
|
221
236
|
};
|
237
|
+
|
238
|
+
Ref.get = function (num, gen) {
|
239
|
+
var key = gen === 0 ? "".concat(num, "R") : "".concat(num, "R").concat(gen);
|
240
|
+
var refValue = refCache[key];
|
241
|
+
return refValue ? refValue : refCache[key] = new Ref(num, gen);
|
242
|
+
};
|
243
|
+
|
244
|
+
Ref._clearCache = function () {
|
245
|
+
refCache = Object.create(null);
|
246
|
+
};
|
247
|
+
|
222
248
|
return Ref;
|
223
249
|
}();
|
224
250
|
|
@@ -303,4 +329,12 @@ function isRefsEqual(v1, v2) {
|
|
303
329
|
|
304
330
|
function isStream(v) {
|
305
331
|
return _typeof(v) === 'object' && v !== null && v.getBytes !== undefined;
|
332
|
+
}
|
333
|
+
|
334
|
+
function clearPrimitiveCaches() {
|
335
|
+
Cmd._clearCache();
|
336
|
+
|
337
|
+
Name._clearCache();
|
338
|
+
|
339
|
+
Ref._clearCache();
|
306
340
|
}
|
package/lib/core/ps_parser.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* @licstart The following is the entire license notice for the
|
3
3
|
* Javascript code in this page
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2019 Mozilla Foundation
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
* you may not use this file except in compliance with the License.
|
@@ -2,7 +2,7 @@
|
|
2
2
|
* @licstart The following is the entire license notice for the
|
3
3
|
* Javascript code in this page
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2019 Mozilla Foundation
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
* you may not use this file except in compliance with the License.
|
@@ -26,9 +26,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
26
26
|
});
|
27
27
|
exports.getSupplementalGlyphMapForCalibri = exports.getSupplementalGlyphMapForArialBlack = exports.getGlyphMapForStandardFonts = exports.getSymbolsFonts = exports.getSerifFonts = exports.getNonStdFontMap = exports.getStdFontMap = void 0;
|
28
28
|
|
29
|
-
var
|
29
|
+
var _core_utils = require("./core_utils");
|
30
30
|
|
31
|
-
var getStdFontMap = (0,
|
31
|
+
var getStdFontMap = (0, _core_utils.getLookupTableFactory)(function (t) {
|
32
32
|
t['ArialNarrow'] = 'Helvetica';
|
33
33
|
t['ArialNarrow-Bold'] = 'Helvetica-Bold';
|
34
34
|
t['ArialNarrow-BoldItalic'] = 'Helvetica-BoldOblique';
|
@@ -87,7 +87,7 @@ var getStdFontMap = (0, _util.getLookupTableFactory)(function (t) {
|
|
87
87
|
t['TimesNewRomanPSMT-Italic'] = 'Times-Italic';
|
88
88
|
});
|
89
89
|
exports.getStdFontMap = getStdFontMap;
|
90
|
-
var getNonStdFontMap = (0,
|
90
|
+
var getNonStdFontMap = (0, _core_utils.getLookupTableFactory)(function (t) {
|
91
91
|
t['Calibri'] = 'Helvetica';
|
92
92
|
t['Calibri-Bold'] = 'Helvetica-Bold';
|
93
93
|
t['Calibri-BoldItalic'] = 'Helvetica-BoldOblique';
|
@@ -125,7 +125,7 @@ var getNonStdFontMap = (0, _util.getLookupTableFactory)(function (t) {
|
|
125
125
|
t['Wingdings'] = 'ZapfDingbats';
|
126
126
|
});
|
127
127
|
exports.getNonStdFontMap = getNonStdFontMap;
|
128
|
-
var getSerifFonts = (0,
|
128
|
+
var getSerifFonts = (0, _core_utils.getLookupTableFactory)(function (t) {
|
129
129
|
t['Adobe Jenson'] = true;
|
130
130
|
t['Adobe Text'] = true;
|
131
131
|
t['Albertus'] = true;
|
@@ -261,13 +261,13 @@ var getSerifFonts = (0, _util.getLookupTableFactory)(function (t) {
|
|
261
261
|
t['XITS'] = true;
|
262
262
|
});
|
263
263
|
exports.getSerifFonts = getSerifFonts;
|
264
|
-
var getSymbolsFonts = (0,
|
264
|
+
var getSymbolsFonts = (0, _core_utils.getLookupTableFactory)(function (t) {
|
265
265
|
t['Dingbats'] = true;
|
266
266
|
t['Symbol'] = true;
|
267
267
|
t['ZapfDingbats'] = true;
|
268
268
|
});
|
269
269
|
exports.getSymbolsFonts = getSymbolsFonts;
|
270
|
-
var getGlyphMapForStandardFonts = (0,
|
270
|
+
var getGlyphMapForStandardFonts = (0, _core_utils.getLookupTableFactory)(function (t) {
|
271
271
|
t[2] = 10;
|
272
272
|
t[3] = 32;
|
273
273
|
t[4] = 33;
|
@@ -663,13 +663,13 @@ var getGlyphMapForStandardFonts = (0, _util.getLookupTableFactory)(function (t)
|
|
663
663
|
t[3416] = 8377;
|
664
664
|
});
|
665
665
|
exports.getGlyphMapForStandardFonts = getGlyphMapForStandardFonts;
|
666
|
-
var getSupplementalGlyphMapForArialBlack = (0,
|
666
|
+
var getSupplementalGlyphMapForArialBlack = (0, _core_utils.getLookupTableFactory)(function (t) {
|
667
667
|
t[227] = 322;
|
668
668
|
t[264] = 261;
|
669
669
|
t[291] = 346;
|
670
670
|
});
|
671
671
|
exports.getSupplementalGlyphMapForArialBlack = getSupplementalGlyphMapForArialBlack;
|
672
|
-
var getSupplementalGlyphMapForCalibri = (0,
|
672
|
+
var getSupplementalGlyphMapForCalibri = (0, _core_utils.getLookupTableFactory)(function (t) {
|
673
673
|
t[1] = 32;
|
674
674
|
t[4] = 65;
|
675
675
|
t[17] = 66;
|
package/lib/core/stream.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* @licstart The following is the entire license notice for the
|
3
3
|
* Javascript code in this page
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2019 Mozilla Foundation
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
* you may not use this file except in compliance with the License.
|
package/lib/core/type1_parser.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* @licstart The following is the entire license notice for the
|
3
3
|
* Javascript code in this page
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2019 Mozilla Foundation
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
* you may not use this file except in compliance with the License.
|
package/lib/core/unicode.js
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
* @licstart The following is the entire license notice for the
|
3
3
|
* Javascript code in this page
|
4
4
|
*
|
5
|
-
* Copyright
|
5
|
+
* Copyright 2019 Mozilla Foundation
|
6
6
|
*
|
7
7
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
8
|
* you may not use this file except in compliance with the License.
|
@@ -21,7 +21,7 @@
|
|
21
21
|
*/
|
22
22
|
"use strict";
|
23
23
|
|
24
|
-
var getLookupTableFactory = require('
|
24
|
+
var getLookupTableFactory = require('./core_utils').getLookupTableFactory;
|
25
25
|
|
26
26
|
var getSpecialPUASymbols = getLookupTableFactory(function (t) {
|
27
27
|
t[63721] = 0x00A9;
|