@ot-builder/cli-proc 1.5.4 → 1.6.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/CHANGELOG.json +109 -1
- package/CHANGELOG.md +31 -2
- package/lib/procs/gc.js +49 -0
- package/lib/procs/merge-consolidate/consolidate/zone-dicing.d.ts +4 -4
- package/lib/procs/merge-consolidate/index.d.ts +3 -1
- package/lib/procs/merge-consolidate/index.js +2 -1
- package/lib/procs/share-glyph-set.d.ts +2 -2
- package/package.json +8 -8
package/CHANGELOG.json
CHANGED
|
@@ -2,7 +2,115 @@
|
|
|
2
2
|
"name": "@ot-builder/cli-proc",
|
|
3
3
|
"entries": [
|
|
4
4
|
{
|
|
5
|
-
"date": "Sat,
|
|
5
|
+
"date": "Sat, 21 Jan 2023 01:08:43 GMT",
|
|
6
|
+
"tag": "@ot-builder/cli-proc_v1.6.0",
|
|
7
|
+
"version": "1.6.0",
|
|
8
|
+
"comments": {
|
|
9
|
+
"minor": [
|
|
10
|
+
{
|
|
11
|
+
"author": "otbbuilder-dev@users.noreply.github.com",
|
|
12
|
+
"package": "@ot-builder/cli-proc",
|
|
13
|
+
"commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7",
|
|
14
|
+
"comment": "GC: add functionality to cleanup inaccessible lookups"
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"author": "beachball",
|
|
18
|
+
"package": "@ot-builder/cli-proc",
|
|
19
|
+
"comment": "Bump @ot-builder/io-bin-font to v1.6.0",
|
|
20
|
+
"commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7"
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
"author": "beachball",
|
|
24
|
+
"package": "@ot-builder/cli-proc",
|
|
25
|
+
"comment": "Bump @ot-builder/primitive to v1.6.0",
|
|
26
|
+
"commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"author": "beachball",
|
|
30
|
+
"package": "@ot-builder/cli-proc",
|
|
31
|
+
"comment": "Bump @ot-builder/common-impl to v1.6.0",
|
|
32
|
+
"commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7"
|
|
33
|
+
},
|
|
34
|
+
{
|
|
35
|
+
"author": "beachball",
|
|
36
|
+
"package": "@ot-builder/cli-proc",
|
|
37
|
+
"comment": "Bump @ot-builder/rectify to v1.6.0",
|
|
38
|
+
"commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"author": "beachball",
|
|
42
|
+
"package": "@ot-builder/cli-proc",
|
|
43
|
+
"comment": "Bump @ot-builder/trace to v1.6.0",
|
|
44
|
+
"commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7"
|
|
45
|
+
},
|
|
46
|
+
{
|
|
47
|
+
"author": "beachball",
|
|
48
|
+
"package": "@ot-builder/cli-proc",
|
|
49
|
+
"comment": "Bump @ot-builder/prelude to v1.6.0",
|
|
50
|
+
"commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
"author": "beachball",
|
|
54
|
+
"package": "@ot-builder/cli-proc",
|
|
55
|
+
"comment": "Bump @ot-builder/ot to v1.6.0",
|
|
56
|
+
"commit": "e80cd99ac2e97a339ecbe083e3c9a2c10a6b12d7"
|
|
57
|
+
}
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"date": "Sat, 03 Dec 2022 01:09:39 GMT",
|
|
63
|
+
"tag": "@ot-builder/cli-proc_v1.5.5",
|
|
64
|
+
"version": "1.5.5",
|
|
65
|
+
"comments": {
|
|
66
|
+
"patch": [
|
|
67
|
+
{
|
|
68
|
+
"author": "beachball",
|
|
69
|
+
"package": "@ot-builder/cli-proc",
|
|
70
|
+
"comment": "Bump @ot-builder/io-bin-font to v1.5.5",
|
|
71
|
+
"commit": "f1f80856c651056bcdc805f284f0580c49af80fd"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"author": "beachball",
|
|
75
|
+
"package": "@ot-builder/cli-proc",
|
|
76
|
+
"comment": "Bump @ot-builder/primitive to v1.5.5",
|
|
77
|
+
"commit": "f1f80856c651056bcdc805f284f0580c49af80fd"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"author": "beachball",
|
|
81
|
+
"package": "@ot-builder/cli-proc",
|
|
82
|
+
"comment": "Bump @ot-builder/common-impl to v1.5.5",
|
|
83
|
+
"commit": "f1f80856c651056bcdc805f284f0580c49af80fd"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"author": "beachball",
|
|
87
|
+
"package": "@ot-builder/cli-proc",
|
|
88
|
+
"comment": "Bump @ot-builder/rectify to v1.5.5",
|
|
89
|
+
"commit": "f1f80856c651056bcdc805f284f0580c49af80fd"
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"author": "beachball",
|
|
93
|
+
"package": "@ot-builder/cli-proc",
|
|
94
|
+
"comment": "Bump @ot-builder/trace to v1.5.5",
|
|
95
|
+
"commit": "f1f80856c651056bcdc805f284f0580c49af80fd"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"author": "beachball",
|
|
99
|
+
"package": "@ot-builder/cli-proc",
|
|
100
|
+
"comment": "Bump @ot-builder/prelude to v1.5.5",
|
|
101
|
+
"commit": "f1f80856c651056bcdc805f284f0580c49af80fd"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
"author": "beachball",
|
|
105
|
+
"package": "@ot-builder/cli-proc",
|
|
106
|
+
"comment": "Bump @ot-builder/ot to v1.5.5",
|
|
107
|
+
"commit": "f1f80856c651056bcdc805f284f0580c49af80fd"
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
"date": "Sat, 09 Jul 2022 01:52:09 GMT",
|
|
6
114
|
"tag": "@ot-builder/cli-proc_v1.5.4",
|
|
7
115
|
"version": "1.5.4",
|
|
8
116
|
"comments": {
|
package/CHANGELOG.md
CHANGED
|
@@ -1,12 +1,41 @@
|
|
|
1
1
|
# Change Log - @ot-builder/cli-proc
|
|
2
2
|
|
|
3
|
-
This log was last generated on Sat,
|
|
3
|
+
This log was last generated on Sat, 21 Jan 2023 01:08:43 GMT and should not be manually modified.
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 1.6.0
|
|
8
|
+
|
|
9
|
+
Sat, 21 Jan 2023 01:08:43 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- GC: add functionality to cleanup inaccessible lookups (otbbuilder-dev@users.noreply.github.com)
|
|
14
|
+
- Bump @ot-builder/io-bin-font to v1.6.0
|
|
15
|
+
- Bump @ot-builder/primitive to v1.6.0
|
|
16
|
+
- Bump @ot-builder/common-impl to v1.6.0
|
|
17
|
+
- Bump @ot-builder/rectify to v1.6.0
|
|
18
|
+
- Bump @ot-builder/trace to v1.6.0
|
|
19
|
+
- Bump @ot-builder/prelude to v1.6.0
|
|
20
|
+
- Bump @ot-builder/ot to v1.6.0
|
|
21
|
+
|
|
22
|
+
## 1.5.5
|
|
23
|
+
|
|
24
|
+
Sat, 03 Dec 2022 01:09:39 GMT
|
|
25
|
+
|
|
26
|
+
### Patches
|
|
27
|
+
|
|
28
|
+
- Bump @ot-builder/io-bin-font to v1.5.5
|
|
29
|
+
- Bump @ot-builder/primitive to v1.5.5
|
|
30
|
+
- Bump @ot-builder/common-impl to v1.5.5
|
|
31
|
+
- Bump @ot-builder/rectify to v1.5.5
|
|
32
|
+
- Bump @ot-builder/trace to v1.5.5
|
|
33
|
+
- Bump @ot-builder/prelude to v1.5.5
|
|
34
|
+
- Bump @ot-builder/ot to v1.5.5
|
|
35
|
+
|
|
7
36
|
## 1.5.4
|
|
8
37
|
|
|
9
|
-
Sat, 09 Jul 2022 01:
|
|
38
|
+
Sat, 09 Jul 2022 01:52:09 GMT
|
|
10
39
|
|
|
11
40
|
### Patches
|
|
12
41
|
|
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,7 @@
|
|
|
1
|
-
export
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
1
|
+
export type Span = [number, number];
|
|
2
|
+
export type Zone = Span[];
|
|
3
|
+
export type SrcZone<S> = [Zone, S];
|
|
4
|
+
export type DstZone<S> = [Zone, S[]];
|
|
5
5
|
export declare function diceZones<S>(dn: number, zoneSets: SrcZone<S>[]): IterableIterator<DstZone<S>>;
|
|
6
6
|
export declare function hashZone(zone: Zone): string;
|
|
7
7
|
//# sourceMappingURL=zone-dicing.d.ts.map
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import * as Ot from "@ot-builder/ot";
|
|
2
|
-
|
|
2
|
+
import { Data } from "@ot-builder/prelude";
|
|
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
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as Ot from "@ot-builder/ot";
|
|
2
|
-
export
|
|
2
|
+
export type ShareGlyphSetOptions = {
|
|
3
3
|
unifyGlyphList?: boolean;
|
|
4
4
|
};
|
|
5
5
|
export declare class GlyphSharer<GS extends Ot.GlyphStore> {
|
|
@@ -14,7 +14,7 @@ export declare class GlyphSharer<GS extends Ot.GlyphStore> {
|
|
|
14
14
|
getGlyphList(): Ot.Glyph[];
|
|
15
15
|
}
|
|
16
16
|
export declare function shareGlyphSet<GS extends Ot.GlyphStore>(fonts: Ot.Font<GS>[], gsf: Ot.GlyphStoreFactory<GS>, options?: ShareGlyphSetOptions): void;
|
|
17
|
-
export
|
|
17
|
+
export type GlyphUnificationResults = {
|
|
18
18
|
originalNames: WeakMap<Ot.Glyph, string>;
|
|
19
19
|
};
|
|
20
20
|
//# sourceMappingURL=share-glyph-set.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ot-builder/cli-proc",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.6.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,13 +24,13 @@
|
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"tslib": "^2.0.0",
|
|
27
|
-
"@ot-builder/io-bin-font": "1.
|
|
28
|
-
"@ot-builder/primitive": "1.
|
|
29
|
-
"@ot-builder/common-impl": "1.
|
|
30
|
-
"@ot-builder/rectify": "1.
|
|
31
|
-
"@ot-builder/trace": "1.
|
|
32
|
-
"@ot-builder/prelude": "1.
|
|
33
|
-
"@ot-builder/ot": "1.
|
|
27
|
+
"@ot-builder/io-bin-font": "1.6.0",
|
|
28
|
+
"@ot-builder/primitive": "1.6.0",
|
|
29
|
+
"@ot-builder/common-impl": "1.6.0",
|
|
30
|
+
"@ot-builder/rectify": "1.6.0",
|
|
31
|
+
"@ot-builder/trace": "1.6.0",
|
|
32
|
+
"@ot-builder/prelude": "1.6.0",
|
|
33
|
+
"@ot-builder/ot": "1.6.0"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@types/jest": "^26.0.23",
|