@mlightcad/mtext-renderer 0.12.11 → 0.12.12
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/dist/index.js +268 -262
- package/dist/index.umd.cjs +7 -7
- package/dist/mtext-renderer-worker.js +14 -11
- package/lib/font/fontManager.d.ts +4 -2
- package/lib/renderer/mtext.d.ts +4 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as I from "three";
|
|
2
|
-
import { BufferGeometry as
|
|
2
|
+
import { BufferGeometry as Lo, BufferAttribute as Oo, ShapePath as Qi, ShapeUtils as ea, Shape as Io, LineCurve as $n, QuadraticBezierCurve as fs, CubicBezierCurve as ps, EllipseCurve as ds } from "three";
|
|
3
3
|
class gs {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.listeners = [];
|
|
@@ -321,7 +321,7 @@ function Do(t) {
|
|
|
321
321
|
function sa(t) {
|
|
322
322
|
return t instanceof ArrayBuffer || ArrayBuffer.isView(t) ? t.byteLength : 0;
|
|
323
323
|
}
|
|
324
|
-
function
|
|
324
|
+
function Oe(t) {
|
|
325
325
|
if (!Number.isFinite(t) || t < 0)
|
|
326
326
|
return "0 B";
|
|
327
327
|
if (t < 1024)
|
|
@@ -2679,7 +2679,7 @@ function Xe(t, e, n) {
|
|
|
2679
2679
|
var r = t.tag & 65535 >>> 16 - e;
|
|
2680
2680
|
return t.tag >>>= e, t.bitcount -= e, r + n;
|
|
2681
2681
|
}
|
|
2682
|
-
function
|
|
2682
|
+
function Lr(t, e) {
|
|
2683
2683
|
for (; t.bitcount < 24; )
|
|
2684
2684
|
t.tag |= t.source[t.sourceIndex++] << t.bitcount, t.bitcount += 8;
|
|
2685
2685
|
var n = 0, r = 0, s = 0, i = t.tag;
|
|
@@ -2688,7 +2688,7 @@ function Or(t, e) {
|
|
|
2688
2688
|
while (r >= 0);
|
|
2689
2689
|
return t.tag = i, t.bitcount -= s, e.trans[n + r];
|
|
2690
2690
|
}
|
|
2691
|
-
function
|
|
2691
|
+
function Lc(t, e, n) {
|
|
2692
2692
|
var r, s, i, a, o, c;
|
|
2693
2693
|
for (r = Xe(t, 5, 257), s = Xe(t, 5, 1), i = Xe(t, 4, 4), a = 0; a < 19; ++a) $e[a] = 0;
|
|
2694
2694
|
for (a = 0; a < i; ++a) {
|
|
@@ -2696,7 +2696,7 @@ function Oc(t, e, n) {
|
|
|
2696
2696
|
$e[kc[a]] = l;
|
|
2697
2697
|
}
|
|
2698
2698
|
for (Jn(Es, $e, 0, 19), o = 0; o < r + s; ) {
|
|
2699
|
-
var u =
|
|
2699
|
+
var u = Lr(t, Es);
|
|
2700
2700
|
switch (u) {
|
|
2701
2701
|
case 16:
|
|
2702
2702
|
var f = $e[o - 1];
|
|
@@ -2718,21 +2718,21 @@ function Oc(t, e, n) {
|
|
|
2718
2718
|
}
|
|
2719
2719
|
Jn(e, $e, 0, r), Jn(n, $e, r, s);
|
|
2720
2720
|
}
|
|
2721
|
-
function
|
|
2721
|
+
function Ls(t, e, n) {
|
|
2722
2722
|
for (; ; ) {
|
|
2723
|
-
var r =
|
|
2723
|
+
var r = Lr(t, e);
|
|
2724
2724
|
if (r === 256)
|
|
2725
2725
|
return Wr;
|
|
2726
2726
|
if (r < 256)
|
|
2727
2727
|
t.dest[t.destLen++] = r;
|
|
2728
2728
|
else {
|
|
2729
2729
|
var s, i, a, o;
|
|
2730
|
-
for (r -= 257, s = Xe(t, Vr[r], qr[r]), i =
|
|
2730
|
+
for (r -= 257, s = Xe(t, Vr[r], qr[r]), i = Lr(t, n), a = t.destLen - Xe(t, ba[i], xa[i]), o = a; o < a + s; ++o)
|
|
2731
2731
|
t.dest[t.destLen++] = t.dest[o];
|
|
2732
2732
|
}
|
|
2733
2733
|
}
|
|
2734
2734
|
}
|
|
2735
|
-
function
|
|
2735
|
+
function Oc(t) {
|
|
2736
2736
|
for (var e, n, r; t.bitcount > 8; )
|
|
2737
2737
|
t.sourceIndex--, t.bitcount -= 8;
|
|
2738
2738
|
if (e = t.source[t.sourceIndex + 1], e = 256 * e + t.source[t.sourceIndex], n = t.source[t.sourceIndex + 3], n = 256 * n + t.source[t.sourceIndex + 2], e !== (~n & 65535))
|
|
@@ -2746,13 +2746,13 @@ function Sa(t, e) {
|
|
|
2746
2746
|
do {
|
|
2747
2747
|
switch (r = Ac(n), s = Xe(n, 2, 0), s) {
|
|
2748
2748
|
case 0:
|
|
2749
|
-
i =
|
|
2749
|
+
i = Oc(n);
|
|
2750
2750
|
break;
|
|
2751
2751
|
case 1:
|
|
2752
|
-
i =
|
|
2752
|
+
i = Ls(n, ma, ya);
|
|
2753
2753
|
break;
|
|
2754
2754
|
case 2:
|
|
2755
|
-
|
|
2755
|
+
Lc(n, n.ltree, n.dtree), i = Ls(n, n.ltree, n.dtree);
|
|
2756
2756
|
break;
|
|
2757
2757
|
default:
|
|
2758
2758
|
i = ga;
|
|
@@ -2767,7 +2767,7 @@ va(Vr, qr, 4, 3);
|
|
|
2767
2767
|
va(ba, xa, 2, 1);
|
|
2768
2768
|
Vr[28] = 0;
|
|
2769
2769
|
qr[28] = 258;
|
|
2770
|
-
function
|
|
2770
|
+
function Lt(t, e, n, r, s) {
|
|
2771
2771
|
return Math.pow(1 - s, 3) * t + 3 * Math.pow(1 - s, 2) * s * e + 3 * (1 - s) * Math.pow(s, 2) * n + Math.pow(s, 3) * r;
|
|
2772
2772
|
}
|
|
2773
2773
|
function kt() {
|
|
@@ -2793,15 +2793,15 @@ kt.prototype.addBezier = function(t, e, n, r, s, i, a, o) {
|
|
|
2793
2793
|
if (y === 0) {
|
|
2794
2794
|
if (p === 0) continue;
|
|
2795
2795
|
const C = -m / p;
|
|
2796
|
-
0 < C && C < 1 && (h === 0 && this.addX(
|
|
2796
|
+
0 < C && C < 1 && (h === 0 && this.addX(Lt(c[h], l[h], u[h], f[h], C)), h === 1 && this.addY(Lt(c[h], l[h], u[h], f[h], C)));
|
|
2797
2797
|
continue;
|
|
2798
2798
|
}
|
|
2799
2799
|
const b = Math.pow(p, 2) - 4 * m * y;
|
|
2800
2800
|
if (b < 0) continue;
|
|
2801
2801
|
const v = (-p + Math.sqrt(b)) / (2 * y);
|
|
2802
|
-
0 < v && v < 1 && (h === 0 && this.addX(
|
|
2802
|
+
0 < v && v < 1 && (h === 0 && this.addX(Lt(c[h], l[h], u[h], f[h], v)), h === 1 && this.addY(Lt(c[h], l[h], u[h], f[h], v)));
|
|
2803
2803
|
const w = (-p - Math.sqrt(b)) / (2 * y);
|
|
2804
|
-
0 < w && w < 1 && (h === 0 && this.addX(
|
|
2804
|
+
0 < w && w < 1 && (h === 0 && this.addX(Lt(c[h], l[h], u[h], f[h], w)), h === 1 && this.addY(Lt(c[h], l[h], u[h], f[h], w)));
|
|
2805
2805
|
}
|
|
2806
2806
|
};
|
|
2807
2807
|
kt.prototype.addQuad = function(t, e, n, r, s, i) {
|
|
@@ -3106,10 +3106,10 @@ var Pt = de;
|
|
|
3106
3106
|
function Ta(t) {
|
|
3107
3107
|
throw new Error(t);
|
|
3108
3108
|
}
|
|
3109
|
-
function
|
|
3109
|
+
function Os(t, e) {
|
|
3110
3110
|
t || Ta(e);
|
|
3111
3111
|
}
|
|
3112
|
-
var H = { fail: Ta, argument:
|
|
3112
|
+
var H = { fail: Ta, argument: Os, assert: Os }, Is = 32768, Rs = 2147483648, Bc = -32768, Mc = 32767 + 1 / 65536, Nt = {}, B = {}, z = {};
|
|
3113
3113
|
function je(t) {
|
|
3114
3114
|
return function() {
|
|
3115
3115
|
return t;
|
|
@@ -3345,7 +3345,7 @@ z.MACSTRING = function(t, e) {
|
|
|
3345
3345
|
const n = B.MACSTRING(t, e);
|
|
3346
3346
|
return n !== void 0 ? n.length : 0;
|
|
3347
3347
|
};
|
|
3348
|
-
function
|
|
3348
|
+
function Or(t) {
|
|
3349
3349
|
return t >= -128 && t <= 127;
|
|
3350
3350
|
}
|
|
3351
3351
|
function _c(t, e, n) {
|
|
@@ -3361,7 +3361,7 @@ function Uc(t, e, n) {
|
|
|
3361
3361
|
let i = e;
|
|
3362
3362
|
for (; i < s && r < 64; ) {
|
|
3363
3363
|
const a = t[i];
|
|
3364
|
-
if (!
|
|
3364
|
+
if (!Or(a) || a === 0 && i + 1 < s && t[i + 1] === 0)
|
|
3365
3365
|
break;
|
|
3366
3366
|
++i, ++r;
|
|
3367
3367
|
}
|
|
@@ -3376,7 +3376,7 @@ function Pc(t, e, n) {
|
|
|
3376
3376
|
let i = e;
|
|
3377
3377
|
for (; i < s && r < 64; ) {
|
|
3378
3378
|
const a = t[i];
|
|
3379
|
-
if (a === 0 ||
|
|
3379
|
+
if (a === 0 || Or(a) && i + 1 < s && Or(t[i + 1]))
|
|
3380
3380
|
break;
|
|
3381
3381
|
++i, ++r;
|
|
3382
3382
|
}
|
|
@@ -3630,7 +3630,7 @@ function An(t) {
|
|
|
3630
3630
|
}
|
|
3631
3631
|
An.prototype = Object.create(fe.prototype);
|
|
3632
3632
|
An.prototype.constructor = An;
|
|
3633
|
-
function
|
|
3633
|
+
function Ln(t) {
|
|
3634
3634
|
fe.call(
|
|
3635
3635
|
this,
|
|
3636
3636
|
"featureListTable",
|
|
@@ -3645,9 +3645,9 @@ function On(t) {
|
|
|
3645
3645
|
})
|
|
3646
3646
|
);
|
|
3647
3647
|
}
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
function
|
|
3648
|
+
Ln.prototype = Object.create(fe.prototype);
|
|
3649
|
+
Ln.prototype.constructor = Ln;
|
|
3650
|
+
function On(t, e) {
|
|
3651
3651
|
fe.call(this, "lookupListTable", Ir("lookup", t, function(n) {
|
|
3652
3652
|
let r = e[n.lookupType];
|
|
3653
3653
|
return H.assert(!!r, "Unable to write GSUB lookup type " + n.lookupType + " tables."), new fe("lookupTable", [
|
|
@@ -3656,8 +3656,8 @@ function Ln(t, e) {
|
|
|
3656
3656
|
].concat(Ir("subtable", n.subtables, r)));
|
|
3657
3657
|
}));
|
|
3658
3658
|
}
|
|
3659
|
-
|
|
3660
|
-
|
|
3659
|
+
On.prototype = Object.create(fe.prototype);
|
|
3660
|
+
On.prototype.constructor = On;
|
|
3661
3661
|
function In(t) {
|
|
3662
3662
|
t.format === 1 ? fe.call(
|
|
3663
3663
|
this,
|
|
@@ -3680,14 +3680,14 @@ function In(t) {
|
|
|
3680
3680
|
}
|
|
3681
3681
|
In.prototype = Object.create(fe.prototype);
|
|
3682
3682
|
In.prototype.constructor = In;
|
|
3683
|
-
var
|
|
3683
|
+
var L = {
|
|
3684
3684
|
Table: fe,
|
|
3685
3685
|
Record: fe,
|
|
3686
3686
|
Coverage: En,
|
|
3687
3687
|
ClassDef: In,
|
|
3688
3688
|
ScriptList: An,
|
|
3689
|
-
FeatureList:
|
|
3690
|
-
LookupList:
|
|
3689
|
+
FeatureList: Ln,
|
|
3690
|
+
LookupList: On,
|
|
3691
3691
|
ushortList: Gt,
|
|
3692
3692
|
tableList: Ir,
|
|
3693
3693
|
recordList: Ht
|
|
@@ -4702,7 +4702,7 @@ var D = {
|
|
|
4702
4702
|
// langAzerbaijanRoman → smRoman
|
|
4703
4703
|
151: 0
|
|
4704
4704
|
// langNynorsk → smRoman
|
|
4705
|
-
},
|
|
4705
|
+
}, La = {
|
|
4706
4706
|
1078: "af",
|
|
4707
4707
|
1052: "sq",
|
|
4708
4708
|
1156: "gsw",
|
|
@@ -4927,7 +4927,7 @@ function $c(t, e, n) {
|
|
|
4927
4927
|
case 1:
|
|
4928
4928
|
return Aa[e];
|
|
4929
4929
|
case 3:
|
|
4930
|
-
return
|
|
4930
|
+
return La[e];
|
|
4931
4931
|
}
|
|
4932
4932
|
}
|
|
4933
4933
|
var Rr = "utf-16", Yc = {
|
|
@@ -5033,14 +5033,14 @@ function $r(t, e, n) {
|
|
|
5033
5033
|
break;
|
|
5034
5034
|
}
|
|
5035
5035
|
}
|
|
5036
|
-
var
|
|
5036
|
+
var Oa = {
|
|
5037
5037
|
0: "unicode",
|
|
5038
5038
|
1: "macintosh",
|
|
5039
5039
|
2: "reserved",
|
|
5040
5040
|
3: "windows"
|
|
5041
5041
|
};
|
|
5042
5042
|
function Kc(t) {
|
|
5043
|
-
return
|
|
5043
|
+
return Oa[t];
|
|
5044
5044
|
}
|
|
5045
5045
|
function Zc(t, e, n) {
|
|
5046
5046
|
const r = {}, s = new D.Parser(t, e), i = s.parseUShort(), a = s.parseUShort(), o = s.offset + s.parseUShort();
|
|
@@ -5065,7 +5065,7 @@ function dn(t) {
|
|
|
5065
5065
|
return e;
|
|
5066
5066
|
}
|
|
5067
5067
|
function Ds(t, e, n, r, s, i) {
|
|
5068
|
-
return new
|
|
5068
|
+
return new L.Record("NameRecord", [
|
|
5069
5069
|
{ name: "platformID", type: "USHORT", value: t },
|
|
5070
5070
|
{ name: "encodingID", type: "USHORT", value: e },
|
|
5071
5071
|
{ name: "languageID", type: "USHORT", value: n },
|
|
@@ -5098,7 +5098,7 @@ function _s(t, e) {
|
|
|
5098
5098
|
return n;
|
|
5099
5099
|
}
|
|
5100
5100
|
function Qc(t, e) {
|
|
5101
|
-
const n = dn(
|
|
5101
|
+
const n = dn(Oa), r = dn(Aa), s = dn(La), i = [], a = [];
|
|
5102
5102
|
for (let c in t) {
|
|
5103
5103
|
let l;
|
|
5104
5104
|
const u = [], f = {}, h = dn(Bn), p = n[c];
|
|
@@ -5149,7 +5149,7 @@ function Qc(t, e) {
|
|
|
5149
5149
|
i.sort(function(c, l) {
|
|
5150
5150
|
return c.platformID - l.platformID || c.encodingID - l.encodingID || c.languageID - l.languageID || c.nameID - l.nameID;
|
|
5151
5151
|
});
|
|
5152
|
-
const o = new
|
|
5152
|
+
const o = new L.Table("name", [
|
|
5153
5153
|
{ name: "format", type: "USHORT", value: 0 },
|
|
5154
5154
|
{ name: "count", type: "USHORT", value: i.length },
|
|
5155
5155
|
{ name: "stringOffset", type: "USHORT", value: 6 + i.length * 12 }
|
|
@@ -5318,7 +5318,7 @@ function cl(t) {
|
|
|
5318
5318
|
{ name: "entrySelector", type: "USHORT", value: 0 },
|
|
5319
5319
|
{ name: "rangeShift", type: "USHORT", value: 0 }
|
|
5320
5320
|
);
|
|
5321
|
-
const s = new
|
|
5321
|
+
const s = new L.Table("cmap", r);
|
|
5322
5322
|
for (s.segments = [], n = 0; n < t.length; n += 1) {
|
|
5323
5323
|
const p = t.get(n);
|
|
5324
5324
|
for (let y = 0; y < p.unicodes.length; y += 1)
|
|
@@ -7100,7 +7100,7 @@ function yl(t, e) {
|
|
|
7100
7100
|
};
|
|
7101
7101
|
}
|
|
7102
7102
|
function bl({ version: t = 0, numPaletteEntries: e = 0, colorRecords: n = [], colorRecordIndices: r = [0] }) {
|
|
7103
|
-
return H.argument(t === 0, "Only CPALv0 are supported."), H.argument(n.length, "No colorRecords given."), H.argument(r.length, "No colorRecordIndices given."), r.length > 1 && H.argument(e, "Can't infer numPaletteEntries on multiple colorRecordIndices"), new
|
|
7103
|
+
return H.argument(t === 0, "Only CPALv0 are supported."), H.argument(n.length, "No colorRecords given."), H.argument(r.length, "No colorRecordIndices given."), r.length > 1 && H.argument(e, "Can't infer numPaletteEntries on multiple colorRecordIndices"), new L.Table("CPAL", [
|
|
7104
7104
|
{ name: "version", type: "USHORT", value: t },
|
|
7105
7105
|
{ name: "numPaletteEntries", type: "USHORT", value: e || n.length },
|
|
7106
7106
|
{ name: "numPalettes", type: "USHORT", value: r.length },
|
|
@@ -7460,7 +7460,7 @@ Ce.prototype.toDOMElement = function(t, e) {
|
|
|
7460
7460
|
return e && e.variation && (n = e.variation.getTransform(this, t.variation).path), n.toDOMElement(t);
|
|
7461
7461
|
};
|
|
7462
7462
|
var Qt = Ce;
|
|
7463
|
-
function
|
|
7463
|
+
function Ot(t, e, n) {
|
|
7464
7464
|
Object.defineProperty(t, e, {
|
|
7465
7465
|
get: function() {
|
|
7466
7466
|
return typeof t[n] > "u" && t.path, t[n];
|
|
@@ -7515,7 +7515,7 @@ function Cl(t, e, n, r, s, i) {
|
|
|
7515
7515
|
n(a, r, s);
|
|
7516
7516
|
const o = i(t.glyphs, a);
|
|
7517
7517
|
return o.unitsPerEm = t.unitsPerEm, o;
|
|
7518
|
-
},
|
|
7518
|
+
}, Ot(a, "numberOfContours", "_numberOfContours"), Ot(a, "xMin", "_xMin"), Ot(a, "xMax", "_xMax"), Ot(a, "yMin", "_yMin"), Ot(a, "yMax", "_yMax"), Ot(a, "points", "_points"), a;
|
|
7519
7519
|
};
|
|
7520
7520
|
}
|
|
7521
7521
|
function Fl(t, e, n, r, s) {
|
|
@@ -7614,7 +7614,7 @@ function Al(t, e) {
|
|
|
7614
7614
|
return n = t.parseByte(), -(e - 251) * 256 - n - 108;
|
|
7615
7615
|
throw new Error("Invalid b0 " + e);
|
|
7616
7616
|
}
|
|
7617
|
-
function
|
|
7617
|
+
function Ll(t) {
|
|
7618
7618
|
const e = {};
|
|
7619
7619
|
for (let n = 0; n < t.length; n += 1) {
|
|
7620
7620
|
const r = t[n][0], s = t[n][1];
|
|
@@ -7642,7 +7642,7 @@ function Kr(t, e, n, r) {
|
|
|
7642
7642
|
} else
|
|
7643
7643
|
a.push(Al(s, c));
|
|
7644
7644
|
}
|
|
7645
|
-
return
|
|
7645
|
+
return Ll(i);
|
|
7646
7646
|
}
|
|
7647
7647
|
function Xt(t, e) {
|
|
7648
7648
|
return e <= 390 ? e = xn[e] : t ? e = t[e - 391] : e = void 0, e;
|
|
@@ -7663,7 +7663,7 @@ function Zr(t, e, n) {
|
|
|
7663
7663
|
}
|
|
7664
7664
|
return r;
|
|
7665
7665
|
}
|
|
7666
|
-
function
|
|
7666
|
+
function Ol(t, e) {
|
|
7667
7667
|
const n = {};
|
|
7668
7668
|
if (n.formatMajor = D.getCard8(t, e), n.formatMinor = D.getCard8(t, e + 1), n.formatMajor > 2)
|
|
7669
7669
|
throw new Error(`Unsupported CFF table version ${n.formatMajor}.${n.formatMinor}`);
|
|
@@ -7941,12 +7941,12 @@ function Mr(t, e, n, r, s) {
|
|
|
7941
7941
|
dx: g,
|
|
7942
7942
|
dy: d
|
|
7943
7943
|
}), l.extend(t.glyphs.get(k).path);
|
|
7944
|
-
const A = t.glyphs.get(S),
|
|
7945
|
-
for (let q = 0; q <
|
|
7946
|
-
const V =
|
|
7944
|
+
const A = t.glyphs.get(S), O = JSON.parse(JSON.stringify(A.path.commands));
|
|
7945
|
+
for (let q = 0; q < O.length; q += 1) {
|
|
7946
|
+
const V = O[q];
|
|
7947
7947
|
V.type !== "Z" && (V.x += g, V.y += d), (V.type === "Q" || V.type === "C") && (V.x1 += g, V.y1 += d), V.type === "C" && (V.x2 += g, V.y2 += d);
|
|
7948
7948
|
}
|
|
7949
|
-
l.extend(
|
|
7949
|
+
l.extend(O);
|
|
7950
7950
|
}
|
|
7951
7951
|
} else u.length > 0 && !h && (N = u.shift() + C, h = !0);
|
|
7952
7952
|
p && j !== 2 && (l.closePath(), p = !1);
|
|
@@ -7964,13 +7964,13 @@ function Mr(t, e, n, r, s) {
|
|
|
7964
7964
|
break;
|
|
7965
7965
|
}
|
|
7966
7966
|
R || (R = t.variation && s && t.variation.process.getBlendVector(E, F, s));
|
|
7967
|
-
var Z = u.pop(), xe = R ? R.length : E.itemVariationSubtables[F].regionIndexes.length, Ee = Z * xe, Ae = u.length - Ee,
|
|
7967
|
+
var Z = u.pop(), xe = R ? R.length : E.itemVariationSubtables[F].regionIndexes.length, Ee = Z * xe, Ae = u.length - Ee, Le = Ae - Z;
|
|
7968
7968
|
if (R)
|
|
7969
7969
|
for (let tt = 0; tt < Z; tt++) {
|
|
7970
|
-
var Re = u[
|
|
7970
|
+
var Re = u[Le + tt];
|
|
7971
7971
|
for (let x = 0; x < xe; x++)
|
|
7972
7972
|
Re += R[x] * u[Ae++];
|
|
7973
|
-
u[
|
|
7973
|
+
u[Le + tt] = Re;
|
|
7974
7974
|
}
|
|
7975
7975
|
for (; Ee--; )
|
|
7976
7976
|
u.pop();
|
|
@@ -8076,7 +8076,7 @@ function Ps(t, e, n, r, s) {
|
|
|
8076
8076
|
}
|
|
8077
8077
|
function Gl(t, e, n, r) {
|
|
8078
8078
|
let s;
|
|
8079
|
-
const i =
|
|
8079
|
+
const i = Ol(t, e);
|
|
8080
8080
|
i.formatMajor === 2 ? s = n.tables.cff2 = {} : s = n.tables.cff = {};
|
|
8081
8081
|
const a = i.formatMajor > 1 ? null : Ye(t, i.endOffset, D.bytesToString), o = i.formatMajor > 1 ? null : Ye(t, a.endOffset), c = i.formatMajor > 1 ? null : Ye(t, o.endOffset, D.bytesToString), l = Ye(t, i.formatMajor > 1 ? e + i.size + i.topDictLength : c.endOffset, void 0, i.formatMajor);
|
|
8082
8082
|
n.gsubrs = l.objects, n.gsubrsBias = _n(n.gsubrs);
|
|
@@ -8137,7 +8137,7 @@ function Wa(t, e) {
|
|
|
8137
8137
|
return r >= 0 && (n = r), r = e.indexOf(t), r >= 0 ? n = r + xn.length : (n = xn.length + e.length, e.push(t)), n;
|
|
8138
8138
|
}
|
|
8139
8139
|
function Hl() {
|
|
8140
|
-
return new
|
|
8140
|
+
return new L.Record("Header", [
|
|
8141
8141
|
{ name: "major", type: "Card8", value: 1 },
|
|
8142
8142
|
{ name: "minor", type: "Card8", value: 0 },
|
|
8143
8143
|
{ name: "hdrSize", type: "Card8", value: 4 },
|
|
@@ -8145,7 +8145,7 @@ function Hl() {
|
|
|
8145
8145
|
]);
|
|
8146
8146
|
}
|
|
8147
8147
|
function zl(t) {
|
|
8148
|
-
const e = new
|
|
8148
|
+
const e = new L.Record("Name INDEX", [
|
|
8149
8149
|
{ name: "names", type: "INDEX", value: [] }
|
|
8150
8150
|
]);
|
|
8151
8151
|
e.names = [];
|
|
@@ -8163,19 +8163,19 @@ function Va(t, e, n) {
|
|
|
8163
8163
|
return r;
|
|
8164
8164
|
}
|
|
8165
8165
|
function Ns(t, e, n) {
|
|
8166
|
-
const r = new
|
|
8166
|
+
const r = new L.Record("Top DICT", [
|
|
8167
8167
|
{ name: "dict", type: "DICT", value: {} }
|
|
8168
8168
|
]);
|
|
8169
8169
|
return r.dict = Va(Ga, t, e), r;
|
|
8170
8170
|
}
|
|
8171
8171
|
function Gs(t) {
|
|
8172
|
-
const e = new
|
|
8172
|
+
const e = new L.Record("Top DICT INDEX", [
|
|
8173
8173
|
{ name: "topDicts", type: "INDEX", value: [] }
|
|
8174
8174
|
]);
|
|
8175
8175
|
return e.topDicts = [{ name: "topDict_0", type: "TABLE", value: t }], e;
|
|
8176
8176
|
}
|
|
8177
8177
|
function Wl(t) {
|
|
8178
|
-
const e = new
|
|
8178
|
+
const e = new L.Record("String INDEX", [
|
|
8179
8179
|
{ name: "strings", type: "INDEX", value: [] }
|
|
8180
8180
|
]);
|
|
8181
8181
|
e.strings = [];
|
|
@@ -8184,12 +8184,12 @@ function Wl(t) {
|
|
|
8184
8184
|
return e;
|
|
8185
8185
|
}
|
|
8186
8186
|
function Vl() {
|
|
8187
|
-
return new
|
|
8187
|
+
return new L.Record("Global Subr INDEX", [
|
|
8188
8188
|
{ name: "subrs", type: "INDEX", value: [] }
|
|
8189
8189
|
]);
|
|
8190
8190
|
}
|
|
8191
8191
|
function ql(t, e) {
|
|
8192
|
-
const n = new
|
|
8192
|
+
const n = new L.Record("Charsets", [
|
|
8193
8193
|
{ name: "format", type: "Card8", value: 0 }
|
|
8194
8194
|
]);
|
|
8195
8195
|
for (let r = 0; r < t.length; r += 1) {
|
|
@@ -8228,7 +8228,7 @@ function jl(t, e) {
|
|
|
8228
8228
|
return n.push({ name: "endchar", type: "OP", value: 14 }), n;
|
|
8229
8229
|
}
|
|
8230
8230
|
function $l(t, e) {
|
|
8231
|
-
const n = new
|
|
8231
|
+
const n = new L.Record("CharStrings INDEX", [
|
|
8232
8232
|
{ name: "charStrings", type: "INDEX", value: [] }
|
|
8233
8233
|
]);
|
|
8234
8234
|
for (let r = 0; r < t.length; r += 1) {
|
|
@@ -8238,13 +8238,13 @@ function $l(t, e) {
|
|
|
8238
8238
|
return n;
|
|
8239
8239
|
}
|
|
8240
8240
|
function Yl(t, e, n) {
|
|
8241
|
-
const r = new
|
|
8241
|
+
const r = new L.Record("Private DICT", [
|
|
8242
8242
|
{ name: "dict", type: "DICT", value: {} }
|
|
8243
8243
|
]);
|
|
8244
8244
|
return r.dict = Va(Ha, t, e), r;
|
|
8245
8245
|
}
|
|
8246
8246
|
function Xl(t, e) {
|
|
8247
|
-
const n = new
|
|
8247
|
+
const n = new L.Table("CFF ", [
|
|
8248
8248
|
{ name: "header", type: "RECORD" },
|
|
8249
8249
|
{ name: "nameIndex", type: "RECORD" },
|
|
8250
8250
|
{ name: "topDictIndex", type: "RECORD" },
|
|
@@ -8285,7 +8285,7 @@ function Kl(t, e) {
|
|
|
8285
8285
|
function Zl(t) {
|
|
8286
8286
|
const e = Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3) + 2082844800;
|
|
8287
8287
|
let n = e, r = t.macStyle || 0;
|
|
8288
|
-
return t.createdTimestamp && (n = t.createdTimestamp + 2082844800), new
|
|
8288
|
+
return t.createdTimestamp && (n = t.createdTimestamp + 2082844800), new L.Table("head", [
|
|
8289
8289
|
{ name: "version", type: "FIXED", value: 65536 },
|
|
8290
8290
|
{ name: "fontRevision", type: "FIXED", value: 65536 },
|
|
8291
8291
|
{ name: "checkSumAdjustment", type: "ULONG", value: 0 },
|
|
@@ -8311,7 +8311,7 @@ function Jl(t, e) {
|
|
|
8311
8311
|
return n.version = r.parseVersion(), n.ascender = r.parseShort(), n.descender = r.parseShort(), n.lineGap = r.parseShort(), n.advanceWidthMax = r.parseUShort(), n.minLeftSideBearing = r.parseShort(), n.minRightSideBearing = r.parseShort(), n.xMaxExtent = r.parseShort(), n.caretSlopeRise = r.parseShort(), n.caretSlopeRun = r.parseShort(), n.caretOffset = r.parseShort(), r.relativeOffset += 8, n.metricDataFormat = r.parseShort(), n.numberOfHMetrics = r.parseUShort(), n;
|
|
8312
8312
|
}
|
|
8313
8313
|
function Ql(t) {
|
|
8314
|
-
return new
|
|
8314
|
+
return new L.Table("hhea", [
|
|
8315
8315
|
{ name: "version", type: "FIXED", value: 65536 },
|
|
8316
8316
|
{ name: "ascender", type: "FWORD", value: 0 },
|
|
8317
8317
|
{ name: "descender", type: "FWORD", value: 0 },
|
|
@@ -8355,7 +8355,7 @@ function nu(t, e, n, r, s, i, a) {
|
|
|
8355
8355
|
a.lowMemory ? tu(t, e, n, r, s) : eu(e, n, r, s, i);
|
|
8356
8356
|
}
|
|
8357
8357
|
function ru(t) {
|
|
8358
|
-
const e = new
|
|
8358
|
+
const e = new L.Table("hmtx", []);
|
|
8359
8359
|
for (let n = 0; n < t.length; n += 1) {
|
|
8360
8360
|
const r = t.get(n), s = r.advanceWidth || 0, i = r.leftSideBearing || 0;
|
|
8361
8361
|
e.fields.push({ name: "advanceWidth_" + n, type: "USHORT", value: s }), e.fields.push({ name: "leftSideBearing_" + n, type: "SHORT", value: i });
|
|
@@ -8364,7 +8364,7 @@ function ru(t) {
|
|
|
8364
8364
|
}
|
|
8365
8365
|
var $a = { parse: nu, make: ru };
|
|
8366
8366
|
function su(t) {
|
|
8367
|
-
const e = new
|
|
8367
|
+
const e = new L.Table("ltag", [
|
|
8368
8368
|
{ name: "version", type: "ULONG", value: 1 },
|
|
8369
8369
|
{ name: "flags", type: "ULONG", value: 0 },
|
|
8370
8370
|
{ name: "numTags", type: "ULONG", value: t.length }
|
|
@@ -8396,7 +8396,7 @@ function au(t, e) {
|
|
|
8396
8396
|
return n.version = r.parseVersion(), n.numGlyphs = r.parseUShort(), n.version === 1 && (n.maxPoints = r.parseUShort(), n.maxContours = r.parseUShort(), n.maxCompositePoints = r.parseUShort(), n.maxCompositeContours = r.parseUShort(), n.maxZones = r.parseUShort(), n.maxTwilightPoints = r.parseUShort(), n.maxStorage = r.parseUShort(), n.maxFunctionDefs = r.parseUShort(), n.maxInstructionDefs = r.parseUShort(), n.maxStackElements = r.parseUShort(), n.maxSizeOfInstructions = r.parseUShort(), n.maxComponentElements = r.parseUShort(), n.maxComponentDepth = r.parseUShort()), n;
|
|
8397
8397
|
}
|
|
8398
8398
|
function ou(t) {
|
|
8399
|
-
return new
|
|
8399
|
+
return new L.Table("maxp", [
|
|
8400
8400
|
{ name: "version", type: "FIXED", value: 20480 },
|
|
8401
8401
|
{ name: "numGlyphs", type: "USHORT", value: t }
|
|
8402
8402
|
]);
|
|
@@ -8665,7 +8665,7 @@ function lu(t, e) {
|
|
|
8665
8665
|
return n.ulUnicodeRange1 = r.parseULong(), n.ulUnicodeRange2 = r.parseULong(), n.ulUnicodeRange3 = r.parseULong(), n.ulUnicodeRange4 = r.parseULong(), n.achVendID = String.fromCharCode(r.parseByte(), r.parseByte(), r.parseByte(), r.parseByte()), n.fsSelection = r.parseUShort(), n.usFirstCharIndex = r.parseUShort(), n.usLastCharIndex = r.parseUShort(), n.sTypoAscender = r.parseShort(), n.sTypoDescender = r.parseShort(), n.sTypoLineGap = r.parseShort(), n.usWinAscent = r.parseUShort(), n.usWinDescent = r.parseUShort(), n.version >= 1 && (n.ulCodePageRange1 = r.parseULong(), n.ulCodePageRange2 = r.parseULong()), n.version >= 2 && (n.sxHeight = r.parseShort(), n.sCapHeight = r.parseShort(), n.usDefaultChar = r.parseUShort(), n.usBreakChar = r.parseUShort(), n.usMaxContent = r.parseUShort()), n;
|
|
8666
8666
|
}
|
|
8667
8667
|
function uu(t) {
|
|
8668
|
-
return new
|
|
8668
|
+
return new L.Table("OS/2", [
|
|
8669
8669
|
{ name: "version", type: "USHORT", value: 3 },
|
|
8670
8670
|
{ name: "xAvgCharWidth", type: "SHORT", value: 0 },
|
|
8671
8671
|
{ name: "usWeightClass", type: "USHORT", value: 0 },
|
|
@@ -8751,7 +8751,7 @@ function fu(t) {
|
|
|
8751
8751
|
minMemType1: o = 0,
|
|
8752
8752
|
maxMemType1: c = 0
|
|
8753
8753
|
} = t.tables.post || {};
|
|
8754
|
-
return new
|
|
8754
|
+
return new L.Table("post", [
|
|
8755
8755
|
{ name: "version", type: "FIXED", value: 196608 },
|
|
8756
8756
|
{ name: "italicAngle", type: "FIXED", value: e },
|
|
8757
8757
|
{ name: "underlinePosition", type: "FWORD", value: n },
|
|
@@ -8930,77 +8930,77 @@ function pu(t, e) {
|
|
|
8930
8930
|
var Et = new Array(9);
|
|
8931
8931
|
Et[1] = function(e) {
|
|
8932
8932
|
if (e.substFormat === 1)
|
|
8933
|
-
return new
|
|
8933
|
+
return new L.Table("substitutionTable", [
|
|
8934
8934
|
{ name: "substFormat", type: "USHORT", value: 1 },
|
|
8935
|
-
{ name: "coverage", type: "TABLE", value: new
|
|
8935
|
+
{ name: "coverage", type: "TABLE", value: new L.Coverage(e.coverage) },
|
|
8936
8936
|
{ name: "deltaGlyphID", type: "SHORT", value: e.deltaGlyphId }
|
|
8937
8937
|
]);
|
|
8938
8938
|
if (e.substFormat === 2)
|
|
8939
|
-
return new
|
|
8939
|
+
return new L.Table("substitutionTable", [
|
|
8940
8940
|
{ name: "substFormat", type: "USHORT", value: 2 },
|
|
8941
|
-
{ name: "coverage", type: "TABLE", value: new
|
|
8942
|
-
].concat(
|
|
8941
|
+
{ name: "coverage", type: "TABLE", value: new L.Coverage(e.coverage) }
|
|
8942
|
+
].concat(L.ushortList("substitute", e.substitute)));
|
|
8943
8943
|
H.fail("Lookup type 1 substFormat must be 1 or 2.");
|
|
8944
8944
|
};
|
|
8945
8945
|
Et[2] = function(e) {
|
|
8946
|
-
return H.assert(e.substFormat === 1, "Lookup type 2 substFormat must be 1."), new
|
|
8946
|
+
return H.assert(e.substFormat === 1, "Lookup type 2 substFormat must be 1."), new L.Table("substitutionTable", [
|
|
8947
8947
|
{ name: "substFormat", type: "USHORT", value: 1 },
|
|
8948
|
-
{ name: "coverage", type: "TABLE", value: new
|
|
8949
|
-
].concat(
|
|
8950
|
-
return new
|
|
8948
|
+
{ name: "coverage", type: "TABLE", value: new L.Coverage(e.coverage) }
|
|
8949
|
+
].concat(L.tableList("seqSet", e.sequences, function(n) {
|
|
8950
|
+
return new L.Table("sequenceSetTable", L.ushortList("sequence", n));
|
|
8951
8951
|
})));
|
|
8952
8952
|
};
|
|
8953
8953
|
Et[3] = function(e) {
|
|
8954
|
-
return H.assert(e.substFormat === 1, "Lookup type 3 substFormat must be 1."), new
|
|
8954
|
+
return H.assert(e.substFormat === 1, "Lookup type 3 substFormat must be 1."), new L.Table("substitutionTable", [
|
|
8955
8955
|
{ name: "substFormat", type: "USHORT", value: 1 },
|
|
8956
|
-
{ name: "coverage", type: "TABLE", value: new
|
|
8957
|
-
].concat(
|
|
8958
|
-
return new
|
|
8956
|
+
{ name: "coverage", type: "TABLE", value: new L.Coverage(e.coverage) }
|
|
8957
|
+
].concat(L.tableList("altSet", e.alternateSets, function(n) {
|
|
8958
|
+
return new L.Table("alternateSetTable", L.ushortList("alternate", n));
|
|
8959
8959
|
})));
|
|
8960
8960
|
};
|
|
8961
8961
|
Et[4] = function(e) {
|
|
8962
|
-
return H.assert(e.substFormat === 1, "Lookup type 4 substFormat must be 1."), new
|
|
8962
|
+
return H.assert(e.substFormat === 1, "Lookup type 4 substFormat must be 1."), new L.Table("substitutionTable", [
|
|
8963
8963
|
{ name: "substFormat", type: "USHORT", value: 1 },
|
|
8964
|
-
{ name: "coverage", type: "TABLE", value: new
|
|
8965
|
-
].concat(
|
|
8966
|
-
return new
|
|
8967
|
-
return new
|
|
8964
|
+
{ name: "coverage", type: "TABLE", value: new L.Coverage(e.coverage) }
|
|
8965
|
+
].concat(L.tableList("ligSet", e.ligatureSets, function(n) {
|
|
8966
|
+
return new L.Table("ligatureSetTable", L.tableList("ligature", n, function(r) {
|
|
8967
|
+
return new L.Table(
|
|
8968
8968
|
"ligatureTable",
|
|
8969
|
-
[{ name: "ligGlyph", type: "USHORT", value: r.ligGlyph }].concat(
|
|
8969
|
+
[{ name: "ligGlyph", type: "USHORT", value: r.ligGlyph }].concat(L.ushortList("component", r.components, r.components.length + 1))
|
|
8970
8970
|
);
|
|
8971
8971
|
}));
|
|
8972
8972
|
})));
|
|
8973
8973
|
};
|
|
8974
8974
|
Et[5] = function(e) {
|
|
8975
8975
|
if (e.substFormat === 1)
|
|
8976
|
-
return new
|
|
8976
|
+
return new L.Table("contextualSubstitutionTable", [
|
|
8977
8977
|
{ name: "substFormat", type: "USHORT", value: e.substFormat },
|
|
8978
|
-
{ name: "coverage", type: "TABLE", value: new
|
|
8979
|
-
].concat(
|
|
8980
|
-
return n ? new
|
|
8981
|
-
let s =
|
|
8978
|
+
{ name: "coverage", type: "TABLE", value: new L.Coverage(e.coverage) }
|
|
8979
|
+
].concat(L.tableList("sequenceRuleSet", e.ruleSets, function(n) {
|
|
8980
|
+
return n ? new L.Table("sequenceRuleSetTable", L.tableList("sequenceRule", n, function(r) {
|
|
8981
|
+
let s = L.ushortList("seqLookup", [], r.lookupRecords.length).concat(L.ushortList("inputSequence", r.input, r.input.length + 1));
|
|
8982
8982
|
[s[0], s[1]] = [s[1], s[0]];
|
|
8983
8983
|
for (let i = 0; i < r.lookupRecords.length; i++) {
|
|
8984
8984
|
const a = r.lookupRecords[i];
|
|
8985
8985
|
s = s.concat({ name: "sequenceIndex" + i, type: "USHORT", value: a.sequenceIndex }).concat({ name: "lookupListIndex" + i, type: "USHORT", value: a.lookupListIndex });
|
|
8986
8986
|
}
|
|
8987
|
-
return new
|
|
8988
|
-
})) : new
|
|
8987
|
+
return new L.Table("sequenceRuleTable", s);
|
|
8988
|
+
})) : new L.Table("NULL", null);
|
|
8989
8989
|
})));
|
|
8990
8990
|
if (e.substFormat === 2)
|
|
8991
|
-
return new
|
|
8991
|
+
return new L.Table("contextualSubstitutionTable", [
|
|
8992
8992
|
{ name: "substFormat", type: "USHORT", value: e.substFormat },
|
|
8993
|
-
{ name: "coverage", type: "TABLE", value: new
|
|
8994
|
-
{ name: "classDef", type: "TABLE", value: new
|
|
8995
|
-
].concat(
|
|
8996
|
-
return n ? new
|
|
8997
|
-
let s =
|
|
8993
|
+
{ name: "coverage", type: "TABLE", value: new L.Coverage(e.coverage) },
|
|
8994
|
+
{ name: "classDef", type: "TABLE", value: new L.ClassDef(e.classDef) }
|
|
8995
|
+
].concat(L.tableList("classSeqRuleSet", e.classSets, function(n) {
|
|
8996
|
+
return n ? new L.Table("classSeqRuleSetTable", L.tableList("classSeqRule", n, function(r) {
|
|
8997
|
+
let s = L.ushortList("classes", r.classes, r.classes.length + 1).concat(L.ushortList("seqLookupCount", [], r.lookupRecords.length));
|
|
8998
8998
|
for (let i = 0; i < r.lookupRecords.length; i++) {
|
|
8999
8999
|
const a = r.lookupRecords[i];
|
|
9000
9000
|
s = s.concat({ name: "sequenceIndex" + i, type: "USHORT", value: a.sequenceIndex }).concat({ name: "lookupListIndex" + i, type: "USHORT", value: a.lookupListIndex });
|
|
9001
9001
|
}
|
|
9002
|
-
return new
|
|
9003
|
-
})) : new
|
|
9002
|
+
return new L.Table("classSeqRuleTable", s);
|
|
9003
|
+
})) : new L.Table("NULL", null);
|
|
9004
9004
|
})));
|
|
9005
9005
|
if (e.substFormat === 3) {
|
|
9006
9006
|
let n = [
|
|
@@ -9009,29 +9009,29 @@ Et[5] = function(e) {
|
|
|
9009
9009
|
n.push({ name: "inputGlyphCount", type: "USHORT", value: e.coverages.length }), n.push({ name: "substitutionCount", type: "USHORT", value: e.lookupRecords.length });
|
|
9010
9010
|
for (let s = 0; s < e.coverages.length; s++) {
|
|
9011
9011
|
const i = e.coverages[s];
|
|
9012
|
-
n.push({ name: "inputCoverage" + s, type: "TABLE", value: new
|
|
9012
|
+
n.push({ name: "inputCoverage" + s, type: "TABLE", value: new L.Coverage(i) });
|
|
9013
9013
|
}
|
|
9014
9014
|
for (let s = 0; s < e.lookupRecords.length; s++) {
|
|
9015
9015
|
const i = e.lookupRecords[s];
|
|
9016
9016
|
n = n.concat({ name: "sequenceIndex" + s, type: "USHORT", value: i.sequenceIndex }).concat({ name: "lookupListIndex" + s, type: "USHORT", value: i.lookupListIndex });
|
|
9017
9017
|
}
|
|
9018
|
-
return new
|
|
9018
|
+
return new L.Table("contextualSubstitutionTable", n);
|
|
9019
9019
|
}
|
|
9020
9020
|
H.assert(!1, "lookup type 5 format must be 1, 2 or 3.");
|
|
9021
9021
|
};
|
|
9022
9022
|
Et[6] = function(e) {
|
|
9023
9023
|
if (e.substFormat === 1)
|
|
9024
|
-
return new
|
|
9024
|
+
return new L.Table("chainContextTable", [
|
|
9025
9025
|
{ name: "substFormat", type: "USHORT", value: e.substFormat },
|
|
9026
|
-
{ name: "coverage", type: "TABLE", value: new
|
|
9027
|
-
].concat(
|
|
9028
|
-
return new
|
|
9029
|
-
let i =
|
|
9026
|
+
{ name: "coverage", type: "TABLE", value: new L.Coverage(e.coverage) }
|
|
9027
|
+
].concat(L.tableList("chainRuleSet", e.chainRuleSets, function(r) {
|
|
9028
|
+
return new L.Table("chainRuleSetTable", L.tableList("chainRule", r, function(s) {
|
|
9029
|
+
let i = L.ushortList("backtrackGlyph", s.backtrack, s.backtrack.length).concat(L.ushortList("inputGlyph", s.input, s.input.length + 1)).concat(L.ushortList("lookaheadGlyph", s.lookahead, s.lookahead.length)).concat(L.ushortList("substitution", [], s.lookupRecords.length));
|
|
9030
9030
|
for (let a = 0; a < s.lookupRecords.length; a++) {
|
|
9031
9031
|
const o = s.lookupRecords[a];
|
|
9032
9032
|
i = i.concat({ name: "sequenceIndex" + a, type: "USHORT", value: o.sequenceIndex }).concat({ name: "lookupListIndex" + a, type: "USHORT", value: o.lookupListIndex });
|
|
9033
9033
|
}
|
|
9034
|
-
return new
|
|
9034
|
+
return new L.Table("chainRuleTable", i);
|
|
9035
9035
|
}));
|
|
9036
9036
|
})));
|
|
9037
9037
|
if (e.substFormat === 2)
|
|
@@ -9043,33 +9043,33 @@ Et[6] = function(e) {
|
|
|
9043
9043
|
n.push({ name: "backtrackGlyphCount", type: "USHORT", value: e.backtrackCoverage.length });
|
|
9044
9044
|
for (let s = 0; s < e.backtrackCoverage.length; s++) {
|
|
9045
9045
|
const i = e.backtrackCoverage[s];
|
|
9046
|
-
n.push({ name: "backtrackCoverage" + s, type: "TABLE", value: new
|
|
9046
|
+
n.push({ name: "backtrackCoverage" + s, type: "TABLE", value: new L.Coverage(i) });
|
|
9047
9047
|
}
|
|
9048
9048
|
n.push({ name: "inputGlyphCount", type: "USHORT", value: e.inputCoverage.length });
|
|
9049
9049
|
for (let s = 0; s < e.inputCoverage.length; s++) {
|
|
9050
9050
|
const i = e.inputCoverage[s];
|
|
9051
|
-
n.push({ name: "inputCoverage" + s, type: "TABLE", value: new
|
|
9051
|
+
n.push({ name: "inputCoverage" + s, type: "TABLE", value: new L.Coverage(i) });
|
|
9052
9052
|
}
|
|
9053
9053
|
n.push({ name: "lookaheadGlyphCount", type: "USHORT", value: e.lookaheadCoverage.length });
|
|
9054
9054
|
for (let s = 0; s < e.lookaheadCoverage.length; s++) {
|
|
9055
9055
|
const i = e.lookaheadCoverage[s];
|
|
9056
|
-
n.push({ name: "lookaheadCoverage" + s, type: "TABLE", value: new
|
|
9056
|
+
n.push({ name: "lookaheadCoverage" + s, type: "TABLE", value: new L.Coverage(i) });
|
|
9057
9057
|
}
|
|
9058
9058
|
n.push({ name: "substitutionCount", type: "USHORT", value: e.lookupRecords.length });
|
|
9059
9059
|
for (let s = 0; s < e.lookupRecords.length; s++) {
|
|
9060
9060
|
const i = e.lookupRecords[s];
|
|
9061
9061
|
n = n.concat({ name: "sequenceIndex" + s, type: "USHORT", value: i.sequenceIndex }).concat({ name: "lookupListIndex" + s, type: "USHORT", value: i.lookupListIndex });
|
|
9062
9062
|
}
|
|
9063
|
-
return new
|
|
9063
|
+
return new L.Table("chainContextTable", n);
|
|
9064
9064
|
}
|
|
9065
9065
|
H.assert(!1, "lookup type 6 format must be 1, 2 or 3.");
|
|
9066
9066
|
};
|
|
9067
9067
|
function du(t) {
|
|
9068
|
-
return new
|
|
9068
|
+
return new L.Table("GSUB", [
|
|
9069
9069
|
{ name: "version", type: "ULONG", value: 65536 },
|
|
9070
|
-
{ name: "scripts", type: "TABLE", value: new
|
|
9071
|
-
{ name: "features", type: "TABLE", value: new
|
|
9072
|
-
{ name: "lookups", type: "TABLE", value: new
|
|
9070
|
+
{ name: "scripts", type: "TABLE", value: new L.ScriptList(t.scripts) },
|
|
9071
|
+
{ name: "features", type: "TABLE", value: new L.FeatureList(t.features) },
|
|
9072
|
+
{ name: "lookups", type: "TABLE", value: new L.LookupList(t.lookups, Et) }
|
|
9073
9073
|
]);
|
|
9074
9074
|
}
|
|
9075
9075
|
var Za = { parse: pu, make: du };
|
|
@@ -9089,7 +9089,7 @@ function gu(t, e) {
|
|
|
9089
9089
|
function mu(t) {
|
|
9090
9090
|
const e = Object.keys(t).length;
|
|
9091
9091
|
let n = "";
|
|
9092
|
-
const r = 16 + e * 12, s = new
|
|
9092
|
+
const r = 16 + e * 12, s = new L.Table("meta", [
|
|
9093
9093
|
{ name: "version", type: "ULONG", value: 1 },
|
|
9094
9094
|
{ name: "flags", type: "ULONG", value: 0 },
|
|
9095
9095
|
{ name: "offset", type: "ULONG", value: r },
|
|
@@ -9126,7 +9126,7 @@ function yu(t, e) {
|
|
|
9126
9126
|
function bu({ version: t = 0, baseGlyphRecords: e = [], layerRecords: n = [] }) {
|
|
9127
9127
|
H.argument(t === 0, "Only COLRv0 supported.");
|
|
9128
9128
|
const r = 14, s = r + e.length * 6;
|
|
9129
|
-
return new
|
|
9129
|
+
return new L.Table("COLR", [
|
|
9130
9130
|
{ name: "version", type: "USHORT", value: t },
|
|
9131
9131
|
{ name: "numBaseGlyphRecords", type: "USHORT", value: e.length },
|
|
9132
9132
|
{ name: "baseGlyphRecordsOffset", type: "ULONG", value: r },
|
|
@@ -9190,7 +9190,7 @@ function wu(t, e, n, r, s) {
|
|
|
9190
9190
|
return i.postScriptNameID = c == 65535 ? void 0 : c, i.postScriptName = i.postScriptNameID !== void 0 ? Mn(r, c, [6]) : "", i;
|
|
9191
9191
|
}
|
|
9192
9192
|
function Cu(t, e) {
|
|
9193
|
-
const n = new
|
|
9193
|
+
const n = new L.Table("fvar", [
|
|
9194
9194
|
{ name: "version", type: "ULONG", value: 65536 },
|
|
9195
9195
|
{ name: "offsetToData", type: "USHORT", value: 0 },
|
|
9196
9196
|
{ name: "countSizePairs", type: "USHORT", value: 2 },
|
|
@@ -9350,20 +9350,20 @@ rn[4] = function(e, n) {
|
|
|
9350
9350
|
return r;
|
|
9351
9351
|
};
|
|
9352
9352
|
function Au(t, e) {
|
|
9353
|
-
return new
|
|
9353
|
+
return new L.Record("axisRecord_" + t, [
|
|
9354
9354
|
{ name: "axisTag_" + t, type: "TAG", value: e.tag },
|
|
9355
9355
|
{ name: "axisNameID_" + t, type: "USHORT", value: e.nameID },
|
|
9356
9356
|
{ name: "axisOrdering_" + t, type: "USHORT", value: e.ordering }
|
|
9357
9357
|
]);
|
|
9358
9358
|
}
|
|
9359
|
-
function
|
|
9359
|
+
function Lu(t, e) {
|
|
9360
9360
|
const n = e.format, r = rn[n];
|
|
9361
9361
|
H.argument(r !== void 0, `Unknown axis value table format ${n}`);
|
|
9362
9362
|
const s = r(t, e);
|
|
9363
|
-
return new
|
|
9363
|
+
return new L.Table("axisValueTable_" + t, s);
|
|
9364
9364
|
}
|
|
9365
|
-
function
|
|
9366
|
-
const e = new
|
|
9365
|
+
function Ou(t) {
|
|
9366
|
+
const e = new L.Table("STAT", [
|
|
9367
9367
|
{ name: "majorVersion", type: "USHORT", value: 1 },
|
|
9368
9368
|
{ name: "minorVersion", type: "USHORT", value: 2 },
|
|
9369
9369
|
{ name: "designAxisSize", type: "USHORT", value: 8 },
|
|
@@ -9381,7 +9381,7 @@ function Lu(t) {
|
|
|
9381
9381
|
const n = [];
|
|
9382
9382
|
let r = [], s = t.values.length * 2;
|
|
9383
9383
|
for (let i = 0; i < t.values.length; i++) {
|
|
9384
|
-
const a =
|
|
9384
|
+
const a = Lu(i, t.values[i]);
|
|
9385
9385
|
n.push({
|
|
9386
9386
|
name: "offset_" + i,
|
|
9387
9387
|
type: "USHORT",
|
|
@@ -9390,15 +9390,15 @@ function Lu(t) {
|
|
|
9390
9390
|
}
|
|
9391
9391
|
return e.fields = e.fields.concat(n), e.fields = e.fields.concat(r), e;
|
|
9392
9392
|
}
|
|
9393
|
-
var to = { make:
|
|
9393
|
+
var to = { make: Ou, parse: Eu };
|
|
9394
9394
|
function Iu(t, e) {
|
|
9395
|
-
return new
|
|
9395
|
+
return new L.Record("axisValueMap_" + t, [
|
|
9396
9396
|
{ name: "fromCoordinate_" + t, type: "F2DOT14", value: e.fromCoordinate },
|
|
9397
9397
|
{ name: "toCoordinate_" + t, type: "F2DOT14", value: e.toCoordinate }
|
|
9398
9398
|
]);
|
|
9399
9399
|
}
|
|
9400
9400
|
function Ru(t, e) {
|
|
9401
|
-
const n = new
|
|
9401
|
+
const n = new L.Record("segmentMap_" + t, [
|
|
9402
9402
|
{ name: "positionMapCount_" + t, type: "USHORT", value: e.axisValueMaps.length }
|
|
9403
9403
|
]);
|
|
9404
9404
|
let r = [];
|
|
@@ -9410,7 +9410,7 @@ function Ru(t, e) {
|
|
|
9410
9410
|
}
|
|
9411
9411
|
function Bu(t, e) {
|
|
9412
9412
|
H.argument(t.axisSegmentMaps.length === e.axes.length, "avar axis count must correspond to fvar axis count");
|
|
9413
|
-
const n = new
|
|
9413
|
+
const n = new L.Table("avar", [
|
|
9414
9414
|
{ name: "majorVersion", type: "USHORT", value: 1 },
|
|
9415
9415
|
{ name: "minorVersion", type: "USHORT", value: 0 },
|
|
9416
9416
|
{ name: "reserved", type: "USHORT", value: 0 },
|
|
@@ -9493,7 +9493,7 @@ function Nu(t, e) {
|
|
|
9493
9493
|
return n;
|
|
9494
9494
|
}
|
|
9495
9495
|
function Gu(t) {
|
|
9496
|
-
const e = new
|
|
9496
|
+
const e = new L.Table("gasp", [
|
|
9497
9497
|
{ name: "version", type: "USHORT", value: 1 },
|
|
9498
9498
|
{ name: "numRanges", type: "USHORT", value: t.numRanges }
|
|
9499
9499
|
]);
|
|
@@ -9538,7 +9538,7 @@ function zu(t) {
|
|
|
9538
9538
|
}
|
|
9539
9539
|
for (let h = 0; h < c; h++)
|
|
9540
9540
|
u[f++] = { name: "svgDoc_" + h, type: "LITERAL", value: r[h] };
|
|
9541
|
-
return new
|
|
9541
|
+
return new L.Table("SVG ", u);
|
|
9542
9542
|
}
|
|
9543
9543
|
var ao = {
|
|
9544
9544
|
make: zu,
|
|
@@ -9556,7 +9556,7 @@ function Qr(t) {
|
|
|
9556
9556
|
return e %= Math.pow(2, 32), e;
|
|
9557
9557
|
}
|
|
9558
9558
|
function zs(t, e, n, r) {
|
|
9559
|
-
return new
|
|
9559
|
+
return new L.Record("Table Record", [
|
|
9560
9560
|
{ name: "tag", type: "TAG", value: t !== void 0 ? t : "" },
|
|
9561
9561
|
{ name: "checkSum", type: "ULONG", value: e !== void 0 ? e : 0 },
|
|
9562
9562
|
{ name: "offset", type: "ULONG", value: n !== void 0 ? n : 0 },
|
|
@@ -9564,7 +9564,7 @@ function zs(t, e, n, r) {
|
|
|
9564
9564
|
]);
|
|
9565
9565
|
}
|
|
9566
9566
|
function oo(t) {
|
|
9567
|
-
const e = new
|
|
9567
|
+
const e = new L.Table("sfnt", [
|
|
9568
9568
|
{ name: "version", type: "TAG", value: "OTTO" },
|
|
9569
9569
|
{ name: "numTables", type: "USHORT", value: 0 },
|
|
9570
9570
|
{ name: "searchRange", type: "USHORT", value: 0 },
|
|
@@ -9623,8 +9623,8 @@ function Vu(t) {
|
|
|
9623
9623
|
else
|
|
9624
9624
|
throw new Error("Unicode ranges bits > 123 are reserved for internal usage");
|
|
9625
9625
|
if (xe.name === ".notdef") continue;
|
|
9626
|
-
const
|
|
9627
|
-
e.push(
|
|
9626
|
+
const Le = xe.getMetrics();
|
|
9627
|
+
e.push(Le.xMin), n.push(Le.yMin), r.push(Le.xMax), s.push(Le.yMax), a.push(Le.leftSideBearing), o.push(Le.rightSideBearing), i.push(xe.advanceWidth);
|
|
9628
9628
|
}
|
|
9629
9629
|
const y = {
|
|
9630
9630
|
xMin: Math.min.apply(null, e),
|
|
@@ -11753,10 +11753,10 @@ function Eh(t) {
|
|
|
11753
11753
|
function Ah(t) {
|
|
11754
11754
|
t.rp1 = t.stack.pop();
|
|
11755
11755
|
}
|
|
11756
|
-
function
|
|
11756
|
+
function Lh(t) {
|
|
11757
11757
|
t.rp2 = t.stack.pop();
|
|
11758
11758
|
}
|
|
11759
|
-
function
|
|
11759
|
+
function Oh(t) {
|
|
11760
11760
|
const e = t.stack.pop();
|
|
11761
11761
|
switch (t.zp0 = e, e) {
|
|
11762
11762
|
case 0:
|
|
@@ -12110,12 +12110,12 @@ function Af(t) {
|
|
|
12110
12110
|
const e = t.stack, n = e.pop();
|
|
12111
12111
|
e.push(Math.abs(n));
|
|
12112
12112
|
}
|
|
12113
|
-
function
|
|
12113
|
+
function Lf(t) {
|
|
12114
12114
|
const e = t.stack;
|
|
12115
12115
|
let n = e.pop();
|
|
12116
12116
|
e.push(-n);
|
|
12117
12117
|
}
|
|
12118
|
-
function
|
|
12118
|
+
function Of(t) {
|
|
12119
12119
|
const e = t.stack, n = e.pop();
|
|
12120
12120
|
e.push(Math.floor(n / 64) * 64);
|
|
12121
12121
|
}
|
|
@@ -12321,9 +12321,9 @@ go = [
|
|
|
12321
12321
|
/* 0x11 */
|
|
12322
12322
|
Ah,
|
|
12323
12323
|
/* 0x12 */
|
|
12324
|
-
Oh,
|
|
12325
|
-
/* 0x13 */
|
|
12326
12324
|
Lh,
|
|
12325
|
+
/* 0x13 */
|
|
12326
|
+
Oh,
|
|
12327
12327
|
/* 0x14 */
|
|
12328
12328
|
Ih,
|
|
12329
12329
|
/* 0x15 */
|
|
@@ -12496,9 +12496,9 @@ go = [
|
|
|
12496
12496
|
/* 0x64 */
|
|
12497
12497
|
Af,
|
|
12498
12498
|
/* 0x65 */
|
|
12499
|
-
Of,
|
|
12500
|
-
/* 0x66 */
|
|
12501
12499
|
Lf,
|
|
12500
|
+
/* 0x66 */
|
|
12501
|
+
Of,
|
|
12502
12502
|
/* 0x67 */
|
|
12503
12503
|
If,
|
|
12504
12504
|
/* 0x68 */
|
|
@@ -13680,8 +13680,8 @@ function Ap(t) {
|
|
|
13680
13680
|
}
|
|
13681
13681
|
}
|
|
13682
13682
|
}
|
|
13683
|
-
var
|
|
13684
|
-
function
|
|
13683
|
+
var Lp = Ap;
|
|
13684
|
+
function Op(t) {
|
|
13685
13685
|
const e = t.current, n = t.get(-1);
|
|
13686
13686
|
return (
|
|
13687
13687
|
// ? thai first char
|
|
@@ -13698,7 +13698,7 @@ function Ip(t) {
|
|
|
13698
13698
|
);
|
|
13699
13699
|
}
|
|
13700
13700
|
var Rp = {
|
|
13701
|
-
startCheck:
|
|
13701
|
+
startCheck: Op,
|
|
13702
13702
|
endCheck: Ip
|
|
13703
13703
|
};
|
|
13704
13704
|
function di(t, e) {
|
|
@@ -13903,7 +13903,7 @@ function Xp() {
|
|
|
13903
13903
|
const t = this.tokenizer.getContextRanges("latinWord");
|
|
13904
13904
|
for (let e = 0; e < t.length; e++) {
|
|
13905
13905
|
const n = t[e];
|
|
13906
|
-
|
|
13906
|
+
Lp.call(this, n);
|
|
13907
13907
|
}
|
|
13908
13908
|
}
|
|
13909
13909
|
function Kp() {
|
|
@@ -14399,11 +14399,11 @@ function ud(t, e) {
|
|
|
14399
14399
|
}
|
|
14400
14400
|
var hd = new Array(10);
|
|
14401
14401
|
function fd(t) {
|
|
14402
|
-
return new
|
|
14402
|
+
return new L.Table("GPOS", [
|
|
14403
14403
|
{ name: "version", type: "ULONG", value: 65536 },
|
|
14404
|
-
{ name: "scripts", type: "TABLE", value: new
|
|
14405
|
-
{ name: "features", type: "TABLE", value: new
|
|
14406
|
-
{ name: "lookups", type: "TABLE", value: new
|
|
14404
|
+
{ name: "scripts", type: "TABLE", value: new L.ScriptList(t.scripts) },
|
|
14405
|
+
{ name: "features", type: "TABLE", value: new L.FeatureList(t.features) },
|
|
14406
|
+
{ name: "lookups", type: "TABLE", value: new L.LookupList(t.lookups, hd) }
|
|
14407
14407
|
]);
|
|
14408
14408
|
}
|
|
14409
14409
|
var pd = { parse: ud, make: fd };
|
|
@@ -14702,7 +14702,7 @@ function Td(t) {
|
|
|
14702
14702
|
return i >= e * Cd && s > wd ? 1 : s;
|
|
14703
14703
|
}
|
|
14704
14704
|
function kd(t, e = !1) {
|
|
14705
|
-
const n = t[0].index !== null, r = new Set(Object.keys(t[0].attributes)), s = new Set(Object.keys(t[0].morphAttributes)), i = {}, a = {}, o = t[0].morphTargetsRelative, c = new
|
|
14705
|
+
const n = t[0].index !== null, r = new Set(Object.keys(t[0].attributes)), s = new Set(Object.keys(t[0].morphAttributes)), i = {}, a = {}, o = t[0].morphTargetsRelative, c = new Lo();
|
|
14706
14706
|
let l = 0;
|
|
14707
14707
|
for (let u = 0; u < t.length; ++u) {
|
|
14708
14708
|
const f = t[u];
|
|
@@ -14781,7 +14781,7 @@ function xi(t) {
|
|
|
14781
14781
|
return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."), null;
|
|
14782
14782
|
i += u.count * n;
|
|
14783
14783
|
}
|
|
14784
|
-
const a = new e(i), o = new
|
|
14784
|
+
const a = new e(i), o = new Oo(a, n, r);
|
|
14785
14785
|
let c = 0;
|
|
14786
14786
|
for (let l = 0; l < t.length; ++l) {
|
|
14787
14787
|
const u = t[l];
|
|
@@ -14908,18 +14908,18 @@ class Ad extends aa {
|
|
|
14908
14908
|
return s ? (this.isFound = !0, s.ha * n / r.data.resolution) : (this.isFound = !1, 0);
|
|
14909
14909
|
}
|
|
14910
14910
|
}
|
|
14911
|
-
class
|
|
14911
|
+
class Ld {
|
|
14912
14912
|
constructor(e) {
|
|
14913
14913
|
this.isFont = !0, this.type = "Font", this.data = e;
|
|
14914
14914
|
}
|
|
14915
14915
|
generateShapes(e, n = 100) {
|
|
14916
|
-
const r = [], s =
|
|
14916
|
+
const r = [], s = Od(e, n, this.data);
|
|
14917
14917
|
for (let i = 0, a = s.length; i < a; i++)
|
|
14918
14918
|
r.push(...s[i].toShapes());
|
|
14919
14919
|
return r;
|
|
14920
14920
|
}
|
|
14921
14921
|
}
|
|
14922
|
-
function
|
|
14922
|
+
function Od(t, e, n) {
|
|
14923
14923
|
const r = Array.from(t), s = e / n.resolution, i = (n.boundingBox.yMax - n.boundingBox.yMin + n.underlineThickness) * s, a = [];
|
|
14924
14924
|
let o = 0, c = 0;
|
|
14925
14925
|
for (let l = 0; l < r.length; l++) {
|
|
@@ -14962,7 +14962,7 @@ function Id(t, e, n, r, s) {
|
|
|
14962
14962
|
}
|
|
14963
14963
|
return { offsetX: i.ha * e, path: a };
|
|
14964
14964
|
}
|
|
14965
|
-
class Rd extends
|
|
14965
|
+
class Rd extends Ld {
|
|
14966
14966
|
/**
|
|
14967
14967
|
* Generates geometry shapes from the given text and size.
|
|
14968
14968
|
*
|
|
@@ -15619,7 +15619,7 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
15619
15619
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
15620
15620
|
);
|
|
15621
15621
|
if (d === g) return 0;
|
|
15622
|
-
for (var S = d.length, k = g.length, A = 0,
|
|
15622
|
+
for (var S = d.length, k = g.length, A = 0, O = Math.min(S, k); A < O; ++A)
|
|
15623
15623
|
if (d[A] !== g[A]) {
|
|
15624
15624
|
S = d[A], k = g[A];
|
|
15625
15625
|
break;
|
|
@@ -15653,18 +15653,18 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
15653
15653
|
g += d[S].length;
|
|
15654
15654
|
var k = o.allocUnsafe(g), A = 0;
|
|
15655
15655
|
for (S = 0; S < d.length; ++S) {
|
|
15656
|
-
var
|
|
15657
|
-
if (Re(
|
|
15658
|
-
A +
|
|
15656
|
+
var O = d[S];
|
|
15657
|
+
if (Re(O, Uint8Array))
|
|
15658
|
+
A + O.length > k.length ? o.from(O).copy(k, A) : Uint8Array.prototype.set.call(
|
|
15659
15659
|
k,
|
|
15660
|
-
|
|
15660
|
+
O,
|
|
15661
15661
|
A
|
|
15662
15662
|
);
|
|
15663
|
-
else if (o.isBuffer(
|
|
15664
|
-
|
|
15663
|
+
else if (o.isBuffer(O))
|
|
15664
|
+
O.copy(k, A);
|
|
15665
15665
|
else
|
|
15666
15666
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
15667
|
-
A +=
|
|
15667
|
+
A += O.length;
|
|
15668
15668
|
}
|
|
15669
15669
|
return k;
|
|
15670
15670
|
};
|
|
@@ -15781,12 +15781,12 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
15781
15781
|
if (g >= S)
|
|
15782
15782
|
return 1;
|
|
15783
15783
|
if (g >>>= 0, S >>>= 0, k >>>= 0, A >>>= 0, this === d) return 0;
|
|
15784
|
-
for (var
|
|
15784
|
+
for (var O = A - k, q = S - g, V = Math.min(O, q), ae = this.slice(k, A), Se = d.slice(g, S), le = 0; le < V; ++le)
|
|
15785
15785
|
if (ae[le] !== Se[le]) {
|
|
15786
|
-
|
|
15786
|
+
O = ae[le], q = Se[le];
|
|
15787
15787
|
break;
|
|
15788
15788
|
}
|
|
15789
|
-
return
|
|
15789
|
+
return O < q ? -1 : q < O ? 1 : 0;
|
|
15790
15790
|
};
|
|
15791
15791
|
function R(x, d, g, S, k) {
|
|
15792
15792
|
if (x.length === 0) return -1;
|
|
@@ -15803,11 +15803,11 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
15803
15803
|
throw new TypeError("val must be string, number or Buffer");
|
|
15804
15804
|
}
|
|
15805
15805
|
function P(x, d, g, S, k) {
|
|
15806
|
-
var A = 1,
|
|
15806
|
+
var A = 1, O = x.length, q = d.length;
|
|
15807
15807
|
if (S !== void 0 && (S = String(S).toLowerCase(), S === "ucs2" || S === "ucs-2" || S === "utf16le" || S === "utf-16le")) {
|
|
15808
15808
|
if (x.length < 2 || d.length < 2)
|
|
15809
15809
|
return -1;
|
|
15810
|
-
A = 2,
|
|
15810
|
+
A = 2, O /= 2, q /= 2, g /= 2;
|
|
15811
15811
|
}
|
|
15812
15812
|
function V(us, hs) {
|
|
15813
15813
|
return A === 1 ? us[hs] : us.readUInt16BE(hs * A);
|
|
@@ -15815,13 +15815,13 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
15815
15815
|
var ae;
|
|
15816
15816
|
if (k) {
|
|
15817
15817
|
var Se = -1;
|
|
15818
|
-
for (ae = g; ae <
|
|
15818
|
+
for (ae = g; ae < O; ae++)
|
|
15819
15819
|
if (V(x, ae) === V(d, Se === -1 ? 0 : ae - Se)) {
|
|
15820
15820
|
if (Se === -1 && (Se = ae), ae - Se + 1 === q) return Se * A;
|
|
15821
15821
|
} else
|
|
15822
15822
|
Se !== -1 && (ae -= ae - Se), Se = -1;
|
|
15823
15823
|
} else
|
|
15824
|
-
for (g + q >
|
|
15824
|
+
for (g + q > O && (g = O - q), ae = g; ae >= 0; ae--) {
|
|
15825
15825
|
for (var le = !0, un = 0; un < q; un++)
|
|
15826
15826
|
if (V(x, ae + un) !== V(d, un)) {
|
|
15827
15827
|
le = !1;
|
|
@@ -15844,24 +15844,24 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
15844
15844
|
S ? (S = Number(S), S > k && (S = k)) : S = k;
|
|
15845
15845
|
var A = d.length;
|
|
15846
15846
|
S > A / 2 && (S = A / 2);
|
|
15847
|
-
for (var
|
|
15848
|
-
var q = parseInt(d.substr(
|
|
15849
|
-
if (ve(q)) return
|
|
15850
|
-
x[g +
|
|
15847
|
+
for (var O = 0; O < S; ++O) {
|
|
15848
|
+
var q = parseInt(d.substr(O * 2, 2), 16);
|
|
15849
|
+
if (ve(q)) return O;
|
|
15850
|
+
x[g + O] = q;
|
|
15851
15851
|
}
|
|
15852
|
-
return
|
|
15852
|
+
return O;
|
|
15853
15853
|
}
|
|
15854
15854
|
function j(x, d, g, S) {
|
|
15855
|
-
return
|
|
15855
|
+
return Le(Z(d, x.length - g), x, g, S);
|
|
15856
15856
|
}
|
|
15857
15857
|
function N(x, d, g, S) {
|
|
15858
|
-
return
|
|
15858
|
+
return Le(xe(d), x, g, S);
|
|
15859
15859
|
}
|
|
15860
15860
|
function X(x, d, g, S) {
|
|
15861
|
-
return
|
|
15861
|
+
return Le(Ae(d), x, g, S);
|
|
15862
15862
|
}
|
|
15863
15863
|
function ie(x, d, g, S) {
|
|
15864
|
-
return
|
|
15864
|
+
return Le(Ee(d, x.length - g), x, g, S);
|
|
15865
15865
|
}
|
|
15866
15866
|
o.prototype.write = function(d, g, S, k) {
|
|
15867
15867
|
if (g === void 0)
|
|
@@ -15878,7 +15878,7 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
15878
15878
|
if ((S === void 0 || S > A) && (S = A), d.length > 0 && (S < 0 || g < 0) || g > this.length)
|
|
15879
15879
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
15880
15880
|
k || (k = "utf8");
|
|
15881
|
-
for (var
|
|
15881
|
+
for (var O = !1; ; )
|
|
15882
15882
|
switch (k) {
|
|
15883
15883
|
case "hex":
|
|
15884
15884
|
return W(this, d, g, S);
|
|
@@ -15897,8 +15897,8 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
15897
15897
|
case "utf-16le":
|
|
15898
15898
|
return ie(this, d, g, S);
|
|
15899
15899
|
default:
|
|
15900
|
-
if (
|
|
15901
|
-
k = ("" + k).toLowerCase(),
|
|
15900
|
+
if (O) throw new TypeError("Unknown encoding: " + k);
|
|
15901
|
+
k = ("" + k).toLowerCase(), O = !0;
|
|
15902
15902
|
}
|
|
15903
15903
|
}, o.prototype.toJSON = function() {
|
|
15904
15904
|
return {
|
|
@@ -15912,24 +15912,24 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
15912
15912
|
function M(x, d, g) {
|
|
15913
15913
|
g = Math.min(x.length, g);
|
|
15914
15914
|
for (var S = [], k = d; k < g; ) {
|
|
15915
|
-
var A = x[k],
|
|
15915
|
+
var A = x[k], O = null, q = A > 239 ? 4 : A > 223 ? 3 : A > 191 ? 2 : 1;
|
|
15916
15916
|
if (k + q <= g) {
|
|
15917
15917
|
var V, ae, Se, le;
|
|
15918
15918
|
switch (q) {
|
|
15919
15919
|
case 1:
|
|
15920
|
-
A < 128 && (
|
|
15920
|
+
A < 128 && (O = A);
|
|
15921
15921
|
break;
|
|
15922
15922
|
case 2:
|
|
15923
|
-
V = x[k + 1], (V & 192) === 128 && (le = (A & 31) << 6 | V & 63, le > 127 && (
|
|
15923
|
+
V = x[k + 1], (V & 192) === 128 && (le = (A & 31) << 6 | V & 63, le > 127 && (O = le));
|
|
15924
15924
|
break;
|
|
15925
15925
|
case 3:
|
|
15926
|
-
V = x[k + 1], ae = x[k + 2], (V & 192) === 128 && (ae & 192) === 128 && (le = (A & 15) << 12 | (V & 63) << 6 | ae & 63, le > 2047 && (le < 55296 || le > 57343) && (
|
|
15926
|
+
V = x[k + 1], ae = x[k + 2], (V & 192) === 128 && (ae & 192) === 128 && (le = (A & 15) << 12 | (V & 63) << 6 | ae & 63, le > 2047 && (le < 55296 || le > 57343) && (O = le));
|
|
15927
15927
|
break;
|
|
15928
15928
|
case 4:
|
|
15929
|
-
V = x[k + 1], ae = x[k + 2], Se = x[k + 3], (V & 192) === 128 && (ae & 192) === 128 && (Se & 192) === 128 && (le = (A & 15) << 18 | (V & 63) << 12 | (ae & 63) << 6 | Se & 63, le > 65535 && le < 1114112 && (
|
|
15929
|
+
V = x[k + 1], ae = x[k + 2], Se = x[k + 3], (V & 192) === 128 && (ae & 192) === 128 && (Se & 192) === 128 && (le = (A & 15) << 18 | (V & 63) << 12 | (ae & 63) << 6 | Se & 63, le > 65535 && le < 1114112 && (O = le));
|
|
15930
15930
|
}
|
|
15931
15931
|
}
|
|
15932
|
-
|
|
15932
|
+
O === null ? (O = 65533, q = 1) : O > 65535 && (O -= 65536, S.push(O >>> 10 & 1023 | 55296), O = 56320 | O & 1023), S.push(O), k += q;
|
|
15933
15933
|
}
|
|
15934
15934
|
return re(S);
|
|
15935
15935
|
}
|
|
@@ -15983,8 +15983,8 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
15983
15983
|
}
|
|
15984
15984
|
o.prototype.readUintLE = o.prototype.readUIntLE = function(d, g, S) {
|
|
15985
15985
|
d = d >>> 0, g = g >>> 0, S || Y(d, g, this.length);
|
|
15986
|
-
for (var k = this[d], A = 1,
|
|
15987
|
-
k += this[d +
|
|
15986
|
+
for (var k = this[d], A = 1, O = 0; ++O < g && (A *= 256); )
|
|
15987
|
+
k += this[d + O] * A;
|
|
15988
15988
|
return k;
|
|
15989
15989
|
}, o.prototype.readUintBE = o.prototype.readUIntBE = function(d, g, S) {
|
|
15990
15990
|
d = d >>> 0, g = g >>> 0, S || Y(d, g, this.length);
|
|
@@ -16003,14 +16003,14 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
16003
16003
|
return d = d >>> 0, g || Y(d, 4, this.length), this[d] * 16777216 + (this[d + 1] << 16 | this[d + 2] << 8 | this[d + 3]);
|
|
16004
16004
|
}, o.prototype.readIntLE = function(d, g, S) {
|
|
16005
16005
|
d = d >>> 0, g = g >>> 0, S || Y(d, g, this.length);
|
|
16006
|
-
for (var k = this[d], A = 1,
|
|
16007
|
-
k += this[d +
|
|
16006
|
+
for (var k = this[d], A = 1, O = 0; ++O < g && (A *= 256); )
|
|
16007
|
+
k += this[d + O] * A;
|
|
16008
16008
|
return A *= 128, k >= A && (k -= Math.pow(2, 8 * g)), k;
|
|
16009
16009
|
}, o.prototype.readIntBE = function(d, g, S) {
|
|
16010
16010
|
d = d >>> 0, g = g >>> 0, S || Y(d, g, this.length);
|
|
16011
|
-
for (var k = g, A = 1,
|
|
16012
|
-
|
|
16013
|
-
return A *= 128,
|
|
16011
|
+
for (var k = g, A = 1, O = this[d + --k]; k > 0 && (A *= 256); )
|
|
16012
|
+
O += this[d + --k] * A;
|
|
16013
|
+
return A *= 128, O >= A && (O -= Math.pow(2, 8 * g)), O;
|
|
16014
16014
|
}, o.prototype.readInt8 = function(d, g) {
|
|
16015
16015
|
return d = d >>> 0, g || Y(d, 1, this.length), this[d] & 128 ? (255 - this[d] + 1) * -1 : this[d];
|
|
16016
16016
|
}, o.prototype.readInt16LE = function(d, g) {
|
|
@@ -16044,18 +16044,18 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
16044
16044
|
var A = Math.pow(2, 8 * S) - 1;
|
|
16045
16045
|
ne(this, d, g, S, A, 0);
|
|
16046
16046
|
}
|
|
16047
|
-
var
|
|
16048
|
-
for (this[g] = d & 255; ++q < S && (
|
|
16049
|
-
this[g + q] = d /
|
|
16047
|
+
var O = 1, q = 0;
|
|
16048
|
+
for (this[g] = d & 255; ++q < S && (O *= 256); )
|
|
16049
|
+
this[g + q] = d / O & 255;
|
|
16050
16050
|
return g + S;
|
|
16051
16051
|
}, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(d, g, S, k) {
|
|
16052
16052
|
if (d = +d, g = g >>> 0, S = S >>> 0, !k) {
|
|
16053
16053
|
var A = Math.pow(2, 8 * S) - 1;
|
|
16054
16054
|
ne(this, d, g, S, A, 0);
|
|
16055
16055
|
}
|
|
16056
|
-
var
|
|
16057
|
-
for (this[g +
|
|
16058
|
-
this[g +
|
|
16056
|
+
var O = S - 1, q = 1;
|
|
16057
|
+
for (this[g + O] = d & 255; --O >= 0 && (q *= 256); )
|
|
16058
|
+
this[g + O] = d / q & 255;
|
|
16059
16059
|
return g + S;
|
|
16060
16060
|
}, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(d, g, S) {
|
|
16061
16061
|
return d = +d, g = g >>> 0, S || ne(this, d, g, 1, 255, 0), this[g] = d & 255, g + 1;
|
|
@@ -16072,18 +16072,18 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
16072
16072
|
var A = Math.pow(2, 8 * S - 1);
|
|
16073
16073
|
ne(this, d, g, S, A - 1, -A);
|
|
16074
16074
|
}
|
|
16075
|
-
var
|
|
16076
|
-
for (this[g] = d & 255; ++
|
|
16077
|
-
d < 0 && V === 0 && this[g +
|
|
16075
|
+
var O = 0, q = 1, V = 0;
|
|
16076
|
+
for (this[g] = d & 255; ++O < S && (q *= 256); )
|
|
16077
|
+
d < 0 && V === 0 && this[g + O - 1] !== 0 && (V = 1), this[g + O] = (d / q >> 0) - V & 255;
|
|
16078
16078
|
return g + S;
|
|
16079
16079
|
}, o.prototype.writeIntBE = function(d, g, S, k) {
|
|
16080
16080
|
if (d = +d, g = g >>> 0, !k) {
|
|
16081
16081
|
var A = Math.pow(2, 8 * S - 1);
|
|
16082
16082
|
ne(this, d, g, S, A - 1, -A);
|
|
16083
16083
|
}
|
|
16084
|
-
var
|
|
16085
|
-
for (this[g +
|
|
16086
|
-
d < 0 && V === 0 && this[g +
|
|
16084
|
+
var O = S - 1, q = 1, V = 0;
|
|
16085
|
+
for (this[g + O] = d & 255; --O >= 0 && (q *= 256); )
|
|
16086
|
+
d < 0 && V === 0 && this[g + O + 1] !== 0 && (V = 1), this[g + O] = (d / q >> 0) - V & 255;
|
|
16087
16087
|
return g + S;
|
|
16088
16088
|
}, o.prototype.writeInt8 = function(d, g, S) {
|
|
16089
16089
|
return d = +d, g = g >>> 0, S || ne(this, d, g, 1, 127, -128), d < 0 && (d = 255 + d + 1), this[g] = d & 255, g + 1;
|
|
@@ -16145,16 +16145,16 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
16145
16145
|
if (S <= g)
|
|
16146
16146
|
return this;
|
|
16147
16147
|
g = g >>> 0, S = S === void 0 ? this.length : S >>> 0, d || (d = 0);
|
|
16148
|
-
var
|
|
16148
|
+
var O;
|
|
16149
16149
|
if (typeof d == "number")
|
|
16150
|
-
for (
|
|
16151
|
-
this[
|
|
16150
|
+
for (O = g; O < S; ++O)
|
|
16151
|
+
this[O] = d;
|
|
16152
16152
|
else {
|
|
16153
16153
|
var q = o.isBuffer(d) ? d : o.from(d, k), V = q.length;
|
|
16154
16154
|
if (V === 0)
|
|
16155
16155
|
throw new TypeError('The value "' + d + '" is invalid for argument "value"');
|
|
16156
|
-
for (
|
|
16157
|
-
this[
|
|
16156
|
+
for (O = 0; O < S - g; ++O)
|
|
16157
|
+
this[O + g] = q[O % V];
|
|
16158
16158
|
}
|
|
16159
16159
|
return this;
|
|
16160
16160
|
};
|
|
@@ -16167,13 +16167,13 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
16167
16167
|
}
|
|
16168
16168
|
function Z(x, d) {
|
|
16169
16169
|
d = d || 1 / 0;
|
|
16170
|
-
for (var g, S = x.length, k = null, A = [],
|
|
16171
|
-
if (g = x.charCodeAt(
|
|
16170
|
+
for (var g, S = x.length, k = null, A = [], O = 0; O < S; ++O) {
|
|
16171
|
+
if (g = x.charCodeAt(O), g > 55295 && g < 57344) {
|
|
16172
16172
|
if (!k) {
|
|
16173
16173
|
if (g > 56319) {
|
|
16174
16174
|
(d -= 3) > -1 && A.push(239, 191, 189);
|
|
16175
16175
|
continue;
|
|
16176
|
-
} else if (
|
|
16176
|
+
} else if (O + 1 === S) {
|
|
16177
16177
|
(d -= 3) > -1 && A.push(239, 191, 189);
|
|
16178
16178
|
continue;
|
|
16179
16179
|
}
|
|
@@ -16221,14 +16221,14 @@ ss.write = function(t, e, n, r, s, i) {
|
|
|
16221
16221
|
return d;
|
|
16222
16222
|
}
|
|
16223
16223
|
function Ee(x, d) {
|
|
16224
|
-
for (var g, S, k, A = [],
|
|
16225
|
-
g = x.charCodeAt(
|
|
16224
|
+
for (var g, S, k, A = [], O = 0; O < x.length && !((d -= 2) < 0); ++O)
|
|
16225
|
+
g = x.charCodeAt(O), S = g >> 8, k = g % 256, A.push(k), A.push(S);
|
|
16226
16226
|
return A;
|
|
16227
16227
|
}
|
|
16228
16228
|
function Ae(x) {
|
|
16229
16229
|
return e.toByteArray(ce(x));
|
|
16230
16230
|
}
|
|
16231
|
-
function
|
|
16231
|
+
function Le(x, d, g, S) {
|
|
16232
16232
|
for (var k = 0; k < S && !(k + g >= d.length || k >= x.length); ++k)
|
|
16233
16233
|
d[k + g] = x[k];
|
|
16234
16234
|
return k;
|
|
@@ -16924,9 +16924,9 @@ function o0() {
|
|
|
16924
16924
|
}, r.prototype.end = function() {
|
|
16925
16925
|
}, fr;
|
|
16926
16926
|
}
|
|
16927
|
-
var pr,
|
|
16927
|
+
var pr, Li;
|
|
16928
16928
|
function c0() {
|
|
16929
|
-
return
|
|
16929
|
+
return Li || (Li = 1, pr = {
|
|
16930
16930
|
// Not supported by iconv, not sure why.
|
|
16931
16931
|
10029: "maccenteuro",
|
|
16932
16932
|
maccenteuro: {
|
|
@@ -17073,9 +17073,9 @@ function c0() {
|
|
|
17073
17073
|
csmacintosh: "macintosh"
|
|
17074
17074
|
}), pr;
|
|
17075
17075
|
}
|
|
17076
|
-
var dr,
|
|
17076
|
+
var dr, Oi;
|
|
17077
17077
|
function l0() {
|
|
17078
|
-
return
|
|
17078
|
+
return Oi || (Oi = 1, dr = {
|
|
17079
17079
|
437: "cp437",
|
|
17080
17080
|
737: "cp737",
|
|
17081
17081
|
775: "cp775",
|
|
@@ -27670,24 +27670,24 @@ function E0() {
|
|
|
27670
27670
|
}
|
|
27671
27671
|
function Pi(t, e = "") {
|
|
27672
27672
|
const n = [
|
|
27673
|
-
`${e}${t.id}: ${
|
|
27673
|
+
`${e}${t.id}: ${Oe(t.totalEstimatedBytes)}` + (t.inFlightRequests != null ? ` (in-flight: ${t.inFlightRequests})` : "")
|
|
27674
27674
|
];
|
|
27675
27675
|
if (n.push(
|
|
27676
|
-
`${e} materials: mesh=${t.materials.meshCount}, line=${t.materials.lineCount}, ~${
|
|
27676
|
+
`${e} materials: mesh=${t.materials.meshCount}, line=${t.materials.lineCount}, ~${Oe(t.materials.estimatedBytes)}`
|
|
27677
27677
|
), t.fonts.length === 0)
|
|
27678
27678
|
return n.push(`${e} fonts: (none)`), n;
|
|
27679
27679
|
for (const r of t.fonts) {
|
|
27680
27680
|
const s = r.names[0] ?? "(unnamed)";
|
|
27681
27681
|
n.push(
|
|
27682
|
-
`${e} font "${s}" [${r.type}]: ~${
|
|
27682
|
+
`${e} font "${s}" [${r.type}]: ~${Oe(r.estimatedBytes)}`
|
|
27683
27683
|
), n.push(
|
|
27684
|
-
`${e} source=${
|
|
27684
|
+
`${e} source=${Oe(r.sourceByteLength)}, parsed~=${Oe(r.parsedFontEstimatedBytes)}`
|
|
27685
27685
|
), n.push(
|
|
27686
|
-
`${e} charGeometry: ${r.charGeometryCache.entries}/${r.charGeometryCache.maxEntries} ~${
|
|
27686
|
+
`${e} charGeometry: ${r.charGeometryCache.entries}/${r.charGeometryCache.maxEntries} ~${Oe(r.charGeometryCache.estimatedBytes)}`
|
|
27687
27687
|
), r.meshGlyphs && n.push(
|
|
27688
|
-
`${e} meshGlyphs: ${r.meshGlyphs.glyphCount} glyphs, outlines=${
|
|
27688
|
+
`${e} meshGlyphs: ${r.meshGlyphs.glyphCount} glyphs, outlines=${Oe(r.meshGlyphs.outlineStringBytes)}`
|
|
27689
27689
|
), r.shxLayoutCache && n.push(
|
|
27690
|
-
`${e} shxLayout: ${r.shxLayoutCache.entries}/${r.shxLayoutCache.maxEntries} ~${
|
|
27690
|
+
`${e} shxLayout: ${r.shxLayoutCache.entries}/${r.shxLayoutCache.maxEntries} ~${Oe(r.shxLayoutCache.estimatedBytes)}`
|
|
27691
27691
|
);
|
|
27692
27692
|
}
|
|
27693
27693
|
return n;
|
|
@@ -27695,10 +27695,10 @@ function Pi(t, e = "") {
|
|
|
27695
27695
|
function r1(t) {
|
|
27696
27696
|
const e = [
|
|
27697
27697
|
`mtext-renderer memory estimate @ ${new Date(t.collectedAt).toISOString()}`,
|
|
27698
|
-
`total (live isolates): ${
|
|
27698
|
+
`total (live isolates): ${Oe(t.totalEstimatedBytes)}`
|
|
27699
27699
|
];
|
|
27700
27700
|
if (t.jsHeap && e.push(
|
|
27701
|
-
`jsHeap: used=${
|
|
27701
|
+
`jsHeap: used=${Oe(t.jsHeap.usedJSHeapSize)}, total=${Oe(t.jsHeap.totalJSHeapSize)}, limit=${Oe(t.jsHeap.jsHeapSizeLimit)}`
|
|
27702
27702
|
), e.push(...Pi(t.mainThread)), t.workers.length === 0)
|
|
27703
27703
|
e.push("workers: (none)");
|
|
27704
27704
|
else {
|
|
@@ -27708,10 +27708,10 @@ function r1(t) {
|
|
|
27708
27708
|
}
|
|
27709
27709
|
const n = t.indexedDbFontCache;
|
|
27710
27710
|
e.push(
|
|
27711
|
-
`indexedDbFontCache (not in total): ${n.fontCount} fonts, ${
|
|
27711
|
+
`indexedDbFontCache (not in total): ${n.fontCount} fonts, ${Oe(n.totalBytes)}`
|
|
27712
27712
|
);
|
|
27713
27713
|
for (const r of n.fonts)
|
|
27714
|
-
e.push(` ${r.name} [${r.type}]: ${
|
|
27714
|
+
e.push(` ${r.name} [${r.type}]: ${Oe(r.bytes)}`);
|
|
27715
27715
|
return e.join(`
|
|
27716
27716
|
`);
|
|
27717
27717
|
}
|
|
@@ -27736,14 +27736,14 @@ const A0 = {
|
|
|
27736
27736
|
d: "°",
|
|
27737
27737
|
p: "±",
|
|
27738
27738
|
"%": "%"
|
|
27739
|
-
},
|
|
27739
|
+
}, L0 = {
|
|
27740
27740
|
l: oe.LEFT,
|
|
27741
27741
|
r: oe.RIGHT,
|
|
27742
27742
|
c: oe.CENTER,
|
|
27743
27743
|
j: oe.JUSTIFIED,
|
|
27744
27744
|
d: oe.DISTRIBUTED
|
|
27745
27745
|
};
|
|
27746
|
-
function
|
|
27746
|
+
function O0(t) {
|
|
27747
27747
|
const [e, n, r] = t;
|
|
27748
27748
|
return e << 16 | n << 8 | r;
|
|
27749
27749
|
}
|
|
@@ -27801,7 +27801,7 @@ function B0(t) {
|
|
|
27801
27801
|
const u = Number.parseFloat(l);
|
|
27802
27802
|
return Ni(u);
|
|
27803
27803
|
}, a = i(s[0]), o = i(s[1]), c = i(s[2]);
|
|
27804
|
-
return
|
|
27804
|
+
return O0([a, o, c]);
|
|
27805
27805
|
}
|
|
27806
27806
|
function i1(t) {
|
|
27807
27807
|
return t.replace(/\r\n|\r|\n/g, "\\P");
|
|
@@ -28298,7 +28298,7 @@ class _0 {
|
|
|
28298
28298
|
break;
|
|
28299
28299
|
case "q": {
|
|
28300
28300
|
const u = n.get();
|
|
28301
|
-
for (a =
|
|
28301
|
+
for (a = L0[u] || oe.DEFAULT; n.peek() === ","; )
|
|
28302
28302
|
n.consume(1);
|
|
28303
28303
|
break;
|
|
28304
28304
|
}
|
|
@@ -30671,26 +30671,29 @@ class tn extends I.Object3D {
|
|
|
30671
30671
|
const n = Array.from(tn.getFonts(this._mtextData.text || "", !0));
|
|
30672
30672
|
if (!this._fontsInStyleLoaded) {
|
|
30673
30673
|
if (this._style.font) {
|
|
30674
|
-
const
|
|
30675
|
-
|
|
30674
|
+
const o = this.getFontName(this._style.font);
|
|
30675
|
+
o && n.push(o);
|
|
30676
30676
|
}
|
|
30677
30677
|
if (this._style.bigFont) {
|
|
30678
|
-
const
|
|
30679
|
-
|
|
30678
|
+
const o = this.getFontName(this._style.bigFont);
|
|
30679
|
+
o && n.push(o);
|
|
30680
30680
|
}
|
|
30681
30681
|
if (this._style.extendedFont) {
|
|
30682
|
-
const
|
|
30683
|
-
|
|
30682
|
+
const o = this.getFontName(this._style.extendedFont);
|
|
30683
|
+
o && n.push(o);
|
|
30684
30684
|
}
|
|
30685
30685
|
}
|
|
30686
|
-
const r = (e == null ? void 0 : e.awaitFonts) ?? (!this._fontManager.lazyFontLoading || this._fontManager.awaitFontsBeforeDraw), s =
|
|
30687
|
-
if (s.length > 0 && (this._fontManager.
|
|
30688
|
-
|
|
30686
|
+
const r = (e == null ? void 0 : e.awaitFonts) ?? (!this._fontManager.lazyFontLoading || this._fontManager.awaitFontsBeforeDraw), s = [...new Set(n)], i = new Set(s.map((o) => o.toLowerCase())), a = this._fontManager.getFontsToLoad().filter((o) => !i.has(o.toLowerCase()));
|
|
30687
|
+
if (this._fontManager.lazyFontLoading ? s.length > 0 && (r && a.length > 0 && this._fontManager.requestFonts(a), r ? await this._fontManager.requestFonts(s) : this._fontManager.requestFonts(s)) : (s.length > 0 || a.length > 0) && await this._fontManager.loadFontsByNames([
|
|
30688
|
+
...s,
|
|
30689
|
+
...a
|
|
30690
|
+
]), n.length > 0) {
|
|
30691
|
+
const o = [
|
|
30689
30692
|
this._style.font ? this.getFontName(this._style.font) : void 0,
|
|
30690
30693
|
this._style.bigFont ? this.getFontName(this._style.bigFont) : void 0,
|
|
30691
30694
|
this._style.extendedFont ? this.getFontName(this._style.extendedFont) : void 0
|
|
30692
|
-
].filter((
|
|
30693
|
-
(
|
|
30695
|
+
].filter((l) => !!l);
|
|
30696
|
+
(o.length === 0 || o.every((l) => this._fontManager.isFontLoaded(l))) && (this._fontsInStyleLoaded = !0);
|
|
30694
30697
|
}
|
|
30695
30698
|
this.syncDraw();
|
|
30696
30699
|
}
|
|
@@ -31258,14 +31261,17 @@ class Xi extends I.Object3D {
|
|
|
31258
31261
|
async asyncDraw(e) {
|
|
31259
31262
|
const n = [];
|
|
31260
31263
|
if (!this._fontsInStyleLoaded)
|
|
31261
|
-
for (const
|
|
31262
|
-
const
|
|
31263
|
-
|
|
31264
|
+
for (const o of ["font", "bigFont", "extendedFont"]) {
|
|
31265
|
+
const c = this.getFontName(this._style[o]);
|
|
31266
|
+
c && n.push(c);
|
|
31264
31267
|
}
|
|
31265
|
-
const r = (e == null ? void 0 : e.awaitFonts) ?? (!this._fontManager.lazyFontLoading || this._fontManager.awaitFontsBeforeDraw), s =
|
|
31266
|
-
s.length > 0 && (this._fontManager.
|
|
31267
|
-
|
|
31268
|
-
|
|
31268
|
+
const r = (e == null ? void 0 : e.awaitFonts) ?? (!this._fontManager.lazyFontLoading || this._fontManager.awaitFontsBeforeDraw), s = [...new Set(n)], i = new Set(s.map((o) => o.toLowerCase())), a = this._fontManager.getFontsToLoad().filter((o) => !i.has(o.toLowerCase()));
|
|
31269
|
+
this._fontManager.lazyFontLoading ? s.length > 0 && (r && a.length > 0 && this._fontManager.requestFonts(a), r ? await this._fontManager.requestFonts(s) : this._fontManager.requestFonts(s)) : (s.length > 0 || a.length > 0) && await this._fontManager.loadFontsByNames([
|
|
31270
|
+
...s,
|
|
31271
|
+
...a
|
|
31272
|
+
]), n.length > 0 && n.every(
|
|
31273
|
+
(c) => this._fontManager.isFontLoaded(c)
|
|
31274
|
+
) && (this._fontsInStyleLoaded = !0), this.syncDraw();
|
|
31269
31275
|
}
|
|
31270
31276
|
syncDraw() {
|
|
31271
31277
|
const n = new tn(
|
|
@@ -32187,7 +32193,7 @@ export {
|
|
|
32187
32193
|
Hi as estimateMTextWrapWidth,
|
|
32188
32194
|
wc as estimateMaterialBytes,
|
|
32189
32195
|
Do as estimateStringBytes,
|
|
32190
|
-
|
|
32196
|
+
Oe as formatBytes,
|
|
32191
32197
|
r1 as formatMemoryUsageReport,
|
|
32192
32198
|
na as getColorByIndex,
|
|
32193
32199
|
M0 as getFonts,
|
|
@@ -32199,6 +32205,6 @@ export {
|
|
|
32199
32205
|
E0 as readJsHeapStats,
|
|
32200
32206
|
Kt as resolveMTextColor,
|
|
32201
32207
|
zi as resolveMTextWrapWidth,
|
|
32202
|
-
|
|
32208
|
+
O0 as rgb2int,
|
|
32203
32209
|
o1 as serializeMTextColor
|
|
32204
32210
|
};
|