@ot-builder/cli-proc 1.7.2 → 1.7.4
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 +1 -2
- package/lib/procs/merge-consolidate/consolidate/zone-dicing.js +2 -3
- package/lib/procs/merge-consolidate/index.js +3 -4
- package/lib/procs/merge-consolidate/utils.js +7 -8
- package/lib/procs/rebase.js +1 -2
- package/lib/procs/share-glyph-set.js +2 -2
- package/lib/procs/subset.js +1 -2
- package/lib/procs/transform-glyphs.js +2 -3
- package/lib/support/design-unifier/index.js +3 -3
- package/lib/support/initial-visible-glyphs.js +2 -3
- package/package.json +11 -11
package/lib/procs/gc.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.gcFont =
|
|
3
|
+
exports.gcFont = gcFont;
|
|
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");
|
|
@@ -19,7 +19,6 @@ function gcFont(font, gsf) {
|
|
|
19
19
|
if (font.gsub)
|
|
20
20
|
font.gsub = (0, index_1.consolidateGsubGpos)(font.fvar, font.gsub);
|
|
21
21
|
}
|
|
22
|
-
exports.gcFont = gcFont;
|
|
23
22
|
function cleanupInaccessibleLookups(table) {
|
|
24
23
|
const keptFeatures = new Set();
|
|
25
24
|
for (const script of table.scripts.values()) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.diceZones = diceZones;
|
|
4
|
+
exports.hashZone = hashZone;
|
|
4
5
|
function* diceZones(dn, zoneSets) {
|
|
5
6
|
if (!zoneSets.length)
|
|
6
7
|
return;
|
|
7
8
|
yield* scanPlaneDiceZones(dn, 0, [], zoneSets);
|
|
8
9
|
}
|
|
9
|
-
exports.diceZones = diceZones;
|
|
10
10
|
function* scanPlaneDiceZones(dn, d, carry, zones) {
|
|
11
11
|
if (d >= dn) {
|
|
12
12
|
yield fetchMatchingSs(carry, zones);
|
|
@@ -57,5 +57,4 @@ function hashZone(zone) {
|
|
|
57
57
|
}
|
|
58
58
|
return result;
|
|
59
59
|
}
|
|
60
|
-
exports.hashZone = hashZone;
|
|
61
60
|
//# sourceMappingURL=zone-dicing.js.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.mergeFonts = mergeFonts;
|
|
4
|
+
exports.consolidateFont = consolidateFont;
|
|
5
|
+
exports.consolidateGsubGpos = consolidateGsubGpos;
|
|
4
6
|
const ImpLib = require("@ot-builder/common-impl");
|
|
5
7
|
const Ot = require("@ot-builder/ot");
|
|
6
8
|
const Rectify = require("@ot-builder/rectify");
|
|
@@ -15,7 +17,6 @@ function mergeFonts(basis, override, gsf, opt = {}) {
|
|
|
15
17
|
]);
|
|
16
18
|
mergeFontTables(basis, override, opt);
|
|
17
19
|
}
|
|
18
|
-
exports.mergeFonts = mergeFonts;
|
|
19
20
|
function consolidateFont(font) {
|
|
20
21
|
const gs = new Set(font.glyphs.decideOrder());
|
|
21
22
|
const rectifier = {
|
|
@@ -27,7 +28,6 @@ function consolidateFont(font) {
|
|
|
27
28
|
if (font.gsub)
|
|
28
29
|
font.gsub = consolidateGsubGpos(font.fvar, font.gsub);
|
|
29
30
|
}
|
|
30
|
-
exports.consolidateFont = consolidateFont;
|
|
31
31
|
// TODO: Add CFF merging
|
|
32
32
|
function mergeFontTables(basis, override, opt) {
|
|
33
33
|
if (opt.preferOverride) {
|
|
@@ -83,5 +83,4 @@ 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: [] }, null, null);
|
|
84
84
|
return merger.resolve();
|
|
85
85
|
}
|
|
86
|
-
exports.consolidateGsubGpos = consolidateGsubGpos;
|
|
87
86
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.combineList = combineList;
|
|
4
|
+
exports.mergeMapOpt = mergeMapOpt;
|
|
5
|
+
exports.mergeMap = mergeMap;
|
|
6
|
+
exports.mergeClassDefOpt = mergeClassDefOpt;
|
|
7
|
+
exports.mergeClassDef = mergeClassDef;
|
|
8
|
+
exports.mergeMapAlt = mergeMapAlt;
|
|
9
|
+
exports.Prime = Prime;
|
|
4
10
|
function combineList(a, b) {
|
|
5
11
|
return [...(a || []), ...(b || [])];
|
|
6
12
|
}
|
|
7
|
-
exports.combineList = combineList;
|
|
8
13
|
function mergeMapOpt(preferred, less, mergeValue) {
|
|
9
14
|
if (!preferred)
|
|
10
15
|
return less;
|
|
@@ -12,7 +17,6 @@ function mergeMapOpt(preferred, less, mergeValue) {
|
|
|
12
17
|
return preferred;
|
|
13
18
|
return mergeMap(preferred, less, mergeValue);
|
|
14
19
|
}
|
|
15
|
-
exports.mergeMapOpt = mergeMapOpt;
|
|
16
20
|
function mergeMap(preferred, less, mergeValue) {
|
|
17
21
|
const m = new Map(preferred);
|
|
18
22
|
for (const [k, v] of less) {
|
|
@@ -25,7 +29,6 @@ function mergeMap(preferred, less, mergeValue) {
|
|
|
25
29
|
}
|
|
26
30
|
return m;
|
|
27
31
|
}
|
|
28
|
-
exports.mergeMap = mergeMap;
|
|
29
32
|
function mergeClassDefOpt(preferred, less) {
|
|
30
33
|
if (!preferred)
|
|
31
34
|
return less;
|
|
@@ -33,7 +36,6 @@ function mergeClassDefOpt(preferred, less) {
|
|
|
33
36
|
return preferred;
|
|
34
37
|
return mergeClassDef(preferred, less);
|
|
35
38
|
}
|
|
36
|
-
exports.mergeClassDefOpt = mergeClassDefOpt;
|
|
37
39
|
function mergeClassDef(preferred, less) {
|
|
38
40
|
const m = new Map(preferred);
|
|
39
41
|
let maxClass = 0;
|
|
@@ -45,7 +47,6 @@ function mergeClassDef(preferred, less) {
|
|
|
45
47
|
m.set(k, v + maxClass);
|
|
46
48
|
return m;
|
|
47
49
|
}
|
|
48
|
-
exports.mergeClassDef = mergeClassDef;
|
|
49
50
|
function mergeMapAlt(preferred, less, mergeValue) {
|
|
50
51
|
const keySet = new Set([...preferred.keys(), ...less.keys()]);
|
|
51
52
|
const m = new Map();
|
|
@@ -54,9 +55,7 @@ function mergeMapAlt(preferred, less, mergeValue) {
|
|
|
54
55
|
}
|
|
55
56
|
return m;
|
|
56
57
|
}
|
|
57
|
-
exports.mergeMapAlt = mergeMapAlt;
|
|
58
58
|
function Prime(a, b) {
|
|
59
59
|
return a;
|
|
60
60
|
}
|
|
61
|
-
exports.Prime = Prime;
|
|
62
61
|
//# sourceMappingURL=utils.js.map
|
package/lib/procs/rebase.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.rebaseFont =
|
|
3
|
+
exports.rebaseFont = rebaseFont;
|
|
4
4
|
const Ot = require("@ot-builder/ot");
|
|
5
5
|
const Rectify = require("@ot-builder/rectify");
|
|
6
6
|
const point_rectifier_1 = require("../support/point-rectifier");
|
|
@@ -8,7 +8,6 @@ function rebaseFont(font, newUpm) {
|
|
|
8
8
|
Rectify.inPlaceRectifyFont({ glyphRef: g => g }, createAxisRectifier(), createValueRectifier(newUpm, font.head.unitsPerEm), new point_rectifier_1.StdPointAttachRectifier(Rectify.PointAttachmentRectifyManner.TrustAttachment), font);
|
|
9
9
|
font.head.unitsPerEm = newUpm;
|
|
10
10
|
}
|
|
11
|
-
exports.rebaseFont = rebaseFont;
|
|
12
11
|
function createAxisRectifier() {
|
|
13
12
|
return {
|
|
14
13
|
dim: a => a,
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.GlyphSharer = void 0;
|
|
4
|
+
exports.shareGlyphSet = shareGlyphSet;
|
|
4
5
|
const Rectify = require("@ot-builder/rectify");
|
|
5
6
|
const design_unifier_1 = require("../support/design-unifier");
|
|
6
7
|
const glyph_hasher_1 = require("../support/share-glyph-set/glyph-hasher");
|
|
@@ -36,7 +37,6 @@ function shareGlyphSet(fonts, gsf, options = { unifyGlyphList: false }) {
|
|
|
36
37
|
if (options.unifyGlyphList)
|
|
37
38
|
sharer.unifyGlyphList();
|
|
38
39
|
}
|
|
39
|
-
exports.shareGlyphSet = shareGlyphSet;
|
|
40
40
|
function unifyGlyphByHash(font, gsf, session, sharedGs, id) {
|
|
41
41
|
const hasher = new glyph_hasher_1.GlyphHasher(session);
|
|
42
42
|
const gOrd = font.glyphs.decideOrder();
|
package/lib/procs/subset.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.subsetFont =
|
|
3
|
+
exports.subsetFont = subsetFont;
|
|
4
4
|
const Rectify = require("@ot-builder/rectify");
|
|
5
5
|
const initial_visible_glyphs_1 = require("../support/initial-visible-glyphs");
|
|
6
6
|
function subsetFont(font, text, gsf) {
|
|
@@ -8,5 +8,4 @@ function subsetFont(font, text, gsf) {
|
|
|
8
8
|
font.glyphs = gsf.createStoreFromList(glyphs);
|
|
9
9
|
Rectify.inPlaceRectifyFontGlyphReferences(rectifier, font);
|
|
10
10
|
}
|
|
11
|
-
exports.subsetFont = subsetFont;
|
|
12
11
|
//# sourceMappingURL=subset.js.map
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.inPlaceTransformFontGlyph = inPlaceTransformFontGlyph;
|
|
4
|
+
exports.inPlaceTransformFontGlyphDependent = inPlaceTransformFontGlyphDependent;
|
|
4
5
|
const Ot = require("@ot-builder/ot");
|
|
5
6
|
function inPlaceTransformFontGlyph(font, transform) {
|
|
6
7
|
inPlaceTransformFontGlyphDependent(font, () => transform);
|
|
7
8
|
}
|
|
8
|
-
exports.inPlaceTransformFontGlyph = inPlaceTransformFontGlyph;
|
|
9
9
|
function inPlaceTransformFontGlyphDependent(font, transformF) {
|
|
10
10
|
for (const g of font.glyphs.decideOrder()) {
|
|
11
11
|
const flattened = Ot.GeometryUtil.apply(Ot.GeometryUtil.Flattener, g.geometry);
|
|
@@ -22,5 +22,4 @@ function inPlaceTransformFontGlyphDependent(font, transformF) {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
}
|
|
25
|
-
exports.inPlaceTransformFontGlyphDependent = inPlaceTransformFontGlyphDependent;
|
|
26
25
|
//# sourceMappingURL=transform-glyphs.js.map
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.DesignSpaceUnifier = exports.DesignUnifierSession = void 0;
|
|
4
|
+
exports.unifyDesignSpacesImpl = unifyDesignSpacesImpl;
|
|
5
|
+
exports.unifyDesignSpaces = unifyDesignSpaces;
|
|
4
6
|
const Ot = require("@ot-builder/ot");
|
|
5
7
|
const Rectify = require("@ot-builder/rectify");
|
|
6
8
|
const point_rectifier_1 = require("../point-rectifier");
|
|
@@ -56,7 +58,6 @@ function unifyDesignSpacesImpl(session, ref, demand) {
|
|
|
56
58
|
throw new Error("Cannot unify variable font with static font");
|
|
57
59
|
}
|
|
58
60
|
}
|
|
59
|
-
exports.unifyDesignSpacesImpl = unifyDesignSpacesImpl;
|
|
60
61
|
function unifyDesignSpaces(fonts) {
|
|
61
62
|
if (fonts.length < 2)
|
|
62
63
|
return;
|
|
@@ -66,5 +67,4 @@ function unifyDesignSpaces(fonts) {
|
|
|
66
67
|
unifyDesignSpacesImpl(session, ref, fonts[fid]);
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
|
-
exports.unifyDesignSpaces = unifyDesignSpaces;
|
|
70
70
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.initialGlyphsFromUnicodeSet = initialGlyphsFromUnicodeSet;
|
|
4
|
+
exports.createSubsetRectifier = createSubsetRectifier;
|
|
4
5
|
const Trace = require("@ot-builder/trace");
|
|
5
6
|
function initialGlyphsFromUnicodeSet(font, unicodeSet, fAddNotDef = true, fAddNull = false) {
|
|
6
7
|
const gOrd = font.glyphs.decideOrder();
|
|
@@ -23,7 +24,6 @@ function initialGlyphsFromUnicodeSet(font, unicodeSet, fAddNotDef = true, fAddNu
|
|
|
23
24
|
}
|
|
24
25
|
return init;
|
|
25
26
|
}
|
|
26
|
-
exports.initialGlyphsFromUnicodeSet = initialGlyphsFromUnicodeSet;
|
|
27
27
|
function createSubsetRectifier(font, unicodeSet) {
|
|
28
28
|
const init = initialGlyphsFromUnicodeSet(font, unicodeSet);
|
|
29
29
|
const collected = Trace.traceGlyphs(new Set(init), font);
|
|
@@ -39,5 +39,4 @@ function createSubsetRectifier(font, unicodeSet) {
|
|
|
39
39
|
}
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
exports.createSubsetRectifier = createSubsetRectifier;
|
|
43
42
|
//# sourceMappingURL=initial-visible-glyphs.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ot-builder/cli-proc",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.4",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -23,17 +23,17 @@
|
|
|
23
23
|
"access": "public"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"tslib": "^2.
|
|
27
|
-
"@ot-builder/io-bin-font": "1.7.
|
|
28
|
-
"@ot-builder/primitive": "1.7.
|
|
29
|
-
"@ot-builder/common-impl": "1.7.
|
|
30
|
-
"@ot-builder/rectify": "1.7.
|
|
31
|
-
"@ot-builder/trace": "1.7.
|
|
32
|
-
"@ot-builder/prelude": "1.7.
|
|
33
|
-
"@ot-builder/ot": "1.7.
|
|
26
|
+
"tslib": "^2.6.3",
|
|
27
|
+
"@ot-builder/io-bin-font": "1.7.4",
|
|
28
|
+
"@ot-builder/primitive": "1.7.4",
|
|
29
|
+
"@ot-builder/common-impl": "1.7.4",
|
|
30
|
+
"@ot-builder/rectify": "1.7.4",
|
|
31
|
+
"@ot-builder/trace": "1.7.4",
|
|
32
|
+
"@ot-builder/prelude": "1.7.4",
|
|
33
|
+
"@ot-builder/ot": "1.7.4"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
|
-
"@types/jest": "^29.5.
|
|
37
|
-
"jest": "^29.
|
|
36
|
+
"@types/jest": "^29.5.12",
|
|
37
|
+
"jest": "^29.7.0"
|
|
38
38
|
}
|
|
39
39
|
}
|