pdfjs-dist 2.3.200 → 2.4.456

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.

Files changed (185) hide show
  1. package/README.md +4 -0
  2. package/bower.json +1 -1
  3. package/build/pdf.js +6499 -17971
  4. package/build/pdf.js.map +1 -1
  5. package/build/pdf.min.js +22 -1
  6. package/build/pdf.worker.entry.js +5 -3
  7. package/build/pdf.worker.js +19303 -29896
  8. package/build/pdf.worker.js.map +1 -1
  9. package/build/pdf.worker.min.js +22 -1
  10. package/es5/build/pdf.js +25473 -0
  11. package/es5/build/pdf.js.map +1 -0
  12. package/{lib/shared/global_scope.js → es5/build/pdf.worker.entry.js} +5 -10
  13. package/es5/build/pdf.worker.js +57878 -0
  14. package/es5/build/pdf.worker.js.map +1 -0
  15. package/es5/web/images/annotation-check.svg +11 -0
  16. package/es5/web/images/annotation-comment.svg +16 -0
  17. package/es5/web/images/annotation-help.svg +26 -0
  18. package/es5/web/images/annotation-insert.svg +10 -0
  19. package/es5/web/images/annotation-key.svg +11 -0
  20. package/es5/web/images/annotation-newparagraph.svg +11 -0
  21. package/es5/web/images/annotation-noicon.svg +7 -0
  22. package/es5/web/images/annotation-note.svg +42 -0
  23. package/es5/web/images/annotation-paragraph.svg +16 -0
  24. package/es5/web/images/loading-icon.gif +0 -0
  25. package/es5/web/images/shadow.png +0 -0
  26. package/es5/web/images/texture.png +0 -0
  27. package/es5/web/pdf_viewer.css +407 -0
  28. package/es5/web/pdf_viewer.js +7757 -0
  29. package/es5/web/pdf_viewer.js.map +1 -0
  30. package/image_decoders/pdf.image_decoders.js +1333 -4839
  31. package/image_decoders/pdf.image_decoders.js.map +1 -1
  32. package/image_decoders/pdf.image_decoders.min.js +22 -1
  33. package/lib/README.md +7 -0
  34. package/lib/core/annotation.js +683 -1066
  35. package/lib/core/arithmetic_decoder.js +81 -97
  36. package/lib/core/bidi.js +54 -46
  37. package/lib/core/ccitt.js +88 -81
  38. package/lib/core/ccitt_stream.js +15 -14
  39. package/lib/core/cff_parser.js +196 -193
  40. package/lib/core/charsets.js +4 -4
  41. package/lib/core/chunked_stream.js +441 -569
  42. package/lib/core/cmap.js +220 -279
  43. package/lib/core/colorspace.js +699 -863
  44. package/lib/core/core_utils.js +59 -80
  45. package/lib/core/crypto.js +379 -437
  46. package/lib/core/document.js +564 -673
  47. package/lib/core/encodings.js +15 -15
  48. package/lib/core/evaluator.js +983 -889
  49. package/lib/core/font_renderer.js +128 -171
  50. package/lib/core/fonts.js +451 -400
  51. package/lib/core/function.js +289 -285
  52. package/lib/core/glyphlist.js +4527 -4527
  53. package/lib/core/image.js +138 -117
  54. package/lib/core/image_utils.js +46 -63
  55. package/lib/core/jbig2.js +324 -332
  56. package/lib/core/jbig2_stream.js +18 -17
  57. package/lib/core/jpeg_stream.js +133 -24
  58. package/lib/core/jpg.js +238 -210
  59. package/lib/core/jpx.js +158 -157
  60. package/lib/core/jpx_stream.js +28 -28
  61. package/lib/core/metrics.js +2928 -2928
  62. package/lib/core/murmurhash3.js +87 -102
  63. package/lib/core/obj.js +1111 -1302
  64. package/lib/core/operator_list.js +55 -42
  65. package/lib/core/parser.js +956 -987
  66. package/lib/core/pattern.js +69 -69
  67. package/lib/core/pdf_manager.js +149 -316
  68. package/lib/core/primitives.js +45 -77
  69. package/lib/core/ps_parser.js +175 -214
  70. package/lib/core/standard_fonts.js +237 -236
  71. package/lib/core/stream.js +83 -77
  72. package/lib/core/type1_parser.js +78 -68
  73. package/lib/core/unicode.js +1654 -1654
  74. package/lib/core/worker.js +148 -196
  75. package/lib/core/worker_stream.js +101 -210
  76. package/lib/display/annotation_layer.js +733 -1155
  77. package/lib/display/api.js +1539 -1928
  78. package/lib/display/api_compatibility.js +10 -8
  79. package/lib/display/canvas.js +159 -158
  80. package/lib/display/content_disposition.js +36 -55
  81. package/lib/display/display_utils.js +298 -551
  82. package/lib/display/fetch_stream.js +181 -305
  83. package/lib/display/font_loader.js +273 -416
  84. package/lib/display/metadata.js +86 -98
  85. package/lib/display/network.js +376 -511
  86. package/lib/display/network_utils.js +20 -19
  87. package/lib/display/node_stream.js +276 -460
  88. package/lib/display/pattern_helper.js +76 -44
  89. package/lib/display/svg.js +1137 -1405
  90. package/lib/display/text_layer.js +75 -82
  91. package/lib/display/transport_stream.js +236 -374
  92. package/lib/display/webgl.js +70 -83
  93. package/lib/display/worker_options.js +3 -3
  94. package/lib/display/xml_parser.js +303 -392
  95. package/lib/examples/node/domstubs.js +37 -37
  96. package/lib/pdf.js +22 -21
  97. package/lib/pdf.worker.js +5 -5
  98. package/lib/shared/compatibility.js +2 -251
  99. package/lib/shared/is_node.js +7 -6
  100. package/lib/shared/message_handler.js +222 -194
  101. package/lib/shared/util.js +269 -405
  102. package/lib/test/unit/annotation_spec.js +1089 -1014
  103. package/lib/test/unit/api_spec.js +617 -544
  104. package/lib/test/unit/bidi_spec.js +7 -7
  105. package/lib/test/unit/cff_parser_spec.js +63 -62
  106. package/lib/test/unit/clitests_helper.js +7 -9
  107. package/lib/test/unit/cmap_spec.js +84 -86
  108. package/lib/test/unit/colorspace_spec.js +154 -154
  109. package/lib/test/unit/core_utils_spec.js +125 -105
  110. package/lib/test/unit/crypto_spec.js +181 -181
  111. package/lib/test/unit/custom_spec.js +22 -24
  112. package/lib/test/unit/display_svg_spec.js +35 -36
  113. package/lib/test/unit/display_utils_spec.js +139 -149
  114. package/lib/test/unit/document_spec.js +16 -16
  115. package/lib/test/unit/encodings_spec.js +12 -34
  116. package/lib/test/unit/evaluator_spec.js +81 -95
  117. package/lib/test/unit/fetch_stream_spec.js +30 -30
  118. package/lib/test/unit/function_spec.js +206 -204
  119. package/lib/test/unit/jasmine-boot.js +48 -32
  120. package/lib/test/unit/message_handler_spec.js +172 -162
  121. package/lib/test/unit/metadata_spec.js +69 -69
  122. package/lib/test/unit/murmurhash3_spec.js +12 -12
  123. package/lib/test/unit/network_spec.js +12 -12
  124. package/lib/test/unit/network_utils_spec.js +152 -152
  125. package/lib/test/unit/node_stream_spec.js +74 -90
  126. package/lib/test/unit/parser_spec.js +107 -113
  127. package/lib/test/unit/pdf_find_controller_spec.js +55 -86
  128. package/lib/test/unit/pdf_find_utils_spec.js +32 -32
  129. package/lib/test/unit/pdf_history_spec.js +32 -32
  130. package/lib/test/unit/primitives_spec.js +117 -115
  131. package/lib/test/unit/stream_spec.js +16 -14
  132. package/lib/test/unit/test_utils.js +119 -285
  133. package/lib/test/unit/testreporter.js +19 -19
  134. package/lib/test/unit/type1_parser_spec.js +41 -41
  135. package/lib/test/unit/ui_utils_spec.js +318 -426
  136. package/lib/test/unit/unicode_spec.js +42 -42
  137. package/lib/test/unit/util_spec.js +122 -143
  138. package/lib/web/annotation_layer_builder.js +66 -103
  139. package/lib/web/app.js +1166 -1196
  140. package/lib/web/app_options.js +61 -77
  141. package/lib/web/base_viewer.js +804 -850
  142. package/lib/web/chromecom.js +164 -249
  143. package/lib/web/debugger.js +149 -205
  144. package/lib/web/download_manager.js +38 -57
  145. package/lib/web/firefox_print_service.js +35 -30
  146. package/lib/web/firefoxcom.js +175 -374
  147. package/lib/web/genericcom.js +26 -108
  148. package/lib/web/genericl10n.js +24 -153
  149. package/lib/web/grab_to_pan.js +30 -30
  150. package/lib/web/interfaces.js +80 -258
  151. package/lib/web/overlay_manager.js +70 -246
  152. package/lib/web/password_prompt.js +38 -64
  153. package/lib/web/pdf_attachment_viewer.js +105 -130
  154. package/lib/web/pdf_cursor_tools.js +75 -102
  155. package/lib/web/pdf_document_properties.js +227 -376
  156. package/lib/web/pdf_find_bar.js +137 -171
  157. package/lib/web/pdf_find_controller.js +492 -549
  158. package/lib/web/pdf_find_utils.js +13 -13
  159. package/lib/web/pdf_history.js +395 -406
  160. package/lib/web/pdf_link_service.js +302 -349
  161. package/lib/web/pdf_outline_viewer.js +148 -209
  162. package/lib/web/pdf_page_view.js +449 -507
  163. package/lib/web/pdf_presentation_mode.js +304 -357
  164. package/lib/web/pdf_print_service.js +90 -104
  165. package/lib/web/pdf_rendering_queue.js +87 -108
  166. package/lib/web/pdf_sidebar.js +264 -304
  167. package/lib/web/pdf_sidebar_resizer.js +92 -119
  168. package/lib/web/pdf_single_page_viewer.js +77 -126
  169. package/lib/web/pdf_thumbnail_view.js +276 -297
  170. package/lib/web/pdf_thumbnail_viewer.js +186 -206
  171. package/lib/web/pdf_viewer.component.js +20 -21
  172. package/lib/web/pdf_viewer.js +55 -115
  173. package/lib/web/preferences.js +66 -273
  174. package/lib/web/secondary_toolbar.js +164 -196
  175. package/lib/web/text_layer_builder.js +284 -317
  176. package/lib/web/toolbar.js +216 -211
  177. package/lib/web/ui_utils.js +303 -404
  178. package/lib/web/view_history.js +49 -222
  179. package/lib/web/viewer_compatibility.js +7 -5
  180. package/package.json +2 -9
  181. package/web/pdf_viewer.css +25 -18
  182. package/web/pdf_viewer.js +3481 -4764
  183. package/web/pdf_viewer.js.map +1 -1
  184. package/webpack.js +14 -5
  185. package/lib/shared/streams_polyfill.js +0 -43
@@ -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 2019 Mozilla Foundation
5
+ * Copyright 2020 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,224 +26,224 @@ Object.defineProperty(exports, "__esModule", {
26
26
  });
27
27
  exports.CFFFDSelect = exports.CFFCompiler = exports.CFFPrivateDict = exports.CFFTopDict = exports.CFFCharset = exports.CFFIndex = exports.CFFStrings = exports.CFFHeader = exports.CFF = exports.CFFParser = exports.CFFStandardStrings = void 0;
28
28
 
29
- var _util = require("../shared/util");
29
+ var _util = require("../shared/util.js");
30
30
 
31
- var _charsets = require("./charsets");
31
+ var _charsets = require("./charsets.js");
32
32
 
33
- var _encodings = require("./encodings");
33
+ var _encodings = require("./encodings.js");
34
34
 
35
35
  var MAX_SUBR_NESTING = 10;
36
- var CFFStandardStrings = ['.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus', 'comma', 'hyphen', 'period', 'slash', 'zero', 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'colon', 'semicolon', 'less', 'equal', 'greater', 'question', 'at', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'backslash', 'bracketright', 'asciicircum', 'underscore', 'quoteleft', 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', 'braceleft', 'bar', 'braceright', 'asciitilde', 'exclamdown', 'cent', 'sterling', 'fraction', 'yen', 'florin', 'section', 'currency', 'quotesingle', 'quotedblleft', 'guillemotleft', 'guilsinglleft', 'guilsinglright', 'fi', 'fl', 'endash', 'dagger', 'daggerdbl', 'periodcentered', 'paragraph', 'bullet', 'quotesinglbase', 'quotedblbase', 'quotedblright', 'guillemotright', 'ellipsis', 'perthousand', 'questiondown', 'grave', 'acute', 'circumflex', 'tilde', 'macron', 'breve', 'dotaccent', 'dieresis', 'ring', 'cedilla', 'hungarumlaut', 'ogonek', 'caron', 'emdash', 'AE', 'ordfeminine', 'Lslash', 'Oslash', 'OE', 'ordmasculine', 'ae', 'dotlessi', 'lslash', 'oslash', 'oe', 'germandbls', 'onesuperior', 'logicalnot', 'mu', 'trademark', 'Eth', 'onehalf', 'plusminus', 'Thorn', 'onequarter', 'divide', 'brokenbar', 'degree', 'thorn', 'threequarters', 'twosuperior', 'registered', 'minus', 'eth', 'multiply', 'threesuperior', 'copyright', 'Aacute', 'Acircumflex', 'Adieresis', 'Agrave', 'Aring', 'Atilde', 'Ccedilla', 'Eacute', 'Ecircumflex', 'Edieresis', 'Egrave', 'Iacute', 'Icircumflex', 'Idieresis', 'Igrave', 'Ntilde', 'Oacute', 'Ocircumflex', 'Odieresis', 'Ograve', 'Otilde', 'Scaron', 'Uacute', 'Ucircumflex', 'Udieresis', 'Ugrave', 'Yacute', 'Ydieresis', 'Zcaron', 'aacute', 'acircumflex', 'adieresis', 'agrave', 'aring', 'atilde', 'ccedilla', 'eacute', 'ecircumflex', 'edieresis', 'egrave', 'iacute', 'icircumflex', 'idieresis', 'igrave', 'ntilde', 'oacute', 'ocircumflex', 'odieresis', 'ograve', 'otilde', 'scaron', 'uacute', 'ucircumflex', 'udieresis', 'ugrave', 'yacute', 'ydieresis', 'zcaron', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle', 'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior', 'parenrightsuperior', 'twodotenleader', 'onedotenleader', 'zerooldstyle', 'oneoldstyle', 'twooldstyle', 'threeoldstyle', 'fouroldstyle', 'fiveoldstyle', 'sixoldstyle', 'sevenoldstyle', 'eightoldstyle', 'nineoldstyle', 'commasuperior', 'threequartersemdash', 'periodsuperior', 'questionsmall', 'asuperior', 'bsuperior', 'centsuperior', 'dsuperior', 'esuperior', 'isuperior', 'lsuperior', 'msuperior', 'nsuperior', 'osuperior', 'rsuperior', 'ssuperior', 'tsuperior', 'ff', 'ffi', 'ffl', 'parenleftinferior', 'parenrightinferior', 'Circumflexsmall', 'hyphensuperior', 'Gravesmall', 'Asmall', 'Bsmall', 'Csmall', 'Dsmall', 'Esmall', 'Fsmall', 'Gsmall', 'Hsmall', 'Ismall', 'Jsmall', 'Ksmall', 'Lsmall', 'Msmall', 'Nsmall', 'Osmall', 'Psmall', 'Qsmall', 'Rsmall', 'Ssmall', 'Tsmall', 'Usmall', 'Vsmall', 'Wsmall', 'Xsmall', 'Ysmall', 'Zsmall', 'colonmonetary', 'onefitted', 'rupiah', 'Tildesmall', 'exclamdownsmall', 'centoldstyle', 'Lslashsmall', 'Scaronsmall', 'Zcaronsmall', 'Dieresissmall', 'Brevesmall', 'Caronsmall', 'Dotaccentsmall', 'Macronsmall', 'figuredash', 'hypheninferior', 'Ogoneksmall', 'Ringsmall', 'Cedillasmall', 'questiondownsmall', 'oneeighth', 'threeeighths', 'fiveeighths', 'seveneighths', 'onethird', 'twothirds', 'zerosuperior', 'foursuperior', 'fivesuperior', 'sixsuperior', 'sevensuperior', 'eightsuperior', 'ninesuperior', 'zeroinferior', 'oneinferior', 'twoinferior', 'threeinferior', 'fourinferior', 'fiveinferior', 'sixinferior', 'seveninferior', 'eightinferior', 'nineinferior', 'centinferior', 'dollarinferior', 'periodinferior', 'commainferior', 'Agravesmall', 'Aacutesmall', 'Acircumflexsmall', 'Atildesmall', 'Adieresissmall', 'Aringsmall', 'AEsmall', 'Ccedillasmall', 'Egravesmall', 'Eacutesmall', 'Ecircumflexsmall', 'Edieresissmall', 'Igravesmall', 'Iacutesmall', 'Icircumflexsmall', 'Idieresissmall', 'Ethsmall', 'Ntildesmall', 'Ogravesmall', 'Oacutesmall', 'Ocircumflexsmall', 'Otildesmall', 'Odieresissmall', 'OEsmall', 'Oslashsmall', 'Ugravesmall', 'Uacutesmall', 'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall', 'Ydieresissmall', '001.000', '001.001', '001.002', '001.003', 'Black', 'Bold', 'Book', 'Light', 'Medium', 'Regular', 'Roman', 'Semibold'];
36
+ var CFFStandardStrings = [".notdef", "space", "exclam", "quotedbl", "numbersign", "dollar", "percent", "ampersand", "quoteright", "parenleft", "parenright", "asterisk", "plus", "comma", "hyphen", "period", "slash", "zero", "one", "two", "three", "four", "five", "six", "seven", "eight", "nine", "colon", "semicolon", "less", "equal", "greater", "question", "at", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "backslash", "bracketright", "asciicircum", "underscore", "quoteleft", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "exclamdown", "cent", "sterling", "fraction", "yen", "florin", "section", "currency", "quotesingle", "quotedblleft", "guillemotleft", "guilsinglleft", "guilsinglright", "fi", "fl", "endash", "dagger", "daggerdbl", "periodcentered", "paragraph", "bullet", "quotesinglbase", "quotedblbase", "quotedblright", "guillemotright", "ellipsis", "perthousand", "questiondown", "grave", "acute", "circumflex", "tilde", "macron", "breve", "dotaccent", "dieresis", "ring", "cedilla", "hungarumlaut", "ogonek", "caron", "emdash", "AE", "ordfeminine", "Lslash", "Oslash", "OE", "ordmasculine", "ae", "dotlessi", "lslash", "oslash", "oe", "germandbls", "onesuperior", "logicalnot", "mu", "trademark", "Eth", "onehalf", "plusminus", "Thorn", "onequarter", "divide", "brokenbar", "degree", "thorn", "threequarters", "twosuperior", "registered", "minus", "eth", "multiply", "threesuperior", "copyright", "Aacute", "Acircumflex", "Adieresis", "Agrave", "Aring", "Atilde", "Ccedilla", "Eacute", "Ecircumflex", "Edieresis", "Egrave", "Iacute", "Icircumflex", "Idieresis", "Igrave", "Ntilde", "Oacute", "Ocircumflex", "Odieresis", "Ograve", "Otilde", "Scaron", "Uacute", "Ucircumflex", "Udieresis", "Ugrave", "Yacute", "Ydieresis", "Zcaron", "aacute", "acircumflex", "adieresis", "agrave", "aring", "atilde", "ccedilla", "eacute", "ecircumflex", "edieresis", "egrave", "iacute", "icircumflex", "idieresis", "igrave", "ntilde", "oacute", "ocircumflex", "odieresis", "ograve", "otilde", "scaron", "uacute", "ucircumflex", "udieresis", "ugrave", "yacute", "ydieresis", "zcaron", "exclamsmall", "Hungarumlautsmall", "dollaroldstyle", "dollarsuperior", "ampersandsmall", "Acutesmall", "parenleftsuperior", "parenrightsuperior", "twodotenleader", "onedotenleader", "zerooldstyle", "oneoldstyle", "twooldstyle", "threeoldstyle", "fouroldstyle", "fiveoldstyle", "sixoldstyle", "sevenoldstyle", "eightoldstyle", "nineoldstyle", "commasuperior", "threequartersemdash", "periodsuperior", "questionsmall", "asuperior", "bsuperior", "centsuperior", "dsuperior", "esuperior", "isuperior", "lsuperior", "msuperior", "nsuperior", "osuperior", "rsuperior", "ssuperior", "tsuperior", "ff", "ffi", "ffl", "parenleftinferior", "parenrightinferior", "Circumflexsmall", "hyphensuperior", "Gravesmall", "Asmall", "Bsmall", "Csmall", "Dsmall", "Esmall", "Fsmall", "Gsmall", "Hsmall", "Ismall", "Jsmall", "Ksmall", "Lsmall", "Msmall", "Nsmall", "Osmall", "Psmall", "Qsmall", "Rsmall", "Ssmall", "Tsmall", "Usmall", "Vsmall", "Wsmall", "Xsmall", "Ysmall", "Zsmall", "colonmonetary", "onefitted", "rupiah", "Tildesmall", "exclamdownsmall", "centoldstyle", "Lslashsmall", "Scaronsmall", "Zcaronsmall", "Dieresissmall", "Brevesmall", "Caronsmall", "Dotaccentsmall", "Macronsmall", "figuredash", "hypheninferior", "Ogoneksmall", "Ringsmall", "Cedillasmall", "questiondownsmall", "oneeighth", "threeeighths", "fiveeighths", "seveneighths", "onethird", "twothirds", "zerosuperior", "foursuperior", "fivesuperior", "sixsuperior", "sevensuperior", "eightsuperior", "ninesuperior", "zeroinferior", "oneinferior", "twoinferior", "threeinferior", "fourinferior", "fiveinferior", "sixinferior", "seveninferior", "eightinferior", "nineinferior", "centinferior", "dollarinferior", "periodinferior", "commainferior", "Agravesmall", "Aacutesmall", "Acircumflexsmall", "Atildesmall", "Adieresissmall", "Aringsmall", "AEsmall", "Ccedillasmall", "Egravesmall", "Eacutesmall", "Ecircumflexsmall", "Edieresissmall", "Igravesmall", "Iacutesmall", "Icircumflexsmall", "Idieresissmall", "Ethsmall", "Ntildesmall", "Ogravesmall", "Oacutesmall", "Ocircumflexsmall", "Otildesmall", "Odieresissmall", "OEsmall", "Oslashsmall", "Ugravesmall", "Uacutesmall", "Ucircumflexsmall", "Udieresissmall", "Yacutesmall", "Thornsmall", "Ydieresissmall", "001.000", "001.001", "001.002", "001.003", "Black", "Bold", "Book", "Light", "Medium", "Regular", "Roman", "Semibold"];
37
37
  exports.CFFStandardStrings = CFFStandardStrings;
38
- var NUM_STANDARD_CFF_STRINGS = 391;
38
+ const NUM_STANDARD_CFF_STRINGS = 391;
39
39
 
40
40
  var CFFParser = function CFFParserClosure() {
41
41
  var CharstringValidationData = [null, {
42
- id: 'hstem',
42
+ id: "hstem",
43
43
  min: 2,
44
44
  stackClearing: true,
45
45
  stem: true
46
46
  }, null, {
47
- id: 'vstem',
47
+ id: "vstem",
48
48
  min: 2,
49
49
  stackClearing: true,
50
50
  stem: true
51
51
  }, {
52
- id: 'vmoveto',
52
+ id: "vmoveto",
53
53
  min: 1,
54
54
  stackClearing: true
55
55
  }, {
56
- id: 'rlineto',
56
+ id: "rlineto",
57
57
  min: 2,
58
58
  resetStack: true
59
59
  }, {
60
- id: 'hlineto',
60
+ id: "hlineto",
61
61
  min: 1,
62
62
  resetStack: true
63
63
  }, {
64
- id: 'vlineto',
64
+ id: "vlineto",
65
65
  min: 1,
66
66
  resetStack: true
67
67
  }, {
68
- id: 'rrcurveto',
68
+ id: "rrcurveto",
69
69
  min: 6,
70
70
  resetStack: true
71
71
  }, null, {
72
- id: 'callsubr',
72
+ id: "callsubr",
73
73
  min: 1,
74
74
  undefStack: true
75
75
  }, {
76
- id: 'return',
76
+ id: "return",
77
77
  min: 0,
78
78
  undefStack: true
79
79
  }, null, null, {
80
- id: 'endchar',
80
+ id: "endchar",
81
81
  min: 0,
82
82
  stackClearing: true
83
83
  }, null, null, null, {
84
- id: 'hstemhm',
84
+ id: "hstemhm",
85
85
  min: 2,
86
86
  stackClearing: true,
87
87
  stem: true
88
88
  }, {
89
- id: 'hintmask',
89
+ id: "hintmask",
90
90
  min: 0,
91
91
  stackClearing: true
92
92
  }, {
93
- id: 'cntrmask',
93
+ id: "cntrmask",
94
94
  min: 0,
95
95
  stackClearing: true
96
96
  }, {
97
- id: 'rmoveto',
97
+ id: "rmoveto",
98
98
  min: 2,
99
99
  stackClearing: true
100
100
  }, {
101
- id: 'hmoveto',
101
+ id: "hmoveto",
102
102
  min: 1,
103
103
  stackClearing: true
104
104
  }, {
105
- id: 'vstemhm',
105
+ id: "vstemhm",
106
106
  min: 2,
107
107
  stackClearing: true,
108
108
  stem: true
109
109
  }, {
110
- id: 'rcurveline',
110
+ id: "rcurveline",
111
111
  min: 8,
112
112
  resetStack: true
113
113
  }, {
114
- id: 'rlinecurve',
114
+ id: "rlinecurve",
115
115
  min: 8,
116
116
  resetStack: true
117
117
  }, {
118
- id: 'vvcurveto',
118
+ id: "vvcurveto",
119
119
  min: 4,
120
120
  resetStack: true
121
121
  }, {
122
- id: 'hhcurveto',
122
+ id: "hhcurveto",
123
123
  min: 4,
124
124
  resetStack: true
125
125
  }, null, {
126
- id: 'callgsubr',
126
+ id: "callgsubr",
127
127
  min: 1,
128
128
  undefStack: true
129
129
  }, {
130
- id: 'vhcurveto',
130
+ id: "vhcurveto",
131
131
  min: 4,
132
132
  resetStack: true
133
133
  }, {
134
- id: 'hvcurveto',
134
+ id: "hvcurveto",
135
135
  min: 4,
136
136
  resetStack: true
137
137
  }];
138
138
  var CharstringValidationData12 = [null, null, null, {
139
- id: 'and',
139
+ id: "and",
140
140
  min: 2,
141
141
  stackDelta: -1
142
142
  }, {
143
- id: 'or',
143
+ id: "or",
144
144
  min: 2,
145
145
  stackDelta: -1
146
146
  }, {
147
- id: 'not',
147
+ id: "not",
148
148
  min: 1,
149
149
  stackDelta: 0
150
150
  }, null, null, null, {
151
- id: 'abs',
151
+ id: "abs",
152
152
  min: 1,
153
153
  stackDelta: 0
154
154
  }, {
155
- id: 'add',
155
+ id: "add",
156
156
  min: 2,
157
157
  stackDelta: -1,
158
158
  stackFn: function stack_div(stack, index) {
159
159
  stack[index - 2] = stack[index - 2] + stack[index - 1];
160
160
  }
161
161
  }, {
162
- id: 'sub',
162
+ id: "sub",
163
163
  min: 2,
164
164
  stackDelta: -1,
165
165
  stackFn: function stack_div(stack, index) {
166
166
  stack[index - 2] = stack[index - 2] - stack[index - 1];
167
167
  }
168
168
  }, {
169
- id: 'div',
169
+ id: "div",
170
170
  min: 2,
171
171
  stackDelta: -1,
172
172
  stackFn: function stack_div(stack, index) {
173
173
  stack[index - 2] = stack[index - 2] / stack[index - 1];
174
174
  }
175
175
  }, null, {
176
- id: 'neg',
176
+ id: "neg",
177
177
  min: 1,
178
178
  stackDelta: 0,
179
179
  stackFn: function stack_div(stack, index) {
180
180
  stack[index - 1] = -stack[index - 1];
181
181
  }
182
182
  }, {
183
- id: 'eq',
183
+ id: "eq",
184
184
  min: 2,
185
185
  stackDelta: -1
186
186
  }, null, null, {
187
- id: 'drop',
187
+ id: "drop",
188
188
  min: 1,
189
189
  stackDelta: -1
190
190
  }, null, {
191
- id: 'put',
191
+ id: "put",
192
192
  min: 2,
193
193
  stackDelta: -2
194
194
  }, {
195
- id: 'get',
195
+ id: "get",
196
196
  min: 1,
197
197
  stackDelta: 0
198
198
  }, {
199
- id: 'ifelse',
199
+ id: "ifelse",
200
200
  min: 4,
201
201
  stackDelta: -3
202
202
  }, {
203
- id: 'random',
203
+ id: "random",
204
204
  min: 0,
205
205
  stackDelta: 1
206
206
  }, {
207
- id: 'mul',
207
+ id: "mul",
208
208
  min: 2,
209
209
  stackDelta: -1,
210
210
  stackFn: function stack_div(stack, index) {
211
211
  stack[index - 2] = stack[index - 2] * stack[index - 1];
212
212
  }
213
213
  }, null, {
214
- id: 'sqrt',
214
+ id: "sqrt",
215
215
  min: 1,
216
216
  stackDelta: 0
217
217
  }, {
218
- id: 'dup',
218
+ id: "dup",
219
219
  min: 1,
220
220
  stackDelta: 1
221
221
  }, {
222
- id: 'exch',
222
+ id: "exch",
223
223
  min: 2,
224
224
  stackDelta: 0
225
225
  }, {
226
- id: 'index',
226
+ id: "index",
227
227
  min: 2,
228
228
  stackDelta: 0
229
229
  }, {
230
- id: 'roll',
230
+ id: "roll",
231
231
  min: 3,
232
232
  stackDelta: -2
233
233
  }, null, null, null, {
234
- id: 'hflex',
234
+ id: "hflex",
235
235
  min: 7,
236
236
  resetStack: true
237
237
  }, {
238
- id: 'flex',
238
+ id: "flex",
239
239
  min: 13,
240
240
  resetStack: true
241
241
  }, {
242
- id: 'hflex1',
242
+ id: "hflex1",
243
243
  min: 9,
244
244
  resetStack: true
245
245
  }, {
246
- id: 'flex1',
246
+ id: "flex1",
247
247
  min: 11,
248
248
  resetStack: true
249
249
  }];
@@ -272,16 +272,16 @@ var CFFParser = function CFFParserClosure() {
272
272
  cff.topDict = topDict;
273
273
  cff.globalSubrIndex = globalSubrIndex.obj;
274
274
  this.parsePrivateDict(cff.topDict);
275
- cff.isCIDFont = topDict.hasName('ROS');
276
- var charStringOffset = topDict.getByName('CharStrings');
275
+ cff.isCIDFont = topDict.hasName("ROS");
276
+ var charStringOffset = topDict.getByName("CharStrings");
277
277
  var charStringIndex = this.parseIndex(charStringOffset).obj;
278
- var fontMatrix = topDict.getByName('FontMatrix');
278
+ var fontMatrix = topDict.getByName("FontMatrix");
279
279
 
280
280
  if (fontMatrix) {
281
281
  properties.fontMatrix = fontMatrix;
282
282
  }
283
283
 
284
- var fontBBox = topDict.getByName('FontBBox');
284
+ var fontBBox = topDict.getByName("FontBBox");
285
285
 
286
286
  if (fontBBox) {
287
287
  properties.ascent = Math.max(fontBBox[3], fontBBox[1]);
@@ -292,7 +292,7 @@ var CFFParser = function CFFParserClosure() {
292
292
  var charset, encoding;
293
293
 
294
294
  if (cff.isCIDFont) {
295
- var fdArrayIndex = this.parseIndex(topDict.getByName('FDArray')).obj;
295
+ var fdArrayIndex = this.parseIndex(topDict.getByName("FDArray")).obj;
296
296
 
297
297
  for (var i = 0, ii = fdArrayIndex.count; i < ii; ++i) {
298
298
  var dictRaw = fdArrayIndex.get(i);
@@ -302,11 +302,11 @@ var CFFParser = function CFFParserClosure() {
302
302
  }
303
303
 
304
304
  encoding = null;
305
- charset = this.parseCharsets(topDict.getByName('charset'), charStringIndex.count, cff.strings, true);
306
- cff.fdSelect = this.parseFDSelect(topDict.getByName('FDSelect'), charStringIndex.count);
305
+ charset = this.parseCharsets(topDict.getByName("charset"), charStringIndex.count, cff.strings, true);
306
+ cff.fdSelect = this.parseFDSelect(topDict.getByName("FDSelect"), charStringIndex.count);
307
307
  } else {
308
- charset = this.parseCharsets(topDict.getByName('charset'), charStringIndex.count, cff.strings, false);
309
- encoding = this.parseEncoding(topDict.getByName('Encoding'), properties, cff.strings, charset.charset);
308
+ charset = this.parseCharsets(topDict.getByName("charset"), charStringIndex.count, cff.strings, false);
309
+ encoding = this.parseEncoding(topDict.getByName("Encoding"), properties, cff.strings, charset.charset);
310
310
  }
311
311
 
312
312
  cff.charset = charset;
@@ -334,11 +334,11 @@ var CFFParser = function CFFParserClosure() {
334
334
  }
335
335
 
336
336
  if (offset >= bytesLength) {
337
- throw new _util.FormatError('Invalid CFF header');
337
+ throw new _util.FormatError("Invalid CFF header");
338
338
  }
339
339
 
340
340
  if (offset !== 0) {
341
- (0, _util.info)('cff data is shifted');
341
+ (0, _util.info)("cff data is shifted");
342
342
  bytes = bytes.subarray(offset);
343
343
  this.bytes = bytes;
344
344
  }
@@ -384,9 +384,9 @@ var CFFParser = function CFFParserClosure() {
384
384
  }
385
385
 
386
386
  function parseFloatOperand() {
387
- var str = '';
387
+ var str = "";
388
388
  var eof = 15;
389
- var lookup = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.', 'E', 'E-', null, '-'];
389
+ const lookup = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "E", "E-", null, "-"];
390
390
  var length = dict.length;
391
391
 
392
392
  while (pos < length) {
@@ -567,7 +567,7 @@ var CFFParser = function CFFParserClosure() {
567
567
 
568
568
  if (!subrsIndex) {
569
569
  validationCommand = CharstringValidationData[value];
570
- (0, _util.warn)('Missing subrsIndex for ' + validationCommand.id);
570
+ (0, _util.warn)("Missing subrsIndex for " + validationCommand.id);
571
571
  return false;
572
572
  }
573
573
 
@@ -583,7 +583,7 @@ var CFFParser = function CFFParserClosure() {
583
583
 
584
584
  if (subrNumber < 0 || subrNumber >= subrsIndex.count || isNaN(subrNumber)) {
585
585
  validationCommand = CharstringValidationData[value];
586
- (0, _util.warn)('Out of bounds subrIndex for ' + validationCommand.id);
586
+ (0, _util.warn)("Out of bounds subrIndex for " + validationCommand.id);
587
587
  return false;
588
588
  }
589
589
 
@@ -612,14 +612,14 @@ var CFFParser = function CFFParserClosure() {
612
612
  if (value === 3 || value === 23) {
613
613
  state.hasVStems = true;
614
614
  } else if (state.hasVStems && (value === 1 || value === 18)) {
615
- (0, _util.warn)('CFF stem hints are in wrong order');
615
+ (0, _util.warn)("CFF stem hints are in wrong order");
616
616
  data[j - 1] = value === 1 ? 3 : 23;
617
617
  }
618
618
  }
619
619
 
620
- if ('min' in validationCommand) {
620
+ if ("min" in validationCommand) {
621
621
  if (!state.undefStack && stackSize < validationCommand.min) {
622
- (0, _util.warn)('Not enough parameters for ' + validationCommand.id + '; actual: ' + stackSize + ', expected: ' + validationCommand.min);
622
+ (0, _util.warn)("Not enough parameters for " + validationCommand.id + "; actual: " + stackSize + ", expected: " + validationCommand.min);
623
623
  return false;
624
624
  }
625
625
  }
@@ -631,7 +631,7 @@ var CFFParser = function CFFParserClosure() {
631
631
  if (stackSize >= 2 && validationCommand.stem) {
632
632
  stackSize %= 2;
633
633
  } else if (stackSize > 1) {
634
- (0, _util.warn)('Found too many parameters for stack-clearing command');
634
+ (0, _util.warn)("Found too many parameters for stack-clearing command");
635
635
  }
636
636
 
637
637
  if (stackSize > 0 && stack[stackSize - 1] >= 0) {
@@ -639,8 +639,8 @@ var CFFParser = function CFFParserClosure() {
639
639
  }
640
640
  }
641
641
 
642
- if ('stackDelta' in validationCommand) {
643
- if ('stackFn' in validationCommand) {
642
+ if ("stackDelta" in validationCommand) {
643
+ if ("stackFn" in validationCommand) {
644
644
  validationCommand.stackFn(stack, stackSize);
645
645
  }
646
646
 
@@ -661,13 +661,15 @@ var CFFParser = function CFFParserClosure() {
661
661
  state.stackSize = stackSize;
662
662
  return true;
663
663
  },
664
- parseCharStrings: function parseCharStrings(_ref) {
665
- var charStrings = _ref.charStrings,
666
- localSubrIndex = _ref.localSubrIndex,
667
- globalSubrIndex = _ref.globalSubrIndex,
668
- fdSelect = _ref.fdSelect,
669
- fdArray = _ref.fdArray,
670
- privateDict = _ref.privateDict;
664
+
665
+ parseCharStrings({
666
+ charStrings,
667
+ localSubrIndex,
668
+ globalSubrIndex,
669
+ fdSelect,
670
+ fdArray,
671
+ privateDict
672
+ }) {
671
673
  var seacs = [];
672
674
  var widths = [];
673
675
  var count = charStrings.count;
@@ -693,12 +695,12 @@ var CFFParser = function CFFParserClosure() {
693
695
  var fdIndex = fdSelect.getFDIndex(i);
694
696
 
695
697
  if (fdIndex === -1) {
696
- (0, _util.warn)('Glyph index is not in fd select.');
698
+ (0, _util.warn)("Glyph index is not in fd select.");
697
699
  valid = false;
698
700
  }
699
701
 
700
702
  if (fdIndex >= fdArray.length) {
701
- (0, _util.warn)('Invalid fd index for glyph index.');
703
+ (0, _util.warn)("Invalid fd index for glyph index.");
702
704
  valid = false;
703
705
  }
704
706
 
@@ -715,10 +717,10 @@ var CFFParser = function CFFParserClosure() {
715
717
  }
716
718
 
717
719
  if (state.width !== null) {
718
- var nominalWidth = privateDictToUse.getByName('nominalWidthX');
720
+ const nominalWidth = privateDictToUse.getByName("nominalWidthX");
719
721
  widths[i] = nominalWidth + state.width;
720
722
  } else {
721
- var defaultWidth = privateDictToUse.getByName('defaultWidthX');
723
+ const defaultWidth = privateDictToUse.getByName("defaultWidthX");
722
724
  widths[i] = defaultWidth;
723
725
  }
724
726
 
@@ -732,26 +734,27 @@ var CFFParser = function CFFParserClosure() {
732
734
  }
733
735
 
734
736
  return {
735
- charStrings: charStrings,
736
- seacs: seacs,
737
- widths: widths
737
+ charStrings,
738
+ seacs,
739
+ widths
738
740
  };
739
741
  },
742
+
740
743
  emptyPrivateDictionary: function CFFParser_emptyPrivateDictionary(parentDict) {
741
744
  var privateDict = this.createDict(CFFPrivateDict, [], parentDict.strings);
742
745
  parentDict.setByKey(18, [0, 0]);
743
746
  parentDict.privateDict = privateDict;
744
747
  },
745
748
  parsePrivateDict: function CFFParser_parsePrivateDict(parentDict) {
746
- if (!parentDict.hasName('Private')) {
749
+ if (!parentDict.hasName("Private")) {
747
750
  this.emptyPrivateDictionary(parentDict);
748
751
  return;
749
752
  }
750
753
 
751
- var privateOffset = parentDict.getByName('Private');
754
+ var privateOffset = parentDict.getByName("Private");
752
755
 
753
756
  if (!Array.isArray(privateOffset) || privateOffset.length !== 2) {
754
- parentDict.removeByName('Private');
757
+ parentDict.removeByName("Private");
755
758
  return;
756
759
  }
757
760
 
@@ -769,11 +772,11 @@ var CFFParser = function CFFParserClosure() {
769
772
  var privateDict = this.createDict(CFFPrivateDict, dict, parentDict.strings);
770
773
  parentDict.privateDict = privateDict;
771
774
 
772
- if (!privateDict.getByName('Subrs')) {
775
+ if (!privateDict.getByName("Subrs")) {
773
776
  return;
774
777
  }
775
778
 
776
- var subrsOffset = privateDict.getByName('Subrs');
779
+ var subrsOffset = privateDict.getByName("Subrs");
777
780
  var relativeOffset = offset + subrsOffset;
778
781
 
779
782
  if (subrsOffset === 0 || relativeOffset >= this.bytes.length) {
@@ -796,7 +799,7 @@ var CFFParser = function CFFParserClosure() {
796
799
  var bytes = this.bytes;
797
800
  var start = pos;
798
801
  var format = bytes[pos++];
799
- var charset = ['.notdef'];
802
+ var charset = [".notdef"];
800
803
  var id, count, i;
801
804
  length -= 1;
802
805
 
@@ -834,7 +837,7 @@ var CFFParser = function CFFParserClosure() {
834
837
  break;
835
838
 
836
839
  default:
837
- throw new _util.FormatError('Unknown charset format');
840
+ throw new _util.FormatError("Unknown charset format");
838
841
  }
839
842
 
840
843
  var end = pos;
@@ -900,7 +903,7 @@ var CFFParser = function CFFParserClosure() {
900
903
  break;
901
904
 
902
905
  default:
903
- throw new _util.FormatError("Unknown encoding format: ".concat(format, " in CFF"));
906
+ throw new _util.FormatError(`Unknown encoding format: ${format} in CFF`);
904
907
  }
905
908
 
906
909
  var dataEnd = pos;
@@ -938,7 +941,7 @@ var CFFParser = function CFFParserClosure() {
938
941
  var first = bytes[pos++] << 8 | bytes[pos++];
939
942
 
940
943
  if (i === 0 && first !== 0) {
941
- (0, _util.warn)('parseFDSelect: The first range must have a first GID of 0' + ' -- trying to recover.');
944
+ (0, _util.warn)("parseFDSelect: The first range must have a first GID of 0" + " -- trying to recover.");
942
945
  first = 0;
943
946
  }
944
947
 
@@ -954,11 +957,11 @@ var CFFParser = function CFFParserClosure() {
954
957
  break;
955
958
 
956
959
  default:
957
- throw new _util.FormatError("parseFDSelect: Unknown format \"".concat(format, "\"."));
960
+ throw new _util.FormatError(`parseFDSelect: Unknown format "${format}".`);
958
961
  }
959
962
 
960
963
  if (fdSelect.length !== length) {
961
- throw new _util.FormatError('parseFDSelect: Invalid font data.');
964
+ throw new _util.FormatError("parseFDSelect: Invalid font data.");
962
965
  }
963
966
 
964
967
  return new CFFFDSelect(format, fdSelect);
@@ -987,7 +990,7 @@ var CFF = function CFFClosure() {
987
990
  CFF.prototype = {
988
991
  duplicateFirstGlyph: function CFF_duplicateFirstGlyph() {
989
992
  if (this.charStrings.count >= 65535) {
990
- (0, _util.warn)('Not enough space in charstrings to duplicate first glyph.');
993
+ (0, _util.warn)("Not enough space in charstrings to duplicate first glyph.");
991
994
  return;
992
995
  }
993
996
 
@@ -1043,7 +1046,7 @@ var CFFStrings = function CFFStringsClosure() {
1043
1046
  return CFFStandardStrings[0];
1044
1047
  },
1045
1048
  getSID: function CFFStrings_getSID(str) {
1046
- var index = CFFStandardStrings.indexOf(str);
1049
+ let index = CFFStandardStrings.indexOf(str);
1047
1050
 
1048
1051
  if (index !== -1) {
1049
1052
  return index;
@@ -1133,7 +1136,7 @@ var CFFDict = function CFFDictClosure() {
1133
1136
 
1134
1137
  var type = this.types[key];
1135
1138
 
1136
- if (type === 'num' || type === 'sid' || type === 'offset') {
1139
+ if (type === "num" || type === "sid" || type === "offset") {
1137
1140
  value = value[0];
1138
1141
  }
1139
1142
 
@@ -1142,7 +1145,7 @@ var CFFDict = function CFFDictClosure() {
1142
1145
  },
1143
1146
  setByName: function CFFDict_setByName(name, value) {
1144
1147
  if (!(name in this.nameToKeyMap)) {
1145
- throw new _util.FormatError("Invalid dictionary name \"".concat(name, "\""));
1148
+ throw new _util.FormatError(`Invalid dictionary name "${name}"`);
1146
1149
  }
1147
1150
 
1148
1151
  this.values[this.nameToKeyMap[name]] = value;
@@ -1152,7 +1155,7 @@ var CFFDict = function CFFDictClosure() {
1152
1155
  },
1153
1156
  getByName: function CFFDict_getByName(name) {
1154
1157
  if (!(name in this.nameToKeyMap)) {
1155
- throw new _util.FormatError("Invalid dictionary name ".concat(name, "\""));
1158
+ throw new _util.FormatError(`Invalid dictionary name ${name}"`);
1156
1159
  }
1157
1160
 
1158
1161
  var key = this.nameToKeyMap[name];
@@ -1196,7 +1199,7 @@ var CFFDict = function CFFDictClosure() {
1196
1199
  }();
1197
1200
 
1198
1201
  var CFFTopDict = function CFFTopDictClosure() {
1199
- var layout = [[[12, 30], 'ROS', ['sid', 'sid', 'num'], null], [[12, 20], 'SyntheticBase', 'num', null], [0, 'version', 'sid', null], [1, 'Notice', 'sid', null], [[12, 0], 'Copyright', 'sid', null], [2, 'FullName', 'sid', null], [3, 'FamilyName', 'sid', null], [4, 'Weight', 'sid', null], [[12, 1], 'isFixedPitch', 'num', 0], [[12, 2], 'ItalicAngle', 'num', 0], [[12, 3], 'UnderlinePosition', 'num', -100], [[12, 4], 'UnderlineThickness', 'num', 50], [[12, 5], 'PaintType', 'num', 0], [[12, 6], 'CharstringType', 'num', 2], [[12, 7], 'FontMatrix', ['num', 'num', 'num', 'num', 'num', 'num'], [0.001, 0, 0, 0.001, 0, 0]], [13, 'UniqueID', 'num', null], [5, 'FontBBox', ['num', 'num', 'num', 'num'], [0, 0, 0, 0]], [[12, 8], 'StrokeWidth', 'num', 0], [14, 'XUID', 'array', null], [15, 'charset', 'offset', 0], [16, 'Encoding', 'offset', 0], [17, 'CharStrings', 'offset', 0], [18, 'Private', ['offset', 'offset'], null], [[12, 21], 'PostScript', 'sid', null], [[12, 22], 'BaseFontName', 'sid', null], [[12, 23], 'BaseFontBlend', 'delta', null], [[12, 31], 'CIDFontVersion', 'num', 0], [[12, 32], 'CIDFontRevision', 'num', 0], [[12, 33], 'CIDFontType', 'num', 0], [[12, 34], 'CIDCount', 'num', 8720], [[12, 35], 'UIDBase', 'num', null], [[12, 37], 'FDSelect', 'offset', null], [[12, 36], 'FDArray', 'offset', null], [[12, 38], 'FontName', 'sid', null]];
1202
+ var layout = [[[12, 30], "ROS", ["sid", "sid", "num"], null], [[12, 20], "SyntheticBase", "num", null], [0, "version", "sid", null], [1, "Notice", "sid", null], [[12, 0], "Copyright", "sid", null], [2, "FullName", "sid", null], [3, "FamilyName", "sid", null], [4, "Weight", "sid", null], [[12, 1], "isFixedPitch", "num", 0], [[12, 2], "ItalicAngle", "num", 0], [[12, 3], "UnderlinePosition", "num", -100], [[12, 4], "UnderlineThickness", "num", 50], [[12, 5], "PaintType", "num", 0], [[12, 6], "CharstringType", "num", 2], [[12, 7], "FontMatrix", ["num", "num", "num", "num", "num", "num"], [0.001, 0, 0, 0.001, 0, 0]], [13, "UniqueID", "num", null], [5, "FontBBox", ["num", "num", "num", "num"], [0, 0, 0, 0]], [[12, 8], "StrokeWidth", "num", 0], [14, "XUID", "array", null], [15, "charset", "offset", 0], [16, "Encoding", "offset", 0], [17, "CharStrings", "offset", 0], [18, "Private", ["offset", "offset"], null], [[12, 21], "PostScript", "sid", null], [[12, 22], "BaseFontName", "sid", null], [[12, 23], "BaseFontBlend", "delta", null], [[12, 31], "CIDFontVersion", "num", 0], [[12, 32], "CIDFontRevision", "num", 0], [[12, 33], "CIDFontType", "num", 0], [[12, 34], "CIDCount", "num", 8720], [[12, 35], "UIDBase", "num", null], [[12, 37], "FDSelect", "offset", null], [[12, 36], "FDArray", "offset", null], [[12, 38], "FontName", "sid", null]];
1200
1203
  var tables = null;
1201
1204
 
1202
1205
  function CFFTopDict(strings) {
@@ -1215,7 +1218,7 @@ var CFFTopDict = function CFFTopDictClosure() {
1215
1218
  exports.CFFTopDict = CFFTopDict;
1216
1219
 
1217
1220
  var CFFPrivateDict = function CFFPrivateDictClosure() {
1218
- var layout = [[6, 'BlueValues', 'delta', null], [7, 'OtherBlues', 'delta', null], [8, 'FamilyBlues', 'delta', null], [9, 'FamilyOtherBlues', 'delta', null], [[12, 9], 'BlueScale', 'num', 0.039625], [[12, 10], 'BlueShift', 'num', 7], [[12, 11], 'BlueFuzz', 'num', 1], [10, 'StdHW', 'num', null], [11, 'StdVW', 'num', null], [[12, 12], 'StemSnapH', 'delta', null], [[12, 13], 'StemSnapV', 'delta', null], [[12, 14], 'ForceBold', 'num', 0], [[12, 17], 'LanguageGroup', 'num', 0], [[12, 18], 'ExpansionFactor', 'num', 0.06], [[12, 19], 'initialRandomSeed', 'num', 0], [20, 'defaultWidthX', 'num', 0], [21, 'nominalWidthX', 'num', 0], [19, 'Subrs', 'offset', null]];
1221
+ var layout = [[6, "BlueValues", "delta", null], [7, "OtherBlues", "delta", null], [8, "FamilyBlues", "delta", null], [9, "FamilyOtherBlues", "delta", null], [[12, 9], "BlueScale", "num", 0.039625], [[12, 10], "BlueShift", "num", 7], [[12, 11], "BlueFuzz", "num", 1], [10, "StdHW", "num", null], [11, "StdVW", "num", null], [[12, 12], "StemSnapH", "delta", null], [[12, 13], "StemSnapV", "delta", null], [[12, 14], "ForceBold", "num", 0], [[12, 17], "LanguageGroup", "num", 0], [[12, 18], "ExpansionFactor", "num", 0.06], [[12, 19], "initialRandomSeed", "num", 0], [20, "defaultWidthX", "num", 0], [21, "nominalWidthX", "num", 0], [19, "Subrs", "offset", null]];
1219
1222
  var tables = null;
1220
1223
 
1221
1224
  function CFFPrivateDict(strings) {
@@ -1293,7 +1296,7 @@ var CFFOffsetTracker = function CFFOffsetTrackerClosure() {
1293
1296
  },
1294
1297
  track: function CFFOffsetTracker_track(key, location) {
1295
1298
  if (key in this.offsets) {
1296
- throw new _util.FormatError("Already tracking location of ".concat(key));
1299
+ throw new _util.FormatError(`Already tracking location of ${key}`);
1297
1300
  }
1298
1301
 
1299
1302
  this.offsets[key] = location;
@@ -1305,7 +1308,7 @@ var CFFOffsetTracker = function CFFOffsetTrackerClosure() {
1305
1308
  },
1306
1309
  setEntryLocation: function CFFOffsetTracker_setEntryLocation(key, values, output) {
1307
1310
  if (!(key in this.offsets)) {
1308
- throw new _util.FormatError("Not tracking location of ".concat(key));
1311
+ throw new _util.FormatError(`Not tracking location of ${key}`);
1309
1312
  }
1310
1313
 
1311
1314
  var data = output.data;
@@ -1320,15 +1323,15 @@ var CFFOffsetTracker = function CFFOffsetTrackerClosure() {
1320
1323
  var offset4 = offset0 + 4;
1321
1324
 
1322
1325
  if (data[offset0] !== 0x1d || data[offset1] !== 0 || data[offset2] !== 0 || data[offset3] !== 0 || data[offset4] !== 0) {
1323
- throw new _util.FormatError('writing to an offset that is not empty');
1326
+ throw new _util.FormatError("writing to an offset that is not empty");
1324
1327
  }
1325
1328
 
1326
1329
  var value = values[i];
1327
1330
  data[offset0] = 0x1d;
1328
- data[offset1] = value >> 24 & 0xFF;
1329
- data[offset2] = value >> 16 & 0xFF;
1330
- data[offset3] = value >> 8 & 0xFF;
1331
- data[offset4] = value & 0xFF;
1331
+ data[offset1] = value >> 24 & 0xff;
1332
+ data[offset2] = value >> 16 & 0xff;
1333
+ data[offset3] = value >> 8 & 0xff;
1334
+ data[offset4] = value & 0xff;
1332
1335
  }
1333
1336
  }
1334
1337
  };
@@ -1357,24 +1360,24 @@ var CFFCompiler = function CFFCompilerClosure() {
1357
1360
  output.add(nameIndex);
1358
1361
 
1359
1362
  if (cff.isCIDFont) {
1360
- if (cff.topDict.hasName('FontMatrix')) {
1361
- var base = cff.topDict.getByName('FontMatrix');
1362
- cff.topDict.removeByName('FontMatrix');
1363
+ if (cff.topDict.hasName("FontMatrix")) {
1364
+ var base = cff.topDict.getByName("FontMatrix");
1365
+ cff.topDict.removeByName("FontMatrix");
1363
1366
 
1364
1367
  for (var i = 0, ii = cff.fdArray.length; i < ii; i++) {
1365
1368
  var subDict = cff.fdArray[i];
1366
1369
  var matrix = base.slice(0);
1367
1370
 
1368
- if (subDict.hasName('FontMatrix')) {
1369
- matrix = _util.Util.transform(matrix, subDict.getByName('FontMatrix'));
1371
+ if (subDict.hasName("FontMatrix")) {
1372
+ matrix = _util.Util.transform(matrix, subDict.getByName("FontMatrix"));
1370
1373
  }
1371
1374
 
1372
- subDict.setByName('FontMatrix', matrix);
1375
+ subDict.setByName("FontMatrix", matrix);
1373
1376
  }
1374
1377
  }
1375
1378
  }
1376
1379
 
1377
- cff.topDict.setByName('charset', 0);
1380
+ cff.topDict.setByName("charset", 0);
1378
1381
  var compiled = this.compileTopDicts([cff.topDict], output.length, cff.isCIDFont);
1379
1382
  output.add(compiled.output);
1380
1383
  var topDictTracker = compiled.trackers[0];
@@ -1383,29 +1386,29 @@ var CFFCompiler = function CFFCompilerClosure() {
1383
1386
  var globalSubrIndex = this.compileIndex(cff.globalSubrIndex);
1384
1387
  output.add(globalSubrIndex);
1385
1388
 
1386
- if (cff.encoding && cff.topDict.hasName('Encoding')) {
1389
+ if (cff.encoding && cff.topDict.hasName("Encoding")) {
1387
1390
  if (cff.encoding.predefined) {
1388
- topDictTracker.setEntryLocation('Encoding', [cff.encoding.format], output);
1391
+ topDictTracker.setEntryLocation("Encoding", [cff.encoding.format], output);
1389
1392
  } else {
1390
1393
  var encoding = this.compileEncoding(cff.encoding);
1391
- topDictTracker.setEntryLocation('Encoding', [output.length], output);
1394
+ topDictTracker.setEntryLocation("Encoding", [output.length], output);
1392
1395
  output.add(encoding);
1393
1396
  }
1394
1397
  }
1395
1398
 
1396
1399
  var charset = this.compileCharset(cff.charset, cff.charStrings.count, cff.strings, cff.isCIDFont);
1397
- topDictTracker.setEntryLocation('charset', [output.length], output);
1400
+ topDictTracker.setEntryLocation("charset", [output.length], output);
1398
1401
  output.add(charset);
1399
1402
  var charStrings = this.compileCharStrings(cff.charStrings);
1400
- topDictTracker.setEntryLocation('CharStrings', [output.length], output);
1403
+ topDictTracker.setEntryLocation("CharStrings", [output.length], output);
1401
1404
  output.add(charStrings);
1402
1405
 
1403
1406
  if (cff.isCIDFont) {
1404
- topDictTracker.setEntryLocation('FDSelect', [output.length], output);
1407
+ topDictTracker.setEntryLocation("FDSelect", [output.length], output);
1405
1408
  var fdSelect = this.compileFDSelect(cff.fdSelect);
1406
1409
  output.add(fdSelect);
1407
1410
  compiled = this.compileTopDicts(cff.fdArray, output.length, true);
1408
- topDictTracker.setEntryLocation('FDArray', [output.length], output);
1411
+ topDictTracker.setEntryLocation("FDArray", [output.length], output);
1409
1412
  output.add(compiled.output);
1410
1413
  var fontDictTrackers = compiled.trackers;
1411
1414
  this.compilePrivateDicts(cff.fdArray, fontDictTrackers, output);
@@ -1427,28 +1430,28 @@ var CFFCompiler = function CFFCompilerClosure() {
1427
1430
  var m = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(value);
1428
1431
 
1429
1432
  if (m) {
1430
- var epsilon = parseFloat('1e' + ((m[2] ? +m[2] : 0) + m[1].length));
1433
+ var epsilon = parseFloat("1e" + ((m[2] ? +m[2] : 0) + m[1].length));
1431
1434
  value = (Math.round(num * epsilon) / epsilon).toString();
1432
1435
  }
1433
1436
 
1434
- var nibbles = '';
1437
+ var nibbles = "";
1435
1438
  var i, ii;
1436
1439
 
1437
1440
  for (i = 0, ii = value.length; i < ii; ++i) {
1438
1441
  var a = value[i];
1439
1442
 
1440
- if (a === 'e') {
1441
- nibbles += value[++i] === '-' ? 'c' : 'b';
1442
- } else if (a === '.') {
1443
- nibbles += 'a';
1444
- } else if (a === '-') {
1445
- nibbles += 'e';
1443
+ if (a === "e") {
1444
+ nibbles += value[++i] === "-" ? "c" : "b";
1445
+ } else if (a === ".") {
1446
+ nibbles += "a";
1447
+ } else if (a === "-") {
1448
+ nibbles += "e";
1446
1449
  } else {
1447
1450
  nibbles += a;
1448
1451
  }
1449
1452
  }
1450
1453
 
1451
- nibbles += nibbles.length & 1 ? 'f' : 'ff';
1454
+ nibbles += nibbles.length & 1 ? "f" : "ff";
1452
1455
  var out = [30];
1453
1456
 
1454
1457
  for (i = 0, ii = nibbles.length; i < ii; i += 2) {
@@ -1464,14 +1467,14 @@ var CFFCompiler = function CFFCompilerClosure() {
1464
1467
  code = [value + 139];
1465
1468
  } else if (value >= 108 && value <= 1131) {
1466
1469
  value = value - 108;
1467
- code = [(value >> 8) + 247, value & 0xFF];
1470
+ code = [(value >> 8) + 247, value & 0xff];
1468
1471
  } else if (value >= -1131 && value <= -108) {
1469
1472
  value = -value - 108;
1470
- code = [(value >> 8) + 251, value & 0xFF];
1473
+ code = [(value >> 8) + 251, value & 0xff];
1471
1474
  } else if (value >= -32768 && value <= 32767) {
1472
- code = [0x1c, value >> 8 & 0xFF, value & 0xFF];
1475
+ code = [0x1c, value >> 8 & 0xff, value & 0xff];
1473
1476
  } else {
1474
- code = [0x1d, value >> 24 & 0xFF, value >> 16 & 0xFF, value >> 8 & 0xFF, value & 0xFF];
1477
+ code = [0x1d, value >> 24 & 0xff, value >> 16 & 0xff, value >> 8 & 0xff, value & 0xff];
1475
1478
  }
1476
1479
 
1477
1480
  return code;
@@ -1488,19 +1491,19 @@ var CFFCompiler = function CFFCompilerClosure() {
1488
1491
  var sanitizedName = new Array(length);
1489
1492
 
1490
1493
  for (var j = 0; j < length; j++) {
1491
- var _char = name[j];
1494
+ var char = name[j];
1492
1495
 
1493
- if (_char < '!' || _char > '~' || _char === '[' || _char === ']' || _char === '(' || _char === ')' || _char === '{' || _char === '}' || _char === '<' || _char === '>' || _char === '/' || _char === '%') {
1494
- _char = '_';
1496
+ if (char < "!" || char > "~" || char === "[" || char === "]" || char === "(" || char === ")" || char === "{" || char === "}" || char === "<" || char === ">" || char === "/" || char === "%") {
1497
+ char = "_";
1495
1498
  }
1496
1499
 
1497
- sanitizedName[j] = _char;
1500
+ sanitizedName[j] = char;
1498
1501
  }
1499
1502
 
1500
- sanitizedName = sanitizedName.join('');
1503
+ sanitizedName = sanitizedName.join("");
1501
1504
 
1502
- if (sanitizedName === '') {
1503
- sanitizedName = 'Bad_Font_Name';
1505
+ if (sanitizedName === "") {
1506
+ sanitizedName = "Bad_Font_Name";
1504
1507
  }
1505
1508
 
1506
1509
  nameIndex.add((0, _util.stringToBytes)(sanitizedName));
@@ -1516,11 +1519,11 @@ var CFFCompiler = function CFFCompilerClosure() {
1516
1519
  var fontDict = dicts[i];
1517
1520
 
1518
1521
  if (removeCidKeys) {
1519
- fontDict.removeByName('CIDFontVersion');
1520
- fontDict.removeByName('CIDFontRevision');
1521
- fontDict.removeByName('CIDFontType');
1522
- fontDict.removeByName('CIDCount');
1523
- fontDict.removeByName('UIDBase');
1522
+ fontDict.removeByName("CIDFontVersion");
1523
+ fontDict.removeByName("CIDFontRevision");
1524
+ fontDict.removeByName("CIDFontType");
1525
+ fontDict.removeByName("CIDCount");
1526
+ fontDict.removeByName("UIDBase");
1524
1527
  }
1525
1528
 
1526
1529
  var fontDictTracker = new CFFOffsetTracker();
@@ -1541,8 +1544,8 @@ var CFFCompiler = function CFFCompilerClosure() {
1541
1544
  var fontDict = dicts[i];
1542
1545
  var privateDict = fontDict.privateDict;
1543
1546
 
1544
- if (!privateDict || !fontDict.hasName('Private')) {
1545
- throw new _util.FormatError('There must be a private dictionary.');
1547
+ if (!privateDict || !fontDict.hasName("Private")) {
1548
+ throw new _util.FormatError("There must be a private dictionary.");
1546
1549
  }
1547
1550
 
1548
1551
  var privateDictTracker = new CFFOffsetTracker();
@@ -1554,12 +1557,12 @@ var CFFCompiler = function CFFCompilerClosure() {
1554
1557
  outputLength = 0;
1555
1558
  }
1556
1559
 
1557
- trackers[i].setEntryLocation('Private', [privateDictData.length, outputLength], output);
1560
+ trackers[i].setEntryLocation("Private", [privateDictData.length, outputLength], output);
1558
1561
  output.add(privateDictData);
1559
1562
 
1560
- if (privateDict.subrsIndex && privateDict.hasName('Subrs')) {
1563
+ if (privateDict.subrsIndex && privateDict.hasName("Subrs")) {
1561
1564
  var subrs = this.compileIndex(privateDict.subrsIndex);
1562
- privateDictTracker.setEntryLocation('Subrs', [privateDictData.length], output);
1565
+ privateDictTracker.setEntryLocation("Subrs", [privateDictData.length], output);
1563
1566
  output.add(subrs);
1564
1567
  }
1565
1568
  }
@@ -1595,12 +1598,12 @@ var CFFCompiler = function CFFCompilerClosure() {
1595
1598
  var value = values[j];
1596
1599
 
1597
1600
  switch (type) {
1598
- case 'num':
1599
- case 'sid':
1601
+ case "num":
1602
+ case "sid":
1600
1603
  out = out.concat(this.encodeNumber(value));
1601
1604
  break;
1602
1605
 
1603
- case 'offset':
1606
+ case "offset":
1604
1607
  var name = dict.keyToNameMap[key];
1605
1608
 
1606
1609
  if (!offsetTracker.isTracking(name)) {
@@ -1610,8 +1613,8 @@ var CFFCompiler = function CFFCompilerClosure() {
1610
1613
  out = out.concat([0x1d, 0, 0, 0, 0]);
1611
1614
  break;
1612
1615
 
1613
- case 'array':
1614
- case 'delta':
1616
+ case "array":
1617
+ case "delta":
1615
1618
  out = out.concat(this.encodeNumber(value));
1616
1619
 
1617
1620
  for (var k = 1, kk = values.length; k < kk; ++k) {
@@ -1621,7 +1624,7 @@ var CFFCompiler = function CFFCompilerClosure() {
1621
1624
  break;
1622
1625
 
1623
1626
  default:
1624
- throw new _util.FormatError("Unknown data type of ".concat(type));
1627
+ throw new _util.FormatError(`Unknown data type of ${type}`);
1625
1628
  }
1626
1629
  }
1627
1630
 
@@ -1650,7 +1653,7 @@ var CFFCompiler = function CFFCompilerClosure() {
1650
1653
  var glyph = charStrings.get(i);
1651
1654
 
1652
1655
  if (glyph.length === 0) {
1653
- charStringsIndex.add(new Uint8Array([0x8B, 0x0E]));
1656
+ charStringsIndex.add(new Uint8Array([0x8b, 0x0e]));
1654
1657
  continue;
1655
1658
  }
1656
1659
 
@@ -1660,24 +1663,24 @@ var CFFCompiler = function CFFCompilerClosure() {
1660
1663
  return this.compileIndex(charStringsIndex);
1661
1664
  },
1662
1665
  compileCharset: function CFFCompiler_compileCharset(charset, numGlyphs, strings, isCIDFont) {
1663
- var out;
1664
- var numGlyphsLessNotDef = numGlyphs - 1;
1666
+ let out;
1667
+ const numGlyphsLessNotDef = numGlyphs - 1;
1665
1668
 
1666
1669
  if (isCIDFont) {
1667
- out = new Uint8Array([2, 0, 0, numGlyphsLessNotDef >> 8 & 0xFF, numGlyphsLessNotDef & 0xFF]);
1670
+ out = new Uint8Array([2, 0, 0, numGlyphsLessNotDef >> 8 & 0xff, numGlyphsLessNotDef & 0xff]);
1668
1671
  } else {
1669
- var length = 1 + numGlyphsLessNotDef * 2;
1672
+ const length = 1 + numGlyphsLessNotDef * 2;
1670
1673
  out = new Uint8Array(length);
1671
1674
  out[0] = 0;
1672
- var charsetIndex = 0;
1673
- var numCharsets = charset.charset.length;
1674
- var warned = false;
1675
+ let charsetIndex = 0;
1676
+ const numCharsets = charset.charset.length;
1677
+ let warned = false;
1675
1678
 
1676
- for (var i = 1; i < out.length; i += 2) {
1677
- var sid = 0;
1679
+ for (let i = 1; i < out.length; i += 2) {
1680
+ let sid = 0;
1678
1681
 
1679
1682
  if (charsetIndex < numCharsets) {
1680
- var name = charset.charset[charsetIndex++];
1683
+ const name = charset.charset[charsetIndex++];
1681
1684
  sid = strings.getSID(name);
1682
1685
 
1683
1686
  if (sid === -1) {
@@ -1685,13 +1688,13 @@ var CFFCompiler = function CFFCompilerClosure() {
1685
1688
 
1686
1689
  if (!warned) {
1687
1690
  warned = true;
1688
- (0, _util.warn)("Couldn't find ".concat(name, " in CFF strings"));
1691
+ (0, _util.warn)(`Couldn't find ${name} in CFF strings`);
1689
1692
  }
1690
1693
  }
1691
1694
  }
1692
1695
 
1693
- out[i] = sid >> 8 & 0xFF;
1694
- out[i + 1] = sid & 0xFF;
1696
+ out[i] = sid >> 8 & 0xff;
1697
+ out[i + 1] = sid & 0xff;
1695
1698
  }
1696
1699
  }
1697
1700
 
@@ -1701,8 +1704,8 @@ var CFFCompiler = function CFFCompilerClosure() {
1701
1704
  return this.compileTypedArray(encoding.raw);
1702
1705
  },
1703
1706
  compileFDSelect: function CFFCompiler_compileFDSelect(fdSelect) {
1704
- var format = fdSelect.format;
1705
- var out, i;
1707
+ const format = fdSelect.format;
1708
+ let out, i;
1706
1709
 
1707
1710
  switch (format) {
1708
1711
  case 0:
@@ -1716,23 +1719,23 @@ var CFFCompiler = function CFFCompilerClosure() {
1716
1719
  break;
1717
1720
 
1718
1721
  case 3:
1719
- var start = 0;
1720
- var lastFD = fdSelect.fdSelect[0];
1721
- var ranges = [format, 0, 0, start >> 8 & 0xFF, start & 0xFF, lastFD];
1722
+ const start = 0;
1723
+ let lastFD = fdSelect.fdSelect[0];
1724
+ const ranges = [format, 0, 0, start >> 8 & 0xff, start & 0xff, lastFD];
1722
1725
 
1723
1726
  for (i = 1; i < fdSelect.fdSelect.length; i++) {
1724
- var currentFD = fdSelect.fdSelect[i];
1727
+ const currentFD = fdSelect.fdSelect[i];
1725
1728
 
1726
1729
  if (currentFD !== lastFD) {
1727
- ranges.push(i >> 8 & 0xFF, i & 0xFF, currentFD);
1730
+ ranges.push(i >> 8 & 0xff, i & 0xff, currentFD);
1728
1731
  lastFD = currentFD;
1729
1732
  }
1730
1733
  }
1731
1734
 
1732
- var numRanges = (ranges.length - 3) / 3;
1733
- ranges[1] = numRanges >> 8 & 0xFF;
1734
- ranges[2] = numRanges & 0xFF;
1735
- ranges.push(i >> 8 & 0xFF, i & 0xFF);
1735
+ const numRanges = (ranges.length - 3) / 3;
1736
+ ranges[1] = numRanges >> 8 & 0xff;
1737
+ ranges[2] = numRanges & 0xff;
1738
+ ranges.push(i >> 8 & 0xff, i & 0xff);
1736
1739
  out = new Uint8Array(ranges);
1737
1740
  break;
1738
1741
  }
@@ -1757,7 +1760,7 @@ var CFFCompiler = function CFFCompilerClosure() {
1757
1760
  return [0, 0, 0];
1758
1761
  }
1759
1762
 
1760
- var data = [count >> 8 & 0xFF, count & 0xff];
1763
+ var data = [count >> 8 & 0xff, count & 0xff];
1761
1764
  var lastOffset = 1,
1762
1765
  i;
1763
1766
 
@@ -1782,13 +1785,13 @@ var CFFCompiler = function CFFCompilerClosure() {
1782
1785
 
1783
1786
  for (i = 0; i < count + 1; i++) {
1784
1787
  if (offsetSize === 1) {
1785
- data.push(relativeOffset & 0xFF);
1788
+ data.push(relativeOffset & 0xff);
1786
1789
  } else if (offsetSize === 2) {
1787
- data.push(relativeOffset >> 8 & 0xFF, relativeOffset & 0xFF);
1790
+ data.push(relativeOffset >> 8 & 0xff, relativeOffset & 0xff);
1788
1791
  } else if (offsetSize === 3) {
1789
- data.push(relativeOffset >> 16 & 0xFF, relativeOffset >> 8 & 0xFF, relativeOffset & 0xFF);
1792
+ data.push(relativeOffset >> 16 & 0xff, relativeOffset >> 8 & 0xff, relativeOffset & 0xff);
1790
1793
  } else {
1791
- data.push(relativeOffset >>> 24 & 0xFF, relativeOffset >> 16 & 0xFF, relativeOffset >> 8 & 0xFF, relativeOffset & 0xFF);
1794
+ data.push(relativeOffset >>> 24 & 0xff, relativeOffset >> 16 & 0xff, relativeOffset >> 8 & 0xff, relativeOffset & 0xff);
1792
1795
  }
1793
1796
 
1794
1797
  if (objects[i]) {