@mlightcad/mtext-renderer 0.4.11 → 0.5.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/dist/index.js +595 -594
- package/dist/index.umd.cjs +3 -3
- package/dist/mtext-renderer-worker.js +1 -1
- package/lib/worker/unifiedRenderer.d.ts +10 -3
- package/lib/worker/webWorkerRenderer.d.ts +7 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ShapePath as
|
|
1
|
+
import * as R from "three";
|
|
2
|
+
import { ShapePath as Fa, ExtrudeGeometry as Ta, BufferGeometry as ut, BufferAttribute as wa } from "three";
|
|
3
3
|
class xr {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.listeners = [];
|
|
@@ -34,7 +34,7 @@ class xr {
|
|
|
34
34
|
n.call(null, e, ...r);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
class
|
|
37
|
+
class Ca {
|
|
38
38
|
constructor() {
|
|
39
39
|
this.cache = /* @__PURE__ */ new Map();
|
|
40
40
|
}
|
|
@@ -92,7 +92,7 @@ class wa {
|
|
|
92
92
|
}
|
|
93
93
|
class kn {
|
|
94
94
|
constructor() {
|
|
95
|
-
this.unsupportedChars = {}, this.cache = new
|
|
95
|
+
this.unsupportedChars = {}, this.cache = new Ca();
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
98
|
* Records an unsupported character in the font.
|
|
@@ -103,7 +103,7 @@ class kn {
|
|
|
103
103
|
this.unsupportedChars[e] || (this.unsupportedChars[e] = 0), this.unsupportedChars[e]++;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
class Fn extends
|
|
106
|
+
class Fn extends R.Shape {
|
|
107
107
|
/**
|
|
108
108
|
* Creates a new instance of BaseTextShape
|
|
109
109
|
* @param char - The character this shape represents */
|
|
@@ -113,7 +113,7 @@ class Fn extends L.Shape {
|
|
|
113
113
|
}
|
|
114
114
|
const Ht = (t, e) => e.some((r) => t instanceof r);
|
|
115
115
|
let br, Sr;
|
|
116
|
-
function
|
|
116
|
+
function Ea() {
|
|
117
117
|
return br || (br = [
|
|
118
118
|
IDBDatabase,
|
|
119
119
|
IDBObjectStore,
|
|
@@ -122,7 +122,7 @@ function Ca() {
|
|
|
122
122
|
IDBTransaction
|
|
123
123
|
]);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Oa() {
|
|
126
126
|
return Sr || (Sr = [
|
|
127
127
|
IDBCursor.prototype.advance,
|
|
128
128
|
IDBCursor.prototype.continue,
|
|
@@ -130,7 +130,7 @@ function Ea() {
|
|
|
130
130
|
]);
|
|
131
131
|
}
|
|
132
132
|
const zt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap();
|
|
133
|
-
function
|
|
133
|
+
function Ua(t) {
|
|
134
134
|
const e = new Promise((r, n) => {
|
|
135
135
|
const a = () => {
|
|
136
136
|
t.removeEventListener("success", s), t.removeEventListener("error", i);
|
|
@@ -143,7 +143,7 @@ function Oa(t) {
|
|
|
143
143
|
});
|
|
144
144
|
return mt.set(e, t), e;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function La(t) {
|
|
147
147
|
if (zt.has(t))
|
|
148
148
|
return;
|
|
149
149
|
const e = new Promise((r, n) => {
|
|
@@ -178,26 +178,26 @@ let Wt = {
|
|
|
178
178
|
function Tn(t) {
|
|
179
179
|
Wt = t(Wt);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
return
|
|
181
|
+
function Ra(t) {
|
|
182
|
+
return Oa().includes(t) ? function(...e) {
|
|
183
183
|
return t.apply(Vt(this), e), Re(this.request);
|
|
184
184
|
} : function(...e) {
|
|
185
185
|
return Re(t.apply(Vt(this), e));
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
|
-
function
|
|
189
|
-
return typeof t == "function" ?
|
|
188
|
+
function Aa(t) {
|
|
189
|
+
return typeof t == "function" ? Ra(t) : (t instanceof IDBTransaction && La(t), Ht(t, Ea()) ? new Proxy(t, Wt) : t);
|
|
190
190
|
}
|
|
191
191
|
function Re(t) {
|
|
192
192
|
if (t instanceof IDBRequest)
|
|
193
|
-
return
|
|
193
|
+
return Ua(t);
|
|
194
194
|
if (kt.has(t))
|
|
195
195
|
return kt.get(t);
|
|
196
|
-
const e =
|
|
196
|
+
const e = Aa(t);
|
|
197
197
|
return e !== t && (kt.set(t, e), mt.set(e, t)), e;
|
|
198
198
|
}
|
|
199
199
|
const Vt = (t) => mt.get(t);
|
|
200
|
-
function
|
|
200
|
+
function Ma(t, e, { blocked: r, upgrade: n, blocking: a, terminated: s } = {}) {
|
|
201
201
|
const i = indexedDB.open(t, e), o = Re(i);
|
|
202
202
|
return n && i.addEventListener("upgradeneeded", (u) => {
|
|
203
203
|
n(Re(i.result), u.oldVersion, u.newVersion, Re(i.transaction), u);
|
|
@@ -211,16 +211,16 @@ function Aa(t, e, { blocked: r, upgrade: n, blocking: a, terminated: s } = {}) {
|
|
|
211
211
|
}).catch(() => {
|
|
212
212
|
}), o;
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const Pa = ["get", "getKey", "getAll", "getAllKeys", "count"], Ba = ["put", "add", "delete", "clear"], Ft = /* @__PURE__ */ new Map();
|
|
215
215
|
function kr(t, e) {
|
|
216
216
|
if (!(t instanceof IDBDatabase && !(e in t) && typeof e == "string"))
|
|
217
217
|
return;
|
|
218
218
|
if (Ft.get(e))
|
|
219
219
|
return Ft.get(e);
|
|
220
|
-
const r = e.replace(/FromIndex$/, ""), n = e !== r, a =
|
|
220
|
+
const r = e.replace(/FromIndex$/, ""), n = e !== r, a = Ba.includes(r);
|
|
221
221
|
if (
|
|
222
222
|
// Bail if the target doesn't exist on the target. Eg, getAll isn't in Edge.
|
|
223
|
-
!(r in (n ? IDBIndex : IDBObjectStore).prototype) || !(a ||
|
|
223
|
+
!(r in (n ? IDBIndex : IDBObjectStore).prototype) || !(a || Pa.includes(r))
|
|
224
224
|
)
|
|
225
225
|
return;
|
|
226
226
|
const s = async function(i, ...o) {
|
|
@@ -238,9 +238,9 @@ Tn((t) => ({
|
|
|
238
238
|
get: (e, r, n) => kr(e, r) || t.get(e, r, n),
|
|
239
239
|
has: (e, r) => !!kr(e, r) || t.has(e, r)
|
|
240
240
|
}));
|
|
241
|
-
const
|
|
241
|
+
const Ia = ["continue", "continuePrimaryKey", "advance"], Fr = {}, qt = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), Da = {
|
|
242
242
|
get(t, e) {
|
|
243
|
-
if (!
|
|
243
|
+
if (!Ia.includes(e))
|
|
244
244
|
return t[e];
|
|
245
245
|
let r = Fr[e];
|
|
246
246
|
return r || (r = Fr[e] = function(...n) {
|
|
@@ -248,12 +248,12 @@ const Ba = ["continue", "continuePrimaryKey", "advance"], Fr = {}, qt = /* @__PU
|
|
|
248
248
|
}), r;
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
async function*
|
|
251
|
+
async function* Ga(...t) {
|
|
252
252
|
let e = this;
|
|
253
253
|
if (e instanceof IDBCursor || (e = await e.openCursor(...t)), !e)
|
|
254
254
|
return;
|
|
255
255
|
e = e;
|
|
256
|
-
const r = new Proxy(e,
|
|
256
|
+
const r = new Proxy(e, Da);
|
|
257
257
|
for (wn.set(r, e), mt.set(r, Vt(e)); e; )
|
|
258
258
|
yield r, e = await (qt.get(r) || e.continue()), qt.delete(r);
|
|
259
259
|
}
|
|
@@ -263,7 +263,7 @@ function Tr(t, e) {
|
|
|
263
263
|
Tn((t) => ({
|
|
264
264
|
...t,
|
|
265
265
|
get(e, r, n) {
|
|
266
|
-
return Tr(e, r) ?
|
|
266
|
+
return Tr(e, r) ? Ga : t.get(e, r, n);
|
|
267
267
|
},
|
|
268
268
|
has(e, r) {
|
|
269
269
|
return Tr(e, r) || t.has(e, r);
|
|
@@ -361,7 +361,7 @@ const Pe = {
|
|
|
361
361
|
async getDatabase() {
|
|
362
362
|
if (this.isClosing)
|
|
363
363
|
throw new Error("Cannot perform operation while database is closing");
|
|
364
|
-
return this.db ? this.db : (this.db = await
|
|
364
|
+
return this.db ? this.db : (this.db = await Ma(
|
|
365
365
|
ee.DATABASE_NAME,
|
|
366
366
|
ee.DATABASE_VERSION,
|
|
367
367
|
{
|
|
@@ -402,14 +402,14 @@ const Pe = {
|
|
|
402
402
|
};
|
|
403
403
|
ee.DATABASE_NAME = "mlightcad", ee.DATABASE_VERSION = Tt[Tt.length - 1].version;
|
|
404
404
|
let ze = ee;
|
|
405
|
-
const
|
|
405
|
+
const Na = (t) => t.substring(t.lastIndexOf(".") + 1), Cn = (t) => t.split("/").pop(), wr = (t) => {
|
|
406
406
|
const e = Cn(t);
|
|
407
407
|
if (e) {
|
|
408
408
|
const r = e.lastIndexOf(".");
|
|
409
409
|
return r === -1 ? e : e.substring(0, r);
|
|
410
410
|
}
|
|
411
411
|
return t;
|
|
412
|
-
},
|
|
412
|
+
}, _a = [
|
|
413
413
|
0,
|
|
414
414
|
16711680,
|
|
415
415
|
16776960,
|
|
@@ -667,19 +667,19 @@ const Ga = (t) => t.substring(t.lastIndexOf(".") + 1), Cn = (t) => t.split("/").
|
|
|
667
667
|
14079702,
|
|
668
668
|
16777215,
|
|
669
669
|
0
|
|
670
|
-
],
|
|
671
|
-
let
|
|
670
|
+
], Ha = (t) => _a[t];
|
|
671
|
+
let za = class {
|
|
672
672
|
constructor(e) {
|
|
673
673
|
this.isFont = !0, this.type = "Font", this.data = e;
|
|
674
674
|
}
|
|
675
675
|
generateShapes(e, r = 100) {
|
|
676
|
-
const n = [], a =
|
|
676
|
+
const n = [], a = Wa(e, r, this.data);
|
|
677
677
|
for (let s = 0, i = a.length; s < i; s++)
|
|
678
678
|
n.push(...a[s].toShapes());
|
|
679
679
|
return n;
|
|
680
680
|
}
|
|
681
681
|
};
|
|
682
|
-
function
|
|
682
|
+
function Wa(t, e, r) {
|
|
683
683
|
const n = Array.from(t), a = e / r.resolution, s = (r.boundingBox.yMax - r.boundingBox.yMin + r.underlineThickness) * a, i = [];
|
|
684
684
|
let o = 0, u = 0;
|
|
685
685
|
for (let l = 0; l < n.length; l++) {
|
|
@@ -688,19 +688,19 @@ function za(t, e, r) {
|
|
|
688
688
|
`)
|
|
689
689
|
o = 0, u -= s;
|
|
690
690
|
else {
|
|
691
|
-
const f =
|
|
691
|
+
const f = Va(h, a, o, u, r);
|
|
692
692
|
o += f.offsetX, i.push(f.path);
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
695
|
return i;
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function Va(t, e, r, n, a) {
|
|
698
698
|
const s = a.glyphs[t] || a.glyphs["?"];
|
|
699
699
|
if (!s) {
|
|
700
700
|
console.error('THREE.Font: character "' + t + '" does not exists in font family ' + a.familyName + ".");
|
|
701
701
|
return;
|
|
702
702
|
}
|
|
703
|
-
const i = new
|
|
703
|
+
const i = new Fa();
|
|
704
704
|
let o, u, l, h, f, c, p, d;
|
|
705
705
|
if (s.o) {
|
|
706
706
|
const v = s._cachedOutline || (s._cachedOutline = s.o.split(" "));
|
|
@@ -753,10 +753,10 @@ var rr = 0, En = -3;
|
|
|
753
753
|
function Ve() {
|
|
754
754
|
this.table = new Uint16Array(16), this.trans = new Uint16Array(288);
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function qa(t, e) {
|
|
757
757
|
this.source = t, this.sourceIndex = 0, this.tag = 0, this.bitcount = 0, this.dest = e, this.destLen = 0, this.ltree = new Ve(), this.dtree = new Ve();
|
|
758
758
|
}
|
|
759
|
-
var On = new Ve(), Un = new Ve(), nr = new Uint8Array(30), ar = new Uint16Array(30), Ln = new Uint8Array(30), Rn = new Uint16Array(30),
|
|
759
|
+
var On = new Ve(), Un = new Ve(), nr = new Uint8Array(30), ar = new Uint16Array(30), Ln = new Uint8Array(30), Rn = new Uint16Array(30), Xa = new Uint8Array([
|
|
760
760
|
16,
|
|
761
761
|
17,
|
|
762
762
|
18,
|
|
@@ -786,7 +786,7 @@ function An(t, e, r, n) {
|
|
|
786
786
|
for (s = n, a = 0; a < 30; ++a)
|
|
787
787
|
e[a] = s, s += 1 << t[a];
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function Ya(t, e) {
|
|
790
790
|
var r;
|
|
791
791
|
for (r = 0; r < 7; ++r)
|
|
792
792
|
t.table[r] = 0;
|
|
@@ -815,7 +815,7 @@ function wt(t, e, r, n) {
|
|
|
815
815
|
for (a = 0; a < n; ++a)
|
|
816
816
|
e[r + a] && (t.trans[Er[e[r + a]]++] = a);
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function Za(t) {
|
|
819
819
|
t.bitcount-- || (t.tag = t.source[t.sourceIndex++], t.bitcount = 7);
|
|
820
820
|
var e = t.tag & 1;
|
|
821
821
|
return t.tag >>>= 1, e;
|
|
@@ -837,13 +837,13 @@ function Xt(t, e) {
|
|
|
837
837
|
while (n >= 0);
|
|
838
838
|
return t.tag = s, t.bitcount -= a, e.trans[r + n];
|
|
839
839
|
}
|
|
840
|
-
function
|
|
840
|
+
function ja(t, e, r) {
|
|
841
841
|
var n, a, s, i, o, u;
|
|
842
842
|
for (n = fe(t, 5, 257), a = fe(t, 5, 1), s = fe(t, 4, 4), i = 0; i < 19; ++i)
|
|
843
843
|
ce[i] = 0;
|
|
844
844
|
for (i = 0; i < s; ++i) {
|
|
845
845
|
var l = fe(t, 3, 0);
|
|
846
|
-
ce[
|
|
846
|
+
ce[Xa[i]] = l;
|
|
847
847
|
}
|
|
848
848
|
for (wt(Cr, ce, 0, 19), o = 0; o < n + a; ) {
|
|
849
849
|
var h = Xt(t, Cr);
|
|
@@ -882,7 +882,7 @@ function Or(t, e, r) {
|
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function Ka(t) {
|
|
886
886
|
for (var e, r, n; t.bitcount > 8; )
|
|
887
887
|
t.sourceIndex--, t.bitcount -= 8;
|
|
888
888
|
if (e = t.source[t.sourceIndex + 1], e = 256 * e + t.source[t.sourceIndex], r = t.source[t.sourceIndex + 3], r = 256 * r + t.source[t.sourceIndex + 2], e !== (~r & 65535))
|
|
@@ -891,18 +891,18 @@ function ja(t) {
|
|
|
891
891
|
t.dest[t.destLen++] = t.source[t.sourceIndex++];
|
|
892
892
|
return t.bitcount = 0, rr;
|
|
893
893
|
}
|
|
894
|
-
function
|
|
895
|
-
var r = new
|
|
894
|
+
function Qa(t, e) {
|
|
895
|
+
var r = new qa(t, e), n, a, s;
|
|
896
896
|
do {
|
|
897
|
-
switch (n =
|
|
897
|
+
switch (n = Za(r), a = fe(r, 2, 0), a) {
|
|
898
898
|
case 0:
|
|
899
|
-
s =
|
|
899
|
+
s = Ka(r);
|
|
900
900
|
break;
|
|
901
901
|
case 1:
|
|
902
902
|
s = Or(r, On, Un);
|
|
903
903
|
break;
|
|
904
904
|
case 2:
|
|
905
|
-
|
|
905
|
+
ja(r, r.ltree, r.dtree), s = Or(r, r.ltree, r.dtree);
|
|
906
906
|
break;
|
|
907
907
|
default:
|
|
908
908
|
s = En;
|
|
@@ -912,12 +912,12 @@ function Ka(t, e) {
|
|
|
912
912
|
} while (!n);
|
|
913
913
|
return r.destLen < r.dest.length ? typeof r.dest.slice == "function" ? r.dest.slice(0, r.destLen) : r.dest.subarray(0, r.destLen) : r.dest;
|
|
914
914
|
}
|
|
915
|
-
|
|
915
|
+
Ya(On, Un);
|
|
916
916
|
An(nr, ar, 4, 3);
|
|
917
917
|
An(Ln, Rn, 2, 1);
|
|
918
918
|
nr[28] = 0;
|
|
919
919
|
ar[28] = 258;
|
|
920
|
-
var
|
|
920
|
+
var $a = Qa;
|
|
921
921
|
function Me(t, e, r, n, a) {
|
|
922
922
|
return Math.pow(1 - a, 3) * t + 3 * Math.pow(1 - a, 2) * a * e + 3 * (1 - a) * Math.pow(a, 2) * r + Math.pow(a, 3) * n;
|
|
923
923
|
}
|
|
@@ -1078,7 +1078,7 @@ function Mn(t) {
|
|
|
1078
1078
|
function Ur(t, e) {
|
|
1079
1079
|
t || Mn(e);
|
|
1080
1080
|
}
|
|
1081
|
-
var U = { fail: Mn, argument: Ur, assert: Ur }, Lr = 32768, Rr = 2147483648, De = {}, k = {},
|
|
1081
|
+
var U = { fail: Mn, argument: Ur, assert: Ur }, Lr = 32768, Rr = 2147483648, De = {}, k = {}, L = {};
|
|
1082
1082
|
function le(t) {
|
|
1083
1083
|
return function() {
|
|
1084
1084
|
return t;
|
|
@@ -1087,50 +1087,50 @@ function le(t) {
|
|
|
1087
1087
|
k.BYTE = function(t) {
|
|
1088
1088
|
return U.argument(t >= 0 && t <= 255, "Byte value should be between 0 and 255."), [t];
|
|
1089
1089
|
};
|
|
1090
|
-
|
|
1090
|
+
L.BYTE = le(1);
|
|
1091
1091
|
k.CHAR = function(t) {
|
|
1092
1092
|
return [t.charCodeAt(0)];
|
|
1093
1093
|
};
|
|
1094
|
-
|
|
1094
|
+
L.CHAR = le(1);
|
|
1095
1095
|
k.CHARARRAY = function(t) {
|
|
1096
1096
|
typeof t > "u" && (t = "", console.warn("Undefined CHARARRAY encountered and treated as an empty string. This is probably caused by a missing glyph name."));
|
|
1097
1097
|
for (var e = [], r = 0; r < t.length; r += 1)
|
|
1098
1098
|
e[r] = t.charCodeAt(r);
|
|
1099
1099
|
return e;
|
|
1100
1100
|
};
|
|
1101
|
-
|
|
1101
|
+
L.CHARARRAY = function(t) {
|
|
1102
1102
|
return typeof t > "u" ? 0 : t.length;
|
|
1103
1103
|
};
|
|
1104
1104
|
k.USHORT = function(t) {
|
|
1105
1105
|
return [t >> 8 & 255, t & 255];
|
|
1106
1106
|
};
|
|
1107
|
-
|
|
1107
|
+
L.USHORT = le(2);
|
|
1108
1108
|
k.SHORT = function(t) {
|
|
1109
1109
|
return t >= Lr && (t = -(2 * Lr - t)), [t >> 8 & 255, t & 255];
|
|
1110
1110
|
};
|
|
1111
|
-
|
|
1111
|
+
L.SHORT = le(2);
|
|
1112
1112
|
k.UINT24 = function(t) {
|
|
1113
1113
|
return [t >> 16 & 255, t >> 8 & 255, t & 255];
|
|
1114
1114
|
};
|
|
1115
|
-
|
|
1115
|
+
L.UINT24 = le(3);
|
|
1116
1116
|
k.ULONG = function(t) {
|
|
1117
1117
|
return [t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, t & 255];
|
|
1118
1118
|
};
|
|
1119
|
-
|
|
1119
|
+
L.ULONG = le(4);
|
|
1120
1120
|
k.LONG = function(t) {
|
|
1121
1121
|
return t >= Rr && (t = -(2 * Rr - t)), [t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, t & 255];
|
|
1122
1122
|
};
|
|
1123
|
-
|
|
1123
|
+
L.LONG = le(4);
|
|
1124
1124
|
k.FIXED = k.ULONG;
|
|
1125
|
-
|
|
1125
|
+
L.FIXED = L.ULONG;
|
|
1126
1126
|
k.FWORD = k.SHORT;
|
|
1127
|
-
|
|
1127
|
+
L.FWORD = L.SHORT;
|
|
1128
1128
|
k.UFWORD = k.USHORT;
|
|
1129
|
-
|
|
1129
|
+
L.UFWORD = L.USHORT;
|
|
1130
1130
|
k.LONGDATETIME = function(t) {
|
|
1131
1131
|
return [0, 0, 0, 0, t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, t & 255];
|
|
1132
1132
|
};
|
|
1133
|
-
|
|
1133
|
+
L.LONGDATETIME = le(8);
|
|
1134
1134
|
k.TAG = function(t) {
|
|
1135
1135
|
return U.argument(t.length === 4, "Tag should be exactly 4 ASCII characters."), [
|
|
1136
1136
|
t.charCodeAt(0),
|
|
@@ -1139,29 +1139,29 @@ k.TAG = function(t) {
|
|
|
1139
1139
|
t.charCodeAt(3)
|
|
1140
1140
|
];
|
|
1141
1141
|
};
|
|
1142
|
-
|
|
1142
|
+
L.TAG = le(4);
|
|
1143
1143
|
k.Card8 = k.BYTE;
|
|
1144
|
-
|
|
1144
|
+
L.Card8 = L.BYTE;
|
|
1145
1145
|
k.Card16 = k.USHORT;
|
|
1146
|
-
|
|
1146
|
+
L.Card16 = L.USHORT;
|
|
1147
1147
|
k.OffSize = k.BYTE;
|
|
1148
|
-
|
|
1148
|
+
L.OffSize = L.BYTE;
|
|
1149
1149
|
k.SID = k.USHORT;
|
|
1150
|
-
|
|
1150
|
+
L.SID = L.USHORT;
|
|
1151
1151
|
k.NUMBER = function(t) {
|
|
1152
1152
|
return t >= -107 && t <= 107 ? [t + 139] : t >= 108 && t <= 1131 ? (t = t - 108, [(t >> 8) + 247, t & 255]) : t >= -1131 && t <= -108 ? (t = -t - 108, [(t >> 8) + 251, t & 255]) : t >= -32768 && t <= 32767 ? k.NUMBER16(t) : k.NUMBER32(t);
|
|
1153
1153
|
};
|
|
1154
|
-
|
|
1154
|
+
L.NUMBER = function(t) {
|
|
1155
1155
|
return k.NUMBER(t).length;
|
|
1156
1156
|
};
|
|
1157
1157
|
k.NUMBER16 = function(t) {
|
|
1158
1158
|
return [28, t >> 8 & 255, t & 255];
|
|
1159
1159
|
};
|
|
1160
|
-
|
|
1160
|
+
L.NUMBER16 = le(3);
|
|
1161
1161
|
k.NUMBER32 = function(t) {
|
|
1162
1162
|
return [29, t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, t & 255];
|
|
1163
1163
|
};
|
|
1164
|
-
|
|
1164
|
+
L.NUMBER32 = le(5);
|
|
1165
1165
|
k.REAL = function(t) {
|
|
1166
1166
|
var e = t.toString(), r = /\.(\d*?)(?:9{5,20}|0{5,20})\d{0,2}(?:e(.+)|$)/.exec(e);
|
|
1167
1167
|
if (r) {
|
|
@@ -1177,13 +1177,13 @@ k.REAL = function(t) {
|
|
|
1177
1177
|
u.push(parseInt(a.substr(l, 2), 16));
|
|
1178
1178
|
return u;
|
|
1179
1179
|
};
|
|
1180
|
-
|
|
1180
|
+
L.REAL = function(t) {
|
|
1181
1181
|
return k.REAL(t).length;
|
|
1182
1182
|
};
|
|
1183
1183
|
k.NAME = k.CHARARRAY;
|
|
1184
|
-
|
|
1184
|
+
L.NAME = L.CHARARRAY;
|
|
1185
1185
|
k.STRING = k.CHARARRAY;
|
|
1186
|
-
|
|
1186
|
+
L.STRING = L.CHARARRAY;
|
|
1187
1187
|
De.UTF8 = function(t, e, r) {
|
|
1188
1188
|
for (var n = [], a = r, s = 0; s < a; s++, e += 1)
|
|
1189
1189
|
n[s] = t.getUint8(e);
|
|
@@ -1201,7 +1201,7 @@ k.UTF16 = function(t) {
|
|
|
1201
1201
|
}
|
|
1202
1202
|
return e;
|
|
1203
1203
|
};
|
|
1204
|
-
|
|
1204
|
+
L.UTF16 = function(t) {
|
|
1205
1205
|
return t.length * 2;
|
|
1206
1206
|
};
|
|
1207
1207
|
var Yt = {
|
|
@@ -1256,7 +1256,7 @@ De.MACSTRING = function(t, e, r, n) {
|
|
|
1256
1256
|
return s;
|
|
1257
1257
|
}
|
|
1258
1258
|
};
|
|
1259
|
-
var nt = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), at,
|
|
1259
|
+
var nt = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), at, Ja = function(t) {
|
|
1260
1260
|
if (!at) {
|
|
1261
1261
|
at = {};
|
|
1262
1262
|
for (var e in Yt)
|
|
@@ -1278,7 +1278,7 @@ var nt = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), at, $a =
|
|
|
1278
1278
|
}
|
|
1279
1279
|
};
|
|
1280
1280
|
k.MACSTRING = function(t, e) {
|
|
1281
|
-
var r =
|
|
1281
|
+
var r = Ja(e);
|
|
1282
1282
|
if (r !== void 0) {
|
|
1283
1283
|
for (var n = [], a = 0; a < t.length; a++) {
|
|
1284
1284
|
var s = t.charCodeAt(a);
|
|
@@ -1289,19 +1289,19 @@ k.MACSTRING = function(t, e) {
|
|
|
1289
1289
|
return n;
|
|
1290
1290
|
}
|
|
1291
1291
|
};
|
|
1292
|
-
|
|
1292
|
+
L.MACSTRING = function(t, e) {
|
|
1293
1293
|
var r = k.MACSTRING(t, e);
|
|
1294
1294
|
return r !== void 0 ? r.length : 0;
|
|
1295
1295
|
};
|
|
1296
1296
|
function Zt(t) {
|
|
1297
1297
|
return t >= -128 && t <= 127;
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function es(t, e, r) {
|
|
1300
1300
|
for (var n = 0, a = t.length; e < a && n < 64 && t[e] === 0; )
|
|
1301
1301
|
++e, ++n;
|
|
1302
1302
|
return r.push(128 | n - 1), e;
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function ts(t, e, r) {
|
|
1305
1305
|
for (var n = 0, a = t.length, s = e; s < a && n < 64; ) {
|
|
1306
1306
|
var i = t[s];
|
|
1307
1307
|
if (!Zt(i) || i === 0 && s + 1 < a && t[s + 1] === 0)
|
|
@@ -1313,7 +1313,7 @@ function es(t, e, r) {
|
|
|
1313
1313
|
r.push(t[o] + 256 & 255);
|
|
1314
1314
|
return s;
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1316
|
+
function rs(t, e, r) {
|
|
1317
1317
|
for (var n = 0, a = t.length, s = e; s < a && n < 64; ) {
|
|
1318
1318
|
var i = t[s];
|
|
1319
1319
|
if (i === 0 || Zt(i) && s + 1 < a && Zt(t[s + 1]))
|
|
@@ -1330,7 +1330,7 @@ function ts(t, e, r) {
|
|
|
1330
1330
|
k.VARDELTAS = function(t) {
|
|
1331
1331
|
for (var e = 0, r = []; e < t.length; ) {
|
|
1332
1332
|
var n = t[e];
|
|
1333
|
-
n === 0 ? e =
|
|
1333
|
+
n === 0 ? e = es(t, e, r) : n >= -128 && n <= 127 ? e = ts(t, e, r) : e = rs(t, e, r);
|
|
1334
1334
|
}
|
|
1335
1335
|
return r;
|
|
1336
1336
|
};
|
|
@@ -1352,7 +1352,7 @@ k.INDEX = function(t) {
|
|
|
1352
1352
|
n
|
|
1353
1353
|
);
|
|
1354
1354
|
};
|
|
1355
|
-
|
|
1355
|
+
L.INDEX = function(t) {
|
|
1356
1356
|
return k.INDEX(t).length;
|
|
1357
1357
|
};
|
|
1358
1358
|
k.DICT = function(t) {
|
|
@@ -1362,7 +1362,7 @@ k.DICT = function(t) {
|
|
|
1362
1362
|
}
|
|
1363
1363
|
return e;
|
|
1364
1364
|
};
|
|
1365
|
-
|
|
1365
|
+
L.DICT = function(t) {
|
|
1366
1366
|
return k.DICT(t).length;
|
|
1367
1367
|
};
|
|
1368
1368
|
k.OPERATOR = function(t) {
|
|
@@ -1386,7 +1386,7 @@ k.OPERAND = function(t, e) {
|
|
|
1386
1386
|
return r;
|
|
1387
1387
|
};
|
|
1388
1388
|
k.OP = k.BYTE;
|
|
1389
|
-
|
|
1389
|
+
L.OP = L.BYTE;
|
|
1390
1390
|
var st = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap();
|
|
1391
1391
|
k.CHARSTRING = function(t) {
|
|
1392
1392
|
if (st) {
|
|
@@ -1400,15 +1400,15 @@ k.CHARSTRING = function(t) {
|
|
|
1400
1400
|
}
|
|
1401
1401
|
return st && st.set(t, r), r;
|
|
1402
1402
|
};
|
|
1403
|
-
|
|
1403
|
+
L.CHARSTRING = function(t) {
|
|
1404
1404
|
return k.CHARSTRING(t).length;
|
|
1405
1405
|
};
|
|
1406
1406
|
k.OBJECT = function(t) {
|
|
1407
1407
|
var e = k[t.type];
|
|
1408
1408
|
return U.argument(e !== void 0, "No encoding function for type " + t.type), e(t.value);
|
|
1409
1409
|
};
|
|
1410
|
-
|
|
1411
|
-
var e =
|
|
1410
|
+
L.OBJECT = function(t) {
|
|
1411
|
+
var e = L[t.type];
|
|
1412
1412
|
return U.argument(e !== void 0, "No sizeOf function for type " + t.type), e(t.value);
|
|
1413
1413
|
};
|
|
1414
1414
|
k.TABLE = function(t) {
|
|
@@ -1426,9 +1426,9 @@ k.TABLE = function(t) {
|
|
|
1426
1426
|
}
|
|
1427
1427
|
return e;
|
|
1428
1428
|
};
|
|
1429
|
-
|
|
1429
|
+
L.TABLE = function(t) {
|
|
1430
1430
|
for (var e = 0, r = t.fields.length, n = 0; n < r; n += 1) {
|
|
1431
|
-
var a = t.fields[n], s =
|
|
1431
|
+
var a = t.fields[n], s = L[a.type];
|
|
1432
1432
|
U.argument(s !== void 0, "No sizeOf function for field type " + a.type + " (" + a.name + ")");
|
|
1433
1433
|
var i = t[a.name];
|
|
1434
1434
|
i === void 0 && (i = a.value), e += s(i), a.type === "TABLE" && (e += 2);
|
|
@@ -1436,11 +1436,11 @@ R.TABLE = function(t) {
|
|
|
1436
1436
|
return e;
|
|
1437
1437
|
};
|
|
1438
1438
|
k.RECORD = k.TABLE;
|
|
1439
|
-
|
|
1439
|
+
L.RECORD = L.TABLE;
|
|
1440
1440
|
k.LITERAL = function(t) {
|
|
1441
1441
|
return t;
|
|
1442
1442
|
};
|
|
1443
|
-
|
|
1443
|
+
L.LITERAL = function(t) {
|
|
1444
1444
|
return t.length;
|
|
1445
1445
|
};
|
|
1446
1446
|
function X(t, e, r) {
|
|
@@ -1459,7 +1459,7 @@ X.prototype.encode = function() {
|
|
|
1459
1459
|
return k.TABLE(this);
|
|
1460
1460
|
};
|
|
1461
1461
|
X.prototype.sizeOf = function() {
|
|
1462
|
-
return
|
|
1462
|
+
return L.TABLE(this);
|
|
1463
1463
|
};
|
|
1464
1464
|
function qe(t, e, r) {
|
|
1465
1465
|
r === void 0 && (r = e.length);
|
|
@@ -1576,7 +1576,7 @@ function Ar(t, e) {
|
|
|
1576
1576
|
function gt(t, e) {
|
|
1577
1577
|
return t.getUint16(e, !1);
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function ns(t, e) {
|
|
1580
1580
|
return t.getInt16(e, !1);
|
|
1581
1581
|
}
|
|
1582
1582
|
function sr(t, e) {
|
|
@@ -1586,27 +1586,27 @@ function Pn(t, e) {
|
|
|
1586
1586
|
var r = t.getInt16(e, !1), n = t.getUint16(e + 2, !1);
|
|
1587
1587
|
return r + n / 65535;
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function as(t, e) {
|
|
1590
1590
|
for (var r = "", n = e; n < e + 4; n += 1)
|
|
1591
1591
|
r += String.fromCharCode(t.getInt8(n));
|
|
1592
1592
|
return r;
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1594
|
+
function ss(t, e, r) {
|
|
1595
1595
|
for (var n = 0, a = 0; a < r; a += 1)
|
|
1596
1596
|
n <<= 8, n += t.getUint8(e + a);
|
|
1597
1597
|
return n;
|
|
1598
1598
|
}
|
|
1599
|
-
function
|
|
1599
|
+
function is(t, e, r) {
|
|
1600
1600
|
for (var n = [], a = e; a < r; a += 1)
|
|
1601
1601
|
n.push(t.getUint8(a));
|
|
1602
1602
|
return n;
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function os(t) {
|
|
1605
1605
|
for (var e = "", r = 0; r < t.length; r += 1)
|
|
1606
1606
|
e += String.fromCharCode(t[r]);
|
|
1607
1607
|
return e;
|
|
1608
1608
|
}
|
|
1609
|
-
var
|
|
1609
|
+
var us = {
|
|
1610
1610
|
byte: 1,
|
|
1611
1611
|
uShort: 2,
|
|
1612
1612
|
short: 2,
|
|
@@ -1670,7 +1670,7 @@ g.prototype.parseVersion = function(t) {
|
|
|
1670
1670
|
return this.relativeOffset += 4, t === void 0 && (t = 4096), e + r / t / 10;
|
|
1671
1671
|
};
|
|
1672
1672
|
g.prototype.skip = function(t, e) {
|
|
1673
|
-
e === void 0 && (e = 1), this.relativeOffset +=
|
|
1673
|
+
e === void 0 && (e = 1), this.relativeOffset += us[t] * e;
|
|
1674
1674
|
};
|
|
1675
1675
|
g.prototype.parseULongList = function(t) {
|
|
1676
1676
|
t === void 0 && (t = this.parseULong());
|
|
@@ -1908,16 +1908,16 @@ var E = {
|
|
|
1908
1908
|
getCard8: Ar,
|
|
1909
1909
|
getUShort: gt,
|
|
1910
1910
|
getCard16: gt,
|
|
1911
|
-
getShort:
|
|
1911
|
+
getShort: ns,
|
|
1912
1912
|
getULong: sr,
|
|
1913
1913
|
getFixed: Pn,
|
|
1914
|
-
getTag:
|
|
1915
|
-
getOffset:
|
|
1916
|
-
getBytes:
|
|
1917
|
-
bytesToString:
|
|
1914
|
+
getTag: as,
|
|
1915
|
+
getOffset: ss,
|
|
1916
|
+
getBytes: is,
|
|
1917
|
+
bytesToString: os,
|
|
1918
1918
|
Parser: g
|
|
1919
1919
|
};
|
|
1920
|
-
function
|
|
1920
|
+
function ls(t, e) {
|
|
1921
1921
|
e.parseUShort(), t.length = e.parseULong(), t.language = e.parseULong();
|
|
1922
1922
|
var r;
|
|
1923
1923
|
t.groupCount = r = e.parseULong(), t.glyphIndexMap = {};
|
|
@@ -1925,7 +1925,7 @@ function us(t, e) {
|
|
|
1925
1925
|
for (var a = e.parseULong(), s = e.parseULong(), i = e.parseULong(), o = a; o <= s; o += 1)
|
|
1926
1926
|
t.glyphIndexMap[o] = i, i++;
|
|
1927
1927
|
}
|
|
1928
|
-
function
|
|
1928
|
+
function hs(t, e, r, n, a) {
|
|
1929
1929
|
t.length = e.parseUShort(), t.language = e.parseUShort();
|
|
1930
1930
|
var s;
|
|
1931
1931
|
t.segCount = s = e.parseUShort() >> 1, e.skip("uShort", 3), t.glyphIndexMap = {};
|
|
@@ -1933,7 +1933,7 @@ function ls(t, e, r, n, a) {
|
|
|
1933
1933
|
for (var c = void 0, p = i.parseUShort(), d = o.parseUShort(), v = u.parseShort(), y = l.parseUShort(), m = d; m <= p; m += 1)
|
|
1934
1934
|
y !== 0 ? (h = l.offset + l.relativeOffset - 2, h += y, h += (m - d) * 2, c = E.getUShort(r, h), c !== 0 && (c = c + v & 65535)) : c = m + v & 65535, t.glyphIndexMap[m] = c;
|
|
1935
1935
|
}
|
|
1936
|
-
function
|
|
1936
|
+
function cs(t, e) {
|
|
1937
1937
|
var r = {};
|
|
1938
1938
|
r.version = E.getUShort(t, e), U.argument(r.version === 0, "cmap table version should be 0."), r.numTables = E.getUShort(t, e + 2);
|
|
1939
1939
|
for (var n = -1, a = r.numTables - 1; a >= 0; a -= 1) {
|
|
@@ -1947,14 +1947,14 @@ function hs(t, e) {
|
|
|
1947
1947
|
throw new Error("No valid cmap sub-tables found.");
|
|
1948
1948
|
var o = new E.Parser(t, e + n);
|
|
1949
1949
|
if (r.format = o.parseUShort(), r.format === 12)
|
|
1950
|
-
|
|
1950
|
+
ls(r, o);
|
|
1951
1951
|
else if (r.format === 4)
|
|
1952
|
-
|
|
1952
|
+
hs(r, o, t, e, n);
|
|
1953
1953
|
else
|
|
1954
1954
|
throw new Error("Only format 4 and 12 cmap tables are supported (found format " + r.format + ").");
|
|
1955
1955
|
return r;
|
|
1956
1956
|
}
|
|
1957
|
-
function
|
|
1957
|
+
function fs(t, e, r) {
|
|
1958
1958
|
t.segments.push({
|
|
1959
1959
|
end: e,
|
|
1960
1960
|
start: e,
|
|
@@ -1963,7 +1963,7 @@ function cs(t, e, r) {
|
|
|
1963
1963
|
glyphIndex: r
|
|
1964
1964
|
});
|
|
1965
1965
|
}
|
|
1966
|
-
function
|
|
1966
|
+
function ps(t) {
|
|
1967
1967
|
t.segments.push({
|
|
1968
1968
|
end: 65535,
|
|
1969
1969
|
start: 65535,
|
|
@@ -1971,7 +1971,7 @@ function fs(t) {
|
|
|
1971
1971
|
offset: 0
|
|
1972
1972
|
});
|
|
1973
1973
|
}
|
|
1974
|
-
function
|
|
1974
|
+
function ds(t) {
|
|
1975
1975
|
var e = !0, r;
|
|
1976
1976
|
for (r = t.length - 1; r > 0; r -= 1) {
|
|
1977
1977
|
var n = t.get(r);
|
|
@@ -2007,12 +2007,12 @@ function ps(t) {
|
|
|
2007
2007
|
var s = new F.Table("cmap", a);
|
|
2008
2008
|
for (s.segments = [], r = 0; r < t.length; r += 1) {
|
|
2009
2009
|
for (var i = t.get(r), o = 0; o < i.unicodes.length; o += 1)
|
|
2010
|
-
|
|
2010
|
+
fs(s, i.unicodes[o], r);
|
|
2011
2011
|
s.segments = s.segments.sort(function(b, x) {
|
|
2012
2012
|
return b.start - x.start;
|
|
2013
2013
|
});
|
|
2014
2014
|
}
|
|
2015
|
-
|
|
2015
|
+
ps(s);
|
|
2016
2016
|
var u = s.segments.length, l = 0, h = [], f = [], c = [], p = [], d = [], v = [];
|
|
2017
2017
|
for (r = 0; r < u; r += 1) {
|
|
2018
2018
|
var y = s.segments[r];
|
|
@@ -2033,7 +2033,7 @@ function ps(t) {
|
|
|
2033
2033
|
}
|
|
2034
2034
|
return s;
|
|
2035
2035
|
}
|
|
2036
|
-
var Bn = { parse:
|
|
2036
|
+
var Bn = { parse: cs, make: ds }, lt = [
|
|
2037
2037
|
".notdef",
|
|
2038
2038
|
"space",
|
|
2039
2039
|
"exclam",
|
|
@@ -2425,7 +2425,7 @@ var Bn = { parse: hs, make: ps }, lt = [
|
|
|
2425
2425
|
"Regular",
|
|
2426
2426
|
"Roman",
|
|
2427
2427
|
"Semibold"
|
|
2428
|
-
],
|
|
2428
|
+
], gs = [
|
|
2429
2429
|
"",
|
|
2430
2430
|
"",
|
|
2431
2431
|
"",
|
|
@@ -2678,7 +2678,7 @@ var Bn = { parse: hs, make: ps }, lt = [
|
|
|
2678
2678
|
"oslash",
|
|
2679
2679
|
"oe",
|
|
2680
2680
|
"germandbls"
|
|
2681
|
-
],
|
|
2681
|
+
], vs = [
|
|
2682
2682
|
"",
|
|
2683
2683
|
"",
|
|
2684
2684
|
"",
|
|
@@ -3249,7 +3249,7 @@ ir.prototype.nameToGlyphIndex = function(t) {
|
|
|
3249
3249
|
ir.prototype.glyphIndexToName = function(t) {
|
|
3250
3250
|
return this.names[t];
|
|
3251
3251
|
};
|
|
3252
|
-
function
|
|
3252
|
+
function ms(t) {
|
|
3253
3253
|
for (var e, r = t.tables.cmap.glyphIndexMap, n = Object.keys(r), a = 0; a < n.length; a += 1) {
|
|
3254
3254
|
var s = n[a], i = r[s];
|
|
3255
3255
|
e = t.glyphs.get(i), e.addUnicode(parseInt(s));
|
|
@@ -3257,7 +3257,7 @@ function vs(t) {
|
|
|
3257
3257
|
for (var o = 0; o < t.glyphs.length; o += 1)
|
|
3258
3258
|
e = t.glyphs.get(o), t.cffEncoding ? t.isCIDFont ? e.name = "gid" + o : e.name = t.cffEncoding.charset[o] : t.glyphNames.names && (e.name = t.glyphNames.glyphIndexToName(o));
|
|
3259
3259
|
}
|
|
3260
|
-
function
|
|
3260
|
+
function ys(t) {
|
|
3261
3261
|
t._IndexToUnicodeMap = {};
|
|
3262
3262
|
for (var e = t.tables.cmap.glyphIndexMap, r = Object.keys(e), n = 0; n < r.length; n += 1) {
|
|
3263
3263
|
var a = r[n], s = e[a];
|
|
@@ -3266,14 +3266,14 @@ function ms(t) {
|
|
|
3266
3266
|
} : t._IndexToUnicodeMap[s].unicodes.push(parseInt(a));
|
|
3267
3267
|
}
|
|
3268
3268
|
}
|
|
3269
|
-
function
|
|
3270
|
-
e.lowMemory ?
|
|
3269
|
+
function xs(t, e) {
|
|
3270
|
+
e.lowMemory ? ys(t) : ms(t);
|
|
3271
3271
|
}
|
|
3272
|
-
function
|
|
3272
|
+
function bs(t, e, r, n, a) {
|
|
3273
3273
|
t.beginPath(), t.moveTo(e, r), t.lineTo(n, a), t.stroke();
|
|
3274
3274
|
}
|
|
3275
|
-
var Ce = { line:
|
|
3276
|
-
function
|
|
3275
|
+
var Ce = { line: bs };
|
|
3276
|
+
function Ss(t, e) {
|
|
3277
3277
|
var r = e || new V();
|
|
3278
3278
|
return {
|
|
3279
3279
|
configurable: !0,
|
|
@@ -3289,7 +3289,7 @@ function ae(t) {
|
|
|
3289
3289
|
this.bindConstructorValues(t);
|
|
3290
3290
|
}
|
|
3291
3291
|
ae.prototype.bindConstructorValues = function(t) {
|
|
3292
|
-
this.index = t.index || 0, this.name = t.name || null, this.unicode = t.unicode || void 0, this.unicodes = t.unicodes || t.unicode !== void 0 ? [t.unicode] : [], "xMin" in t && (this.xMin = t.xMin), "yMin" in t && (this.yMin = t.yMin), "xMax" in t && (this.xMax = t.xMax), "yMax" in t && (this.yMax = t.yMax), "advanceWidth" in t && (this.advanceWidth = t.advanceWidth), Object.defineProperty(this, "path",
|
|
3292
|
+
this.index = t.index || 0, this.name = t.name || null, this.unicode = t.unicode || void 0, this.unicodes = t.unicodes || t.unicode !== void 0 ? [t.unicode] : [], "xMin" in t && (this.xMin = t.xMin), "yMin" in t && (this.yMin = t.yMin), "xMax" in t && (this.xMax = t.xMax), "yMax" in t && (this.yMax = t.yMax), "advanceWidth" in t && (this.advanceWidth = t.advanceWidth), Object.defineProperty(this, "path", Ss(this, t.path));
|
|
3293
3293
|
};
|
|
3294
3294
|
ae.prototype.addUnicode = function(t) {
|
|
3295
3295
|
this.unicodes.length === 0 && (this.unicode = t), this.unicodes.push(t);
|
|
@@ -3408,10 +3408,10 @@ or.prototype.get = function(t) {
|
|
|
3408
3408
|
or.prototype.push = function(t, e) {
|
|
3409
3409
|
this.glyphs[t] = e, this.length++;
|
|
3410
3410
|
};
|
|
3411
|
-
function
|
|
3411
|
+
function ks(t, e) {
|
|
3412
3412
|
return new ae({ index: e, font: t });
|
|
3413
3413
|
}
|
|
3414
|
-
function
|
|
3414
|
+
function Fs(t, e, r, n, a, s) {
|
|
3415
3415
|
return function() {
|
|
3416
3416
|
var i = new ae({ index: e, font: t });
|
|
3417
3417
|
return i.path = function() {
|
|
@@ -3421,7 +3421,7 @@ function ks(t, e, r, n, a, s) {
|
|
|
3421
3421
|
}, it(i, "xMin", "_xMin"), it(i, "xMax", "_xMax"), it(i, "yMin", "_yMin"), it(i, "yMax", "_yMax"), i;
|
|
3422
3422
|
};
|
|
3423
3423
|
}
|
|
3424
|
-
function
|
|
3424
|
+
function Ts(t, e, r, n) {
|
|
3425
3425
|
return function() {
|
|
3426
3426
|
var a = new ae({ index: e, font: t });
|
|
3427
3427
|
return a.path = function() {
|
|
@@ -3430,7 +3430,7 @@ function Fs(t, e, r, n) {
|
|
|
3430
3430
|
}, a;
|
|
3431
3431
|
};
|
|
3432
3432
|
}
|
|
3433
|
-
var ge = { GlyphSet: or, glyphLoader:
|
|
3433
|
+
var ge = { GlyphSet: or, glyphLoader: ks, ttfGlyphLoader: Fs, cffGlyphLoader: Ts };
|
|
3434
3434
|
function Gn(t, e) {
|
|
3435
3435
|
if (t === e)
|
|
3436
3436
|
return !0;
|
|
@@ -3464,7 +3464,7 @@ function be(t, e, r) {
|
|
|
3464
3464
|
}
|
|
3465
3465
|
return { objects: a, startOffset: e, endOffset: o };
|
|
3466
3466
|
}
|
|
3467
|
-
function
|
|
3467
|
+
function ws(t, e) {
|
|
3468
3468
|
var r = [], n = E.getCard16(t, e), a, s;
|
|
3469
3469
|
if (n !== 0) {
|
|
3470
3470
|
var i = E.getByte(t, e + 2);
|
|
@@ -3476,7 +3476,7 @@ function Ts(t, e) {
|
|
|
3476
3476
|
s = e + 2;
|
|
3477
3477
|
return { offsets: r, startOffset: e, endOffset: s };
|
|
3478
3478
|
}
|
|
3479
|
-
function
|
|
3479
|
+
function Cs(t, e, r, n, a) {
|
|
3480
3480
|
var s = E.getCard16(r, n), i = 0;
|
|
3481
3481
|
if (s !== 0) {
|
|
3482
3482
|
var o = E.getByte(r, n + 2);
|
|
@@ -3485,7 +3485,7 @@ function ws(t, e, r, n, a) {
|
|
|
3485
3485
|
var u = E.getBytes(r, i + e[t], i + e[t + 1]);
|
|
3486
3486
|
return u;
|
|
3487
3487
|
}
|
|
3488
|
-
function
|
|
3488
|
+
function Es(t) {
|
|
3489
3489
|
for (var e = "", r = 15, n = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "E", "E-", null, "-"]; ; ) {
|
|
3490
3490
|
var a = t.parseByte(), s = a >> 4, i = a & 15;
|
|
3491
3491
|
if (s === r || (e += n[s], i === r))
|
|
@@ -3494,14 +3494,14 @@ function Cs(t) {
|
|
|
3494
3494
|
}
|
|
3495
3495
|
return parseFloat(e);
|
|
3496
3496
|
}
|
|
3497
|
-
function
|
|
3497
|
+
function Os(t, e) {
|
|
3498
3498
|
var r, n, a, s;
|
|
3499
3499
|
if (e === 28)
|
|
3500
3500
|
return r = t.parseByte(), n = t.parseByte(), r << 8 | n;
|
|
3501
3501
|
if (e === 29)
|
|
3502
3502
|
return r = t.parseByte(), n = t.parseByte(), a = t.parseByte(), s = t.parseByte(), r << 24 | n << 16 | a << 8 | s;
|
|
3503
3503
|
if (e === 30)
|
|
3504
|
-
return
|
|
3504
|
+
return Es(t);
|
|
3505
3505
|
if (e >= 32 && e <= 246)
|
|
3506
3506
|
return e - 139;
|
|
3507
3507
|
if (e >= 247 && e <= 250)
|
|
@@ -3510,7 +3510,7 @@ function Es(t, e) {
|
|
|
3510
3510
|
return r = t.parseByte(), -(e - 251) * 256 - r - 108;
|
|
3511
3511
|
throw new Error("Invalid b0 " + e);
|
|
3512
3512
|
}
|
|
3513
|
-
function
|
|
3513
|
+
function Us(t) {
|
|
3514
3514
|
for (var e = {}, r = 0; r < t.length; r += 1) {
|
|
3515
3515
|
var n = t[r][0], a = t[r][1], s = void 0;
|
|
3516
3516
|
if (a.length === 1 ? s = a[0] : s = a, e.hasOwnProperty(n) && !isNaN(e[n]))
|
|
@@ -3524,9 +3524,9 @@ function Nn(t, e, r) {
|
|
|
3524
3524
|
var n = new E.Parser(t, e), a = [], s = [];
|
|
3525
3525
|
for (r = r !== void 0 ? r : t.length; n.relativeOffset < r; ) {
|
|
3526
3526
|
var i = n.parseByte();
|
|
3527
|
-
i <= 21 ? (i === 12 && (i = 1200 + n.parseByte()), a.push([i, s]), s = []) : s.push(
|
|
3527
|
+
i <= 21 ? (i === 12 && (i = 1200 + n.parseByte()), a.push([i, s]), s = []) : s.push(Os(n, i));
|
|
3528
3528
|
}
|
|
3529
|
-
return
|
|
3529
|
+
return Us(a);
|
|
3530
3530
|
}
|
|
3531
3531
|
function We(t, e) {
|
|
3532
3532
|
return e <= 390 ? e = lt[e] : e = t[e - 391], e;
|
|
@@ -3545,7 +3545,7 @@ function _n(t, e, r) {
|
|
|
3545
3545
|
}
|
|
3546
3546
|
return n;
|
|
3547
3547
|
}
|
|
3548
|
-
function
|
|
3548
|
+
function Ls(t, e) {
|
|
3549
3549
|
var r = {};
|
|
3550
3550
|
return r.formatMajor = E.getCard8(t, e), r.formatMinor = E.getCard8(t, e + 1), r.size = E.getCard8(t, e + 2), r.offsetSize = E.getCard8(t, e + 3), r.startOffset = e, r.endOffset = e + 4, r;
|
|
3551
3551
|
}
|
|
@@ -3590,7 +3590,7 @@ var Hn = [
|
|
|
3590
3590
|
{ name: "defaultWidthX", op: 20, type: "number", value: 0 },
|
|
3591
3591
|
{ name: "nominalWidthX", op: 21, type: "number", value: 0 }
|
|
3592
3592
|
];
|
|
3593
|
-
function
|
|
3593
|
+
function Rs(t, e) {
|
|
3594
3594
|
var r = Nn(t, 0, t.byteLength);
|
|
3595
3595
|
return _n(r, Hn, e);
|
|
3596
3596
|
}
|
|
@@ -3600,7 +3600,7 @@ function Wn(t, e, r, n) {
|
|
|
3600
3600
|
}
|
|
3601
3601
|
function Pr(t, e, r, n) {
|
|
3602
3602
|
for (var a = [], s = 0; s < r.length; s += 1) {
|
|
3603
|
-
var i = new DataView(new Uint8Array(r[s]).buffer), o =
|
|
3603
|
+
var i = new DataView(new Uint8Array(r[s]).buffer), o = Rs(i, n);
|
|
3604
3604
|
o._subrs = [], o._subrsBias = 0, o._defaultWidthX = 0, o._nominalWidthX = 0;
|
|
3605
3605
|
var u = o.private[0], l = o.private[1];
|
|
3606
3606
|
if (u !== 0 && l !== 0) {
|
|
@@ -3615,7 +3615,7 @@ function Pr(t, e, r, n) {
|
|
|
3615
3615
|
}
|
|
3616
3616
|
return a;
|
|
3617
3617
|
}
|
|
3618
|
-
function
|
|
3618
|
+
function As(t, e, r, n) {
|
|
3619
3619
|
var a, s, i = new E.Parser(t, e);
|
|
3620
3620
|
r -= 1;
|
|
3621
3621
|
var o = [".notdef"], u = i.parseCard8();
|
|
@@ -3638,7 +3638,7 @@ function Rs(t, e, r, n) {
|
|
|
3638
3638
|
throw new Error("Unknown charset format " + u);
|
|
3639
3639
|
return o;
|
|
3640
3640
|
}
|
|
3641
|
-
function
|
|
3641
|
+
function Ms(t, e, r) {
|
|
3642
3642
|
var n, a = {}, s = new E.Parser(t, e), i = s.parseCard8();
|
|
3643
3643
|
if (i === 0)
|
|
3644
3644
|
for (var o = s.parseCard8(), u = 0; u < o; u += 1)
|
|
@@ -3778,7 +3778,7 @@ function Br(t, e, r) {
|
|
|
3778
3778
|
}
|
|
3779
3779
|
return O(r), e.advanceWidth = T, o;
|
|
3780
3780
|
}
|
|
3781
|
-
function
|
|
3781
|
+
function Ps(t, e, r, n) {
|
|
3782
3782
|
var a = [], s, i = new E.Parser(t, e), o = i.parseCard8();
|
|
3783
3783
|
if (o === 0)
|
|
3784
3784
|
for (var u = 0; u < r; u++) {
|
|
@@ -3805,9 +3805,9 @@ function Ms(t, e, r, n) {
|
|
|
3805
3805
|
throw new Error("CFF Table CID Font FDSelect table has unsupported format " + o);
|
|
3806
3806
|
return a;
|
|
3807
3807
|
}
|
|
3808
|
-
function
|
|
3808
|
+
function Bs(t, e, r, n) {
|
|
3809
3809
|
r.tables.cff = {};
|
|
3810
|
-
var a =
|
|
3810
|
+
var a = Ls(t, e), s = be(t, a.endOffset, E.bytesToString), i = be(t, s.endOffset), o = be(t, i.endOffset, E.bytesToString), u = be(t, o.endOffset);
|
|
3811
3811
|
r.gsubrs = u.objects, r.gsubrsBias = Kt(r.gsubrs);
|
|
3812
3812
|
var l = Pr(t, e, i.objects, o.objects);
|
|
3813
3813
|
if (l.length !== 1)
|
|
@@ -3819,7 +3819,7 @@ function Ps(t, e, r, n) {
|
|
|
3819
3819
|
throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
|
|
3820
3820
|
f += e;
|
|
3821
3821
|
var p = be(t, f), d = Pr(t, e, p.objects, o.objects);
|
|
3822
|
-
h._fdArray = d, c += e, h._fdSelect =
|
|
3822
|
+
h._fdArray = d, c += e, h._fdSelect = Ps(t, c, r.numGlyphs, d.length);
|
|
3823
3823
|
}
|
|
3824
3824
|
var v = e + h.private[1], y = Wn(t, v, h.private[0], o.objects);
|
|
3825
3825
|
if (r.defaultWidthX = y.defaultWidthX, r.nominalWidthX = y.nominalWidthX, y.subrs !== 0) {
|
|
@@ -3828,11 +3828,11 @@ function Ps(t, e, r, n) {
|
|
|
3828
3828
|
} else
|
|
3829
3829
|
r.subrs = [], r.subrsBias = 0;
|
|
3830
3830
|
var x;
|
|
3831
|
-
n.lowMemory ? (x =
|
|
3832
|
-
var T =
|
|
3833
|
-
if (h.encoding === 0 ? r.cffEncoding = new vt(
|
|
3831
|
+
n.lowMemory ? (x = ws(t, e + h.charStrings), r.nGlyphs = x.offsets.length) : (x = be(t, e + h.charStrings), r.nGlyphs = x.objects.length);
|
|
3832
|
+
var T = As(t, e + h.charset, r.nGlyphs, o.objects);
|
|
3833
|
+
if (h.encoding === 0 ? r.cffEncoding = new vt(gs, T) : h.encoding === 1 ? r.cffEncoding = new vt(vs, T) : r.cffEncoding = Ms(t, e + h.encoding, T), r.encoding = r.encoding || r.cffEncoding, r.glyphs = new ge.GlyphSet(r), n.lowMemory)
|
|
3834
3834
|
r._push = function(O) {
|
|
3835
|
-
var w =
|
|
3835
|
+
var w = Cs(O, x.offsets, t, e + h.charStrings);
|
|
3836
3836
|
r.glyphs.push(O, ge.cffGlyphLoader(r, O, Br, w));
|
|
3837
3837
|
};
|
|
3838
3838
|
else
|
|
@@ -3845,7 +3845,7 @@ function Vn(t, e) {
|
|
|
3845
3845
|
var r, n = lt.indexOf(t);
|
|
3846
3846
|
return n >= 0 && (r = n), n = e.indexOf(t), n >= 0 ? r = n + lt.length : (r = lt.length + e.length, e.push(t)), r;
|
|
3847
3847
|
}
|
|
3848
|
-
function
|
|
3848
|
+
function Is() {
|
|
3849
3849
|
return new F.Record("Header", [
|
|
3850
3850
|
{ name: "major", type: "Card8", value: 1 },
|
|
3851
3851
|
{ name: "minor", type: "Card8", value: 0 },
|
|
@@ -3853,7 +3853,7 @@ function Bs() {
|
|
|
3853
3853
|
{ name: "major", type: "Card8", value: 1 }
|
|
3854
3854
|
]);
|
|
3855
3855
|
}
|
|
3856
|
-
function
|
|
3856
|
+
function Ds(t) {
|
|
3857
3857
|
var e = new F.Record("Name INDEX", [
|
|
3858
3858
|
{ name: "names", type: "INDEX", value: [] }
|
|
3859
3859
|
]);
|
|
@@ -3881,7 +3881,7 @@ function Dr(t) {
|
|
|
3881
3881
|
]);
|
|
3882
3882
|
return e.topDicts = [{ name: "topDict_0", type: "TABLE", value: t }], e;
|
|
3883
3883
|
}
|
|
3884
|
-
function
|
|
3884
|
+
function Gs(t) {
|
|
3885
3885
|
var e = new F.Record("String INDEX", [
|
|
3886
3886
|
{ name: "strings", type: "INDEX", value: [] }
|
|
3887
3887
|
]);
|
|
@@ -3890,12 +3890,12 @@ function Ds(t) {
|
|
|
3890
3890
|
e.strings.push({ name: "string_" + r, type: "STRING", value: t[r] });
|
|
3891
3891
|
return e;
|
|
3892
3892
|
}
|
|
3893
|
-
function
|
|
3893
|
+
function Ns() {
|
|
3894
3894
|
return new F.Record("Global Subr INDEX", [
|
|
3895
3895
|
{ name: "subrs", type: "INDEX", value: [] }
|
|
3896
3896
|
]);
|
|
3897
3897
|
}
|
|
3898
|
-
function
|
|
3898
|
+
function _s(t, e) {
|
|
3899
3899
|
for (var r = new F.Record("Charsets", [
|
|
3900
3900
|
{ name: "format", type: "Card8", value: 0 }
|
|
3901
3901
|
]), n = 0; n < t.length; n += 1) {
|
|
@@ -3904,7 +3904,7 @@ function Ns(t, e) {
|
|
|
3904
3904
|
}
|
|
3905
3905
|
return r;
|
|
3906
3906
|
}
|
|
3907
|
-
function
|
|
3907
|
+
function Hs(t) {
|
|
3908
3908
|
var e = [], r = t.path;
|
|
3909
3909
|
e.push({ name: "width", type: "NUMBER", value: t.advanceWidth });
|
|
3910
3910
|
for (var n = 0, a = 0, s = 0; s < r.commands.length; s += 1) {
|
|
@@ -3932,22 +3932,22 @@ function _s(t) {
|
|
|
3932
3932
|
}
|
|
3933
3933
|
return e.push({ name: "endchar", type: "OP", value: 14 }), e;
|
|
3934
3934
|
}
|
|
3935
|
-
function
|
|
3935
|
+
function zs(t) {
|
|
3936
3936
|
for (var e = new F.Record("CharStrings INDEX", [
|
|
3937
3937
|
{ name: "charStrings", type: "INDEX", value: [] }
|
|
3938
3938
|
]), r = 0; r < t.length; r += 1) {
|
|
3939
|
-
var n = t.get(r), a =
|
|
3939
|
+
var n = t.get(r), a = Hs(n);
|
|
3940
3940
|
e.charStrings.push({ name: n.name, type: "CHARSTRING", value: a });
|
|
3941
3941
|
}
|
|
3942
3942
|
return e;
|
|
3943
3943
|
}
|
|
3944
|
-
function
|
|
3944
|
+
function Ws(t, e) {
|
|
3945
3945
|
var r = new F.Record("Private DICT", [
|
|
3946
3946
|
{ name: "dict", type: "DICT", value: {} }
|
|
3947
3947
|
]);
|
|
3948
3948
|
return r.dict = qn(zn, t, e), r;
|
|
3949
3949
|
}
|
|
3950
|
-
function
|
|
3950
|
+
function Vs(t, e) {
|
|
3951
3951
|
for (var r = new F.Table("CFF ", [
|
|
3952
3952
|
{ name: "header", type: "RECORD" },
|
|
3953
3953
|
{ name: "nameIndex", type: "RECORD" },
|
|
@@ -3971,18 +3971,18 @@ function Ws(t, e) {
|
|
|
3971
3971
|
}, s = {}, i = [], o, u = 1; u < t.length; u += 1)
|
|
3972
3972
|
o = t.get(u), i.push(o.name);
|
|
3973
3973
|
var l = [];
|
|
3974
|
-
r.header =
|
|
3974
|
+
r.header = Is(), r.nameIndex = Ds([e.postScriptName]);
|
|
3975
3975
|
var h = Ir(a, l);
|
|
3976
|
-
r.topDictIndex = Dr(h), r.globalSubrIndex =
|
|
3976
|
+
r.topDictIndex = Dr(h), r.globalSubrIndex = Ns(), r.charsets = _s(i, l), r.charStringsIndex = zs(t), r.privateDict = Ws(s, l), r.stringIndex = Gs(l);
|
|
3977
3977
|
var f = r.header.sizeOf() + r.nameIndex.sizeOf() + r.topDictIndex.sizeOf() + r.stringIndex.sizeOf() + r.globalSubrIndex.sizeOf();
|
|
3978
3978
|
return a.charset = f, a.encoding = 0, a.charStrings = a.charset + r.charsets.sizeOf(), a.private[1] = a.charStrings + r.charStringsIndex.sizeOf(), h = Ir(a, l), r.topDictIndex = Dr(h), r;
|
|
3979
3979
|
}
|
|
3980
|
-
var Xn = { parse:
|
|
3981
|
-
function
|
|
3980
|
+
var Xn = { parse: Bs, make: Vs };
|
|
3981
|
+
function qs(t, e) {
|
|
3982
3982
|
var r = {}, n = new E.Parser(t, e);
|
|
3983
3983
|
return r.version = n.parseVersion(), r.fontRevision = Math.round(n.parseFixed() * 1e3) / 1e3, r.checkSumAdjustment = n.parseULong(), r.magicNumber = n.parseULong(), U.argument(r.magicNumber === 1594834165, "Font header has wrong magic number."), r.flags = n.parseUShort(), r.unitsPerEm = n.parseUShort(), r.created = n.parseLongDateTime(), r.modified = n.parseLongDateTime(), r.xMin = n.parseShort(), r.yMin = n.parseShort(), r.xMax = n.parseShort(), r.yMax = n.parseShort(), r.macStyle = n.parseUShort(), r.lowestRecPPEM = n.parseUShort(), r.fontDirectionHint = n.parseShort(), r.indexToLocFormat = n.parseShort(), r.glyphDataFormat = n.parseShort(), r;
|
|
3984
3984
|
}
|
|
3985
|
-
function
|
|
3985
|
+
function Xs(t) {
|
|
3986
3986
|
var e = Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3) + 2082844800, r = e;
|
|
3987
3987
|
return t.createdTimestamp && (r = t.createdTimestamp + 2082844800), new F.Table("head", [
|
|
3988
3988
|
{ name: "version", type: "FIXED", value: 65536 },
|
|
@@ -4004,12 +4004,12 @@ function qs(t) {
|
|
|
4004
4004
|
{ name: "glyphDataFormat", type: "SHORT", value: 0 }
|
|
4005
4005
|
], t);
|
|
4006
4006
|
}
|
|
4007
|
-
var Yn = { parse:
|
|
4008
|
-
function
|
|
4007
|
+
var Yn = { parse: qs, make: Xs };
|
|
4008
|
+
function Ys(t, e) {
|
|
4009
4009
|
var r = {}, n = new E.Parser(t, e);
|
|
4010
4010
|
return r.version = n.parseVersion(), r.ascender = n.parseShort(), r.descender = n.parseShort(), r.lineGap = n.parseShort(), r.advanceWidthMax = n.parseUShort(), r.minLeftSideBearing = n.parseShort(), r.minRightSideBearing = n.parseShort(), r.xMaxExtent = n.parseShort(), r.caretSlopeRise = n.parseShort(), r.caretSlopeRun = n.parseShort(), r.caretOffset = n.parseShort(), n.relativeOffset += 8, r.metricDataFormat = n.parseShort(), r.numberOfHMetrics = n.parseUShort(), r;
|
|
4011
4011
|
}
|
|
4012
|
-
function
|
|
4012
|
+
function Zs(t) {
|
|
4013
4013
|
return new F.Table("hhea", [
|
|
4014
4014
|
{ name: "version", type: "FIXED", value: 65536 },
|
|
4015
4015
|
{ name: "ascender", type: "FWORD", value: 0 },
|
|
@@ -4030,15 +4030,15 @@ function Ys(t) {
|
|
|
4030
4030
|
{ name: "numberOfHMetrics", type: "USHORT", value: 0 }
|
|
4031
4031
|
], t);
|
|
4032
4032
|
}
|
|
4033
|
-
var Zn = { parse:
|
|
4034
|
-
function
|
|
4033
|
+
var Zn = { parse: Ys, make: Zs };
|
|
4034
|
+
function js(t, e, r, n, a) {
|
|
4035
4035
|
for (var s, i, o = new E.Parser(t, e), u = 0; u < n; u += 1) {
|
|
4036
4036
|
u < r && (s = o.parseUShort(), i = o.parseShort());
|
|
4037
4037
|
var l = a.get(u);
|
|
4038
4038
|
l.advanceWidth = s, l.leftSideBearing = i;
|
|
4039
4039
|
}
|
|
4040
4040
|
}
|
|
4041
|
-
function
|
|
4041
|
+
function Ks(t, e, r, n, a) {
|
|
4042
4042
|
t._hmtxTableData = {};
|
|
4043
4043
|
for (var s, i, o = new E.Parser(e, r), u = 0; u < a; u += 1)
|
|
4044
4044
|
u < n && (s = o.parseUShort(), i = o.parseShort()), t._hmtxTableData[u] = {
|
|
@@ -4046,18 +4046,18 @@ function js(t, e, r, n, a) {
|
|
|
4046
4046
|
leftSideBearing: i
|
|
4047
4047
|
};
|
|
4048
4048
|
}
|
|
4049
|
-
function
|
|
4050
|
-
i.lowMemory ?
|
|
4049
|
+
function Qs(t, e, r, n, a, s, i) {
|
|
4050
|
+
i.lowMemory ? Ks(t, e, r, n, a) : js(e, r, n, a, s);
|
|
4051
4051
|
}
|
|
4052
|
-
function
|
|
4052
|
+
function $s(t) {
|
|
4053
4053
|
for (var e = new F.Table("hmtx", []), r = 0; r < t.length; r += 1) {
|
|
4054
4054
|
var n = t.get(r), a = n.advanceWidth || 0, s = n.leftSideBearing || 0;
|
|
4055
4055
|
e.fields.push({ name: "advanceWidth_" + r, type: "USHORT", value: a }), e.fields.push({ name: "leftSideBearing_" + r, type: "SHORT", value: s });
|
|
4056
4056
|
}
|
|
4057
4057
|
return e;
|
|
4058
4058
|
}
|
|
4059
|
-
var jn = { parse:
|
|
4060
|
-
function
|
|
4059
|
+
var jn = { parse: Qs, make: $s };
|
|
4060
|
+
function Js(t) {
|
|
4061
4061
|
for (var e = new F.Table("ltag", [
|
|
4062
4062
|
{ name: "version", type: "ULONG", value: 1 },
|
|
4063
4063
|
{ name: "flags", type: "ULONG", value: 0 },
|
|
@@ -4068,7 +4068,7 @@ function $s(t) {
|
|
|
4068
4068
|
}
|
|
4069
4069
|
return e.fields.push({ name: "stringPool", type: "CHARARRAY", value: r }), e;
|
|
4070
4070
|
}
|
|
4071
|
-
function
|
|
4071
|
+
function ei(t, e) {
|
|
4072
4072
|
var r = new E.Parser(t, e), n = r.parseULong();
|
|
4073
4073
|
U.argument(n === 1, "Unsupported ltag table version."), r.skip("uLong", 1);
|
|
4074
4074
|
for (var a = r.parseULong(), s = [], i = 0; i < a; i++) {
|
|
@@ -4078,18 +4078,18 @@ function Js(t, e) {
|
|
|
4078
4078
|
}
|
|
4079
4079
|
return s;
|
|
4080
4080
|
}
|
|
4081
|
-
var Kn = { make:
|
|
4082
|
-
function
|
|
4081
|
+
var Kn = { make: Js, parse: ei };
|
|
4082
|
+
function ti(t, e) {
|
|
4083
4083
|
var r = {}, n = new E.Parser(t, e);
|
|
4084
4084
|
return r.version = n.parseVersion(), r.numGlyphs = n.parseUShort(), r.version === 1 && (r.maxPoints = n.parseUShort(), r.maxContours = n.parseUShort(), r.maxCompositePoints = n.parseUShort(), r.maxCompositeContours = n.parseUShort(), r.maxZones = n.parseUShort(), r.maxTwilightPoints = n.parseUShort(), r.maxStorage = n.parseUShort(), r.maxFunctionDefs = n.parseUShort(), r.maxInstructionDefs = n.parseUShort(), r.maxStackElements = n.parseUShort(), r.maxSizeOfInstructions = n.parseUShort(), r.maxComponentElements = n.parseUShort(), r.maxComponentDepth = n.parseUShort()), r;
|
|
4085
4085
|
}
|
|
4086
|
-
function
|
|
4086
|
+
function ri(t) {
|
|
4087
4087
|
return new F.Table("maxp", [
|
|
4088
4088
|
{ name: "version", type: "FIXED", value: 20480 },
|
|
4089
4089
|
{ name: "numGlyphs", type: "USHORT", value: t }
|
|
4090
4090
|
]);
|
|
4091
4091
|
}
|
|
4092
|
-
var Qn = { parse:
|
|
4092
|
+
var Qn = { parse: ti, make: ri }, $n = [
|
|
4093
4093
|
"copyright",
|
|
4094
4094
|
// 0
|
|
4095
4095
|
"fontFamily",
|
|
@@ -4256,7 +4256,7 @@ var Qn = { parse: ei, make: ti }, $n = [
|
|
|
4256
4256
|
149: "kl",
|
|
4257
4257
|
150: "az",
|
|
4258
4258
|
151: "nn"
|
|
4259
|
-
},
|
|
4259
|
+
}, ni = {
|
|
4260
4260
|
0: 0,
|
|
4261
4261
|
// langEnglish → smRoman
|
|
4262
4262
|
1: 0,
|
|
@@ -4709,7 +4709,7 @@ var Qn = { parse: ei, make: ti }, $n = [
|
|
|
4709
4709
|
1144: "ii",
|
|
4710
4710
|
1130: "yo"
|
|
4711
4711
|
};
|
|
4712
|
-
function
|
|
4712
|
+
function ai(t, e, r) {
|
|
4713
4713
|
switch (t) {
|
|
4714
4714
|
case 0:
|
|
4715
4715
|
if (e === 65535)
|
|
@@ -4723,7 +4723,7 @@ function ni(t, e, r) {
|
|
|
4723
4723
|
return ea[e];
|
|
4724
4724
|
}
|
|
4725
4725
|
}
|
|
4726
|
-
var Qt = "utf-16",
|
|
4726
|
+
var Qt = "utf-16", si = {
|
|
4727
4727
|
0: "macintosh",
|
|
4728
4728
|
// smRoman
|
|
4729
4729
|
1: "x-mac-japanese",
|
|
@@ -4782,7 +4782,7 @@ var Qt = "utf-16", ai = {
|
|
|
4782
4782
|
// smVietnamese
|
|
4783
4783
|
31: "x-mac-extarabic"
|
|
4784
4784
|
// smExtArabic
|
|
4785
|
-
},
|
|
4785
|
+
}, ii = {
|
|
4786
4786
|
15: "x-mac-icelandic",
|
|
4787
4787
|
// langIcelandic
|
|
4788
4788
|
17: "x-mac-turkish",
|
|
@@ -4819,16 +4819,16 @@ function ta(t, e, r) {
|
|
|
4819
4819
|
case 0:
|
|
4820
4820
|
return Qt;
|
|
4821
4821
|
case 1:
|
|
4822
|
-
return
|
|
4822
|
+
return ii[r] || si[e];
|
|
4823
4823
|
case 3:
|
|
4824
4824
|
if (e === 1 || e === 10)
|
|
4825
4825
|
return Qt;
|
|
4826
4826
|
break;
|
|
4827
4827
|
}
|
|
4828
4828
|
}
|
|
4829
|
-
function
|
|
4829
|
+
function oi(t, e, r) {
|
|
4830
4830
|
for (var n = {}, a = new E.Parser(t, e), s = a.parseUShort(), i = a.parseUShort(), o = a.offset + a.parseUShort(), u = 0; u < i; u++) {
|
|
4831
|
-
var l = a.parseUShort(), h = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p = $n[c] || c, d = a.parseUShort(), v = a.parseUShort(), y =
|
|
4831
|
+
var l = a.parseUShort(), h = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p = $n[c] || c, d = a.parseUShort(), v = a.parseUShort(), y = ai(l, f, r), m = ta(l, h, f);
|
|
4832
4832
|
if (m !== void 0 && y !== void 0) {
|
|
4833
4833
|
var b = void 0;
|
|
4834
4834
|
if (m === Qt ? b = De.UTF16(t, o + v, d) : b = De.MACSTRING(t, o + v, d, m), b) {
|
|
@@ -4855,7 +4855,7 @@ function Gr(t, e, r, n, a, s) {
|
|
|
4855
4855
|
{ name: "offset", type: "USHORT", value: s }
|
|
4856
4856
|
]);
|
|
4857
4857
|
}
|
|
4858
|
-
function
|
|
4858
|
+
function ui(t, e) {
|
|
4859
4859
|
var r = t.length, n = e.length - r + 1;
|
|
4860
4860
|
e:
|
|
4861
4861
|
for (var a = 0; a < n; a++)
|
|
@@ -4868,7 +4868,7 @@ function oi(t, e) {
|
|
|
4868
4868
|
return -1;
|
|
4869
4869
|
}
|
|
4870
4870
|
function Nr(t, e) {
|
|
4871
|
-
var r =
|
|
4871
|
+
var r = ui(t, e);
|
|
4872
4872
|
if (r < 0) {
|
|
4873
4873
|
r = e.length;
|
|
4874
4874
|
for (var n = 0, a = t.length; n < a; ++n)
|
|
@@ -4876,7 +4876,7 @@ function Nr(t, e) {
|
|
|
4876
4876
|
}
|
|
4877
4877
|
return r;
|
|
4878
4878
|
}
|
|
4879
|
-
function
|
|
4879
|
+
function li(t, e) {
|
|
4880
4880
|
var r, n = [], a = {}, s = Ct($n);
|
|
4881
4881
|
for (var i in t) {
|
|
4882
4882
|
var o = s[i];
|
|
@@ -4888,7 +4888,7 @@ function ui(t, e) {
|
|
|
4888
4888
|
r = n[c];
|
|
4889
4889
|
var p = a[r];
|
|
4890
4890
|
for (var d in p) {
|
|
4891
|
-
var v = p[d], y = 1, m = u[d], b =
|
|
4891
|
+
var v = p[d], y = 1, m = u[d], b = ni[m], x = ta(y, b, m), T = k.MACSTRING(v, x);
|
|
4892
4892
|
T === void 0 && (y = 0, m = e.indexOf(d), m < 0 && (m = e.length, e.push(d)), b = 4, T = k.UTF16(v));
|
|
4893
4893
|
var S = Nr(T, f);
|
|
4894
4894
|
h.push(Gr(
|
|
@@ -4924,7 +4924,7 @@ function ui(t, e) {
|
|
|
4924
4924
|
M.fields.push({ name: "record_" + N, type: "RECORD", value: h[N] });
|
|
4925
4925
|
return M.fields.push({ name: "strings", type: "LITERAL", value: f }), M;
|
|
4926
4926
|
}
|
|
4927
|
-
var ra = { parse:
|
|
4927
|
+
var ra = { parse: oi, make: li }, $t = [
|
|
4928
4928
|
{ begin: 0, end: 127 },
|
|
4929
4929
|
// Basic Latin
|
|
4930
4930
|
{ begin: 128, end: 255 },
|
|
@@ -5172,7 +5172,7 @@ var ra = { parse: ii, make: ui }, $t = [
|
|
|
5172
5172
|
{ begin: 127024, end: 127135 }
|
|
5173
5173
|
// Domino Tiles
|
|
5174
5174
|
];
|
|
5175
|
-
function
|
|
5175
|
+
function hi(t) {
|
|
5176
5176
|
for (var e = 0; e < $t.length; e += 1) {
|
|
5177
5177
|
var r = $t[e];
|
|
5178
5178
|
if (t >= r.begin && t < r.end)
|
|
@@ -5180,14 +5180,14 @@ function li(t) {
|
|
|
5180
5180
|
}
|
|
5181
5181
|
return -1;
|
|
5182
5182
|
}
|
|
5183
|
-
function
|
|
5183
|
+
function ci(t, e) {
|
|
5184
5184
|
var r = {}, n = new E.Parser(t, e);
|
|
5185
5185
|
r.version = n.parseUShort(), r.xAvgCharWidth = n.parseShort(), r.usWeightClass = n.parseUShort(), r.usWidthClass = n.parseUShort(), r.fsType = n.parseUShort(), r.ySubscriptXSize = n.parseShort(), r.ySubscriptYSize = n.parseShort(), r.ySubscriptXOffset = n.parseShort(), r.ySubscriptYOffset = n.parseShort(), r.ySuperscriptXSize = n.parseShort(), r.ySuperscriptYSize = n.parseShort(), r.ySuperscriptXOffset = n.parseShort(), r.ySuperscriptYOffset = n.parseShort(), r.yStrikeoutSize = n.parseShort(), r.yStrikeoutPosition = n.parseShort(), r.sFamilyClass = n.parseShort(), r.panose = [];
|
|
5186
5186
|
for (var a = 0; a < 10; a++)
|
|
5187
5187
|
r.panose[a] = n.parseByte();
|
|
5188
5188
|
return r.ulUnicodeRange1 = n.parseULong(), r.ulUnicodeRange2 = n.parseULong(), r.ulUnicodeRange3 = n.parseULong(), r.ulUnicodeRange4 = n.parseULong(), r.achVendID = String.fromCharCode(n.parseByte(), n.parseByte(), n.parseByte(), n.parseByte()), r.fsSelection = n.parseUShort(), r.usFirstCharIndex = n.parseUShort(), r.usLastCharIndex = n.parseUShort(), r.sTypoAscender = n.parseShort(), r.sTypoDescender = n.parseShort(), r.sTypoLineGap = n.parseShort(), r.usWinAscent = n.parseUShort(), r.usWinDescent = n.parseUShort(), r.version >= 1 && (r.ulCodePageRange1 = n.parseULong(), r.ulCodePageRange2 = n.parseULong()), r.version >= 2 && (r.sxHeight = n.parseShort(), r.sCapHeight = n.parseShort(), r.usDefaultChar = n.parseUShort(), r.usBreakChar = n.parseUShort(), r.usMaxContent = n.parseUShort()), r;
|
|
5189
5189
|
}
|
|
5190
|
-
function
|
|
5190
|
+
function fi(t) {
|
|
5191
5191
|
return new F.Table("OS/2", [
|
|
5192
5192
|
{ name: "version", type: "USHORT", value: 3 },
|
|
5193
5193
|
{ name: "xAvgCharWidth", type: "SHORT", value: 0 },
|
|
@@ -5237,8 +5237,8 @@ function ci(t) {
|
|
|
5237
5237
|
{ name: "usMaxContext", type: "USHORT", value: 0 }
|
|
5238
5238
|
], t);
|
|
5239
5239
|
}
|
|
5240
|
-
var Jt = { parse:
|
|
5241
|
-
function
|
|
5240
|
+
var Jt = { parse: ci, make: fi, unicodeRanges: $t, getUnicodeRange: hi };
|
|
5241
|
+
function pi(t, e) {
|
|
5242
5242
|
var r = {}, n = new E.Parser(t, e);
|
|
5243
5243
|
switch (r.version = n.parseVersion(), r.italicAngle = n.parseFixed(), r.underlinePosition = n.parseShort(), r.underlineThickness = n.parseShort(), r.isFixedPitch = n.parseULong(), r.minMemType42 = n.parseULong(), r.maxMemType42 = n.parseULong(), r.minMemType1 = n.parseULong(), r.maxMemType1 = n.parseULong(), r.version) {
|
|
5244
5244
|
case 1:
|
|
@@ -5263,7 +5263,7 @@ function fi(t, e) {
|
|
|
5263
5263
|
}
|
|
5264
5264
|
return r;
|
|
5265
5265
|
}
|
|
5266
|
-
function
|
|
5266
|
+
function di() {
|
|
5267
5267
|
return new F.Table("post", [
|
|
5268
5268
|
{ name: "version", type: "FIXED", value: 196608 },
|
|
5269
5269
|
{ name: "italicAngle", type: "FIXED", value: 0 },
|
|
@@ -5276,7 +5276,7 @@ function pi() {
|
|
|
5276
5276
|
{ name: "maxMemType1", type: "ULONG", value: 0 }
|
|
5277
5277
|
]);
|
|
5278
5278
|
}
|
|
5279
|
-
var na = { parse:
|
|
5279
|
+
var na = { parse: pi, make: di }, ie = new Array(9);
|
|
5280
5280
|
ie[1] = function() {
|
|
5281
5281
|
var e = this.offset + this.relativeOffset, r = this.parseUShort();
|
|
5282
5282
|
if (r === 1)
|
|
@@ -5424,7 +5424,7 @@ ie[8] = function() {
|
|
|
5424
5424
|
substitutes: this.parseUShortList()
|
|
5425
5425
|
};
|
|
5426
5426
|
};
|
|
5427
|
-
function
|
|
5427
|
+
function gi(t, e) {
|
|
5428
5428
|
e = e || 0;
|
|
5429
5429
|
var r = new g(t, e), n = r.parseVersion(1);
|
|
5430
5430
|
return U.argument(n === 1 || n === 1.1, "Unsupported GSUB table version."), n === 1 ? {
|
|
@@ -5514,7 +5514,7 @@ Ge[6] = function(e) {
|
|
|
5514
5514
|
}
|
|
5515
5515
|
U.assert(!1, "lookup type 6 format must be 1, 2 or 3.");
|
|
5516
5516
|
};
|
|
5517
|
-
function
|
|
5517
|
+
function vi(t) {
|
|
5518
5518
|
return new F.Table("GSUB", [
|
|
5519
5519
|
{ name: "version", type: "ULONG", value: 65536 },
|
|
5520
5520
|
{ name: "scripts", type: "TABLE", value: new F.ScriptList(t.scripts) },
|
|
@@ -5522,8 +5522,8 @@ function gi(t) {
|
|
|
5522
5522
|
{ name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups, Ge) }
|
|
5523
5523
|
]);
|
|
5524
5524
|
}
|
|
5525
|
-
var aa = { parse:
|
|
5526
|
-
function
|
|
5525
|
+
var aa = { parse: gi, make: vi };
|
|
5526
|
+
function mi(t, e) {
|
|
5527
5527
|
var r = new E.Parser(t, e), n = r.parseULong();
|
|
5528
5528
|
U.argument(n === 1, "Unsupported META table version."), r.parseULong(), r.parseULong();
|
|
5529
5529
|
for (var a = r.parseULong(), s = {}, i = 0; i < a; i++) {
|
|
@@ -5532,7 +5532,7 @@ function vi(t, e) {
|
|
|
5532
5532
|
}
|
|
5533
5533
|
return s;
|
|
5534
5534
|
}
|
|
5535
|
-
function
|
|
5535
|
+
function yi(t) {
|
|
5536
5536
|
var e = Object.keys(t).length, r = "", n = 16 + e * 12, a = new F.Table("meta", [
|
|
5537
5537
|
{ name: "version", type: "ULONG", value: 1 },
|
|
5538
5538
|
{ name: "flags", type: "ULONG", value: 0 },
|
|
@@ -5545,7 +5545,7 @@ function mi(t) {
|
|
|
5545
5545
|
}
|
|
5546
5546
|
return a.fields.push({ name: "stringPool", type: "CHARARRAY", value: r }), a;
|
|
5547
5547
|
}
|
|
5548
|
-
var sa = { parse:
|
|
5548
|
+
var sa = { parse: mi, make: yi };
|
|
5549
5549
|
function _r(t) {
|
|
5550
5550
|
return Math.log(t) / Math.log(2) | 0;
|
|
5551
5551
|
}
|
|
@@ -5598,12 +5598,12 @@ function zr(t, e, r) {
|
|
|
5598
5598
|
}
|
|
5599
5599
|
return r;
|
|
5600
5600
|
}
|
|
5601
|
-
function
|
|
5601
|
+
function xi(t) {
|
|
5602
5602
|
for (var e = 0, r = 0; r < t.length; r += 1)
|
|
5603
5603
|
e += t[r];
|
|
5604
5604
|
return e / t.length;
|
|
5605
5605
|
}
|
|
5606
|
-
function
|
|
5606
|
+
function bi(t) {
|
|
5607
5607
|
for (var e = [], r = [], n = [], a = [], s = [], i = [], o = [], u, l = 0, h = 0, f = 0, c = 0, p = 0, d = 0; d < t.glyphs.length; d += 1) {
|
|
5608
5608
|
var v = t.glyphs.get(d), y = v.unicode | 0;
|
|
5609
5609
|
if (isNaN(v.advanceWidth))
|
|
@@ -5631,7 +5631,7 @@ function xi(t) {
|
|
|
5631
5631
|
xMax: Math.max.apply(null, n),
|
|
5632
5632
|
yMax: Math.max.apply(null, a),
|
|
5633
5633
|
advanceWidthMax: Math.max.apply(null, s),
|
|
5634
|
-
advanceWidthAvg:
|
|
5634
|
+
advanceWidthAvg: xi(s),
|
|
5635
5635
|
minLeftSideBearing: Math.min.apply(null, i),
|
|
5636
5636
|
maxLeftSideBearing: Math.max.apply(null, i),
|
|
5637
5637
|
minRightSideBearing: Math.min.apply(null, o)
|
|
@@ -5696,16 +5696,16 @@ function xi(t) {
|
|
|
5696
5696
|
fontBBox: [0, x.yMin, x.ascender, x.advanceWidthMax]
|
|
5697
5697
|
}), B = t.metas && Object.keys(t.metas).length > 0 ? sa.make(t.metas) : void 0, j = [T, S, A, O, W, M, q, Q, w];
|
|
5698
5698
|
Z && j.push(Z), t.tables.gsub && j.push(aa.make(t.tables.gsub)), B && j.push(B);
|
|
5699
|
-
for (var bt = ia(j),
|
|
5699
|
+
for (var bt = ia(j), Sa = bt.encode(), ka = ur(Sa), St = bt.fields, yr = !1, rt = 0; rt < St.length; rt += 1)
|
|
5700
5700
|
if (St[rt].name === "head table") {
|
|
5701
|
-
St[rt].value.checkSumAdjustment = 2981146554 -
|
|
5701
|
+
St[rt].value.checkSumAdjustment = 2981146554 - ka, yr = !0;
|
|
5702
5702
|
break;
|
|
5703
5703
|
}
|
|
5704
5704
|
if (!yr)
|
|
5705
5705
|
throw new Error("Could not find head table with checkSum to adjust.");
|
|
5706
5706
|
return bt;
|
|
5707
5707
|
}
|
|
5708
|
-
var
|
|
5708
|
+
var Si = { make: ia, fontToTable: bi, computeCheckSum: ur };
|
|
5709
5709
|
function Et(t, e) {
|
|
5710
5710
|
for (var r = 0, n = t.length - 1; r <= n; ) {
|
|
5711
5711
|
var a = r + n >>> 1, s = t[a].tag;
|
|
@@ -5987,7 +5987,7 @@ Qe.prototype.getKerningTables = function(t, e) {
|
|
|
5987
5987
|
function re(t) {
|
|
5988
5988
|
Ke.call(this, t, "gsub");
|
|
5989
5989
|
}
|
|
5990
|
-
function
|
|
5990
|
+
function ki(t, e) {
|
|
5991
5991
|
var r = t.length;
|
|
5992
5992
|
if (r !== e.length)
|
|
5993
5993
|
return !1;
|
|
@@ -6117,7 +6117,7 @@ re.prototype.addLigature = function(t, e, r, n) {
|
|
|
6117
6117
|
}, l = this.binSearch(s.coverage.glyphs, i);
|
|
6118
6118
|
if (l >= 0) {
|
|
6119
6119
|
for (var h = s.ligatureSets[l], f = 0; f < h.length; f++)
|
|
6120
|
-
if (
|
|
6120
|
+
if (ki(h[f].components, o))
|
|
6121
6121
|
return;
|
|
6122
6122
|
h.push(u);
|
|
6123
6123
|
} else
|
|
@@ -6155,10 +6155,10 @@ re.prototype.add = function(t, e, r, n) {
|
|
|
6155
6155
|
return e.by instanceof Array ? this.addMultiple(t, e, r, n) : this.addLigature(t, e, r, n);
|
|
6156
6156
|
}
|
|
6157
6157
|
};
|
|
6158
|
-
function
|
|
6158
|
+
function Fi() {
|
|
6159
6159
|
return typeof window < "u";
|
|
6160
6160
|
}
|
|
6161
|
-
function
|
|
6161
|
+
function Ti(t) {
|
|
6162
6162
|
for (var e = new Buffer(t.byteLength), r = new Uint8Array(t), n = 0; n < e.length; ++n)
|
|
6163
6163
|
e[n] = r[n];
|
|
6164
6164
|
return e;
|
|
@@ -6236,7 +6236,7 @@ function Ot(t, e) {
|
|
|
6236
6236
|
}
|
|
6237
6237
|
return r;
|
|
6238
6238
|
}
|
|
6239
|
-
function
|
|
6239
|
+
function wi(t) {
|
|
6240
6240
|
for (var e = [], r = [], n = 0; n < t.length; n += 1) {
|
|
6241
6241
|
var a = t[n];
|
|
6242
6242
|
r.push(a), a.lastPointOfContour && (e.push(r), r = []);
|
|
@@ -6247,7 +6247,7 @@ function ua(t) {
|
|
|
6247
6247
|
var e = new V();
|
|
6248
6248
|
if (!t)
|
|
6249
6249
|
return e;
|
|
6250
|
-
for (var r =
|
|
6250
|
+
for (var r = wi(t), n = 0; n < r.length; ++n) {
|
|
6251
6251
|
var a = r[n], s = null, i = a[a.length - 1], o = a[0];
|
|
6252
6252
|
if (i.onCurve)
|
|
6253
6253
|
e.moveTo(i.x, i.y);
|
|
@@ -6294,45 +6294,45 @@ function la(t, e) {
|
|
|
6294
6294
|
}
|
|
6295
6295
|
return ua(e.points);
|
|
6296
6296
|
}
|
|
6297
|
-
function
|
|
6297
|
+
function Ci(t, e, r, n) {
|
|
6298
6298
|
for (var a = new ge.GlyphSet(n), s = 0; s < r.length - 1; s += 1) {
|
|
6299
6299
|
var i = r[s], o = r[s + 1];
|
|
6300
6300
|
i !== o ? a.push(s, ge.ttfGlyphLoader(n, s, oa, t, e + i, la)) : a.push(s, ge.glyphLoader(n, s));
|
|
6301
6301
|
}
|
|
6302
6302
|
return a;
|
|
6303
6303
|
}
|
|
6304
|
-
function
|
|
6304
|
+
function Ei(t, e, r, n) {
|
|
6305
6305
|
var a = new ge.GlyphSet(n);
|
|
6306
6306
|
return n._push = function(s) {
|
|
6307
6307
|
var i = r[s], o = r[s + 1];
|
|
6308
6308
|
i !== o ? a.push(s, ge.ttfGlyphLoader(n, s, oa, t, e + i, la)) : a.push(s, ge.glyphLoader(n, s));
|
|
6309
6309
|
}, a;
|
|
6310
6310
|
}
|
|
6311
|
-
function
|
|
6312
|
-
return a.lowMemory ?
|
|
6311
|
+
function Oi(t, e, r, n, a) {
|
|
6312
|
+
return a.lowMemory ? Ei(t, e, r, n) : Ci(t, e, r, n);
|
|
6313
6313
|
}
|
|
6314
|
-
var ha = { getPath: ua, parse:
|
|
6314
|
+
var ha = { getPath: ua, parse: Oi }, ca, Ae, fa, er;
|
|
6315
6315
|
function pa(t) {
|
|
6316
6316
|
this.font = t, this.getCommands = function(e) {
|
|
6317
6317
|
return ha.getPath(e).commands;
|
|
6318
6318
|
}, this._fpgmState = this._prepState = void 0, this._errorState = 0;
|
|
6319
6319
|
}
|
|
6320
|
-
function
|
|
6320
|
+
function Ui(t) {
|
|
6321
6321
|
return t;
|
|
6322
6322
|
}
|
|
6323
6323
|
function da(t) {
|
|
6324
6324
|
return Math.sign(t) * Math.round(Math.abs(t));
|
|
6325
6325
|
}
|
|
6326
|
-
function
|
|
6326
|
+
function Li(t) {
|
|
6327
6327
|
return Math.sign(t) * Math.round(Math.abs(t * 2)) / 2;
|
|
6328
6328
|
}
|
|
6329
|
-
function
|
|
6329
|
+
function Ri(t) {
|
|
6330
6330
|
return Math.sign(t) * (Math.round(Math.abs(t) + 0.5) - 0.5);
|
|
6331
6331
|
}
|
|
6332
|
-
function
|
|
6332
|
+
function Ai(t) {
|
|
6333
6333
|
return Math.sign(t) * Math.ceil(Math.abs(t));
|
|
6334
6334
|
}
|
|
6335
|
-
function
|
|
6335
|
+
function Mi(t) {
|
|
6336
6336
|
return Math.sign(t) * Math.floor(Math.abs(t));
|
|
6337
6337
|
}
|
|
6338
6338
|
var ga = function(t) {
|
|
@@ -6508,7 +6508,7 @@ me.prototype.prevTouched = function(t) {
|
|
|
6508
6508
|
e = e.prevPointOnContour;
|
|
6509
6509
|
return e;
|
|
6510
6510
|
};
|
|
6511
|
-
var Ye = Object.freeze(new me(0, 0)),
|
|
6511
|
+
var Ye = Object.freeze(new me(0, 0)), Pi = {
|
|
6512
6512
|
cvCutIn: 17 / 16,
|
|
6513
6513
|
// control value cut in
|
|
6514
6514
|
deltaBase: 9,
|
|
@@ -6535,7 +6535,7 @@ pa.prototype.exec = function(t, e) {
|
|
|
6535
6535
|
if (!n || n.ppem !== e) {
|
|
6536
6536
|
var a = this._fpgmState;
|
|
6537
6537
|
if (!a) {
|
|
6538
|
-
Se.prototype =
|
|
6538
|
+
Se.prototype = Pi, a = this._fpgmState = new Se("fpgm", r.tables.fpgm), a.funcs = [], a.font = r, exports.DEBUG && (console.log("---EXEC FPGM---"), a.step = -1);
|
|
6539
6539
|
try {
|
|
6540
6540
|
Ae(a);
|
|
6541
6541
|
} catch (l) {
|
|
@@ -6676,41 +6676,41 @@ function Kr(t, e) {
|
|
|
6676
6676
|
var o, u;
|
|
6677
6677
|
t ? (o = s.y - i.y, u = i.x - s.x) : (o = i.x - s.x, u = i.y - s.y), e.fv = Je(o, u);
|
|
6678
6678
|
}
|
|
6679
|
-
function
|
|
6679
|
+
function Bi(t) {
|
|
6680
6680
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6681
6681
|
exports.DEBUG && console.log(t.step, "SPVFS[]", r, n), t.pv = t.dpv = Je(n, r);
|
|
6682
6682
|
}
|
|
6683
|
-
function
|
|
6683
|
+
function Ii(t) {
|
|
6684
6684
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6685
6685
|
exports.DEBUG && console.log(t.step, "SPVFS[]", r, n), t.fv = Je(n, r);
|
|
6686
6686
|
}
|
|
6687
|
-
function
|
|
6687
|
+
function Di(t) {
|
|
6688
6688
|
var e = t.stack, r = t.pv;
|
|
6689
6689
|
exports.DEBUG && console.log(t.step, "GPV[]"), e.push(r.x * 16384), e.push(r.y * 16384);
|
|
6690
6690
|
}
|
|
6691
|
-
function
|
|
6691
|
+
function Gi(t) {
|
|
6692
6692
|
var e = t.stack, r = t.fv;
|
|
6693
6693
|
exports.DEBUG && console.log(t.step, "GFV[]"), e.push(r.x * 16384), e.push(r.y * 16384);
|
|
6694
6694
|
}
|
|
6695
|
-
function
|
|
6695
|
+
function Ni(t) {
|
|
6696
6696
|
t.fv = t.pv, exports.DEBUG && console.log(t.step, "SFVTPV[]");
|
|
6697
6697
|
}
|
|
6698
|
-
function
|
|
6698
|
+
function _i(t) {
|
|
6699
6699
|
var e = t.stack, r = e.pop(), n = e.pop(), a = e.pop(), s = e.pop(), i = e.pop(), o = t.z0, u = t.z1, l = o[r], h = o[n], f = u[a], c = u[s], p = t.z2[i];
|
|
6700
6700
|
exports.DEBUG && console.log("ISECT[], ", r, n, a, s, i);
|
|
6701
6701
|
var d = l.x, v = l.y, y = h.x, m = h.y, b = f.x, x = f.y, T = c.x, S = c.y, A = (d - y) * (x - S) - (v - m) * (b - T), O = d * m - v * y, w = b * S - x * T;
|
|
6702
6702
|
p.x = (O * (b - T) - w * (d - y)) / A, p.y = (O * (x - S) - w * (v - m)) / A;
|
|
6703
6703
|
}
|
|
6704
|
-
function
|
|
6704
|
+
function Hi(t) {
|
|
6705
6705
|
t.rp0 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP0[]", t.rp0);
|
|
6706
6706
|
}
|
|
6707
|
-
function
|
|
6707
|
+
function zi(t) {
|
|
6708
6708
|
t.rp1 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP1[]", t.rp1);
|
|
6709
6709
|
}
|
|
6710
|
-
function
|
|
6710
|
+
function Wi(t) {
|
|
6711
6711
|
t.rp2 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP2[]", t.rp2);
|
|
6712
6712
|
}
|
|
6713
|
-
function
|
|
6713
|
+
function Vi(t) {
|
|
6714
6714
|
var e = t.stack.pop();
|
|
6715
6715
|
switch (exports.DEBUG && console.log(t.step, "SZP0[]", e), t.zp0 = e, e) {
|
|
6716
6716
|
case 0:
|
|
@@ -6723,7 +6723,7 @@ function Wi(t) {
|
|
|
6723
6723
|
throw new Error("Invalid zone pointer");
|
|
6724
6724
|
}
|
|
6725
6725
|
}
|
|
6726
|
-
function
|
|
6726
|
+
function qi(t) {
|
|
6727
6727
|
var e = t.stack.pop();
|
|
6728
6728
|
switch (exports.DEBUG && console.log(t.step, "SZP1[]", e), t.zp1 = e, e) {
|
|
6729
6729
|
case 0:
|
|
@@ -6736,7 +6736,7 @@ function Vi(t) {
|
|
|
6736
6736
|
throw new Error("Invalid zone pointer");
|
|
6737
6737
|
}
|
|
6738
6738
|
}
|
|
6739
|
-
function
|
|
6739
|
+
function Xi(t) {
|
|
6740
6740
|
var e = t.stack.pop();
|
|
6741
6741
|
switch (exports.DEBUG && console.log(t.step, "SZP2[]", e), t.zp2 = e, e) {
|
|
6742
6742
|
case 0:
|
|
@@ -6749,7 +6749,7 @@ function qi(t) {
|
|
|
6749
6749
|
throw new Error("Invalid zone pointer");
|
|
6750
6750
|
}
|
|
6751
6751
|
}
|
|
6752
|
-
function
|
|
6752
|
+
function Yi(t) {
|
|
6753
6753
|
var e = t.stack.pop();
|
|
6754
6754
|
switch (exports.DEBUG && console.log(t.step, "SZPS[]", e), t.zp0 = t.zp1 = t.zp2 = e, e) {
|
|
6755
6755
|
case 0:
|
|
@@ -6762,49 +6762,49 @@ function Xi(t) {
|
|
|
6762
6762
|
throw new Error("Invalid zone pointer");
|
|
6763
6763
|
}
|
|
6764
6764
|
}
|
|
6765
|
-
function Yi(t) {
|
|
6766
|
-
t.loop = t.stack.pop(), exports.DEBUG && console.log(t.step, "SLOOP[]", t.loop);
|
|
6767
|
-
}
|
|
6768
6765
|
function Zi(t) {
|
|
6769
|
-
exports.DEBUG && console.log(t.step, "
|
|
6766
|
+
t.loop = t.stack.pop(), exports.DEBUG && console.log(t.step, "SLOOP[]", t.loop);
|
|
6770
6767
|
}
|
|
6771
6768
|
function ji(t) {
|
|
6772
|
-
exports.DEBUG && console.log(t.step, "
|
|
6769
|
+
exports.DEBUG && console.log(t.step, "RTG[]"), t.round = da;
|
|
6773
6770
|
}
|
|
6774
6771
|
function Ki(t) {
|
|
6772
|
+
exports.DEBUG && console.log(t.step, "RTHG[]"), t.round = Ri;
|
|
6773
|
+
}
|
|
6774
|
+
function Qi(t) {
|
|
6775
6775
|
var e = t.stack.pop();
|
|
6776
6776
|
exports.DEBUG && console.log(t.step, "SMD[]", e), t.minDis = e / 64;
|
|
6777
6777
|
}
|
|
6778
|
-
function
|
|
6778
|
+
function $i(t) {
|
|
6779
6779
|
exports.DEBUG && console.log(t.step, "ELSE[]"), va(t, !1);
|
|
6780
6780
|
}
|
|
6781
|
-
function
|
|
6781
|
+
function Ji(t) {
|
|
6782
6782
|
var e = t.stack.pop();
|
|
6783
6783
|
exports.DEBUG && console.log(t.step, "JMPR[]", e), t.ip += e - 1;
|
|
6784
6784
|
}
|
|
6785
|
-
function
|
|
6785
|
+
function eo(t) {
|
|
6786
6786
|
var e = t.stack.pop();
|
|
6787
6787
|
exports.DEBUG && console.log(t.step, "SCVTCI[]", e), t.cvCutIn = e / 64;
|
|
6788
6788
|
}
|
|
6789
|
-
function
|
|
6789
|
+
function to(t) {
|
|
6790
6790
|
var e = t.stack;
|
|
6791
6791
|
exports.DEBUG && console.log(t.step, "DUP[]"), e.push(e[e.length - 1]);
|
|
6792
6792
|
}
|
|
6793
6793
|
function Ut(t) {
|
|
6794
6794
|
exports.DEBUG && console.log(t.step, "POP[]"), t.stack.pop();
|
|
6795
6795
|
}
|
|
6796
|
-
function
|
|
6796
|
+
function ro(t) {
|
|
6797
6797
|
exports.DEBUG && console.log(t.step, "CLEAR[]"), t.stack.length = 0;
|
|
6798
6798
|
}
|
|
6799
|
-
function
|
|
6799
|
+
function no(t) {
|
|
6800
6800
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6801
6801
|
exports.DEBUG && console.log(t.step, "SWAP[]"), e.push(r), e.push(n);
|
|
6802
6802
|
}
|
|
6803
|
-
function
|
|
6803
|
+
function ao(t) {
|
|
6804
6804
|
var e = t.stack;
|
|
6805
6805
|
exports.DEBUG && console.log(t.step, "DEPTH[]"), e.push(e.length);
|
|
6806
6806
|
}
|
|
6807
|
-
function
|
|
6807
|
+
function so(t) {
|
|
6808
6808
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6809
6809
|
exports.DEBUG && console.log(t.step, "LOOPCALL[]", r, n);
|
|
6810
6810
|
var a = t.ip, s = t.prog;
|
|
@@ -6817,21 +6817,21 @@ function ao(t) {
|
|
|
6817
6817
|
);
|
|
6818
6818
|
t.ip = a, t.prog = s;
|
|
6819
6819
|
}
|
|
6820
|
-
function
|
|
6820
|
+
function io(t) {
|
|
6821
6821
|
var e = t.stack.pop();
|
|
6822
6822
|
exports.DEBUG && console.log(t.step, "CALL[]", e);
|
|
6823
6823
|
var r = t.ip, n = t.prog;
|
|
6824
6824
|
t.prog = t.funcs[e], Ae(t), t.ip = r, t.prog = n, exports.DEBUG && console.log(++t.step, "returning from", e);
|
|
6825
6825
|
}
|
|
6826
|
-
function
|
|
6826
|
+
function oo(t) {
|
|
6827
6827
|
var e = t.stack, r = e.pop();
|
|
6828
6828
|
exports.DEBUG && console.log(t.step, "CINDEX[]", r), e.push(e[e.length - r]);
|
|
6829
6829
|
}
|
|
6830
|
-
function
|
|
6830
|
+
function uo(t) {
|
|
6831
6831
|
var e = t.stack, r = e.pop();
|
|
6832
6832
|
exports.DEBUG && console.log(t.step, "MINDEX[]", r), e.push(e.splice(e.length - r, 1)[0]);
|
|
6833
6833
|
}
|
|
6834
|
-
function
|
|
6834
|
+
function lo(t) {
|
|
6835
6835
|
if (t.env !== "fpgm")
|
|
6836
6836
|
throw new Error("FDEF not allowed here");
|
|
6837
6837
|
var e = t.stack, r = t.prog, n = t.ip, a = e.pop(), s = n;
|
|
@@ -6887,7 +6887,7 @@ function tn(t, e) {
|
|
|
6887
6887
|
for (var l, h = i.distance(a, a, !1, !0), f = u.length - 2, c = 0; c < f; c++)
|
|
6888
6888
|
l = u[c], s.setRelative(l, l, h, i);
|
|
6889
6889
|
}
|
|
6890
|
-
function
|
|
6890
|
+
function ho(t) {
|
|
6891
6891
|
for (var e = t.stack, r = t.loop, n = t.fv, a = e.pop() / 64, s = t.z2; r--; ) {
|
|
6892
6892
|
var i = e.pop(), o = s[i];
|
|
6893
6893
|
exports.DEBUG && console.log(
|
|
@@ -6899,7 +6899,7 @@ function lo(t) {
|
|
|
6899
6899
|
}
|
|
6900
6900
|
t.loop = 1;
|
|
6901
6901
|
}
|
|
6902
|
-
function
|
|
6902
|
+
function co(t) {
|
|
6903
6903
|
for (var e = t.stack, r = t.rp1, n = t.rp2, a = t.loop, s = t.z0[r], i = t.z1[n], o = t.fv, u = t.dpv, l = t.z2; a--; ) {
|
|
6904
6904
|
var h = e.pop(), f = l[h];
|
|
6905
6905
|
exports.DEBUG && console.log(
|
|
@@ -6917,7 +6917,7 @@ function rn(t, e) {
|
|
|
6917
6917
|
var r = e.stack, n = r.pop() / 64, a = r.pop(), s = e.z1[a], i = e.z0[e.rp0], o = e.fv, u = e.pv;
|
|
6918
6918
|
o.setRelative(s, i, n, u), o.touch(s), exports.DEBUG && console.log(e.step, "MSIRP[" + t + "]", n, a), e.rp1 = e.rp0, e.rp2 = a, t && (e.rp0 = a);
|
|
6919
6919
|
}
|
|
6920
|
-
function
|
|
6920
|
+
function fo(t) {
|
|
6921
6921
|
for (var e = t.stack, r = t.rp0, n = t.z0[r], a = t.loop, s = t.fv, i = t.pv, o = t.z1; a--; ) {
|
|
6922
6922
|
var u = e.pop(), l = o[u];
|
|
6923
6923
|
exports.DEBUG && console.log(
|
|
@@ -6928,8 +6928,8 @@ function co(t) {
|
|
|
6928
6928
|
}
|
|
6929
6929
|
t.loop = 1;
|
|
6930
6930
|
}
|
|
6931
|
-
function
|
|
6932
|
-
exports.DEBUG && console.log(t.step, "RTDG[]"), t.round =
|
|
6931
|
+
function po(t) {
|
|
6932
|
+
exports.DEBUG && console.log(t.step, "RTDG[]"), t.round = Li;
|
|
6933
6933
|
}
|
|
6934
6934
|
function nn(t, e) {
|
|
6935
6935
|
var r = e.stack, n = r.pop(), a = r.pop(), s = e.z0[a], i = e.fv, o = e.pv, u = e.cvt[n];
|
|
@@ -6945,14 +6945,14 @@ function nn(t, e) {
|
|
|
6945
6945
|
var l = o.distance(s, Ye);
|
|
6946
6946
|
t && (Math.abs(l - u) < e.cvCutIn && (l = u), l = e.round(l)), i.setRelative(s, Ye, l, o), e.zp0 === 0 && (s.xo = s.x, s.yo = s.y), i.touch(s), e.rp0 = e.rp1 = a;
|
|
6947
6947
|
}
|
|
6948
|
-
function
|
|
6948
|
+
function go(t) {
|
|
6949
6949
|
var e = t.prog, r = t.ip, n = t.stack, a = e[++r];
|
|
6950
6950
|
exports.DEBUG && console.log(t.step, "NPUSHB[]", a);
|
|
6951
6951
|
for (var s = 0; s < a; s++)
|
|
6952
6952
|
n.push(e[++r]);
|
|
6953
6953
|
t.ip = r;
|
|
6954
6954
|
}
|
|
6955
|
-
function
|
|
6955
|
+
function vo(t) {
|
|
6956
6956
|
var e = t.ip, r = t.prog, n = t.stack, a = r[++e];
|
|
6957
6957
|
exports.DEBUG && console.log(t.step, "NPUSHW[]", a);
|
|
6958
6958
|
for (var s = 0; s < a; s++) {
|
|
@@ -6961,23 +6961,23 @@ function go(t) {
|
|
|
6961
6961
|
}
|
|
6962
6962
|
t.ip = e;
|
|
6963
6963
|
}
|
|
6964
|
-
function
|
|
6964
|
+
function mo(t) {
|
|
6965
6965
|
var e = t.stack, r = t.store;
|
|
6966
6966
|
r || (r = t.store = []);
|
|
6967
6967
|
var n = e.pop(), a = e.pop();
|
|
6968
6968
|
exports.DEBUG && console.log(t.step, "WS", n, a), r[a] = n;
|
|
6969
6969
|
}
|
|
6970
|
-
function
|
|
6970
|
+
function yo(t) {
|
|
6971
6971
|
var e = t.stack, r = t.store, n = e.pop();
|
|
6972
6972
|
exports.DEBUG && console.log(t.step, "RS", n);
|
|
6973
6973
|
var a = r && r[n] || 0;
|
|
6974
6974
|
e.push(a);
|
|
6975
6975
|
}
|
|
6976
|
-
function
|
|
6976
|
+
function xo(t) {
|
|
6977
6977
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6978
6978
|
exports.DEBUG && console.log(t.step, "WCVTP", r, n), t.cvt[n] = r / 64;
|
|
6979
6979
|
}
|
|
6980
|
-
function
|
|
6980
|
+
function bo(t) {
|
|
6981
6981
|
var e = t.stack, r = e.pop();
|
|
6982
6982
|
exports.DEBUG && console.log(t.step, "RCVT", r), e.push(t.cvt[r] * 64);
|
|
6983
6983
|
}
|
|
@@ -6989,60 +6989,60 @@ function sn(t, e) {
|
|
|
6989
6989
|
var r = e.stack, n = r.pop(), a = r.pop(), s = e.z1[n], i = e.z0[a], o = e.dpv.distance(i, s, t, t);
|
|
6990
6990
|
exports.DEBUG && console.log(e.step, "MD[" + t + "]", n, a, "->", o), e.stack.push(Math.round(o * 64));
|
|
6991
6991
|
}
|
|
6992
|
-
function
|
|
6992
|
+
function So(t) {
|
|
6993
6993
|
exports.DEBUG && console.log(t.step, "MPPEM[]"), t.stack.push(t.ppem);
|
|
6994
6994
|
}
|
|
6995
|
-
function
|
|
6995
|
+
function ko(t) {
|
|
6996
6996
|
exports.DEBUG && console.log(t.step, "FLIPON[]"), t.autoFlip = !0;
|
|
6997
6997
|
}
|
|
6998
|
-
function
|
|
6998
|
+
function Fo(t) {
|
|
6999
6999
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7000
7000
|
exports.DEBUG && console.log(t.step, "LT[]", r, n), e.push(n < r ? 1 : 0);
|
|
7001
7001
|
}
|
|
7002
|
-
function
|
|
7002
|
+
function To(t) {
|
|
7003
7003
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7004
7004
|
exports.DEBUG && console.log(t.step, "LTEQ[]", r, n), e.push(n <= r ? 1 : 0);
|
|
7005
7005
|
}
|
|
7006
|
-
function
|
|
7006
|
+
function wo(t) {
|
|
7007
7007
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7008
7008
|
exports.DEBUG && console.log(t.step, "GT[]", r, n), e.push(n > r ? 1 : 0);
|
|
7009
7009
|
}
|
|
7010
|
-
function
|
|
7010
|
+
function Co(t) {
|
|
7011
7011
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7012
7012
|
exports.DEBUG && console.log(t.step, "GTEQ[]", r, n), e.push(n >= r ? 1 : 0);
|
|
7013
7013
|
}
|
|
7014
|
-
function
|
|
7014
|
+
function Eo(t) {
|
|
7015
7015
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7016
7016
|
exports.DEBUG && console.log(t.step, "EQ[]", r, n), e.push(r === n ? 1 : 0);
|
|
7017
7017
|
}
|
|
7018
|
-
function
|
|
7018
|
+
function Oo(t) {
|
|
7019
7019
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7020
7020
|
exports.DEBUG && console.log(t.step, "NEQ[]", r, n), e.push(r !== n ? 1 : 0);
|
|
7021
7021
|
}
|
|
7022
|
-
function
|
|
7022
|
+
function Uo(t) {
|
|
7023
7023
|
var e = t.stack, r = e.pop();
|
|
7024
7024
|
exports.DEBUG && console.log(t.step, "ODD[]", r), e.push(Math.trunc(r) % 2 ? 1 : 0);
|
|
7025
7025
|
}
|
|
7026
|
-
function
|
|
7026
|
+
function Lo(t) {
|
|
7027
7027
|
var e = t.stack, r = e.pop();
|
|
7028
7028
|
exports.DEBUG && console.log(t.step, "EVEN[]", r), e.push(Math.trunc(r) % 2 ? 0 : 1);
|
|
7029
7029
|
}
|
|
7030
|
-
function
|
|
7030
|
+
function Ro(t) {
|
|
7031
7031
|
var e = t.stack.pop();
|
|
7032
7032
|
exports.DEBUG && console.log(t.step, "IF[]", e), e || (va(t, !0), exports.DEBUG && console.log(t.step, "EIF[]"));
|
|
7033
7033
|
}
|
|
7034
|
-
function
|
|
7034
|
+
function Ao(t) {
|
|
7035
7035
|
exports.DEBUG && console.log(t.step, "EIF[]");
|
|
7036
7036
|
}
|
|
7037
|
-
function
|
|
7037
|
+
function Mo(t) {
|
|
7038
7038
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7039
7039
|
exports.DEBUG && console.log(t.step, "AND[]", r, n), e.push(r && n ? 1 : 0);
|
|
7040
7040
|
}
|
|
7041
|
-
function
|
|
7041
|
+
function Po(t) {
|
|
7042
7042
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7043
7043
|
exports.DEBUG && console.log(t.step, "OR[]", r, n), e.push(r || n ? 1 : 0);
|
|
7044
7044
|
}
|
|
7045
|
-
function
|
|
7045
|
+
function Bo(t) {
|
|
7046
7046
|
var e = t.stack, r = e.pop();
|
|
7047
7047
|
exports.DEBUG && console.log(t.step, "NOT[]", r), e.push(r ? 0 : 1);
|
|
7048
7048
|
}
|
|
@@ -7059,43 +7059,43 @@ function Lt(t, e) {
|
|
|
7059
7059
|
}
|
|
7060
7060
|
}
|
|
7061
7061
|
}
|
|
7062
|
-
function
|
|
7062
|
+
function Io(t) {
|
|
7063
7063
|
var e = t.stack, r = e.pop();
|
|
7064
7064
|
exports.DEBUG && console.log(t.step, "SDB[]", r), t.deltaBase = r;
|
|
7065
7065
|
}
|
|
7066
|
-
function
|
|
7066
|
+
function Do(t) {
|
|
7067
7067
|
var e = t.stack, r = e.pop();
|
|
7068
7068
|
exports.DEBUG && console.log(t.step, "SDS[]", r), t.deltaShift = Math.pow(0.5, r);
|
|
7069
7069
|
}
|
|
7070
|
-
function
|
|
7070
|
+
function Go(t) {
|
|
7071
7071
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7072
7072
|
exports.DEBUG && console.log(t.step, "ADD[]", r, n), e.push(n + r);
|
|
7073
7073
|
}
|
|
7074
|
-
function
|
|
7074
|
+
function No(t) {
|
|
7075
7075
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7076
7076
|
exports.DEBUG && console.log(t.step, "SUB[]", r, n), e.push(n - r);
|
|
7077
7077
|
}
|
|
7078
|
-
function
|
|
7078
|
+
function _o(t) {
|
|
7079
7079
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7080
7080
|
exports.DEBUG && console.log(t.step, "DIV[]", r, n), e.push(n * 64 / r);
|
|
7081
7081
|
}
|
|
7082
|
-
function
|
|
7082
|
+
function Ho(t) {
|
|
7083
7083
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7084
7084
|
exports.DEBUG && console.log(t.step, "MUL[]", r, n), e.push(n * r / 64);
|
|
7085
7085
|
}
|
|
7086
|
-
function
|
|
7086
|
+
function zo(t) {
|
|
7087
7087
|
var e = t.stack, r = e.pop();
|
|
7088
7088
|
exports.DEBUG && console.log(t.step, "ABS[]", r), e.push(Math.abs(r));
|
|
7089
7089
|
}
|
|
7090
|
-
function
|
|
7090
|
+
function Wo(t) {
|
|
7091
7091
|
var e = t.stack, r = e.pop();
|
|
7092
7092
|
exports.DEBUG && console.log(t.step, "NEG[]", r), e.push(-r);
|
|
7093
7093
|
}
|
|
7094
|
-
function
|
|
7094
|
+
function Vo(t) {
|
|
7095
7095
|
var e = t.stack, r = e.pop();
|
|
7096
7096
|
exports.DEBUG && console.log(t.step, "FLOOR[]", r), e.push(Math.floor(r / 64) * 64);
|
|
7097
7097
|
}
|
|
7098
|
-
function
|
|
7098
|
+
function qo(t) {
|
|
7099
7099
|
var e = t.stack, r = e.pop();
|
|
7100
7100
|
exports.DEBUG && console.log(t.step, "CEILING[]", r), e.push(Math.ceil(r / 64) * 64);
|
|
7101
7101
|
}
|
|
@@ -7103,7 +7103,7 @@ function ot(t, e) {
|
|
|
7103
7103
|
var r = e.stack, n = r.pop();
|
|
7104
7104
|
exports.DEBUG && console.log(e.step, "ROUND[]"), r.push(e.round(n / 64) * 64);
|
|
7105
7105
|
}
|
|
7106
|
-
function
|
|
7106
|
+
function Xo(t) {
|
|
7107
7107
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7108
7108
|
exports.DEBUG && console.log(t.step, "WCVTF[]", r, n), t.cvt[n] = r * t.ppem / t.font.unitsPerEm;
|
|
7109
7109
|
}
|
|
@@ -7120,7 +7120,7 @@ function Rt(t, e) {
|
|
|
7120
7120
|
}
|
|
7121
7121
|
}
|
|
7122
7122
|
}
|
|
7123
|
-
function
|
|
7123
|
+
function Yo(t) {
|
|
7124
7124
|
var e = t.stack.pop();
|
|
7125
7125
|
exports.DEBUG && console.log(t.step, "SROUND[]", e), t.round = ga;
|
|
7126
7126
|
var r;
|
|
@@ -7155,7 +7155,7 @@ function Xo(t) {
|
|
|
7155
7155
|
}
|
|
7156
7156
|
e &= 15, e === 0 ? t.srThreshold = 0 : t.srThreshold = (e / 8 - 0.5) * r;
|
|
7157
7157
|
}
|
|
7158
|
-
function
|
|
7158
|
+
function Zo(t) {
|
|
7159
7159
|
var e = t.stack.pop();
|
|
7160
7160
|
exports.DEBUG && console.log(t.step, "S45ROUND[]", e), t.round = ga;
|
|
7161
7161
|
var r;
|
|
@@ -7190,16 +7190,16 @@ function Yo(t) {
|
|
|
7190
7190
|
}
|
|
7191
7191
|
e &= 15, e === 0 ? t.srThreshold = 0 : t.srThreshold = (e / 8 - 0.5) * r;
|
|
7192
7192
|
}
|
|
7193
|
-
function Zo(t) {
|
|
7194
|
-
exports.DEBUG && console.log(t.step, "ROFF[]"), t.round = Oi;
|
|
7195
|
-
}
|
|
7196
7193
|
function jo(t) {
|
|
7197
|
-
exports.DEBUG && console.log(t.step, "
|
|
7194
|
+
exports.DEBUG && console.log(t.step, "ROFF[]"), t.round = Ui;
|
|
7198
7195
|
}
|
|
7199
7196
|
function Ko(t) {
|
|
7200
|
-
exports.DEBUG && console.log(t.step, "
|
|
7197
|
+
exports.DEBUG && console.log(t.step, "RUTG[]"), t.round = Ai;
|
|
7201
7198
|
}
|
|
7202
7199
|
function Qo(t) {
|
|
7200
|
+
exports.DEBUG && console.log(t.step, "RDTG[]"), t.round = Mi;
|
|
7201
|
+
}
|
|
7202
|
+
function $o(t) {
|
|
7203
7203
|
var e = t.stack.pop();
|
|
7204
7204
|
exports.DEBUG && console.log(t.step, "SCANCTRL[]", e);
|
|
7205
7205
|
}
|
|
@@ -7209,27 +7209,27 @@ function on(t, e) {
|
|
|
7209
7209
|
var o, u;
|
|
7210
7210
|
t ? (o = s.y - i.y, u = i.x - s.x) : (o = i.x - s.x, u = i.y - s.y), e.dpv = Je(o, u);
|
|
7211
7211
|
}
|
|
7212
|
-
function
|
|
7212
|
+
function Jo(t) {
|
|
7213
7213
|
var e = t.stack, r = e.pop(), n = 0;
|
|
7214
7214
|
exports.DEBUG && console.log(t.step, "GETINFO[]", r), r & 1 && (n = 35), r & 32 && (n |= 4096), e.push(n);
|
|
7215
7215
|
}
|
|
7216
|
-
function
|
|
7216
|
+
function eu(t) {
|
|
7217
7217
|
var e = t.stack, r = e.pop(), n = e.pop(), a = e.pop();
|
|
7218
7218
|
exports.DEBUG && console.log(t.step, "ROLL[]"), e.push(n), e.push(r), e.push(a);
|
|
7219
7219
|
}
|
|
7220
|
-
function
|
|
7220
|
+
function tu(t) {
|
|
7221
7221
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7222
7222
|
exports.DEBUG && console.log(t.step, "MAX[]", r, n), e.push(Math.max(n, r));
|
|
7223
7223
|
}
|
|
7224
|
-
function
|
|
7224
|
+
function ru(t) {
|
|
7225
7225
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7226
7226
|
exports.DEBUG && console.log(t.step, "MIN[]", r, n), e.push(Math.min(n, r));
|
|
7227
7227
|
}
|
|
7228
|
-
function
|
|
7228
|
+
function nu(t) {
|
|
7229
7229
|
var e = t.stack.pop();
|
|
7230
7230
|
exports.DEBUG && console.log(t.step, "SCANTYPE[]", e);
|
|
7231
7231
|
}
|
|
7232
|
-
function
|
|
7232
|
+
function au(t) {
|
|
7233
7233
|
var e = t.stack.pop(), r = t.stack.pop();
|
|
7234
7234
|
switch (exports.DEBUG && console.log(t.step, "INSTCTRL[]", e, r), e) {
|
|
7235
7235
|
case 1:
|
|
@@ -7294,45 +7294,45 @@ ca = [
|
|
|
7294
7294
|
/* 0x09 */
|
|
7295
7295
|
Kr.bind(void 0, 1),
|
|
7296
7296
|
/* 0x0A */
|
|
7297
|
-
Pi,
|
|
7298
|
-
/* 0x0B */
|
|
7299
7297
|
Bi,
|
|
7300
|
-
/*
|
|
7298
|
+
/* 0x0B */
|
|
7301
7299
|
Ii,
|
|
7302
|
-
/*
|
|
7300
|
+
/* 0x0C */
|
|
7303
7301
|
Di,
|
|
7304
|
-
/*
|
|
7302
|
+
/* 0x0D */
|
|
7305
7303
|
Gi,
|
|
7306
|
-
/*
|
|
7304
|
+
/* 0x0E */
|
|
7307
7305
|
Ni,
|
|
7308
|
-
/*
|
|
7306
|
+
/* 0x0F */
|
|
7309
7307
|
_i,
|
|
7310
|
-
/*
|
|
7308
|
+
/* 0x10 */
|
|
7311
7309
|
Hi,
|
|
7312
|
-
/*
|
|
7310
|
+
/* 0x11 */
|
|
7313
7311
|
zi,
|
|
7314
|
-
/*
|
|
7312
|
+
/* 0x12 */
|
|
7315
7313
|
Wi,
|
|
7316
|
-
/*
|
|
7314
|
+
/* 0x13 */
|
|
7317
7315
|
Vi,
|
|
7318
|
-
/*
|
|
7316
|
+
/* 0x14 */
|
|
7319
7317
|
qi,
|
|
7320
|
-
/*
|
|
7318
|
+
/* 0x15 */
|
|
7321
7319
|
Xi,
|
|
7322
|
-
/*
|
|
7320
|
+
/* 0x16 */
|
|
7323
7321
|
Yi,
|
|
7324
|
-
/*
|
|
7322
|
+
/* 0x17 */
|
|
7325
7323
|
Zi,
|
|
7326
|
-
/*
|
|
7324
|
+
/* 0x18 */
|
|
7327
7325
|
ji,
|
|
7328
|
-
/*
|
|
7326
|
+
/* 0x19 */
|
|
7329
7327
|
Ki,
|
|
7330
|
-
/*
|
|
7328
|
+
/* 0x1A */
|
|
7331
7329
|
Qi,
|
|
7332
|
-
/*
|
|
7330
|
+
/* 0x1B */
|
|
7333
7331
|
$i,
|
|
7334
|
-
/*
|
|
7332
|
+
/* 0x1C */
|
|
7335
7333
|
Ji,
|
|
7334
|
+
/* 0x1D */
|
|
7335
|
+
eo,
|
|
7336
7336
|
/* 0x1E */
|
|
7337
7337
|
void 0,
|
|
7338
7338
|
// TODO SSWCI
|
|
@@ -7340,19 +7340,19 @@ ca = [
|
|
|
7340
7340
|
void 0,
|
|
7341
7341
|
// TODO SSW
|
|
7342
7342
|
/* 0x20 */
|
|
7343
|
-
|
|
7343
|
+
to,
|
|
7344
7344
|
/* 0x21 */
|
|
7345
7345
|
Ut,
|
|
7346
7346
|
/* 0x22 */
|
|
7347
|
-
to,
|
|
7348
|
-
/* 0x23 */
|
|
7349
7347
|
ro,
|
|
7350
|
-
/*
|
|
7348
|
+
/* 0x23 */
|
|
7351
7349
|
no,
|
|
7350
|
+
/* 0x24 */
|
|
7351
|
+
ao,
|
|
7352
7352
|
/* 0x25 */
|
|
7353
|
-
io,
|
|
7354
|
-
/* 0x26 */
|
|
7355
7353
|
oo,
|
|
7354
|
+
/* 0x26 */
|
|
7355
|
+
uo,
|
|
7356
7356
|
/* 0x27 */
|
|
7357
7357
|
void 0,
|
|
7358
7358
|
// TODO ALIGNPTS
|
|
@@ -7362,11 +7362,11 @@ ca = [
|
|
|
7362
7362
|
void 0,
|
|
7363
7363
|
// TODO UTP
|
|
7364
7364
|
/* 0x2A */
|
|
7365
|
-
ao,
|
|
7366
|
-
/* 0x2B */
|
|
7367
7365
|
so,
|
|
7366
|
+
/* 0x2B */
|
|
7367
|
+
io,
|
|
7368
7368
|
/* 0x2C */
|
|
7369
|
-
|
|
7369
|
+
lo,
|
|
7370
7370
|
/* 0x2D */
|
|
7371
7371
|
void 0,
|
|
7372
7372
|
// ENDF (eaten by FDEF)
|
|
@@ -7391,33 +7391,33 @@ ca = [
|
|
|
7391
7391
|
/* 0x37 */
|
|
7392
7392
|
tn.bind(void 0, 1),
|
|
7393
7393
|
/* 0x38 */
|
|
7394
|
-
lo,
|
|
7395
|
-
/* 0x39 */
|
|
7396
7394
|
ho,
|
|
7395
|
+
/* 0x39 */
|
|
7396
|
+
co,
|
|
7397
7397
|
/* 0x3A */
|
|
7398
7398
|
rn.bind(void 0, 0),
|
|
7399
7399
|
/* 0x3B */
|
|
7400
7400
|
rn.bind(void 0, 1),
|
|
7401
7401
|
/* 0x3C */
|
|
7402
|
-
co,
|
|
7403
|
-
/* 0x3D */
|
|
7404
7402
|
fo,
|
|
7403
|
+
/* 0x3D */
|
|
7404
|
+
po,
|
|
7405
7405
|
/* 0x3E */
|
|
7406
7406
|
nn.bind(void 0, 0),
|
|
7407
7407
|
/* 0x3F */
|
|
7408
7408
|
nn.bind(void 0, 1),
|
|
7409
7409
|
/* 0x40 */
|
|
7410
|
-
po,
|
|
7411
|
-
/* 0x41 */
|
|
7412
7410
|
go,
|
|
7413
|
-
/*
|
|
7411
|
+
/* 0x41 */
|
|
7414
7412
|
vo,
|
|
7415
|
-
/*
|
|
7413
|
+
/* 0x42 */
|
|
7416
7414
|
mo,
|
|
7417
|
-
/*
|
|
7415
|
+
/* 0x43 */
|
|
7418
7416
|
yo,
|
|
7419
|
-
/*
|
|
7417
|
+
/* 0x44 */
|
|
7420
7418
|
xo,
|
|
7419
|
+
/* 0x45 */
|
|
7420
|
+
bo,
|
|
7421
7421
|
/* 0x46 */
|
|
7422
7422
|
an.bind(void 0, 0),
|
|
7423
7423
|
/* 0x47 */
|
|
@@ -7430,12 +7430,12 @@ ca = [
|
|
|
7430
7430
|
/* 0x4A */
|
|
7431
7431
|
sn.bind(void 0, 1),
|
|
7432
7432
|
/* 0x4B */
|
|
7433
|
-
|
|
7433
|
+
So,
|
|
7434
7434
|
/* 0x4C */
|
|
7435
7435
|
void 0,
|
|
7436
7436
|
// TODO MPS
|
|
7437
7437
|
/* 0x4D */
|
|
7438
|
-
|
|
7438
|
+
ko,
|
|
7439
7439
|
/* 0x4E */
|
|
7440
7440
|
void 0,
|
|
7441
7441
|
// TODO FLIPOFF
|
|
@@ -7443,53 +7443,53 @@ ca = [
|
|
|
7443
7443
|
void 0,
|
|
7444
7444
|
// TODO DEBUG
|
|
7445
7445
|
/* 0x50 */
|
|
7446
|
-
ko,
|
|
7447
|
-
/* 0x51 */
|
|
7448
7446
|
Fo,
|
|
7449
|
-
/*
|
|
7447
|
+
/* 0x51 */
|
|
7450
7448
|
To,
|
|
7451
|
-
/*
|
|
7449
|
+
/* 0x52 */
|
|
7452
7450
|
wo,
|
|
7453
|
-
/*
|
|
7451
|
+
/* 0x53 */
|
|
7454
7452
|
Co,
|
|
7455
|
-
/*
|
|
7453
|
+
/* 0x54 */
|
|
7456
7454
|
Eo,
|
|
7457
|
-
/*
|
|
7455
|
+
/* 0x55 */
|
|
7458
7456
|
Oo,
|
|
7459
|
-
/*
|
|
7457
|
+
/* 0x56 */
|
|
7460
7458
|
Uo,
|
|
7461
|
-
/*
|
|
7459
|
+
/* 0x57 */
|
|
7462
7460
|
Lo,
|
|
7463
|
-
/*
|
|
7461
|
+
/* 0x58 */
|
|
7464
7462
|
Ro,
|
|
7465
|
-
/*
|
|
7463
|
+
/* 0x59 */
|
|
7466
7464
|
Ao,
|
|
7467
|
-
/*
|
|
7465
|
+
/* 0x5A */
|
|
7468
7466
|
Mo,
|
|
7469
|
-
/*
|
|
7467
|
+
/* 0x5B */
|
|
7470
7468
|
Po,
|
|
7469
|
+
/* 0x5C */
|
|
7470
|
+
Bo,
|
|
7471
7471
|
/* 0x5D */
|
|
7472
7472
|
Lt.bind(void 0, 1),
|
|
7473
7473
|
/* 0x5E */
|
|
7474
|
-
Bo,
|
|
7475
|
-
/* 0x5F */
|
|
7476
7474
|
Io,
|
|
7477
|
-
/*
|
|
7475
|
+
/* 0x5F */
|
|
7478
7476
|
Do,
|
|
7479
|
-
/*
|
|
7477
|
+
/* 0x60 */
|
|
7480
7478
|
Go,
|
|
7481
|
-
/*
|
|
7479
|
+
/* 0x61 */
|
|
7482
7480
|
No,
|
|
7483
|
-
/*
|
|
7481
|
+
/* 0x62 */
|
|
7484
7482
|
_o,
|
|
7485
|
-
/*
|
|
7483
|
+
/* 0x63 */
|
|
7486
7484
|
Ho,
|
|
7487
|
-
/*
|
|
7485
|
+
/* 0x64 */
|
|
7488
7486
|
zo,
|
|
7489
|
-
/*
|
|
7487
|
+
/* 0x65 */
|
|
7490
7488
|
Wo,
|
|
7491
|
-
/*
|
|
7489
|
+
/* 0x66 */
|
|
7492
7490
|
Vo,
|
|
7491
|
+
/* 0x67 */
|
|
7492
|
+
qo,
|
|
7493
7493
|
/* 0x68 */
|
|
7494
7494
|
ot.bind(void 0, 0),
|
|
7495
7495
|
/* 0x69 */
|
|
@@ -7511,7 +7511,7 @@ ca = [
|
|
|
7511
7511
|
void 0,
|
|
7512
7512
|
// TODO NROUND[ab]
|
|
7513
7513
|
/* 0x70 */
|
|
7514
|
-
|
|
7514
|
+
Xo,
|
|
7515
7515
|
/* 0x71 */
|
|
7516
7516
|
Lt.bind(void 0, 2),
|
|
7517
7517
|
/* 0x72 */
|
|
@@ -7523,9 +7523,9 @@ ca = [
|
|
|
7523
7523
|
/* 0x75 */
|
|
7524
7524
|
Rt.bind(void 0, 3),
|
|
7525
7525
|
/* 0x76 */
|
|
7526
|
-
Xo,
|
|
7527
|
-
/* 0x77 */
|
|
7528
7526
|
Yo,
|
|
7527
|
+
/* 0x77 */
|
|
7528
|
+
Zo,
|
|
7529
7529
|
/* 0x78 */
|
|
7530
7530
|
void 0,
|
|
7531
7531
|
// TODO JROT[]
|
|
@@ -7533,13 +7533,13 @@ ca = [
|
|
|
7533
7533
|
void 0,
|
|
7534
7534
|
// TODO JROF[]
|
|
7535
7535
|
/* 0x7A */
|
|
7536
|
-
|
|
7536
|
+
jo,
|
|
7537
7537
|
/* 0x7B */
|
|
7538
7538
|
void 0,
|
|
7539
7539
|
/* 0x7C */
|
|
7540
|
-
jo,
|
|
7541
|
-
/* 0x7D */
|
|
7542
7540
|
Ko,
|
|
7541
|
+
/* 0x7D */
|
|
7542
|
+
Qo,
|
|
7543
7543
|
/* 0x7E */
|
|
7544
7544
|
Ut,
|
|
7545
7545
|
// actually SANGW, supposed to do only a pop though
|
|
@@ -7560,26 +7560,26 @@ ca = [
|
|
|
7560
7560
|
/* 0x84 */
|
|
7561
7561
|
void 0,
|
|
7562
7562
|
/* 0x85 */
|
|
7563
|
-
|
|
7563
|
+
$o,
|
|
7564
7564
|
/* 0x86 */
|
|
7565
7565
|
on.bind(void 0, 0),
|
|
7566
7566
|
/* 0x87 */
|
|
7567
7567
|
on.bind(void 0, 1),
|
|
7568
7568
|
/* 0x88 */
|
|
7569
|
-
|
|
7569
|
+
Jo,
|
|
7570
7570
|
/* 0x89 */
|
|
7571
7571
|
void 0,
|
|
7572
7572
|
// TODO IDEF
|
|
7573
7573
|
/* 0x8A */
|
|
7574
|
-
Jo,
|
|
7575
|
-
/* 0x8B */
|
|
7576
7574
|
eu,
|
|
7577
|
-
/*
|
|
7575
|
+
/* 0x8B */
|
|
7578
7576
|
tu,
|
|
7579
|
-
/*
|
|
7577
|
+
/* 0x8C */
|
|
7580
7578
|
ru,
|
|
7581
|
-
/*
|
|
7579
|
+
/* 0x8D */
|
|
7582
7580
|
nu,
|
|
7581
|
+
/* 0x8E */
|
|
7582
|
+
au,
|
|
7583
7583
|
/* 0x8F */
|
|
7584
7584
|
void 0,
|
|
7585
7585
|
/* 0x90 */
|
|
@@ -7813,7 +7813,7 @@ function Ne(t) {
|
|
|
7813
7813
|
function hr(t, e, r) {
|
|
7814
7814
|
this.contextName = r, this.startIndex = t, this.endOffset = e;
|
|
7815
7815
|
}
|
|
7816
|
-
function
|
|
7816
|
+
function su(t, e, r) {
|
|
7817
7817
|
this.contextName = t, this.openRange = null, this.ranges = [], this.checkStart = e, this.checkEnd = r;
|
|
7818
7818
|
}
|
|
7819
7819
|
function oe(t, e) {
|
|
@@ -7822,7 +7822,7 @@ function oe(t, e) {
|
|
|
7822
7822
|
function xt(t) {
|
|
7823
7823
|
this.eventId = t, this.subscribers = [];
|
|
7824
7824
|
}
|
|
7825
|
-
function
|
|
7825
|
+
function iu(t) {
|
|
7826
7826
|
var e = this, r = [
|
|
7827
7827
|
"start",
|
|
7828
7828
|
"end",
|
|
@@ -7861,7 +7861,7 @@ function su(t) {
|
|
|
7861
7861
|
});
|
|
7862
7862
|
}
|
|
7863
7863
|
function G(t) {
|
|
7864
|
-
this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [],
|
|
7864
|
+
this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], iu.call(this, t);
|
|
7865
7865
|
}
|
|
7866
7866
|
Ne.prototype.setState = function(t, e) {
|
|
7867
7867
|
return this.state[t] = e, this.activeState = { key: t, value: this.state[t] }, this.activeState;
|
|
@@ -7999,7 +7999,7 @@ G.prototype.registerContextChecker = function(t, e, r) {
|
|
|
7999
7999
|
return {
|
|
8000
8000
|
FAIL: "missing context end check."
|
|
8001
8001
|
};
|
|
8002
|
-
var n = new
|
|
8002
|
+
var n = new su(
|
|
8003
8003
|
t,
|
|
8004
8004
|
e,
|
|
8005
8005
|
r
|
|
@@ -8072,7 +8072,7 @@ function Te(t) {
|
|
|
8072
8072
|
function ht(t) {
|
|
8073
8073
|
return /[A-z]/.test(t);
|
|
8074
8074
|
}
|
|
8075
|
-
function
|
|
8075
|
+
function ou(t) {
|
|
8076
8076
|
return /\s/.test(t);
|
|
8077
8077
|
}
|
|
8078
8078
|
function ne(t) {
|
|
@@ -8101,11 +8101,11 @@ function et(t, e) {
|
|
|
8101
8101
|
}
|
|
8102
8102
|
return -1;
|
|
8103
8103
|
}
|
|
8104
|
-
function
|
|
8104
|
+
function uu(t, e) {
|
|
8105
8105
|
var r = et(t, e.coverage);
|
|
8106
8106
|
return r === -1 ? null : t + e.deltaGlyphId;
|
|
8107
8107
|
}
|
|
8108
|
-
function
|
|
8108
|
+
function lu(t, e) {
|
|
8109
8109
|
var r = et(t, e.coverage);
|
|
8110
8110
|
return r === -1 ? null : e.substitute[r];
|
|
8111
8111
|
}
|
|
@@ -8118,7 +8118,7 @@ function At(t, e) {
|
|
|
8118
8118
|
}
|
|
8119
8119
|
return r.length !== t.length ? -1 : r;
|
|
8120
8120
|
}
|
|
8121
|
-
function
|
|
8121
|
+
function hu(t, e) {
|
|
8122
8122
|
var r = e.inputCoverage.length + e.lookaheadCoverage.length + e.backtrackCoverage.length;
|
|
8123
8123
|
if (t.context.length < r)
|
|
8124
8124
|
return [];
|
|
@@ -8157,7 +8157,7 @@ function lu(t, e) {
|
|
|
8157
8157
|
}
|
|
8158
8158
|
return c;
|
|
8159
8159
|
}
|
|
8160
|
-
function
|
|
8160
|
+
function cu(t, e) {
|
|
8161
8161
|
var r = t.current, n = et(r, e.coverage);
|
|
8162
8162
|
if (n === -1)
|
|
8163
8163
|
return null;
|
|
@@ -8173,7 +8173,7 @@ function hu(t, e) {
|
|
|
8173
8173
|
}
|
|
8174
8174
|
return null;
|
|
8175
8175
|
}
|
|
8176
|
-
function
|
|
8176
|
+
function fu(t, e) {
|
|
8177
8177
|
var r = et(t, e.coverage);
|
|
8178
8178
|
return r === -1 ? null : e.sequences[r];
|
|
8179
8179
|
}
|
|
@@ -8235,35 +8235,35 @@ ne.prototype.getLookupMethod = function(t, e) {
|
|
|
8235
8235
|
switch (n) {
|
|
8236
8236
|
case "11":
|
|
8237
8237
|
return function(a) {
|
|
8238
|
-
return
|
|
8238
|
+
return uu.apply(
|
|
8239
8239
|
r,
|
|
8240
8240
|
[a, e]
|
|
8241
8241
|
);
|
|
8242
8242
|
};
|
|
8243
8243
|
case "12":
|
|
8244
8244
|
return function(a) {
|
|
8245
|
-
return
|
|
8245
|
+
return lu.apply(
|
|
8246
8246
|
r,
|
|
8247
8247
|
[a, e]
|
|
8248
8248
|
);
|
|
8249
8249
|
};
|
|
8250
8250
|
case "63":
|
|
8251
8251
|
return function(a) {
|
|
8252
|
-
return
|
|
8252
|
+
return hu.apply(
|
|
8253
8253
|
r,
|
|
8254
8254
|
[a, e]
|
|
8255
8255
|
);
|
|
8256
8256
|
};
|
|
8257
8257
|
case "41":
|
|
8258
8258
|
return function(a) {
|
|
8259
|
-
return
|
|
8259
|
+
return cu.apply(
|
|
8260
8260
|
r,
|
|
8261
8261
|
[a, e]
|
|
8262
8262
|
);
|
|
8263
8263
|
};
|
|
8264
8264
|
case "21":
|
|
8265
8265
|
return function(a) {
|
|
8266
|
-
return
|
|
8266
|
+
return fu.apply(
|
|
8267
8267
|
r,
|
|
8268
8268
|
[a, e]
|
|
8269
8269
|
);
|
|
@@ -8356,7 +8356,7 @@ ne.prototype.getFeature = function(e) {
|
|
|
8356
8356
|
var r = this.features[e.script];
|
|
8357
8357
|
return r ? r.tags[e.tag] ? this.features[e.script].tags[e.tag] : null : { FAIL: "No feature for script " + e.script };
|
|
8358
8358
|
};
|
|
8359
|
-
function
|
|
8359
|
+
function pu(t) {
|
|
8360
8360
|
var e = t.current, r = t.get(-1);
|
|
8361
8361
|
return (
|
|
8362
8362
|
// ? arabic first char
|
|
@@ -8364,7 +8364,7 @@ function fu(t) {
|
|
|
8364
8364
|
!Fe(r) && Fe(e)
|
|
8365
8365
|
);
|
|
8366
8366
|
}
|
|
8367
|
-
function
|
|
8367
|
+
function du(t) {
|
|
8368
8368
|
var e = t.get(1);
|
|
8369
8369
|
return (
|
|
8370
8370
|
// ? last arabic char
|
|
@@ -8372,24 +8372,24 @@ function pu(t) {
|
|
|
8372
8372
|
!Fe(e)
|
|
8373
8373
|
);
|
|
8374
8374
|
}
|
|
8375
|
-
var
|
|
8376
|
-
startCheck:
|
|
8377
|
-
endCheck:
|
|
8375
|
+
var gu = {
|
|
8376
|
+
startCheck: pu,
|
|
8377
|
+
endCheck: du
|
|
8378
8378
|
};
|
|
8379
|
-
function
|
|
8379
|
+
function vu(t) {
|
|
8380
8380
|
var e = t.current, r = t.get(-1);
|
|
8381
8381
|
return (
|
|
8382
8382
|
// ? an arabic char preceded with a non arabic char
|
|
8383
8383
|
(Fe(e) || Te(e)) && !Fe(r)
|
|
8384
8384
|
);
|
|
8385
8385
|
}
|
|
8386
|
-
function
|
|
8386
|
+
function mu(t) {
|
|
8387
8387
|
var e = t.get(1);
|
|
8388
8388
|
switch (!0) {
|
|
8389
8389
|
case e === null:
|
|
8390
8390
|
return !0;
|
|
8391
8391
|
case (!Fe(e) && !Te(e)):
|
|
8392
|
-
var r =
|
|
8392
|
+
var r = ou(e);
|
|
8393
8393
|
if (!r)
|
|
8394
8394
|
return !0;
|
|
8395
8395
|
if (r) {
|
|
@@ -8406,38 +8406,38 @@ function vu(t) {
|
|
|
8406
8406
|
return !1;
|
|
8407
8407
|
}
|
|
8408
8408
|
}
|
|
8409
|
-
var
|
|
8410
|
-
startCheck:
|
|
8411
|
-
endCheck:
|
|
8409
|
+
var yu = {
|
|
8410
|
+
startCheck: vu,
|
|
8411
|
+
endCheck: mu
|
|
8412
8412
|
};
|
|
8413
|
-
function yu(t, e, r) {
|
|
8414
|
-
e[r].setState(t.tag, t.substitution);
|
|
8415
|
-
}
|
|
8416
8413
|
function xu(t, e, r) {
|
|
8417
8414
|
e[r].setState(t.tag, t.substitution);
|
|
8418
8415
|
}
|
|
8419
8416
|
function bu(t, e, r) {
|
|
8417
|
+
e[r].setState(t.tag, t.substitution);
|
|
8418
|
+
}
|
|
8419
|
+
function Su(t, e, r) {
|
|
8420
8420
|
t.substitution.forEach(function(n, a) {
|
|
8421
8421
|
var s = e[r + a];
|
|
8422
8422
|
s.setState(t.tag, n);
|
|
8423
8423
|
});
|
|
8424
8424
|
}
|
|
8425
|
-
function
|
|
8425
|
+
function ku(t, e, r) {
|
|
8426
8426
|
var n = e[r];
|
|
8427
8427
|
n.setState(t.tag, t.substitution.ligGlyph);
|
|
8428
8428
|
for (var a = t.substitution.components.length, s = 0; s < a; s++)
|
|
8429
8429
|
n = e[r + s + 1], n.setState("deleted", !0);
|
|
8430
8430
|
}
|
|
8431
8431
|
var un = {
|
|
8432
|
-
11:
|
|
8433
|
-
12:
|
|
8434
|
-
63:
|
|
8435
|
-
41:
|
|
8432
|
+
11: xu,
|
|
8433
|
+
12: bu,
|
|
8434
|
+
63: Su,
|
|
8435
|
+
41: ku
|
|
8436
8436
|
};
|
|
8437
8437
|
function cr(t, e, r) {
|
|
8438
8438
|
t instanceof Le && un[t.id] && un[t.id](t, e, r);
|
|
8439
8439
|
}
|
|
8440
|
-
function
|
|
8440
|
+
function Fu(t) {
|
|
8441
8441
|
for (var e = [].concat(t.backtrack), r = e.length - 1; r >= 0; r--) {
|
|
8442
8442
|
var n = e[r], a = ma(n), s = Te(n);
|
|
8443
8443
|
if (!a && !s)
|
|
@@ -8447,7 +8447,7 @@ function ku(t) {
|
|
|
8447
8447
|
}
|
|
8448
8448
|
return !1;
|
|
8449
8449
|
}
|
|
8450
|
-
function
|
|
8450
|
+
function Tu(t) {
|
|
8451
8451
|
if (ma(t.current))
|
|
8452
8452
|
return !1;
|
|
8453
8453
|
for (var e = 0; e < t.lookahead.length; e++) {
|
|
@@ -8457,7 +8457,7 @@ function Fu(t) {
|
|
|
8457
8457
|
}
|
|
8458
8458
|
return !1;
|
|
8459
8459
|
}
|
|
8460
|
-
function
|
|
8460
|
+
function wu(t) {
|
|
8461
8461
|
var e = this, r = "arab", n = this.featuresTags[r], a = this.tokenizer.getRangeTokens(t);
|
|
8462
8462
|
if (a.length !== 1) {
|
|
8463
8463
|
var s = new oe(
|
|
@@ -8479,7 +8479,7 @@ function Tu(t) {
|
|
|
8479
8479
|
if (!Te(o.char)) {
|
|
8480
8480
|
s.setCurrentIndex(u), i.setCurrentIndex(u);
|
|
8481
8481
|
var l = 0;
|
|
8482
|
-
|
|
8482
|
+
Fu(i) && (l |= 1), Tu(i) && (l |= 2);
|
|
8483
8483
|
var h;
|
|
8484
8484
|
switch (l) {
|
|
8485
8485
|
case 1:
|
|
@@ -8514,7 +8514,7 @@ function ln(t, e) {
|
|
|
8514
8514
|
});
|
|
8515
8515
|
return new oe(r, 0);
|
|
8516
8516
|
}
|
|
8517
|
-
function
|
|
8517
|
+
function Cu(t) {
|
|
8518
8518
|
var e = this, r = "arab", n = this.tokenizer.getRangeTokens(t), a = ln(n);
|
|
8519
8519
|
a.context.forEach(function(s, i) {
|
|
8520
8520
|
a.setCurrentIndex(i);
|
|
@@ -8530,7 +8530,7 @@ function wu(t) {
|
|
|
8530
8530
|
), a = ln(n));
|
|
8531
8531
|
});
|
|
8532
8532
|
}
|
|
8533
|
-
function
|
|
8533
|
+
function Eu(t) {
|
|
8534
8534
|
var e = t.current, r = t.get(-1);
|
|
8535
8535
|
return (
|
|
8536
8536
|
// ? latin first char
|
|
@@ -8538,7 +8538,7 @@ function Cu(t) {
|
|
|
8538
8538
|
!ht(r) && ht(e)
|
|
8539
8539
|
);
|
|
8540
8540
|
}
|
|
8541
|
-
function
|
|
8541
|
+
function Ou(t) {
|
|
8542
8542
|
var e = t.get(1);
|
|
8543
8543
|
return (
|
|
8544
8544
|
// ? last latin char
|
|
@@ -8546,9 +8546,9 @@ function Eu(t) {
|
|
|
8546
8546
|
!ht(e)
|
|
8547
8547
|
);
|
|
8548
8548
|
}
|
|
8549
|
-
var
|
|
8550
|
-
startCheck:
|
|
8551
|
-
endCheck:
|
|
8549
|
+
var Uu = {
|
|
8550
|
+
startCheck: Eu,
|
|
8551
|
+
endCheck: Ou
|
|
8552
8552
|
};
|
|
8553
8553
|
function hn(t, e) {
|
|
8554
8554
|
var r = t.map(function(n) {
|
|
@@ -8556,7 +8556,7 @@ function hn(t, e) {
|
|
|
8556
8556
|
});
|
|
8557
8557
|
return new oe(r, 0);
|
|
8558
8558
|
}
|
|
8559
|
-
function
|
|
8559
|
+
function Lu(t) {
|
|
8560
8560
|
var e = this, r = "latn", n = this.tokenizer.getRangeTokens(t), a = hn(n);
|
|
8561
8561
|
a.context.forEach(function(s, i) {
|
|
8562
8562
|
a.setCurrentIndex(i);
|
|
@@ -8579,9 +8579,9 @@ he.prototype.setText = function(t) {
|
|
|
8579
8579
|
this.text = t;
|
|
8580
8580
|
};
|
|
8581
8581
|
he.prototype.contextChecks = {
|
|
8582
|
-
latinWordCheck:
|
|
8583
|
-
arabicWordCheck:
|
|
8584
|
-
arabicSentenceCheck:
|
|
8582
|
+
latinWordCheck: Uu,
|
|
8583
|
+
arabicWordCheck: gu,
|
|
8584
|
+
arabicSentenceCheck: yu
|
|
8585
8585
|
};
|
|
8586
8586
|
function Mt(t) {
|
|
8587
8587
|
var e = this.contextChecks[t + "Check"];
|
|
@@ -8591,10 +8591,10 @@ function Mt(t) {
|
|
|
8591
8591
|
e.endCheck
|
|
8592
8592
|
);
|
|
8593
8593
|
}
|
|
8594
|
-
function
|
|
8594
|
+
function Ru() {
|
|
8595
8595
|
return Mt.call(this, "latinWord"), Mt.call(this, "arabicWord"), Mt.call(this, "arabicSentence"), this.tokenizer.tokenize(this.text);
|
|
8596
8596
|
}
|
|
8597
|
-
function
|
|
8597
|
+
function Au() {
|
|
8598
8598
|
var t = this, e = this.tokenizer.getContextRanges("arabicSentence");
|
|
8599
8599
|
e.forEach(function(r) {
|
|
8600
8600
|
var n = t.tokenizer.getRangeTokens(r);
|
|
@@ -8633,17 +8633,17 @@ function fr() {
|
|
|
8633
8633
|
"glyphIndex modifier is required to apply arabic presentation features."
|
|
8634
8634
|
);
|
|
8635
8635
|
}
|
|
8636
|
-
function
|
|
8636
|
+
function Mu() {
|
|
8637
8637
|
var t = this, e = "arab";
|
|
8638
8638
|
if (this.featuresTags.hasOwnProperty(e)) {
|
|
8639
8639
|
fr.call(this);
|
|
8640
8640
|
var r = this.tokenizer.getContextRanges("arabicWord");
|
|
8641
8641
|
r.forEach(function(n) {
|
|
8642
|
-
|
|
8642
|
+
wu.call(t, n);
|
|
8643
8643
|
});
|
|
8644
8644
|
}
|
|
8645
8645
|
}
|
|
8646
|
-
function
|
|
8646
|
+
function Pu() {
|
|
8647
8647
|
var t = this, e = "arab";
|
|
8648
8648
|
if (this.featuresTags.hasOwnProperty(e)) {
|
|
8649
8649
|
var r = this.featuresTags[e];
|
|
@@ -8651,12 +8651,12 @@ function Mu() {
|
|
|
8651
8651
|
fr.call(this);
|
|
8652
8652
|
var n = this.tokenizer.getContextRanges("arabicWord");
|
|
8653
8653
|
n.forEach(function(a) {
|
|
8654
|
-
|
|
8654
|
+
Cu.call(t, a);
|
|
8655
8655
|
});
|
|
8656
8656
|
}
|
|
8657
8657
|
}
|
|
8658
8658
|
}
|
|
8659
|
-
function
|
|
8659
|
+
function Bu() {
|
|
8660
8660
|
var t = this, e = "latn";
|
|
8661
8661
|
if (this.featuresTags.hasOwnProperty(e)) {
|
|
8662
8662
|
var r = this.featuresTags[e];
|
|
@@ -8664,7 +8664,7 @@ function Pu() {
|
|
|
8664
8664
|
fr.call(this);
|
|
8665
8665
|
var n = this.tokenizer.getContextRanges("latinWord");
|
|
8666
8666
|
n.forEach(function(a) {
|
|
8667
|
-
|
|
8667
|
+
Lu.call(t, a);
|
|
8668
8668
|
});
|
|
8669
8669
|
}
|
|
8670
8670
|
}
|
|
@@ -8673,10 +8673,10 @@ he.prototype.checkContextReady = function(t) {
|
|
|
8673
8673
|
return !!this.tokenizer.getContext(t);
|
|
8674
8674
|
};
|
|
8675
8675
|
he.prototype.applyFeaturesToContexts = function() {
|
|
8676
|
-
this.checkContextReady("arabicWord") && (
|
|
8676
|
+
this.checkContextReady("arabicWord") && (Mu.call(this), Pu.call(this)), this.checkContextReady("latinWord") && Bu.call(this), this.checkContextReady("arabicSentence") && Au.call(this);
|
|
8677
8677
|
};
|
|
8678
8678
|
he.prototype.processText = function(t) {
|
|
8679
|
-
(!this.text || this.text !== t) && (this.setText(t),
|
|
8679
|
+
(!this.text || this.text !== t) && (this.setText(t), Ru.call(this), this.applyFeaturesToContexts());
|
|
8680
8680
|
};
|
|
8681
8681
|
he.prototype.getBidiText = function(t) {
|
|
8682
8682
|
return this.processText(t), this.tokenizer.getText();
|
|
@@ -8845,7 +8845,7 @@ P.prototype.validate = function() {
|
|
|
8845
8845
|
r("fontFamily"), r("weightName"), r("manufacturer"), r("copyright"), r("version"), this.unitsPerEm > 0;
|
|
8846
8846
|
};
|
|
8847
8847
|
P.prototype.toTables = function() {
|
|
8848
|
-
return
|
|
8848
|
+
return Si.fontToTable(this);
|
|
8849
8849
|
};
|
|
8850
8850
|
P.prototype.toBuffer = function() {
|
|
8851
8851
|
return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."), this.toArrayBuffer();
|
|
@@ -8859,7 +8859,7 @@ P.prototype.download = function(t) {
|
|
|
8859
8859
|
var e = this.getEnglishName("fontFamily"), r = this.getEnglishName("fontSubfamily");
|
|
8860
8860
|
t = t || e.replace(/\s/g, "") + "-" + r + ".otf";
|
|
8861
8861
|
var n = this.toArrayBuffer();
|
|
8862
|
-
if (
|
|
8862
|
+
if (Fi())
|
|
8863
8863
|
if (window.URL = window.URL || window.webkitURL, window.URL) {
|
|
8864
8864
|
var a = new DataView(n), s = new Blob([a], { type: "font/opentype" }), i = document.createElement("a");
|
|
8865
8865
|
i.href = window.URL.createObjectURL(s), i.download = t;
|
|
@@ -8868,7 +8868,7 @@ P.prototype.download = function(t) {
|
|
|
8868
8868
|
} else
|
|
8869
8869
|
console.warn("Font file could not be downloaded. Try using a different browser.");
|
|
8870
8870
|
else {
|
|
8871
|
-
var u = require("fs"), l =
|
|
8871
|
+
var u = require("fs"), l = Ti(n);
|
|
8872
8872
|
u.writeFileSync(t, l);
|
|
8873
8873
|
}
|
|
8874
8874
|
};
|
|
@@ -8928,7 +8928,7 @@ function ya(t, e) {
|
|
|
8928
8928
|
}
|
|
8929
8929
|
return e[n] = t, n;
|
|
8930
8930
|
}
|
|
8931
|
-
function
|
|
8931
|
+
function Iu(t, e, r) {
|
|
8932
8932
|
var n = ya(e.name, r);
|
|
8933
8933
|
return [
|
|
8934
8934
|
{ name: "tag_" + t, type: "TAG", value: e.tag },
|
|
@@ -8939,11 +8939,11 @@ function Bu(t, e, r) {
|
|
|
8939
8939
|
{ name: "nameID_" + t, type: "USHORT", value: n }
|
|
8940
8940
|
];
|
|
8941
8941
|
}
|
|
8942
|
-
function
|
|
8942
|
+
function Du(t, e, r) {
|
|
8943
8943
|
var n = {}, a = new E.Parser(t, e);
|
|
8944
8944
|
return n.tag = a.parseTag(), n.minValue = a.parseFixed(), n.defaultValue = a.parseFixed(), n.maxValue = a.parseFixed(), a.skip("uShort", 1), n.name = r[a.parseUShort()] || {}, n;
|
|
8945
8945
|
}
|
|
8946
|
-
function
|
|
8946
|
+
function Gu(t, e, r, n) {
|
|
8947
8947
|
for (var a = ya(e.name, n), s = [
|
|
8948
8948
|
{ name: "nameID_" + t, type: "USHORT", value: a },
|
|
8949
8949
|
{ name: "flags_" + t, type: "USHORT", value: 0 }
|
|
@@ -8957,14 +8957,14 @@ function Du(t, e, r, n) {
|
|
|
8957
8957
|
}
|
|
8958
8958
|
return s;
|
|
8959
8959
|
}
|
|
8960
|
-
function
|
|
8960
|
+
function Nu(t, e, r, n) {
|
|
8961
8961
|
var a = {}, s = new E.Parser(t, e);
|
|
8962
8962
|
a.name = n[s.parseUShort()] || {}, s.skip("uShort", 1), a.coordinates = {};
|
|
8963
8963
|
for (var i = 0; i < r.length; ++i)
|
|
8964
8964
|
a.coordinates[r[i].tag] = s.parseFixed();
|
|
8965
8965
|
return a;
|
|
8966
8966
|
}
|
|
8967
|
-
function
|
|
8967
|
+
function _u(t, e) {
|
|
8968
8968
|
var r = new F.Table("fvar", [
|
|
8969
8969
|
{ name: "version", type: "ULONG", value: 65536 },
|
|
8970
8970
|
{ name: "offsetToData", type: "USHORT", value: 0 },
|
|
@@ -8976,28 +8976,28 @@ function Nu(t, e) {
|
|
|
8976
8976
|
]);
|
|
8977
8977
|
r.offsetToData = r.sizeOf();
|
|
8978
8978
|
for (var n = 0; n < t.axes.length; n++)
|
|
8979
|
-
r.fields = r.fields.concat(
|
|
8979
|
+
r.fields = r.fields.concat(Iu(n, t.axes[n], e));
|
|
8980
8980
|
for (var a = 0; a < t.instances.length; a++)
|
|
8981
|
-
r.fields = r.fields.concat(
|
|
8981
|
+
r.fields = r.fields.concat(Gu(a, t.instances[a], t.axes, e));
|
|
8982
8982
|
return r;
|
|
8983
8983
|
}
|
|
8984
|
-
function
|
|
8984
|
+
function Hu(t, e, r) {
|
|
8985
8985
|
var n = new E.Parser(t, e), a = n.parseULong();
|
|
8986
8986
|
U.argument(a === 65536, "Unsupported fvar table version.");
|
|
8987
8987
|
var s = n.parseOffset16();
|
|
8988
8988
|
n.skip("uShort", 1);
|
|
8989
8989
|
for (var i = n.parseUShort(), o = n.parseUShort(), u = n.parseUShort(), l = n.parseUShort(), h = [], f = 0; f < i; f++)
|
|
8990
|
-
h.push(
|
|
8990
|
+
h.push(Du(t, e + s + f * o, r));
|
|
8991
8991
|
for (var c = [], p = e + s + i * o, d = 0; d < u; d++)
|
|
8992
|
-
c.push(
|
|
8992
|
+
c.push(Nu(t, p + d * l, h, r));
|
|
8993
8993
|
return { axes: h, instances: c };
|
|
8994
8994
|
}
|
|
8995
|
-
var
|
|
8995
|
+
var zu = { make: _u, parse: Hu }, Wu = function() {
|
|
8996
8996
|
return {
|
|
8997
8997
|
coverage: this.parsePointer(g.coverage),
|
|
8998
8998
|
attachPoints: this.parseList(g.pointer(g.uShortList))
|
|
8999
8999
|
};
|
|
9000
|
-
},
|
|
9000
|
+
}, Vu = function() {
|
|
9001
9001
|
var t = this.parseUShort();
|
|
9002
9002
|
if (U.argument(
|
|
9003
9003
|
t === 1 || t === 2 || t === 3,
|
|
@@ -9008,17 +9008,17 @@ var Hu = { make: Nu, parse: _u }, zu = function() {
|
|
|
9008
9008
|
return { pointindex: this.parseShort() };
|
|
9009
9009
|
if (t === 3)
|
|
9010
9010
|
return { coordinate: this.parseShort() };
|
|
9011
|
-
}, Vu = function() {
|
|
9012
|
-
return this.parseList(g.pointer(Wu));
|
|
9013
9011
|
}, qu = function() {
|
|
9012
|
+
return this.parseList(g.pointer(Vu));
|
|
9013
|
+
}, Xu = function() {
|
|
9014
9014
|
return {
|
|
9015
9015
|
coverage: this.parsePointer(g.coverage),
|
|
9016
|
-
ligGlyphs: this.parseList(g.pointer(
|
|
9016
|
+
ligGlyphs: this.parseList(g.pointer(qu))
|
|
9017
9017
|
};
|
|
9018
|
-
},
|
|
9018
|
+
}, Yu = function() {
|
|
9019
9019
|
return this.parseUShort(), this.parseList(g.pointer(g.coverage));
|
|
9020
9020
|
};
|
|
9021
|
-
function
|
|
9021
|
+
function Zu(t, e) {
|
|
9022
9022
|
e = e || 0;
|
|
9023
9023
|
var r = new g(t, e), n = r.parseVersion(1);
|
|
9024
9024
|
U.argument(
|
|
@@ -9028,13 +9028,13 @@ function Yu(t, e) {
|
|
|
9028
9028
|
var a = {
|
|
9029
9029
|
version: n,
|
|
9030
9030
|
classDef: r.parsePointer(g.classDef),
|
|
9031
|
-
attachList: r.parsePointer(
|
|
9032
|
-
ligCaretList: r.parsePointer(
|
|
9031
|
+
attachList: r.parsePointer(Wu),
|
|
9032
|
+
ligCaretList: r.parsePointer(Xu),
|
|
9033
9033
|
markAttachClassDef: r.parsePointer(g.classDef)
|
|
9034
9034
|
};
|
|
9035
|
-
return n >= 1.2 && (a.markGlyphSets = r.parsePointer(
|
|
9035
|
+
return n >= 1.2 && (a.markGlyphSets = r.parsePointer(Yu)), a;
|
|
9036
9036
|
}
|
|
9037
|
-
var
|
|
9037
|
+
var ju = { parse: Zu }, ue = new Array(10);
|
|
9038
9038
|
ue[1] = function() {
|
|
9039
9039
|
var e = this.offset + this.relativeOffset, r = this.parseUShort();
|
|
9040
9040
|
if (r === 1)
|
|
@@ -9112,7 +9112,7 @@ ue[8] = function() {
|
|
|
9112
9112
|
ue[9] = function() {
|
|
9113
9113
|
return { error: "GPOS Lookup 9 not supported" };
|
|
9114
9114
|
};
|
|
9115
|
-
function
|
|
9115
|
+
function Ku(t, e) {
|
|
9116
9116
|
e = e || 0;
|
|
9117
9117
|
var r = new g(t, e), n = r.parseVersion(1);
|
|
9118
9118
|
return U.argument(n === 1 || n === 1.1, "Unsupported GPOS table version " + n), n === 1 ? {
|
|
@@ -9128,17 +9128,17 @@ function ju(t, e) {
|
|
|
9128
9128
|
variations: r.parseFeatureVariationsList()
|
|
9129
9129
|
};
|
|
9130
9130
|
}
|
|
9131
|
-
var
|
|
9132
|
-
function
|
|
9131
|
+
var Qu = new Array(10);
|
|
9132
|
+
function $u(t) {
|
|
9133
9133
|
return new F.Table("GPOS", [
|
|
9134
9134
|
{ name: "version", type: "ULONG", value: 65536 },
|
|
9135
9135
|
{ name: "scripts", type: "TABLE", value: new F.ScriptList(t.scripts) },
|
|
9136
9136
|
{ name: "features", type: "TABLE", value: new F.FeatureList(t.features) },
|
|
9137
|
-
{ name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups,
|
|
9137
|
+
{ name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups, Qu) }
|
|
9138
9138
|
]);
|
|
9139
9139
|
}
|
|
9140
|
-
var
|
|
9141
|
-
function
|
|
9140
|
+
var Ju = { parse: Ku, make: $u };
|
|
9141
|
+
function el(t) {
|
|
9142
9142
|
var e = {};
|
|
9143
9143
|
t.skip("uShort");
|
|
9144
9144
|
var r = t.parseUShort();
|
|
@@ -9151,7 +9151,7 @@ function Ju(t) {
|
|
|
9151
9151
|
}
|
|
9152
9152
|
return e;
|
|
9153
9153
|
}
|
|
9154
|
-
function
|
|
9154
|
+
function tl(t) {
|
|
9155
9155
|
var e = {};
|
|
9156
9156
|
t.skip("uShort");
|
|
9157
9157
|
var r = t.parseULong();
|
|
@@ -9167,23 +9167,23 @@ function el(t) {
|
|
|
9167
9167
|
}
|
|
9168
9168
|
return e;
|
|
9169
9169
|
}
|
|
9170
|
-
function
|
|
9170
|
+
function rl(t, e) {
|
|
9171
9171
|
var r = new E.Parser(t, e), n = r.parseUShort();
|
|
9172
9172
|
if (n === 0)
|
|
9173
|
-
return Ju(r);
|
|
9174
|
-
if (n === 1)
|
|
9175
9173
|
return el(r);
|
|
9174
|
+
if (n === 1)
|
|
9175
|
+
return tl(r);
|
|
9176
9176
|
throw new Error("Unsupported kern table version (" + n + ").");
|
|
9177
9177
|
}
|
|
9178
|
-
var
|
|
9179
|
-
function
|
|
9178
|
+
var nl = { parse: rl };
|
|
9179
|
+
function al(t, e, r, n) {
|
|
9180
9180
|
for (var a = new E.Parser(t, e), s = n ? a.parseUShort : a.parseULong, i = [], o = 0; o < r + 1; o += 1) {
|
|
9181
9181
|
var u = s.call(a);
|
|
9182
9182
|
n && (u *= 2), i.push(u);
|
|
9183
9183
|
}
|
|
9184
9184
|
return i;
|
|
9185
9185
|
}
|
|
9186
|
-
var
|
|
9186
|
+
var sl = { parse: al };
|
|
9187
9187
|
function cn(t, e) {
|
|
9188
9188
|
for (var r = [], n = 12, a = 0; a < e; a += 1) {
|
|
9189
9189
|
var s = E.getTag(t, n), i = E.getULong(t, n + 4), o = E.getULong(t, n + 8), u = E.getULong(t, n + 12);
|
|
@@ -9191,7 +9191,7 @@ function cn(t, e) {
|
|
|
9191
9191
|
}
|
|
9192
9192
|
return r;
|
|
9193
9193
|
}
|
|
9194
|
-
function
|
|
9194
|
+
function il(t, e) {
|
|
9195
9195
|
for (var r = [], n = 44, a = 0; a < e; a += 1) {
|
|
9196
9196
|
var s = E.getTag(t, n), i = E.getULong(t, n + 4), o = E.getULong(t, n + 8), u = E.getULong(t, n + 12), l = void 0;
|
|
9197
9197
|
o < u ? l = "WOFF" : l = !1, r.push({
|
|
@@ -9207,14 +9207,14 @@ function sl(t, e) {
|
|
|
9207
9207
|
function H(t, e) {
|
|
9208
9208
|
if (e.compression === "WOFF") {
|
|
9209
9209
|
var r = new Uint8Array(t.buffer, e.offset + 2, e.compressedLength - 2), n = new Uint8Array(e.length);
|
|
9210
|
-
if (
|
|
9210
|
+
if ($a(r, n), n.byteLength !== e.length)
|
|
9211
9211
|
throw new Error("Decompression error: " + e.tag + " decompressed length doesn't match recorded length");
|
|
9212
9212
|
var a = new DataView(n.buffer, 0);
|
|
9213
9213
|
return { data: a, offset: 0 };
|
|
9214
9214
|
} else
|
|
9215
9215
|
return { data: t, offset: e.offset };
|
|
9216
9216
|
}
|
|
9217
|
-
function
|
|
9217
|
+
function ol(t, e) {
|
|
9218
9218
|
e = e ?? {};
|
|
9219
9219
|
var r, n, a = new P({ empty: !0 }), s = new DataView(t, 0), i, o = [], u = E.getTag(s, 0);
|
|
9220
9220
|
if (u === "\0\0\0" || u === "true" || u === "typ1")
|
|
@@ -9229,7 +9229,7 @@ function il(t, e) {
|
|
|
9229
9229
|
a.outlinesFormat = "cff";
|
|
9230
9230
|
else
|
|
9231
9231
|
throw new Error("Unsupported OpenType flavor " + u);
|
|
9232
|
-
i = E.getUShort(s, 12), o =
|
|
9232
|
+
i = E.getUShort(s, 12), o = il(s, i);
|
|
9233
9233
|
} else
|
|
9234
9234
|
throw new Error("Unsupported OpenType signature " + u);
|
|
9235
9235
|
for (var h, f, c, p, d, v, y, m, b, x, T, S, A = 0; A < i; A += 1) {
|
|
@@ -9302,7 +9302,7 @@ function il(t, e) {
|
|
|
9302
9302
|
}
|
|
9303
9303
|
var M = H(s, x);
|
|
9304
9304
|
if (a.tables.name = ra.parse(M.data, M.offset, n), a.names = a.tables.name, c && b) {
|
|
9305
|
-
var N = r === 0, K = H(s, b), $ =
|
|
9305
|
+
var N = r === 0, K = H(s, b), $ = sl.parse(K.data, K.offset, a.numGlyphs, N), Y = H(s, c);
|
|
9306
9306
|
a.glyphs = ha.parse(Y.data, Y.offset, $, a, e);
|
|
9307
9307
|
} else if (h) {
|
|
9308
9308
|
var I = H(s, h);
|
|
@@ -9310,18 +9310,18 @@ function il(t, e) {
|
|
|
9310
9310
|
} else
|
|
9311
9311
|
throw new Error("Font doesn't contain TrueType or CFF outlines.");
|
|
9312
9312
|
var _ = H(s, y);
|
|
9313
|
-
if (jn.parse(a, _.data, _.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, e),
|
|
9313
|
+
if (jn.parse(a, _.data, _.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, e), xs(a, e), m) {
|
|
9314
9314
|
var D = H(s, m);
|
|
9315
|
-
a.kerningPairs =
|
|
9315
|
+
a.kerningPairs = nl.parse(D.data, D.offset);
|
|
9316
9316
|
} else
|
|
9317
9317
|
a.kerningPairs = {};
|
|
9318
9318
|
if (p) {
|
|
9319
9319
|
var W = H(s, p);
|
|
9320
|
-
a.tables.gdef =
|
|
9320
|
+
a.tables.gdef = ju.parse(W.data, W.offset);
|
|
9321
9321
|
}
|
|
9322
9322
|
if (d) {
|
|
9323
9323
|
var Z = H(s, d);
|
|
9324
|
-
a.tables.gpos =
|
|
9324
|
+
a.tables.gpos = Ju.parse(Z.data, Z.offset), a.position.init();
|
|
9325
9325
|
}
|
|
9326
9326
|
if (v) {
|
|
9327
9327
|
var q = H(s, v);
|
|
@@ -9329,7 +9329,7 @@ function il(t, e) {
|
|
|
9329
9329
|
}
|
|
9330
9330
|
if (f) {
|
|
9331
9331
|
var Q = H(s, f);
|
|
9332
|
-
a.tables.fvar =
|
|
9332
|
+
a.tables.fvar = zu.parse(Q.data, Q.offset, a.names);
|
|
9333
9333
|
}
|
|
9334
9334
|
if (T) {
|
|
9335
9335
|
var B = H(s, T);
|
|
@@ -9337,7 +9337,7 @@ function il(t, e) {
|
|
|
9337
9337
|
}
|
|
9338
9338
|
return a;
|
|
9339
9339
|
}
|
|
9340
|
-
function
|
|
9340
|
+
function ul(t) {
|
|
9341
9341
|
return ((r, n) => {
|
|
9342
9342
|
const a = Math.round, s = {}, i = r.encoding.cmap.glyphIndexMap, o = Object.keys(i), u = r.glyphs.glyphs[i[65]];
|
|
9343
9343
|
let l = 1;
|
|
@@ -9373,9 +9373,9 @@ function ol(t) {
|
|
|
9373
9373
|
scaleFactor: l,
|
|
9374
9374
|
original_font_information: r.tables.name
|
|
9375
9375
|
};
|
|
9376
|
-
})(
|
|
9376
|
+
})(ol(t));
|
|
9377
9377
|
}
|
|
9378
|
-
class
|
|
9378
|
+
class ll extends Ta {
|
|
9379
9379
|
constructor(e, r = {}) {
|
|
9380
9380
|
const n = r.font;
|
|
9381
9381
|
if (n === void 0)
|
|
@@ -9467,7 +9467,7 @@ function pn(t) {
|
|
|
9467
9467
|
return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."), null;
|
|
9468
9468
|
s += h.count * r;
|
|
9469
9469
|
}
|
|
9470
|
-
const i = new e(s), o = new
|
|
9470
|
+
const i = new e(s), o = new wa(i, r, n);
|
|
9471
9471
|
let u = 0;
|
|
9472
9472
|
for (let l = 0; l < t.length; ++l) {
|
|
9473
9473
|
const h = t[l];
|
|
@@ -9484,7 +9484,7 @@ function pn(t) {
|
|
|
9484
9484
|
}
|
|
9485
9485
|
return a !== void 0 && (o.gpuType = a), o;
|
|
9486
9486
|
}
|
|
9487
|
-
function
|
|
9487
|
+
function hl(t, e = 1e-4) {
|
|
9488
9488
|
e = Math.max(e, Number.EPSILON);
|
|
9489
9489
|
const r = {}, n = t.getIndex(), a = t.getAttribute("position"), s = n ? n.count : a.count;
|
|
9490
9490
|
let i = 0;
|
|
@@ -9593,7 +9593,7 @@ const mr = class mr {
|
|
|
9593
9593
|
};
|
|
9594
9594
|
mr.originalComputeVertexNormals = ut.prototype.computeVertexNormals;
|
|
9595
9595
|
let tr = mr;
|
|
9596
|
-
const Ee = new
|
|
9596
|
+
const Ee = new R.Vector2();
|
|
9597
9597
|
class dn extends Fn {
|
|
9598
9598
|
constructor(e, r, n) {
|
|
9599
9599
|
super(e), this.isFound = !1, this.fontSize = r, this.font = n, this.width = this.getCharWidth(e, r, n);
|
|
@@ -9606,7 +9606,7 @@ class dn extends Fn {
|
|
|
9606
9606
|
toGeometry() {
|
|
9607
9607
|
let e = this.font.cache.getGeometry(this.char, this.fontSize);
|
|
9608
9608
|
return e == null && (e = tr.runWithoutNormals(() => {
|
|
9609
|
-
const r = new
|
|
9609
|
+
const r = new ll(this.char, {
|
|
9610
9610
|
font: this.font.font,
|
|
9611
9611
|
depth: 0,
|
|
9612
9612
|
size: this.fontSize,
|
|
@@ -9620,7 +9620,7 @@ class dn extends Fn {
|
|
|
9620
9620
|
generateSideWallUV: () => [Ee, Ee, Ee, Ee]
|
|
9621
9621
|
}
|
|
9622
9622
|
});
|
|
9623
|
-
return r.hasAttribute("uv") && r.deleteAttribute("uv"), r.hasAttribute("normal") && r.deleteAttribute("normal"),
|
|
9623
|
+
return r.hasAttribute("uv") && r.deleteAttribute("uv"), r.hasAttribute("normal") && r.deleteAttribute("normal"), hl(r, 1e-6);
|
|
9624
9624
|
})), e;
|
|
9625
9625
|
}
|
|
9626
9626
|
/**
|
|
@@ -9641,7 +9641,7 @@ class gn extends kn {
|
|
|
9641
9641
|
* @param data - Either a MeshFontData object containing font information or an ArrayBuffer containing raw font data
|
|
9642
9642
|
*/
|
|
9643
9643
|
constructor(e) {
|
|
9644
|
-
super(), this.type = "mesh", e instanceof ArrayBuffer ? this.data =
|
|
9644
|
+
super(), this.type = "mesh", e instanceof ArrayBuffer ? this.data = ul(e) : this.data = e, this.font = new za(this.data);
|
|
9645
9645
|
}
|
|
9646
9646
|
/**
|
|
9647
9647
|
* Return true if this font contains glyph of the specified character. Otherwise, return false.
|
|
@@ -9848,7 +9848,7 @@ class J {
|
|
|
9848
9848
|
}
|
|
9849
9849
|
}
|
|
9850
9850
|
var te = /* @__PURE__ */ ((t) => (t.SHAPES = "shapes", t.BIGFONT = "bigfont", t.UNIFONT = "unifont", t))(te || {});
|
|
9851
|
-
let
|
|
9851
|
+
let cl = class {
|
|
9852
9852
|
parse(e) {
|
|
9853
9853
|
const r = this.parseHeader(e).split(" "), n = r[1].toLocaleLowerCase();
|
|
9854
9854
|
if (!Object.values(te).includes(n))
|
|
@@ -9875,7 +9875,7 @@ let hl = class {
|
|
|
9875
9875
|
return r.trim();
|
|
9876
9876
|
}
|
|
9877
9877
|
};
|
|
9878
|
-
class
|
|
9878
|
+
class fl {
|
|
9879
9879
|
parse(e) {
|
|
9880
9880
|
try {
|
|
9881
9881
|
e.readBytes(4);
|
|
@@ -9927,7 +9927,7 @@ class cl {
|
|
|
9927
9927
|
}
|
|
9928
9928
|
}
|
|
9929
9929
|
}
|
|
9930
|
-
class
|
|
9930
|
+
class pl {
|
|
9931
9931
|
parse(e) {
|
|
9932
9932
|
try {
|
|
9933
9933
|
e.readInt16();
|
|
@@ -10012,7 +10012,7 @@ class fl {
|
|
|
10012
10012
|
return r;
|
|
10013
10013
|
}
|
|
10014
10014
|
}
|
|
10015
|
-
class
|
|
10015
|
+
class dl {
|
|
10016
10016
|
parse(e) {
|
|
10017
10017
|
try {
|
|
10018
10018
|
const r = e.readInt32();
|
|
@@ -10058,15 +10058,15 @@ class pl {
|
|
|
10058
10058
|
}
|
|
10059
10059
|
}
|
|
10060
10060
|
}
|
|
10061
|
-
class
|
|
10061
|
+
class gl {
|
|
10062
10062
|
static createParser(e) {
|
|
10063
10063
|
switch (e) {
|
|
10064
10064
|
case te.SHAPES:
|
|
10065
|
-
return new cl();
|
|
10066
|
-
case te.BIGFONT:
|
|
10067
10065
|
return new fl();
|
|
10068
|
-
case te.
|
|
10066
|
+
case te.BIGFONT:
|
|
10069
10067
|
return new pl();
|
|
10068
|
+
case te.UNIFONT:
|
|
10069
|
+
return new dl();
|
|
10070
10070
|
default:
|
|
10071
10071
|
throw new Error(`Unsupported font type: ${e}`);
|
|
10072
10072
|
}
|
|
@@ -10313,8 +10313,8 @@ let Pt = class xa {
|
|
|
10313
10313
|
return `<svg width="100%" height="100%" viewBox="${s}" preserveAspectRatio="xMidYMid meet">${i}</svg>`;
|
|
10314
10314
|
}
|
|
10315
10315
|
};
|
|
10316
|
-
const
|
|
10317
|
-
let
|
|
10316
|
+
const vl = Math.PI / 18, mn = 12;
|
|
10317
|
+
let ml = class {
|
|
10318
10318
|
constructor(e) {
|
|
10319
10319
|
this.shapeCache = /* @__PURE__ */ new Map(), this.shapeData = /* @__PURE__ */ new Map(), this.fontData = e;
|
|
10320
10320
|
}
|
|
@@ -10548,7 +10548,7 @@ let vl = class {
|
|
|
10548
10548
|
let c = h & 7;
|
|
10549
10549
|
c === 0 && (c = 8), i !== 0 && c--;
|
|
10550
10550
|
const p = Math.PI / 4;
|
|
10551
|
-
let d = p * c, v =
|
|
10551
|
+
let d = p * c, v = vl, y = 1;
|
|
10552
10552
|
h < 0 && (v = -v, d = -d, y = -1);
|
|
10553
10553
|
let m = p * f, b = m + d;
|
|
10554
10554
|
m += p * s / 256 * y, b += p * i / 256 * y;
|
|
@@ -10703,7 +10703,7 @@ let vl = class {
|
|
|
10703
10703
|
return o.add(r), o;
|
|
10704
10704
|
}
|
|
10705
10705
|
};
|
|
10706
|
-
class
|
|
10706
|
+
class yl {
|
|
10707
10707
|
/**
|
|
10708
10708
|
* Creates a new ShxFont instance.
|
|
10709
10709
|
* @param data - Either raw binary data of the SHX font file (ArrayBuffer) or pre-parsed font data (ShxFontData)
|
|
@@ -10711,14 +10711,14 @@ class ml {
|
|
|
10711
10711
|
*/
|
|
10712
10712
|
constructor(e) {
|
|
10713
10713
|
if (e instanceof ArrayBuffer) {
|
|
10714
|
-
const r = new J(e), n = new
|
|
10714
|
+
const r = new J(e), n = new cl().parse(r), a = gl.createParser(n.fontType).parse(r);
|
|
10715
10715
|
this.fontData = {
|
|
10716
10716
|
header: n,
|
|
10717
10717
|
content: a
|
|
10718
10718
|
};
|
|
10719
10719
|
} else
|
|
10720
10720
|
this.fontData = e;
|
|
10721
|
-
this.shapeParser = new
|
|
10721
|
+
this.shapeParser = new ml(this.fontData);
|
|
10722
10722
|
}
|
|
10723
10723
|
/**
|
|
10724
10724
|
* Return true if this font contains glyph of the specified character. Otherwise, return false.
|
|
@@ -10775,7 +10775,7 @@ class pr extends Fn {
|
|
|
10775
10775
|
if (e == null) {
|
|
10776
10776
|
const r = this.shape.polylines, n = [], a = [];
|
|
10777
10777
|
let s = 0;
|
|
10778
|
-
e = new
|
|
10778
|
+
e = new R.BufferGeometry();
|
|
10779
10779
|
for (let i = 0; i < r.length; i++) {
|
|
10780
10780
|
const o = r[i];
|
|
10781
10781
|
for (let u = 0; u < o.length; u++) {
|
|
@@ -10785,7 +10785,7 @@ class pr extends Fn {
|
|
|
10785
10785
|
}
|
|
10786
10786
|
e.setAttribute(
|
|
10787
10787
|
"position",
|
|
10788
|
-
new
|
|
10788
|
+
new R.Float32BufferAttribute(n, 3)
|
|
10789
10789
|
), e.setIndex(a);
|
|
10790
10790
|
}
|
|
10791
10791
|
return e;
|
|
@@ -10793,7 +10793,7 @@ class pr extends Fn {
|
|
|
10793
10793
|
}
|
|
10794
10794
|
class yn extends kn {
|
|
10795
10795
|
constructor(e) {
|
|
10796
|
-
super(), this.type = "shx", this.font = new
|
|
10796
|
+
super(), this.type = "shx", this.font = new yl(e), this.data = this.font.fontData;
|
|
10797
10797
|
}
|
|
10798
10798
|
/**
|
|
10799
10799
|
* Return true if this font contains glyph of the specified character. Otherwise, return false.
|
|
@@ -10889,7 +10889,7 @@ class ke {
|
|
|
10889
10889
|
* @throws {Error} If the file type is not supported
|
|
10890
10890
|
*/
|
|
10891
10891
|
createFontFromBuffer(e, r) {
|
|
10892
|
-
const n =
|
|
10892
|
+
const n = Na(e).toLowerCase();
|
|
10893
10893
|
if (n === "shx")
|
|
10894
10894
|
return new yn(r);
|
|
10895
10895
|
if (["ttf", "otf", "woff"].includes(n))
|
|
@@ -10904,7 +10904,7 @@ class de {
|
|
|
10904
10904
|
fontNotFound: new xr(),
|
|
10905
10905
|
/** Event triggered when a font is successfully loaded */
|
|
10906
10906
|
fontLoaded: new xr()
|
|
10907
|
-
}, this.loader = new
|
|
10907
|
+
}, this.loader = new R.FileLoader(), this.loader.setResponseType("arraybuffer"), this.fileNames = [], this.fontLoader = new xl();
|
|
10908
10908
|
}
|
|
10909
10909
|
/**
|
|
10910
10910
|
* Gets the singleton instance of the FontManager
|
|
@@ -11148,7 +11148,7 @@ class de {
|
|
|
11148
11148
|
return e == null ? (this.fontMap.clear(), !0) : this.fontMap.delete(e);
|
|
11149
11149
|
}
|
|
11150
11150
|
}
|
|
11151
|
-
class
|
|
11151
|
+
class xl {
|
|
11152
11152
|
/**
|
|
11153
11153
|
* Creates a new instance of DefaultFontLoader
|
|
11154
11154
|
*/
|
|
@@ -11221,11 +11221,11 @@ class yl {
|
|
|
11221
11221
|
}
|
|
11222
11222
|
}
|
|
11223
11223
|
var Be = /* @__PURE__ */ ((t) => (t[t.NONE = 0] = "NONE", t[t.WORD = 1] = "WORD", t[t.STACK = 2] = "STACK", t[t.SPACE = 3] = "SPACE", t[t.NBSP = 4] = "NBSP", t[t.TABULATOR = 5] = "TABULATOR", t[t.NEW_PARAGRAPH = 6] = "NEW_PARAGRAPH", t[t.NEW_COLUMN = 7] = "NEW_COLUMN", t[t.WRAP_AT_DIMLINE = 8] = "WRAP_AT_DIMLINE", t[t.PROPERTIES_CHANGED = 9] = "PROPERTIES_CHANGED", t))(Be || {}), He = /* @__PURE__ */ ((t) => (t[t.BOTTOM = 0] = "BOTTOM", t[t.MIDDLE = 1] = "MIDDLE", t[t.TOP = 2] = "TOP", t))(He || {}), se = /* @__PURE__ */ ((t) => (t[t.DEFAULT = 0] = "DEFAULT", t[t.LEFT = 1] = "LEFT", t[t.RIGHT = 2] = "RIGHT", t[t.CENTER = 3] = "CENTER", t[t.JUSTIFIED = 4] = "JUSTIFIED", t[t.DISTRIBUTED = 5] = "DISTRIBUTED", t))(se || {});
|
|
11224
|
-
const
|
|
11224
|
+
const bl = {
|
|
11225
11225
|
c: "Ø",
|
|
11226
11226
|
d: "°",
|
|
11227
11227
|
p: "±"
|
|
11228
|
-
},
|
|
11228
|
+
}, Sl = {
|
|
11229
11229
|
l: 1,
|
|
11230
11230
|
r: 2,
|
|
11231
11231
|
c: 3,
|
|
@@ -11233,14 +11233,14 @@ const xl = {
|
|
|
11233
11233
|
d: 5
|
|
11234
11234
|
/* DISTRIBUTED */
|
|
11235
11235
|
};
|
|
11236
|
-
function
|
|
11236
|
+
function kl(t, e = !1) {
|
|
11237
11237
|
const r = /* @__PURE__ */ new Set(), n = /\\[fF](.*?)[;|]/g;
|
|
11238
11238
|
return [...t.matchAll(n)].forEach((a) => {
|
|
11239
11239
|
let s = a[1].toLowerCase();
|
|
11240
11240
|
e && (s = s.replace(/\.(ttf|otf|woff|shx)$/, "")), r.add(s);
|
|
11241
11241
|
}), r;
|
|
11242
11242
|
}
|
|
11243
|
-
class
|
|
11243
|
+
class Fl {
|
|
11244
11244
|
/**
|
|
11245
11245
|
* Creates a new ContextStack with an initial context.
|
|
11246
11246
|
* @param initial The initial MTextContext to use as the base of the stack.
|
|
@@ -11292,7 +11292,7 @@ class kl {
|
|
|
11292
11292
|
this.stack[this.stack.length - 1] = e;
|
|
11293
11293
|
}
|
|
11294
11294
|
}
|
|
11295
|
-
class
|
|
11295
|
+
class Tl {
|
|
11296
11296
|
/**
|
|
11297
11297
|
* Creates a new MTextParser instance
|
|
11298
11298
|
* @param content - The MText content to parse
|
|
@@ -11302,7 +11302,7 @@ class Fl {
|
|
|
11302
11302
|
constructor(e, r, n = {}) {
|
|
11303
11303
|
this.continueStroke = !1, this.inStackContext = !1, this.scanner = new Bt(e);
|
|
11304
11304
|
const a = r ?? new tt();
|
|
11305
|
-
this.ctxStack = new
|
|
11305
|
+
this.ctxStack = new Fl(a), this.yieldPropertyCommands = n.yieldPropertyCommands ?? !1, this.resetParagraphParameters = n.resetParagraphParameters ?? !1;
|
|
11306
11306
|
}
|
|
11307
11307
|
/**
|
|
11308
11308
|
* Decode multi-byte character from hex code
|
|
@@ -11657,7 +11657,7 @@ class Fl {
|
|
|
11657
11657
|
break;
|
|
11658
11658
|
case "q": {
|
|
11659
11659
|
const l = r.get();
|
|
11660
|
-
for (i =
|
|
11660
|
+
for (i = Sl[l] || 0; r.peek() === ","; )
|
|
11661
11661
|
r.consume(1);
|
|
11662
11662
|
break;
|
|
11663
11663
|
}
|
|
@@ -11795,7 +11795,7 @@ class Fl {
|
|
|
11795
11795
|
continue;
|
|
11796
11796
|
}
|
|
11797
11797
|
if (o === "%" && this.scanner.peek(1) === "%") {
|
|
11798
|
-
const l = this.scanner.peek(2).toLowerCase(), h =
|
|
11798
|
+
const l = this.scanner.peek(2).toLowerCase(), h = bl[l];
|
|
11799
11799
|
if (h) {
|
|
11800
11800
|
this.scanner.consume(3), s += h;
|
|
11801
11801
|
continue;
|
|
@@ -12250,8 +12250,8 @@ class It {
|
|
|
12250
12250
|
this.type = e, this.ctx = r, this.data = n;
|
|
12251
12251
|
}
|
|
12252
12252
|
}
|
|
12253
|
-
var je = /* @__PURE__ */ ((t) => (t[t.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", t[t.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", t[t.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", t[t.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", t[t.BY_STYLE = 5] = "BY_STYLE", t))(je || {}),
|
|
12254
|
-
const
|
|
12253
|
+
var je = /* @__PURE__ */ ((t) => (t[t.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", t[t.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", t[t.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", t[t.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", t[t.BY_STYLE = 5] = "BY_STYLE", t))(je || {}), wl = /* @__PURE__ */ ((t) => (t[t.TopLeft = 1] = "TopLeft", t[t.TopCenter = 2] = "TopCenter", t[t.TopRight = 3] = "TopRight", t[t.MiddleLeft = 4] = "MiddleLeft", t[t.MiddleCenter = 5] = "MiddleCenter", t[t.MiddleRight = 6] = "MiddleRight", t[t.BottomLeft = 7] = "BottomLeft", t[t.BottomCenter = 8] = "BottomCenter", t[t.BottomRight = 9] = "BottomRight", t))(wl || {});
|
|
12254
|
+
const Cl = /* @__PURE__ */ new R.Vector3(), El = 1.666666;
|
|
12255
12255
|
class gr extends tt {
|
|
12256
12256
|
/**
|
|
12257
12257
|
* Creates a new RenderContext instance with optional initial values.
|
|
@@ -12274,7 +12274,7 @@ class gr extends tt {
|
|
|
12274
12274
|
* @returns The color as a hex number (0xRRGGBB)
|
|
12275
12275
|
*/
|
|
12276
12276
|
getColorAsHex() {
|
|
12277
|
-
return this.color.isRgb && this.color.rgbValue !== null ? this.color.rgbValue : this.color.isAci && this.color.aci !== null ?
|
|
12277
|
+
return this.color.isRgb && this.color.rgbValue !== null ? this.color.rgbValue : this.color.isAci && this.color.aci !== null ? Ha(this.color.aci) : 16777215;
|
|
12278
12278
|
}
|
|
12279
12279
|
/**
|
|
12280
12280
|
* Set the color using a hex value for rendering purposes.
|
|
@@ -12285,7 +12285,7 @@ class gr extends tt {
|
|
|
12285
12285
|
this.color.rgb = [r, n, a];
|
|
12286
12286
|
}
|
|
12287
12287
|
}
|
|
12288
|
-
class
|
|
12288
|
+
class Ol {
|
|
12289
12289
|
/**
|
|
12290
12290
|
* Construct one instance of this class and initialize some properties with default values.
|
|
12291
12291
|
* @param style Input text style
|
|
@@ -12384,7 +12384,7 @@ class El {
|
|
|
12384
12384
|
* The height of current line of texts
|
|
12385
12385
|
*/
|
|
12386
12386
|
get currentLineHeight() {
|
|
12387
|
-
return this.defaultLineSpaceFactor * this.currentFontSize *
|
|
12387
|
+
return this.defaultLineSpaceFactor * this.currentFontSize * El + this.currentMaxFontSize;
|
|
12388
12388
|
}
|
|
12389
12389
|
/**
|
|
12390
12390
|
* The maximum font size in current line. Characters in one line may have different font and font
|
|
@@ -12529,7 +12529,7 @@ class El {
|
|
|
12529
12529
|
* @param item Input texts to render
|
|
12530
12530
|
*/
|
|
12531
12531
|
processText(e) {
|
|
12532
|
-
const r = [], n = [], a = new
|
|
12532
|
+
const r = [], n = [], a = new R.Group();
|
|
12533
12533
|
for (const s of e)
|
|
12534
12534
|
if (s.type === Be.NEW_PARAGRAPH)
|
|
12535
12535
|
this.startNewParagraph(r, n, a);
|
|
@@ -12620,7 +12620,7 @@ class El {
|
|
|
12620
12620
|
T
|
|
12621
12621
|
);
|
|
12622
12622
|
if (r.push(...x), n.push(...T), i === "/" || i === "#") {
|
|
12623
|
-
const S = new
|
|
12623
|
+
const S = new R.BufferGeometry(), A = new Float32Array([
|
|
12624
12624
|
o,
|
|
12625
12625
|
u - this.currentFontSize * 0.8,
|
|
12626
12626
|
0,
|
|
@@ -12630,7 +12630,7 @@ class El {
|
|
|
12630
12630
|
]);
|
|
12631
12631
|
S.setAttribute(
|
|
12632
12632
|
"position",
|
|
12633
|
-
new
|
|
12633
|
+
new R.BufferAttribute(A, 3)
|
|
12634
12634
|
), S.setIndex(null), n.push(S);
|
|
12635
12635
|
}
|
|
12636
12636
|
this._hOffset = o + d;
|
|
@@ -12653,7 +12653,7 @@ class El {
|
|
|
12653
12653
|
s.scale(this.currentWidthFactor, 1, 1);
|
|
12654
12654
|
let i = this._currentContext.oblique;
|
|
12655
12655
|
if (this._currentContext.italic && (i += 15), i) {
|
|
12656
|
-
const d = i * Math.PI / 180, v = new
|
|
12656
|
+
const d = i * Math.PI / 180, v = new R.Matrix4();
|
|
12657
12657
|
v.set(
|
|
12658
12658
|
1,
|
|
12659
12659
|
Math.tan(d),
|
|
@@ -12679,10 +12679,10 @@ class El {
|
|
|
12679
12679
|
s.translate(u, l, 0), this.currentHorizontalAlignment == se.DISTRIBUTED ? this._hOffset += a.width * this.currentWidthFactor : this._hOffset += a.width * this.currentWordSpace * this.currentWidthFactor, r.push(s);
|
|
12680
12680
|
const c = f * 0.05, p = 1e-3;
|
|
12681
12681
|
if (this._currentContext.underline) {
|
|
12682
|
-
const d = new
|
|
12682
|
+
const d = new R.BufferGeometry(), v = l - c;
|
|
12683
12683
|
d.setAttribute(
|
|
12684
12684
|
"position",
|
|
12685
|
-
new
|
|
12685
|
+
new R.BufferAttribute(
|
|
12686
12686
|
new Float32Array([
|
|
12687
12687
|
u,
|
|
12688
12688
|
v,
|
|
@@ -12696,10 +12696,10 @@ class El {
|
|
|
12696
12696
|
), d.setIndex(null), n.push(d);
|
|
12697
12697
|
}
|
|
12698
12698
|
if (this._currentContext.overline) {
|
|
12699
|
-
const d = new
|
|
12699
|
+
const d = new R.BufferGeometry(), v = l + f + c;
|
|
12700
12700
|
d.setAttribute(
|
|
12701
12701
|
"position",
|
|
12702
|
-
new
|
|
12702
|
+
new R.BufferAttribute(
|
|
12703
12703
|
new Float32Array([
|
|
12704
12704
|
u,
|
|
12705
12705
|
v,
|
|
@@ -12713,10 +12713,10 @@ class El {
|
|
|
12713
12713
|
), d.setIndex(null), n.push(d);
|
|
12714
12714
|
}
|
|
12715
12715
|
if (this._currentContext.strikeThrough) {
|
|
12716
|
-
const d = new
|
|
12716
|
+
const d = new R.BufferGeometry(), v = l + f / 2 - f * 0.2;
|
|
12717
12717
|
d.setAttribute(
|
|
12718
12718
|
"position",
|
|
12719
|
-
new
|
|
12719
|
+
new R.BufferAttribute(
|
|
12720
12720
|
new Float32Array([
|
|
12721
12721
|
u,
|
|
12722
12722
|
v,
|
|
@@ -12787,7 +12787,7 @@ class El {
|
|
|
12787
12787
|
if (e.forEach((n, a) => {
|
|
12788
12788
|
n.boundingBox || n.computeBoundingBox(), a === 0 ? r = n.boundingBox : r.union(n.boundingBox);
|
|
12789
12789
|
}), r) {
|
|
12790
|
-
const n = r.getSize(
|
|
12790
|
+
const n = r.getSize(Cl);
|
|
12791
12791
|
switch (this.currentHorizontalAlignment) {
|
|
12792
12792
|
case se.LEFT:
|
|
12793
12793
|
e.forEach(
|
|
@@ -12844,17 +12844,17 @@ class El {
|
|
|
12844
12844
|
* @returns Return three.js object created from the specified text shape geometries
|
|
12845
12845
|
*/
|
|
12846
12846
|
toThreeObject(e, r) {
|
|
12847
|
-
const n = new
|
|
12847
|
+
const n = new R.Group(), a = this._currentContext.getColorAsHex(), s = e.filter((o) => o instanceof R.ExtrudeGeometry);
|
|
12848
12848
|
if (s.length > 0) {
|
|
12849
|
-
const o = new
|
|
12849
|
+
const o = new R.Mesh();
|
|
12850
12850
|
o.geometry = fn(s), o.material = this.styleManager.getMeshBasicMaterial(a), o.userData.bboxIntersectionCheck = !0, n.add(o);
|
|
12851
12851
|
}
|
|
12852
12852
|
const i = [
|
|
12853
12853
|
...r,
|
|
12854
|
-
...e.filter((o) => !(o instanceof
|
|
12854
|
+
...e.filter((o) => !(o instanceof R.ExtrudeGeometry))
|
|
12855
12855
|
];
|
|
12856
12856
|
if (i.length > 0) {
|
|
12857
|
-
const o = new
|
|
12857
|
+
const o = new R.LineSegments();
|
|
12858
12858
|
o.geometry = fn(i), o.material = this.styleManager.getLineBasicMaterial(a), o.userData.bboxIntersectionCheck = !0, n.add(o);
|
|
12859
12859
|
}
|
|
12860
12860
|
return n.children.length === 1 ? n.children[0] : n;
|
|
@@ -12866,8 +12866,8 @@ class El {
|
|
|
12866
12866
|
this._currentContext.fontSize = e * this._currentContext.fontScaleFactor * this._currentContext.fontSizeScaleFactor, this.calcuateLineParams();
|
|
12867
12867
|
}
|
|
12868
12868
|
}
|
|
12869
|
-
const Dt = /* @__PURE__ */ new
|
|
12870
|
-
class vr extends
|
|
12869
|
+
const Dt = /* @__PURE__ */ new R.Vector3(), Oe = /* @__PURE__ */ new R.Vector3(), Gt = /* @__PURE__ */ new R.Vector3(), Nt = /* @__PURE__ */ new R.Quaternion(), _t = /* @__PURE__ */ new R.Matrix4(), xn = /* @__PURE__ */ new R.Matrix4(), bn = /* @__PURE__ */ new R.Vector3(1, 0, 0);
|
|
12870
|
+
class vr extends R.Object3D {
|
|
12871
12871
|
/**
|
|
12872
12872
|
* Extracts all unique font names used in an MText string.
|
|
12873
12873
|
* This function searches for font commands in the format \f{fontname}| or \f{fontname}; and returns a set of unique font names.
|
|
@@ -12884,7 +12884,7 @@ class vr extends L.Object3D {
|
|
|
12884
12884
|
* ```
|
|
12885
12885
|
*/
|
|
12886
12886
|
static getFonts(e, r = !1) {
|
|
12887
|
-
return
|
|
12887
|
+
return kl(e, r);
|
|
12888
12888
|
}
|
|
12889
12889
|
/**
|
|
12890
12890
|
* Creates a new instance of MText.
|
|
@@ -12901,7 +12901,7 @@ class vr extends L.Object3D {
|
|
|
12901
12901
|
super(), this._style = r, this._styleManager = n, this._fontManager = a, this._colorSettings = {
|
|
12902
12902
|
byLayerColor: s.byLayerColor,
|
|
12903
12903
|
byBlockColor: s.byBlockColor
|
|
12904
|
-
}, this._box = new
|
|
12904
|
+
}, this._box = new R.Box3(), this._boxes = [], this._mtextData = e;
|
|
12905
12905
|
}
|
|
12906
12906
|
/**
|
|
12907
12907
|
* Gets the font manager instance associated with this MText object.
|
|
@@ -12991,7 +12991,7 @@ class vr extends L.Object3D {
|
|
|
12991
12991
|
});
|
|
12992
12992
|
let o = e.rotation || 0;
|
|
12993
12993
|
if (e.directionVector) {
|
|
12994
|
-
const l = e.directionVector, h = new
|
|
12994
|
+
const l = e.directionVector, h = new R.Vector3(l.x, l.y, l.z), f = h.clone().cross(bn), c = bn.angleTo(h);
|
|
12995
12995
|
o = f.z > 0 ? -c : c;
|
|
12996
12996
|
}
|
|
12997
12997
|
n.matrix.compose(Oe, Nt, Gt);
|
|
@@ -13029,12 +13029,12 @@ class vr extends L.Object3D {
|
|
|
13029
13029
|
value: e.widthFactor ?? 1,
|
|
13030
13030
|
isRelative: !0
|
|
13031
13031
|
}, h.align = s, h.paragraph.align = a;
|
|
13032
|
-
const f = new
|
|
13032
|
+
const f = new Ol(
|
|
13033
13033
|
r,
|
|
13034
13034
|
this.styleManager,
|
|
13035
13035
|
this.fontManager,
|
|
13036
13036
|
l
|
|
13037
|
-
), p = new
|
|
13037
|
+
), p = new Tl(e.text, h, {
|
|
13038
13038
|
resetParagraphParameters: !0,
|
|
13039
13039
|
yieldPropertyCommands: !0
|
|
13040
13040
|
}).parse();
|
|
@@ -13091,10 +13091,10 @@ class vr extends L.Object3D {
|
|
|
13091
13091
|
* @param boxes - Array to store the calculated bounding boxes
|
|
13092
13092
|
*/
|
|
13093
13093
|
getBoxes(e, r) {
|
|
13094
|
-
if (e.updateWorldMatrix(!1, !1), e instanceof
|
|
13094
|
+
if (e.updateWorldMatrix(!1, !1), e instanceof R.Line || e instanceof R.Mesh) {
|
|
13095
13095
|
const a = e.geometry;
|
|
13096
13096
|
a.boundingBox === null && a.computeBoundingBox();
|
|
13097
|
-
const s = new
|
|
13097
|
+
const s = new R.Box3().copy(a.boundingBox);
|
|
13098
13098
|
s.applyMatrix4(e.matrixWorld), r.push(s);
|
|
13099
13099
|
}
|
|
13100
13100
|
const n = e.children;
|
|
@@ -13102,17 +13102,17 @@ class vr extends L.Object3D {
|
|
|
13102
13102
|
this.getBoxes(n[a], r);
|
|
13103
13103
|
}
|
|
13104
13104
|
}
|
|
13105
|
-
class
|
|
13105
|
+
class ba {
|
|
13106
13106
|
constructor() {
|
|
13107
13107
|
this.lineBasicMaterials = {}, this.meshBasicMaterials = {}, this.unsupportedTextStyles = {};
|
|
13108
13108
|
}
|
|
13109
13109
|
getMeshBasicMaterial(e) {
|
|
13110
|
-
return this.meshBasicMaterials[e] || (this.meshBasicMaterials[e] = new
|
|
13110
|
+
return this.meshBasicMaterials[e] || (this.meshBasicMaterials[e] = new R.MeshBasicMaterial({
|
|
13111
13111
|
color: e
|
|
13112
13112
|
})), this.meshBasicMaterials[e];
|
|
13113
13113
|
}
|
|
13114
13114
|
getLineBasicMaterial(e) {
|
|
13115
|
-
return this.lineBasicMaterials[e] || (this.lineBasicMaterials[e] = new
|
|
13115
|
+
return this.lineBasicMaterials[e] || (this.lineBasicMaterials[e] = new R.LineBasicMaterial({
|
|
13116
13116
|
color: e
|
|
13117
13117
|
})), this.lineBasicMaterials[e];
|
|
13118
13118
|
}
|
|
@@ -13122,8 +13122,9 @@ class Sn {
|
|
|
13122
13122
|
this.workers = [], this.inFlightPerWorker = [], this.pendingRequests = /* @__PURE__ */ new Map(), this.requestId = 0, this.readyPromise = null, this.poolSize = e.poolSize ?? Math.max(
|
|
13123
13123
|
1,
|
|
13124
13124
|
navigator.hardwareConcurrency ? Math.min(4, navigator.hardwareConcurrency) : 2
|
|
13125
|
-
), this.isLoadFontsOnDemand = !!e.isLoadFontsOnDemand;
|
|
13125
|
+
), this.isLoadFontsOnDemand = !!e.isLoadFontsOnDemand, this.styleManager = new ba();
|
|
13126
13126
|
const r = e.workerUrl ?? "./mtext-renderer-worker.js";
|
|
13127
|
+
this.timeOut = e.timeOut ?? 12e4;
|
|
13127
13128
|
for (let n = 0; n < this.poolSize; n++) {
|
|
13128
13129
|
const a = new Worker(new URL(r, import.meta.url), {
|
|
13129
13130
|
type: "module"
|
|
@@ -13181,7 +13182,7 @@ class Sn {
|
|
|
13181
13182
|
0,
|
|
13182
13183
|
this.inFlightPerWorker[n] - 1
|
|
13183
13184
|
), i(new Error("Worker request timeout")));
|
|
13184
|
-
},
|
|
13185
|
+
}, this.timeOut);
|
|
13185
13186
|
});
|
|
13186
13187
|
}
|
|
13187
13188
|
ensureTasksFinished() {
|
|
@@ -13198,7 +13199,7 @@ class Sn {
|
|
|
13198
13199
|
0,
|
|
13199
13200
|
this.inFlightPerWorker[r] - 1
|
|
13200
13201
|
), a(new Error("Worker init timeout")));
|
|
13201
|
-
},
|
|
13202
|
+
}, this.timeOut);
|
|
13202
13203
|
})
|
|
13203
13204
|
)
|
|
13204
13205
|
).then(() => {
|
|
@@ -13238,7 +13239,7 @@ class Sn {
|
|
|
13238
13239
|
0,
|
|
13239
13240
|
this.inFlightPerWorker[s] - 1
|
|
13240
13241
|
), o(new Error("Worker request timeout")));
|
|
13241
|
-
},
|
|
13242
|
+
}, this.timeOut);
|
|
13242
13243
|
})
|
|
13243
13244
|
)
|
|
13244
13245
|
), n = /* @__PURE__ */ new Set();
|
|
@@ -13266,7 +13267,7 @@ class Sn {
|
|
|
13266
13267
|
0,
|
|
13267
13268
|
this.inFlightPerWorker[e] - 1
|
|
13268
13269
|
), a(new Error("Worker request timeout")));
|
|
13269
|
-
},
|
|
13270
|
+
}, this.timeOut);
|
|
13270
13271
|
}
|
|
13271
13272
|
);
|
|
13272
13273
|
}
|
|
@@ -13274,15 +13275,15 @@ class Sn {
|
|
|
13274
13275
|
* Reconstruct MText object from JSON serialized data
|
|
13275
13276
|
*/
|
|
13276
13277
|
reconstructMText(e) {
|
|
13277
|
-
const r = new
|
|
13278
|
+
const r = new R.Group();
|
|
13278
13279
|
return e.children.forEach((n) => {
|
|
13279
|
-
const a = new
|
|
13280
|
+
const a = new R.BufferGeometry();
|
|
13280
13281
|
if (Object.keys(n.geometry.attributes).forEach((o) => {
|
|
13281
13282
|
const u = n.geometry.attributes[o], l = new Float32Array(
|
|
13282
13283
|
u.arrayBuffer,
|
|
13283
13284
|
u.byteOffset,
|
|
13284
13285
|
u.length
|
|
13285
|
-
), h = new
|
|
13286
|
+
), h = new R.BufferAttribute(
|
|
13286
13287
|
l,
|
|
13287
13288
|
u.itemSize,
|
|
13288
13289
|
u.normalized
|
|
@@ -13295,29 +13296,23 @@ class Sn {
|
|
|
13295
13296
|
n.geometry.index.byteOffset,
|
|
13296
13297
|
n.geometry.index.length
|
|
13297
13298
|
);
|
|
13298
|
-
a.setIndex(new
|
|
13299
|
+
a.setIndex(new R.Uint32BufferAttribute(u, 1));
|
|
13299
13300
|
} else {
|
|
13300
13301
|
const u = new Uint16Array(
|
|
13301
13302
|
n.geometry.index.arrayBuffer,
|
|
13302
13303
|
n.geometry.index.byteOffset,
|
|
13303
13304
|
n.geometry.index.length
|
|
13304
13305
|
);
|
|
13305
|
-
a.setIndex(new
|
|
13306
|
+
a.setIndex(new R.Uint16BufferAttribute(u, 1));
|
|
13306
13307
|
}
|
|
13307
13308
|
let s;
|
|
13308
|
-
n.type === "mesh" ? s =
|
|
13309
|
-
|
|
13310
|
-
|
|
13311
|
-
|
|
13312
|
-
|
|
13313
|
-
}) : s = new L.LineBasicMaterial({
|
|
13314
|
-
color: n.material.color,
|
|
13315
|
-
transparent: n.material.transparent,
|
|
13316
|
-
opacity: n.material.opacity,
|
|
13317
|
-
linewidth: n.material.linewidth
|
|
13318
|
-
});
|
|
13309
|
+
n.type === "mesh" ? (s = this.styleManager.getMeshBasicMaterial(
|
|
13310
|
+
n.material.color
|
|
13311
|
+
), n.material.transparent !== void 0 && (s.transparent = n.material.transparent), n.material.opacity !== void 0 && (s.opacity = n.material.opacity), n.material.side !== void 0 && (s.side = n.material.side)) : (s = this.styleManager.getLineBasicMaterial(
|
|
13312
|
+
n.material.color
|
|
13313
|
+
), n.material.transparent !== void 0 && (s.transparent = n.material.transparent), n.material.opacity !== void 0 && (s.opacity = n.material.opacity), n.material.linewidth !== void 0 && (s.linewidth = n.material.linewidth));
|
|
13319
13314
|
let i;
|
|
13320
|
-
n.type === "mesh" ? i = new
|
|
13315
|
+
n.type === "mesh" ? i = new R.Mesh(a, s) : i = new R.Line(a, s), a.boundingBox || a.computeBoundingBox(), a.boundingSphere || a.computeBoundingSphere(), i.position.set(
|
|
13321
13316
|
n.position.x,
|
|
13322
13317
|
n.position.y,
|
|
13323
13318
|
n.position.z
|
|
@@ -13327,13 +13322,13 @@ class Sn {
|
|
|
13327
13322
|
n.rotation.z,
|
|
13328
13323
|
n.rotation.w
|
|
13329
13324
|
), i.scale.set(n.scale.x, n.scale.y, n.scale.z), r.add(i);
|
|
13330
|
-
}), r.box = new
|
|
13331
|
-
new
|
|
13325
|
+
}), r.box = new R.Box3(
|
|
13326
|
+
new R.Vector3(
|
|
13332
13327
|
e.box.min.x,
|
|
13333
13328
|
e.box.min.y,
|
|
13334
13329
|
e.box.min.z
|
|
13335
13330
|
),
|
|
13336
|
-
new
|
|
13331
|
+
new R.Vector3(
|
|
13337
13332
|
e.box.max.x,
|
|
13338
13333
|
e.box.max.y,
|
|
13339
13334
|
e.box.max.z
|
|
@@ -13354,7 +13349,7 @@ class Sn {
|
|
|
13354
13349
|
}
|
|
13355
13350
|
class Ul {
|
|
13356
13351
|
constructor() {
|
|
13357
|
-
this.fontManager = de.instance, this.styleManager = new
|
|
13352
|
+
this.fontManager = de.instance, this.styleManager = new ba(), this.isInitialized = !1;
|
|
13358
13353
|
}
|
|
13359
13354
|
/**
|
|
13360
13355
|
* Render MText directly in the main thread
|
|
@@ -13392,16 +13387,22 @@ class Ul {
|
|
|
13392
13387
|
}
|
|
13393
13388
|
}
|
|
13394
13389
|
class Pl {
|
|
13395
|
-
|
|
13396
|
-
|
|
13390
|
+
/**
|
|
13391
|
+
* Constructor
|
|
13392
|
+
*
|
|
13393
|
+
* @param mode - Rendering mode. Default is 'main' which means rendering in main thread.
|
|
13394
|
+
* @param workerConfig - Configuration options for WebWorkerRenderer which is used
|
|
13395
|
+
* when render mode is 'worker'.
|
|
13396
|
+
*/
|
|
13397
|
+
constructor(e = "main", r = {}) {
|
|
13398
|
+
this.workerManager = null, this.currentMode = e, this.mainThreadRenderer = new Ul(), this.adapter = this.mainThreadRenderer, this.workerConfig = r, e === "worker" && (this.workerManager = new Sn(r), this.adapter = this.workerManager);
|
|
13397
13399
|
}
|
|
13398
13400
|
/**
|
|
13399
13401
|
* Switch between main thread and worker rendering modes
|
|
13400
13402
|
* @param mode The rendering mode to switch to
|
|
13401
|
-
* @param workerConfig Configuration options for WebWorkerRenderer when switching to worker mode
|
|
13402
13403
|
*/
|
|
13403
|
-
switchMode(e
|
|
13404
|
-
this.currentMode !== e && (this.currentMode === "worker" && this.workerManager && (this.workerManager.terminate(), this.workerManager = null), this.currentMode = e, e === "worker" ? (this.workerManager = new Sn(
|
|
13404
|
+
switchMode(e) {
|
|
13405
|
+
this.currentMode !== e && (this.currentMode === "worker" && this.workerManager && (this.workerManager.terminate(), this.workerManager = null), this.currentMode = e, e === "worker" ? (this.workerManager = new Sn(this.workerConfig), this.adapter = this.workerManager) : this.adapter = this.mainThreadRenderer);
|
|
13405
13406
|
}
|
|
13406
13407
|
/**
|
|
13407
13408
|
* Get current rendering mode
|
|
@@ -13440,15 +13441,15 @@ class Pl {
|
|
|
13440
13441
|
export {
|
|
13441
13442
|
kn as BaseFont,
|
|
13442
13443
|
Fn as BaseTextShape,
|
|
13443
|
-
|
|
13444
|
+
xl as DefaultFontLoader,
|
|
13444
13445
|
xr as EventManager,
|
|
13445
13446
|
ke as FontFactory,
|
|
13446
13447
|
de as FontManager,
|
|
13447
13448
|
vr as MText,
|
|
13448
|
-
|
|
13449
|
+
wl as MTextAttachmentPoint,
|
|
13449
13450
|
je as MTextFlowDirection,
|
|
13450
13451
|
Ul as MainThreadRenderer,
|
|
13451
|
-
|
|
13452
|
+
ba as StyleManager,
|
|
13452
13453
|
Pl as UnifiedRenderer,
|
|
13453
13454
|
Sn as WebWorkerRenderer
|
|
13454
13455
|
};
|