@ot-builder/cli-proc 1.6.3 → 1.7.0

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.
package/lib/procs/gc.js CHANGED
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.gcFont = void 0;
4
4
  const ImpLib = require("@ot-builder/common-impl");
5
+ const Ot = require("@ot-builder/ot");
5
6
  const Rectify = require("@ot-builder/rectify");
6
7
  const initial_visible_glyphs_1 = require("../support/initial-visible-glyphs");
7
8
  const index_1 = require("./merge-consolidate/index");
@@ -46,8 +47,32 @@ function cleanupInaccessibleLookups(table) {
46
47
  }
47
48
  }
48
49
  }
50
+ extendIndirectLookups(keptLookups);
49
51
  ImpLib.ArrayHelper.inPlaceShrinkArray(keptLookups, table.lookups);
50
52
  }
53
+ function isChainingLookup(lookup) {
54
+ return lookup instanceof Ot.Gsub.Chaining || lookup instanceof Ot.Gpos.Chaining;
55
+ }
56
+ function extendIndirectLookups(keptLookups) {
57
+ let sizeOld = keptLookups.size;
58
+ for (;;) {
59
+ const sizeNew = keptLookups.size;
60
+ for (const l of keptLookups) {
61
+ if (isChainingLookup(l)) {
62
+ for (const rule of l.rules) {
63
+ for (const app of rule.applications)
64
+ keptLookups.add(app.apply);
65
+ }
66
+ }
67
+ }
68
+ if (sizeNew === sizeOld) {
69
+ break;
70
+ }
71
+ else {
72
+ sizeOld = sizeNew;
73
+ }
74
+ }
75
+ }
51
76
  function collectAccessibleFeatures(lang, sink) {
52
77
  if (lang.requiredFeature)
53
78
  sink.add(lang.requiredFeature);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ot-builder/cli-proc",
3
- "version": "1.6.3",
3
+ "version": "1.7.0",
4
4
  "license": "MIT",
5
5
  "repository": {
6
6
  "type": "git",
@@ -24,16 +24,16 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "tslib": "^2.0.0",
27
- "@ot-builder/io-bin-font": "1.6.3",
28
- "@ot-builder/primitive": "1.6.3",
29
- "@ot-builder/common-impl": "1.6.3",
30
- "@ot-builder/rectify": "1.6.3",
31
- "@ot-builder/trace": "1.6.3",
32
- "@ot-builder/prelude": "1.6.3",
33
- "@ot-builder/ot": "1.6.3"
27
+ "@ot-builder/io-bin-font": "1.7.0",
28
+ "@ot-builder/primitive": "1.7.0",
29
+ "@ot-builder/common-impl": "1.7.0",
30
+ "@ot-builder/rectify": "1.7.0",
31
+ "@ot-builder/trace": "1.7.0",
32
+ "@ot-builder/prelude": "1.7.0",
33
+ "@ot-builder/ot": "1.7.0"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/jest": "^26.0.23",
37
- "jest": "^29.3.1"
37
+ "jest": "^29.6.2"
38
38
  }
39
39
  }