ntk 8.26.1 → 8.26.2
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/vendor/fontkit.js +20 -8
- package/package.json +1 -1
package/lib/vendor/fontkit.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
// fontkit 2.0.4-windowkit.
|
|
2
|
-
// https://github.com/windowkit/fontkit/releases/download/v2.0.4-windowkit.
|
|
3
|
-
// sha256
|
|
1
|
+
// fontkit 2.0.4-windowkit.4: the windowkit fork's dist/browser-module.mjs, from
|
|
2
|
+
// https://github.com/windowkit/fontkit/releases/download/v2.0.4-windowkit.4/fontkit-2.0.4-windowkit.4.tgz
|
|
3
|
+
// sha256 45318f8c3917fa6e33c9104bed8839c0cb4658a41d6ccf12f48a0606af6613be
|
|
4
4
|
//
|
|
5
5
|
// Made by scripts/vendor-fontkit.mjs; do not edit. Why ntk carries fontkit
|
|
6
6
|
// rather than depending on it: AGENTS.md, "The fontkit fork".
|
|
@@ -7123,9 +7123,11 @@ class $0aee9744d4a73be3$export$2e2bcd8739ae039 {
|
|
|
7123
7123
|
* specified features and features chosen by the shaper.
|
|
7124
7124
|
* @type {object}
|
|
7125
7125
|
*/ this.features = {};
|
|
7126
|
-
// Convert features to an object
|
|
7126
|
+
// Convert features to an object. A copy, since the shaper adds the
|
|
7127
|
+
// features it chooses: written into the caller's object, they would be
|
|
7128
|
+
// asked for by the user the next time the object was handed in.
|
|
7127
7129
|
if (Array.isArray(features)) for (let tag of features)this.features[tag] = true;
|
|
7128
|
-
else if (typeof features === 'object') this.features
|
|
7130
|
+
else if (typeof features === 'object') Object.assign(this.features, features);
|
|
7129
7131
|
}
|
|
7130
7132
|
/**
|
|
7131
7133
|
* The total advance width of the run.
|
|
@@ -8739,10 +8741,16 @@ class $d6106e27efe2333c$export$2e2bcd8739ae039 {
|
|
|
8739
8741
|
this.add(arg, global);
|
|
8740
8742
|
}
|
|
8741
8743
|
}
|
|
8742
|
-
|
|
8743
|
-
|
|
8744
|
+
/**
|
|
8745
|
+
* Applies the features the user asked for, or turned off.
|
|
8746
|
+
* A feature the user asks for applies to every glyph, as HarfBuzz applies
|
|
8747
|
+
* a feature asked for over the whole run: one the shaper planned for some
|
|
8748
|
+
* glyphs only, like numr and dnom around a fraction slash, is made global,
|
|
8749
|
+
* in the stage the shaper planned it in.
|
|
8750
|
+
*/ setFeatureOverrides(features) {
|
|
8751
|
+
if (Array.isArray(features)) for (let tag of features)this._addGlobal(tag);
|
|
8744
8752
|
else if (typeof features === 'object') for(let tag in features){
|
|
8745
|
-
if (features[tag]) this.
|
|
8753
|
+
if (features[tag]) this._addGlobal(tag);
|
|
8746
8754
|
else if (this.allFeatures[tag] != null) {
|
|
8747
8755
|
let stage = this.stages[this.allFeatures[tag]];
|
|
8748
8756
|
stage.splice(stage.indexOf(tag), 1);
|
|
@@ -8751,6 +8759,10 @@ class $d6106e27efe2333c$export$2e2bcd8739ae039 {
|
|
|
8751
8759
|
}
|
|
8752
8760
|
}
|
|
8753
8761
|
}
|
|
8762
|
+
_addGlobal(tag) {
|
|
8763
|
+
this.add(tag);
|
|
8764
|
+
this.globalFeatures[tag] = true;
|
|
8765
|
+
}
|
|
8754
8766
|
/**
|
|
8755
8767
|
* Assigns the global features to the given glyphs
|
|
8756
8768
|
*/ assignGlobalFeatures(glyphs) {
|