@turntrout/subfont 1.6.0 → 1.7.1

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.
Files changed (39) hide show
  1. package/README.md +43 -43
  2. package/lib/FontTracerPool.d.ts +37 -0
  3. package/lib/FontTracerPool.d.ts.map +1 -0
  4. package/lib/FontTracerPool.js +212 -173
  5. package/lib/FontTracerPool.js.map +1 -0
  6. package/lib/HeadlessBrowser.js +11 -3
  7. package/lib/cli.d.ts +3 -0
  8. package/lib/cli.d.ts.map +1 -0
  9. package/lib/cli.js +15 -12
  10. package/lib/cli.js.map +1 -0
  11. package/lib/collectTextsByPage.js +425 -352
  12. package/lib/escapeJsStringLiteral.js +13 -0
  13. package/lib/extractVisibleText.js +6 -2
  14. package/lib/fontConverter.js +25 -0
  15. package/lib/fontConverterWorker.js +16 -0
  16. package/lib/fontFaceHelpers.js +16 -4
  17. package/lib/gatherStylesheetsWithPredicates.js +4 -5
  18. package/lib/normalizeFontPropertyValue.js +1 -1
  19. package/lib/sfntCache.js +10 -7
  20. package/lib/subfont.d.ts +33 -0
  21. package/lib/subfont.d.ts.map +1 -0
  22. package/lib/subfont.js +533 -591
  23. package/lib/subfont.js.map +1 -0
  24. package/lib/subsetFontWithGlyphs.d.ts +17 -0
  25. package/lib/subsetFontWithGlyphs.d.ts.map +1 -0
  26. package/lib/subsetFontWithGlyphs.js +231 -253
  27. package/lib/subsetFontWithGlyphs.js.map +1 -0
  28. package/lib/subsetFonts.d.ts +59 -0
  29. package/lib/subsetFonts.d.ts.map +1 -0
  30. package/lib/subsetFonts.js +921 -1180
  31. package/lib/subsetFonts.js.map +1 -0
  32. package/lib/subsetGeneration.d.ts +39 -0
  33. package/lib/subsetGeneration.d.ts.map +1 -0
  34. package/lib/subsetGeneration.js +294 -324
  35. package/lib/subsetGeneration.js.map +1 -0
  36. package/lib/unquote.js +9 -4
  37. package/lib/warnAboutMissingGlyphs.js +36 -25
  38. package/lib/wasmQueue.js +6 -2
  39. package/package.json +11 -3
package/lib/cli.js CHANGED
@@ -1,14 +1,17 @@
1
1
  #!/usr/bin/env node
2
-
3
- const { yargs, help, ...options } = require('./parseCommandLineOptions')();
4
-
5
- require('@gustavnikolaj/async-main-wrap')(require('./subfont'), {
6
- processError(err) {
7
- yargs.showHelp();
8
- if (err.name === 'UsageError') {
9
- // Avoid rendering a stack trace for the wrong usage errors
10
- err.customOutput = err.message;
11
- }
12
- return err;
13
- },
2
+ "use strict";
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ const parseCommandLineOptions = require("./parseCommandLineOptions");
5
+ const asyncMainWrap = require("@gustavnikolaj/async-main-wrap");
6
+ const subfont = require("./subfont");
7
+ const { yargs, help: _help, ...options } = parseCommandLineOptions();
8
+ asyncMainWrap(subfont, {
9
+ processError(err) {
10
+ yargs.showHelp();
11
+ if (err.name === 'UsageError') {
12
+ err.customOutput = err.message;
13
+ }
14
+ return err;
15
+ },
14
16
  })(options, console);
17
+ //# sourceMappingURL=cli.js.map
package/lib/cli.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cli.js","sourceRoot":"","sources":["../src/cli.ts"],"names":[],"mappings":";;;AAEA,qEAAsE;AACtE,gEAAiE;AACjE,qCAAsC;AAEtC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,OAAO,EAAE,GAAG,uBAAuB,EAAE,CAAC;AAIrE,aAAa,CAAC,OAAO,EAAE;IACrB,YAAY,CAAC,GAA0B;QACrC,KAAK,CAAC,QAAQ,EAAE,CAAC;QACjB,IAAI,GAAG,CAAC,IAAI,KAAK,YAAY,EAAE,CAAC;YAC9B,GAAG,CAAC,YAAY,GAAG,GAAG,CAAC,OAAO,CAAC;QACjC,CAAC;QACD,OAAO,GAAG,CAAC;IACb,CAAC;CACF,CAAC,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC"}