@ot-builder/cli-proc 1.5.5 → 1.6.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.
package/CHANGELOG.json CHANGED
@@ -2,7 +2,121 @@
2
2
  "name": "@ot-builder/cli-proc",
3
3
  "entries": [
4
4
  {
5
- "date": "Sat, 03 Dec 2022 01:08:18 GMT",
5
+ "date": "Sat, 28 Jan 2023 01:10:30 GMT",
6
+ "tag": "@ot-builder/cli-proc_v1.6.1",
7
+ "version": "1.6.1",
8
+ "comments": {
9
+ "patch": [
10
+ {
11
+ "author": "otbbuilder-dev@users.noreply.github.com",
12
+ "package": "@ot-builder/cli-proc",
13
+ "commit": "54ecbdd4230574b91f52d20aa11c1f90055a83e4",
14
+ "comment": "Bump deps and fix doc build"
15
+ },
16
+ {
17
+ "author": "beachball",
18
+ "package": "@ot-builder/cli-proc",
19
+ "comment": "Bump @ot-builder/io-bin-font to v1.6.1",
20
+ "commit": "54ecbdd4230574b91f52d20aa11c1f90055a83e4"
21
+ },
22
+ {
23
+ "author": "beachball",
24
+ "package": "@ot-builder/cli-proc",
25
+ "comment": "Bump @ot-builder/primitive to v1.6.1",
26
+ "commit": "54ecbdd4230574b91f52d20aa11c1f90055a83e4"
27
+ },
28
+ {
29
+ "author": "beachball",
30
+ "package": "@ot-builder/cli-proc",
31
+ "comment": "Bump @ot-builder/common-impl to v1.6.1",
32
+ "commit": "54ecbdd4230574b91f52d20aa11c1f90055a83e4"
33
+ },
34
+ {
35
+ "author": "beachball",
36
+ "package": "@ot-builder/cli-proc",
37
+ "comment": "Bump @ot-builder/rectify to v1.6.1",
38
+ "commit": "54ecbdd4230574b91f52d20aa11c1f90055a83e4"
39
+ },
40
+ {
41
+ "author": "beachball",
42
+ "package": "@ot-builder/cli-proc",
43
+ "comment": "Bump @ot-builder/trace to v1.6.1",
44
+ "commit": "54ecbdd4230574b91f52d20aa11c1f90055a83e4"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@ot-builder/cli-proc",
49
+ "comment": "Bump @ot-builder/prelude to v1.6.1",
50
+ "commit": "54ecbdd4230574b91f52d20aa11c1f90055a83e4"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@ot-builder/cli-proc",
55
+ "comment": "Bump @ot-builder/ot to v1.6.1",
56
+ "commit": "54ecbdd4230574b91f52d20aa11c1f90055a83e4"
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ {
62
+ "date": "Sat, 21 Jan 2023 01:10:00 GMT",
63
+ "tag": "@ot-builder/cli-proc_v1.6.0",
64
+ "version": "1.6.0",
65
+ "comments": {
66
+ "minor": [
67
+ {
68
+ "author": "otbbuilder-dev@users.noreply.github.com",
69
+ "package": "@ot-builder/cli-proc",
70
+ "commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7",
71
+ "comment": "GC: add functionality to cleanup inaccessible lookups"
72
+ },
73
+ {
74
+ "author": "beachball",
75
+ "package": "@ot-builder/cli-proc",
76
+ "comment": "Bump @ot-builder/io-bin-font to v1.6.0",
77
+ "commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7"
78
+ },
79
+ {
80
+ "author": "beachball",
81
+ "package": "@ot-builder/cli-proc",
82
+ "comment": "Bump @ot-builder/primitive to v1.6.0",
83
+ "commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7"
84
+ },
85
+ {
86
+ "author": "beachball",
87
+ "package": "@ot-builder/cli-proc",
88
+ "comment": "Bump @ot-builder/common-impl to v1.6.0",
89
+ "commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7"
90
+ },
91
+ {
92
+ "author": "beachball",
93
+ "package": "@ot-builder/cli-proc",
94
+ "comment": "Bump @ot-builder/rectify to v1.6.0",
95
+ "commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7"
96
+ },
97
+ {
98
+ "author": "beachball",
99
+ "package": "@ot-builder/cli-proc",
100
+ "comment": "Bump @ot-builder/trace to v1.6.0",
101
+ "commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7"
102
+ },
103
+ {
104
+ "author": "beachball",
105
+ "package": "@ot-builder/cli-proc",
106
+ "comment": "Bump @ot-builder/prelude to v1.6.0",
107
+ "commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7"
108
+ },
109
+ {
110
+ "author": "beachball",
111
+ "package": "@ot-builder/cli-proc",
112
+ "comment": "Bump @ot-builder/ot to v1.6.0",
113
+ "commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7"
114
+ }
115
+ ]
116
+ }
117
+ },
118
+ {
119
+ "date": "Sat, 03 Dec 2022 01:09:39 GMT",
6
120
  "tag": "@ot-builder/cli-proc_v1.5.5",
7
121
  "version": "1.5.5",
8
122
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,12 +1,42 @@
1
1
  # Change Log - @ot-builder/cli-proc
2
2
 
3
- This log was last generated on Sat, 03 Dec 2022 01:08:18 GMT and should not be manually modified.
3
+ This log was last generated on Sat, 28 Jan 2023 01:10:30 GMT and should not be manually modified.
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 1.6.1
8
+
9
+ Sat, 28 Jan 2023 01:10:30 GMT
10
+
11
+ ### Patches
12
+
13
+ - Bump deps and fix doc build (otbbuilder-dev@users.noreply.github.com)
14
+ - Bump @ot-builder/io-bin-font to v1.6.1
15
+ - Bump @ot-builder/primitive to v1.6.1
16
+ - Bump @ot-builder/common-impl to v1.6.1
17
+ - Bump @ot-builder/rectify to v1.6.1
18
+ - Bump @ot-builder/trace to v1.6.1
19
+ - Bump @ot-builder/prelude to v1.6.1
20
+ - Bump @ot-builder/ot to v1.6.1
21
+
22
+ ## 1.6.0
23
+
24
+ Sat, 21 Jan 2023 01:10:00 GMT
25
+
26
+ ### Minor changes
27
+
28
+ - GC: add functionality to cleanup inaccessible lookups (otbbuilder-dev@users.noreply.github.com)
29
+ - Bump @ot-builder/io-bin-font to v1.6.0
30
+ - Bump @ot-builder/primitive to v1.6.0
31
+ - Bump @ot-builder/common-impl to v1.6.0
32
+ - Bump @ot-builder/rectify to v1.6.0
33
+ - Bump @ot-builder/trace to v1.6.0
34
+ - Bump @ot-builder/prelude to v1.6.0
35
+ - Bump @ot-builder/ot to v1.6.0
36
+
7
37
  ## 1.5.5
8
38
 
9
- Sat, 03 Dec 2022 01:08:18 GMT
39
+ Sat, 03 Dec 2022 01:09:39 GMT
10
40
 
11
41
  ### Patches
12
42
 
package/lib/procs/gc.js CHANGED
@@ -1,12 +1,61 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.gcFont = void 0;
4
+ const ImpLib = require("@ot-builder/common-impl");
4
5
  const Rectify = require("@ot-builder/rectify");
5
6
  const initial_visible_glyphs_1 = require("../support/initial-visible-glyphs");
7
+ const index_1 = require("./merge-consolidate/index");
6
8
  function gcFont(font, gsf) {
9
+ if (font.gsub)
10
+ cleanupInaccessibleLookups(font.gsub);
11
+ if (font.gpos)
12
+ cleanupInaccessibleLookups(font.gpos);
7
13
  const { glyphs, rectifier } = (0, initial_visible_glyphs_1.createSubsetRectifier)(font, { has: () => true });
8
14
  font.glyphs = gsf.createStoreFromList(glyphs);
9
15
  Rectify.inPlaceRectifyFontGlyphReferences(rectifier, font);
16
+ if (font.gpos)
17
+ font.gpos = (0, index_1.consolidateGsubGpos)(font.fvar, font.gpos);
18
+ if (font.gsub)
19
+ font.gsub = (0, index_1.consolidateGsubGpos)(font.fvar, font.gsub);
10
20
  }
11
21
  exports.gcFont = gcFont;
22
+ function cleanupInaccessibleLookups(table) {
23
+ const keptFeatures = new Set();
24
+ for (const script of table.scripts.values()) {
25
+ if (script.defaultLanguage)
26
+ collectAccessibleFeatures(script.defaultLanguage, keptFeatures);
27
+ for (const lang of script.languages.values())
28
+ collectAccessibleFeatures(lang, keptFeatures);
29
+ }
30
+ const keptLookups = new Set();
31
+ for (const feature of table.features) {
32
+ if (!keptFeatures.has(feature))
33
+ emptyFeature(feature);
34
+ else
35
+ for (const lookup of feature.lookups)
36
+ keptLookups.add(lookup);
37
+ }
38
+ if (table.featureVariations) {
39
+ for (const fv of table.featureVariations) {
40
+ for (const [from, to] of fv.substitutions) {
41
+ if (!keptFeatures.has(from))
42
+ emptyFeature(to);
43
+ else
44
+ for (const lookup of to.lookups)
45
+ keptLookups.add(lookup);
46
+ }
47
+ }
48
+ }
49
+ ImpLib.ArrayHelper.inPlaceShrinkArray(keptLookups, table.lookups);
50
+ }
51
+ function collectAccessibleFeatures(lang, sink) {
52
+ if (lang.requiredFeature)
53
+ sink.add(lang.requiredFeature);
54
+ for (const feature of lang.features)
55
+ sink.add(feature);
56
+ }
57
+ function emptyFeature(f) {
58
+ f.lookups = [];
59
+ f.params = null;
60
+ }
12
61
  //# sourceMappingURL=gc.js.map
@@ -1,7 +1,9 @@
1
1
  import * as Ot from "@ot-builder/ot";
2
+ import { Data } from "@ot-builder/prelude";
2
3
  export type MergeOptions = {
3
4
  preferOverride?: boolean;
4
5
  };
5
6
  export declare function mergeFonts<GS extends Ot.GlyphStore, GS2 extends Ot.GlyphStore>(basis: Ot.Font<GS>, override: Ot.Font<GS2>, gsf: Ot.GlyphStoreFactory<GS>, opt?: MergeOptions): void;
6
7
  export declare function consolidateFont<GS extends Ot.GlyphStore>(font: Ot.Font<GS>): void;
8
+ export declare function consolidateGsubGpos<L>(fvar: Data.Maybe<Ot.Fvar.Table>, preferred: Ot.GsubGpos.TableT<L>): Ot.GsubGpos.TableT<L>;
7
9
  //# sourceMappingURL=index.d.ts.map
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.consolidateFont = exports.mergeFonts = void 0;
3
+ exports.consolidateGsubGpos = exports.consolidateFont = exports.mergeFonts = void 0;
4
4
  const ImpLib = require("@ot-builder/common-impl");
5
5
  const Ot = require("@ot-builder/ot");
6
6
  const Rectify = require("@ot-builder/rectify");
@@ -83,4 +83,5 @@ function consolidateGsubGpos(fvar, preferred) {
83
83
  const merger = new gsub_gpos_merger_1.GsubGposMerger(ImpLib.Order.fromList("Dimensions", fvar ? fvar.axes.map(a => a.dim) : []), preferred, { scripts: new Map(), features: [], lookups: [], featureVariations: [] });
84
84
  return merger.resolve();
85
85
  }
86
+ exports.consolidateGsubGpos = consolidateGsubGpos;
86
87
  //# sourceMappingURL=index.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ot-builder/cli-proc",
3
- "version": "1.5.5",
3
+ "version": "1.6.1",
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.5.5",
28
- "@ot-builder/primitive": "1.5.5",
29
- "@ot-builder/common-impl": "1.5.5",
30
- "@ot-builder/rectify": "1.5.5",
31
- "@ot-builder/trace": "1.5.5",
32
- "@ot-builder/prelude": "1.5.5",
33
- "@ot-builder/ot": "1.5.5"
27
+ "@ot-builder/io-bin-font": "1.6.1",
28
+ "@ot-builder/primitive": "1.6.1",
29
+ "@ot-builder/common-impl": "1.6.1",
30
+ "@ot-builder/rectify": "1.6.1",
31
+ "@ot-builder/trace": "1.6.1",
32
+ "@ot-builder/prelude": "1.6.1",
33
+ "@ot-builder/ot": "1.6.1"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@types/jest": "^26.0.23",
37
- "jest": "^27.5.1"
37
+ "jest": "^29.3.1"
38
38
  }
39
39
  }