@mlightcad/mtext-renderer 0.4.8 → 0.4.10
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 +1023 -846
- package/dist/index.umd.cjs +3 -3
- package/dist/mtext-renderer-worker.js +915 -762
- package/lib/font/fontManager.d.ts +28 -3
- package/lib/renderer/mtext.d.ts +8 -0
- package/lib/worker/mainThreadRenderer.d.ts +0 -1
- package/lib/worker/webWorkerRenderer.d.ts +7 -0
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as L from "three";
|
|
2
|
-
import { ShapePath as
|
|
3
|
-
class
|
|
2
|
+
import { ShapePath as ka, ExtrudeGeometry as Fa, BufferGeometry as ut, BufferAttribute as Ta } from "three";
|
|
3
|
+
class xr {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.listeners = [];
|
|
6
6
|
}
|
|
@@ -34,7 +34,7 @@ class yr {
|
|
|
34
34
|
n.call(null, e, ...r);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
class
|
|
37
|
+
class wa {
|
|
38
38
|
constructor() {
|
|
39
39
|
this.cache = /* @__PURE__ */ new Map();
|
|
40
40
|
}
|
|
@@ -90,9 +90,9 @@ class Ta {
|
|
|
90
90
|
return `${e}_${r}`;
|
|
91
91
|
}
|
|
92
92
|
}
|
|
93
|
-
class
|
|
93
|
+
class kn {
|
|
94
94
|
constructor() {
|
|
95
|
-
this.unsupportedChars = {}, this.cache = new
|
|
95
|
+
this.unsupportedChars = {}, this.cache = new wa();
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
98
|
* Records an unsupported character in the font.
|
|
@@ -103,7 +103,7 @@ class Sn {
|
|
|
103
103
|
this.unsupportedChars[e] || (this.unsupportedChars[e] = 0), this.unsupportedChars[e]++;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
class
|
|
106
|
+
class Fn extends L.Shape {
|
|
107
107
|
/**
|
|
108
108
|
* Creates a new instance of BaseTextShape
|
|
109
109
|
* @param char - The character this shape represents */
|
|
@@ -112,9 +112,9 @@ class kn extends L.Shape {
|
|
|
112
112
|
}
|
|
113
113
|
}
|
|
114
114
|
const Ht = (t, e) => e.some((r) => t instanceof r);
|
|
115
|
-
let
|
|
116
|
-
function
|
|
117
|
-
return
|
|
115
|
+
let br, Sr;
|
|
116
|
+
function Ca() {
|
|
117
|
+
return br || (br = [
|
|
118
118
|
IDBDatabase,
|
|
119
119
|
IDBObjectStore,
|
|
120
120
|
IDBIndex,
|
|
@@ -122,15 +122,15 @@ function wa() {
|
|
|
122
122
|
IDBTransaction
|
|
123
123
|
]);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
126
|
-
return
|
|
125
|
+
function Ea() {
|
|
126
|
+
return Sr || (Sr = [
|
|
127
127
|
IDBCursor.prototype.advance,
|
|
128
128
|
IDBCursor.prototype.continue,
|
|
129
129
|
IDBCursor.prototype.continuePrimaryKey
|
|
130
130
|
]);
|
|
131
131
|
}
|
|
132
132
|
const zt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), mt = /* @__PURE__ */ new WeakMap();
|
|
133
|
-
function
|
|
133
|
+
function Oa(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 Ea(t) {
|
|
|
143
143
|
});
|
|
144
144
|
return mt.set(e, t), e;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function Ua(t) {
|
|
147
147
|
if (zt.has(t))
|
|
148
148
|
return;
|
|
149
149
|
const e = new Promise((r, n) => {
|
|
@@ -175,29 +175,29 @@ let Wt = {
|
|
|
175
175
|
return t instanceof IDBTransaction && (e === "done" || e === "store") ? !0 : e in t;
|
|
176
176
|
}
|
|
177
177
|
};
|
|
178
|
-
function
|
|
178
|
+
function Tn(t) {
|
|
179
179
|
Wt = t(Wt);
|
|
180
180
|
}
|
|
181
|
-
function
|
|
182
|
-
return
|
|
181
|
+
function La(t) {
|
|
182
|
+
return Ea().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 Ra(t) {
|
|
189
|
+
return typeof t == "function" ? La(t) : (t instanceof IDBTransaction && Ua(t), Ht(t, Ca()) ? new Proxy(t, Wt) : t);
|
|
190
190
|
}
|
|
191
191
|
function Re(t) {
|
|
192
192
|
if (t instanceof IDBRequest)
|
|
193
|
-
return
|
|
193
|
+
return Oa(t);
|
|
194
194
|
if (kt.has(t))
|
|
195
195
|
return kt.get(t);
|
|
196
|
-
const e =
|
|
196
|
+
const e = Ra(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 Aa(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 Ra(t, e, { blocked: r, upgrade: n, blocking: a, terminated: s } = {}) {
|
|
|
211
211
|
}).catch(() => {
|
|
212
212
|
}), o;
|
|
213
213
|
}
|
|
214
|
-
const
|
|
215
|
-
function
|
|
214
|
+
const Ma = ["get", "getKey", "getAll", "getAllKeys", "count"], Pa = ["put", "add", "delete", "clear"], Ft = /* @__PURE__ */ new Map();
|
|
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 = Pa.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 || Ma.includes(r))
|
|
224
224
|
)
|
|
225
225
|
return;
|
|
226
226
|
const s = async function(i, ...o) {
|
|
@@ -233,18 +233,18 @@ function Sr(t, e) {
|
|
|
233
233
|
};
|
|
234
234
|
return Ft.set(e, s), s;
|
|
235
235
|
}
|
|
236
|
-
|
|
236
|
+
Tn((t) => ({
|
|
237
237
|
...t,
|
|
238
|
-
get: (e, r, n) =>
|
|
239
|
-
has: (e, r) => !!
|
|
238
|
+
get: (e, r, n) => kr(e, r) || t.get(e, r, n),
|
|
239
|
+
has: (e, r) => !!kr(e, r) || t.has(e, r)
|
|
240
240
|
}));
|
|
241
|
-
const
|
|
241
|
+
const Ba = ["continue", "continuePrimaryKey", "advance"], Fr = {}, qt = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), Da = {
|
|
242
242
|
get(t, e) {
|
|
243
|
-
if (!
|
|
243
|
+
if (!Ba.includes(e))
|
|
244
244
|
return t[e];
|
|
245
|
-
let r =
|
|
246
|
-
return r || (r =
|
|
247
|
-
qt.set(this,
|
|
245
|
+
let r = Fr[e];
|
|
246
|
+
return r || (r = Fr[e] = function(...n) {
|
|
247
|
+
qt.set(this, wn.get(this)[e](...n));
|
|
248
248
|
}), r;
|
|
249
249
|
}
|
|
250
250
|
};
|
|
@@ -253,20 +253,20 @@ async function* Ia(...t) {
|
|
|
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,
|
|
257
|
-
for (
|
|
256
|
+
const r = new Proxy(e, Da);
|
|
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
|
}
|
|
260
|
-
function
|
|
260
|
+
function Tr(t, e) {
|
|
261
261
|
return e === Symbol.asyncIterator && Ht(t, [IDBIndex, IDBObjectStore, IDBCursor]) || e === "iterate" && Ht(t, [IDBIndex, IDBObjectStore]);
|
|
262
262
|
}
|
|
263
|
-
|
|
263
|
+
Tn((t) => ({
|
|
264
264
|
...t,
|
|
265
265
|
get(e, r, n) {
|
|
266
|
-
return
|
|
266
|
+
return Tr(e, r) ? Ia : t.get(e, r, n);
|
|
267
267
|
},
|
|
268
268
|
has(e, r) {
|
|
269
|
-
return
|
|
269
|
+
return Tr(e, r) || t.has(e, r);
|
|
270
270
|
}
|
|
271
271
|
}));
|
|
272
272
|
const Pe = {
|
|
@@ -361,13 +361,15 @@ 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 Aa(
|
|
365
365
|
ee.DATABASE_NAME,
|
|
366
366
|
ee.DATABASE_VERSION,
|
|
367
367
|
{
|
|
368
368
|
upgrade: (e, r, n) => this.handleUpgrade(e, r, n),
|
|
369
369
|
blocked() {
|
|
370
|
-
console.warn(
|
|
370
|
+
console.warn(
|
|
371
|
+
"Database upgrade blocked - please close other tabs using the application"
|
|
372
|
+
);
|
|
371
373
|
},
|
|
372
374
|
blocking() {
|
|
373
375
|
console.warn("Database blocking newer version - closing connection"), ee.instance.close();
|
|
@@ -400,14 +402,14 @@ const Pe = {
|
|
|
400
402
|
};
|
|
401
403
|
ee.DATABASE_NAME = "mlightcad", ee.DATABASE_VERSION = Tt[Tt.length - 1].version;
|
|
402
404
|
let ze = ee;
|
|
403
|
-
const
|
|
404
|
-
const e =
|
|
405
|
+
const Ga = (t) => t.substring(t.lastIndexOf(".") + 1), Cn = (t) => t.split("/").pop(), wr = (t) => {
|
|
406
|
+
const e = Cn(t);
|
|
405
407
|
if (e) {
|
|
406
408
|
const r = e.lastIndexOf(".");
|
|
407
409
|
return r === -1 ? e : e.substring(0, r);
|
|
408
410
|
}
|
|
409
411
|
return t;
|
|
410
|
-
},
|
|
412
|
+
}, Na = [
|
|
411
413
|
0,
|
|
412
414
|
16711680,
|
|
413
415
|
16776960,
|
|
@@ -665,19 +667,19 @@ const Da = (t) => t.substring(t.lastIndexOf(".") + 1), wn = (t) => t.split("/").
|
|
|
665
667
|
14079702,
|
|
666
668
|
16777215,
|
|
667
669
|
0
|
|
668
|
-
],
|
|
669
|
-
let
|
|
670
|
+
], _a = (t) => Na[t];
|
|
671
|
+
let Ha = class {
|
|
670
672
|
constructor(e) {
|
|
671
673
|
this.isFont = !0, this.type = "Font", this.data = e;
|
|
672
674
|
}
|
|
673
675
|
generateShapes(e, r = 100) {
|
|
674
|
-
const n = [], a =
|
|
676
|
+
const n = [], a = za(e, r, this.data);
|
|
675
677
|
for (let s = 0, i = a.length; s < i; s++)
|
|
676
678
|
n.push(...a[s].toShapes());
|
|
677
679
|
return n;
|
|
678
680
|
}
|
|
679
681
|
};
|
|
680
|
-
function
|
|
682
|
+
function za(t, e, r) {
|
|
681
683
|
const n = Array.from(t), a = e / r.resolution, s = (r.boundingBox.yMax - r.boundingBox.yMin + r.underlineThickness) * a, i = [];
|
|
682
684
|
let o = 0, u = 0;
|
|
683
685
|
for (let l = 0; l < n.length; l++) {
|
|
@@ -686,19 +688,19 @@ function Ha(t, e, r) {
|
|
|
686
688
|
`)
|
|
687
689
|
o = 0, u -= s;
|
|
688
690
|
else {
|
|
689
|
-
const f =
|
|
691
|
+
const f = Wa(h, a, o, u, r);
|
|
690
692
|
o += f.offsetX, i.push(f.path);
|
|
691
693
|
}
|
|
692
694
|
}
|
|
693
695
|
return i;
|
|
694
696
|
}
|
|
695
|
-
function
|
|
697
|
+
function Wa(t, e, r, n, a) {
|
|
696
698
|
const s = a.glyphs[t] || a.glyphs["?"];
|
|
697
699
|
if (!s) {
|
|
698
700
|
console.error('THREE.Font: character "' + t + '" does not exists in font family ' + a.familyName + ".");
|
|
699
701
|
return;
|
|
700
702
|
}
|
|
701
|
-
const i = new
|
|
703
|
+
const i = new ka();
|
|
702
704
|
let o, u, l, h, f, c, p, d;
|
|
703
705
|
if (s.o) {
|
|
704
706
|
const v = s._cachedOutline || (s._cachedOutline = s.o.split(" "));
|
|
@@ -747,14 +749,14 @@ String.prototype.codePointAt || function() {
|
|
|
747
749
|
writable: !0
|
|
748
750
|
}) : String.prototype.codePointAt = e;
|
|
749
751
|
}();
|
|
750
|
-
var rr = 0,
|
|
752
|
+
var rr = 0, En = -3;
|
|
751
753
|
function Ve() {
|
|
752
754
|
this.table = new Uint16Array(16), this.trans = new Uint16Array(288);
|
|
753
755
|
}
|
|
754
|
-
function
|
|
756
|
+
function Va(t, e) {
|
|
755
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();
|
|
756
758
|
}
|
|
757
|
-
var
|
|
759
|
+
var On = new Ve(), Un = new Ve(), nr = new Uint8Array(30), ar = new Uint16Array(30), Ln = new Uint8Array(30), Rn = new Uint16Array(30), qa = new Uint8Array([
|
|
758
760
|
16,
|
|
759
761
|
17,
|
|
760
762
|
18,
|
|
@@ -774,8 +776,8 @@ var En = new Ve(), On = new Ve(), nr = new Uint8Array(30), ar = new Uint16Array(
|
|
|
774
776
|
14,
|
|
775
777
|
1,
|
|
776
778
|
15
|
|
777
|
-
]),
|
|
778
|
-
function
|
|
779
|
+
]), Cr = new Ve(), ce = new Uint8Array(320);
|
|
780
|
+
function An(t, e, r, n) {
|
|
779
781
|
var a, s;
|
|
780
782
|
for (a = 0; a < r; ++a)
|
|
781
783
|
t[a] = 0;
|
|
@@ -784,7 +786,7 @@ function Rn(t, e, r, n) {
|
|
|
784
786
|
for (s = n, a = 0; a < 30; ++a)
|
|
785
787
|
e[a] = s, s += 1 << t[a];
|
|
786
788
|
}
|
|
787
|
-
function
|
|
789
|
+
function Xa(t, e) {
|
|
788
790
|
var r;
|
|
789
791
|
for (r = 0; r < 7; ++r)
|
|
790
792
|
t.table[r] = 0;
|
|
@@ -801,7 +803,7 @@ function qa(t, e) {
|
|
|
801
803
|
for (e.table[5] = 32, r = 0; r < 32; ++r)
|
|
802
804
|
e.trans[r] = r;
|
|
803
805
|
}
|
|
804
|
-
var
|
|
806
|
+
var Er = new Uint16Array(16);
|
|
805
807
|
function wt(t, e, r, n) {
|
|
806
808
|
var a, s;
|
|
807
809
|
for (a = 0; a < 16; ++a)
|
|
@@ -809,11 +811,11 @@ function wt(t, e, r, n) {
|
|
|
809
811
|
for (a = 0; a < n; ++a)
|
|
810
812
|
t.table[e[r + a]]++;
|
|
811
813
|
for (t.table[0] = 0, s = 0, a = 0; a < 16; ++a)
|
|
812
|
-
|
|
814
|
+
Er[a] = s, s += t.table[a];
|
|
813
815
|
for (a = 0; a < n; ++a)
|
|
814
|
-
e[r + a] && (t.trans[
|
|
816
|
+
e[r + a] && (t.trans[Er[e[r + a]]++] = a);
|
|
815
817
|
}
|
|
816
|
-
function
|
|
818
|
+
function Ya(t) {
|
|
817
819
|
t.bitcount-- || (t.tag = t.source[t.sourceIndex++], t.bitcount = 7);
|
|
818
820
|
var e = t.tag & 1;
|
|
819
821
|
return t.tag >>>= 1, e;
|
|
@@ -835,16 +837,16 @@ function Xt(t, e) {
|
|
|
835
837
|
while (n >= 0);
|
|
836
838
|
return t.tag = s, t.bitcount -= a, e.trans[r + n];
|
|
837
839
|
}
|
|
838
|
-
function
|
|
840
|
+
function Za(t, e, r) {
|
|
839
841
|
var n, a, s, i, o, u;
|
|
840
842
|
for (n = fe(t, 5, 257), a = fe(t, 5, 1), s = fe(t, 4, 4), i = 0; i < 19; ++i)
|
|
841
843
|
ce[i] = 0;
|
|
842
844
|
for (i = 0; i < s; ++i) {
|
|
843
845
|
var l = fe(t, 3, 0);
|
|
844
|
-
ce[
|
|
846
|
+
ce[qa[i]] = l;
|
|
845
847
|
}
|
|
846
|
-
for (wt(
|
|
847
|
-
var h = Xt(t,
|
|
848
|
+
for (wt(Cr, ce, 0, 19), o = 0; o < n + a; ) {
|
|
849
|
+
var h = Xt(t, Cr);
|
|
848
850
|
switch (h) {
|
|
849
851
|
case 16:
|
|
850
852
|
var f = ce[o - 1];
|
|
@@ -866,7 +868,7 @@ function Ya(t, e, r) {
|
|
|
866
868
|
}
|
|
867
869
|
wt(e, ce, 0, n), wt(r, ce, n, a);
|
|
868
870
|
}
|
|
869
|
-
function
|
|
871
|
+
function Or(t, e, r) {
|
|
870
872
|
for (; ; ) {
|
|
871
873
|
var n = Xt(t, e);
|
|
872
874
|
if (n === 256)
|
|
@@ -875,47 +877,47 @@ function Er(t, e, r) {
|
|
|
875
877
|
t.dest[t.destLen++] = n;
|
|
876
878
|
else {
|
|
877
879
|
var a, s, i, o;
|
|
878
|
-
for (n -= 257, a = fe(t, nr[n], ar[n]), s = Xt(t, r), i = t.destLen - fe(t,
|
|
880
|
+
for (n -= 257, a = fe(t, nr[n], ar[n]), s = Xt(t, r), i = t.destLen - fe(t, Ln[s], Rn[s]), o = i; o < i + a; ++o)
|
|
879
881
|
t.dest[t.destLen++] = t.dest[o];
|
|
880
882
|
}
|
|
881
883
|
}
|
|
882
884
|
}
|
|
883
|
-
function
|
|
885
|
+
function ja(t) {
|
|
884
886
|
for (var e, r, n; t.bitcount > 8; )
|
|
885
887
|
t.sourceIndex--, t.bitcount -= 8;
|
|
886
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))
|
|
887
|
-
return
|
|
889
|
+
return En;
|
|
888
890
|
for (t.sourceIndex += 4, n = e; n; --n)
|
|
889
891
|
t.dest[t.destLen++] = t.source[t.sourceIndex++];
|
|
890
892
|
return t.bitcount = 0, rr;
|
|
891
893
|
}
|
|
892
|
-
function
|
|
893
|
-
var r = new
|
|
894
|
+
function Ka(t, e) {
|
|
895
|
+
var r = new Va(t, e), n, a, s;
|
|
894
896
|
do {
|
|
895
|
-
switch (n =
|
|
897
|
+
switch (n = Ya(r), a = fe(r, 2, 0), a) {
|
|
896
898
|
case 0:
|
|
897
|
-
s =
|
|
899
|
+
s = ja(r);
|
|
898
900
|
break;
|
|
899
901
|
case 1:
|
|
900
|
-
s =
|
|
902
|
+
s = Or(r, On, Un);
|
|
901
903
|
break;
|
|
902
904
|
case 2:
|
|
903
|
-
|
|
905
|
+
Za(r, r.ltree, r.dtree), s = Or(r, r.ltree, r.dtree);
|
|
904
906
|
break;
|
|
905
907
|
default:
|
|
906
|
-
s =
|
|
908
|
+
s = En;
|
|
907
909
|
}
|
|
908
910
|
if (s !== rr)
|
|
909
911
|
throw new Error("Data error");
|
|
910
912
|
} while (!n);
|
|
911
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;
|
|
912
914
|
}
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
915
|
+
Xa(On, Un);
|
|
916
|
+
An(nr, ar, 4, 3);
|
|
917
|
+
An(Ln, Rn, 2, 1);
|
|
916
918
|
nr[28] = 0;
|
|
917
919
|
ar[28] = 258;
|
|
918
|
-
var
|
|
920
|
+
var Qa = Ka;
|
|
919
921
|
function Me(t, e, r, n, a) {
|
|
920
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;
|
|
921
923
|
}
|
|
@@ -1070,13 +1072,13 @@ V.prototype.toDOMElement = function(t) {
|
|
|
1070
1072
|
var e = this.toPathData(t), r = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
1071
1073
|
return r.setAttribute("d", e), r;
|
|
1072
1074
|
};
|
|
1073
|
-
function
|
|
1075
|
+
function Mn(t) {
|
|
1074
1076
|
throw new Error(t);
|
|
1075
1077
|
}
|
|
1076
|
-
function
|
|
1077
|
-
t ||
|
|
1078
|
+
function Ur(t, e) {
|
|
1079
|
+
t || Mn(e);
|
|
1078
1080
|
}
|
|
1079
|
-
var U = { fail:
|
|
1081
|
+
var U = { fail: Mn, argument: Ur, assert: Ur }, Lr = 32768, Rr = 2147483648, Ie = {}, k = {}, R = {};
|
|
1080
1082
|
function le(t) {
|
|
1081
1083
|
return function() {
|
|
1082
1084
|
return t;
|
|
@@ -1104,7 +1106,7 @@ k.USHORT = function(t) {
|
|
|
1104
1106
|
};
|
|
1105
1107
|
R.USHORT = le(2);
|
|
1106
1108
|
k.SHORT = function(t) {
|
|
1107
|
-
return t >=
|
|
1109
|
+
return t >= Lr && (t = -(2 * Lr - t)), [t >> 8 & 255, t & 255];
|
|
1108
1110
|
};
|
|
1109
1111
|
R.SHORT = le(2);
|
|
1110
1112
|
k.UINT24 = function(t) {
|
|
@@ -1116,7 +1118,7 @@ k.ULONG = function(t) {
|
|
|
1116
1118
|
};
|
|
1117
1119
|
R.ULONG = le(4);
|
|
1118
1120
|
k.LONG = function(t) {
|
|
1119
|
-
return t >=
|
|
1121
|
+
return t >= Rr && (t = -(2 * Rr - t)), [t >> 24 & 255, t >> 16 & 255, t >> 8 & 255, t & 255];
|
|
1120
1122
|
};
|
|
1121
1123
|
R.LONG = le(4);
|
|
1122
1124
|
k.FIXED = k.ULONG;
|
|
@@ -1182,12 +1184,12 @@ k.NAME = k.CHARARRAY;
|
|
|
1182
1184
|
R.NAME = R.CHARARRAY;
|
|
1183
1185
|
k.STRING = k.CHARARRAY;
|
|
1184
1186
|
R.STRING = R.CHARARRAY;
|
|
1185
|
-
|
|
1187
|
+
Ie.UTF8 = function(t, e, r) {
|
|
1186
1188
|
for (var n = [], a = r, s = 0; s < a; s++, e += 1)
|
|
1187
1189
|
n[s] = t.getUint8(e);
|
|
1188
1190
|
return String.fromCharCode.apply(null, n);
|
|
1189
1191
|
};
|
|
1190
|
-
|
|
1192
|
+
Ie.UTF16 = function(t, e, r) {
|
|
1191
1193
|
for (var n = [], a = r / 2, s = 0; s < a; s++, e += 2)
|
|
1192
1194
|
n[s] = t.getUint16(e);
|
|
1193
1195
|
return String.fromCharCode.apply(null, n);
|
|
@@ -1244,7 +1246,7 @@ var Yt = {
|
|
|
1244
1246
|
"ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"
|
|
1245
1247
|
)
|
|
1246
1248
|
};
|
|
1247
|
-
|
|
1249
|
+
Ie.MACSTRING = function(t, e, r, n) {
|
|
1248
1250
|
var a = Yt[n];
|
|
1249
1251
|
if (a !== void 0) {
|
|
1250
1252
|
for (var s = "", i = 0; i < r; i++) {
|
|
@@ -1254,7 +1256,7 @@ De.MACSTRING = function(t, e, r, n) {
|
|
|
1254
1256
|
return s;
|
|
1255
1257
|
}
|
|
1256
1258
|
};
|
|
1257
|
-
var nt = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), at,
|
|
1259
|
+
var nt = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), at, $a = function(t) {
|
|
1258
1260
|
if (!at) {
|
|
1259
1261
|
at = {};
|
|
1260
1262
|
for (var e in Yt)
|
|
@@ -1276,7 +1278,7 @@ var nt = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), at, Qa =
|
|
|
1276
1278
|
}
|
|
1277
1279
|
};
|
|
1278
1280
|
k.MACSTRING = function(t, e) {
|
|
1279
|
-
var r =
|
|
1281
|
+
var r = $a(e);
|
|
1280
1282
|
if (r !== void 0) {
|
|
1281
1283
|
for (var n = [], a = 0; a < t.length; a++) {
|
|
1282
1284
|
var s = t.charCodeAt(a);
|
|
@@ -1294,12 +1296,12 @@ R.MACSTRING = function(t, e) {
|
|
|
1294
1296
|
function Zt(t) {
|
|
1295
1297
|
return t >= -128 && t <= 127;
|
|
1296
1298
|
}
|
|
1297
|
-
function
|
|
1299
|
+
function Ja(t, e, r) {
|
|
1298
1300
|
for (var n = 0, a = t.length; e < a && n < 64 && t[e] === 0; )
|
|
1299
1301
|
++e, ++n;
|
|
1300
1302
|
return r.push(128 | n - 1), e;
|
|
1301
1303
|
}
|
|
1302
|
-
function
|
|
1304
|
+
function es(t, e, r) {
|
|
1303
1305
|
for (var n = 0, a = t.length, s = e; s < a && n < 64; ) {
|
|
1304
1306
|
var i = t[s];
|
|
1305
1307
|
if (!Zt(i) || i === 0 && s + 1 < a && t[s + 1] === 0)
|
|
@@ -1311,7 +1313,7 @@ function Ja(t, e, r) {
|
|
|
1311
1313
|
r.push(t[o] + 256 & 255);
|
|
1312
1314
|
return s;
|
|
1313
1315
|
}
|
|
1314
|
-
function
|
|
1316
|
+
function ts(t, e, r) {
|
|
1315
1317
|
for (var n = 0, a = t.length, s = e; s < a && n < 64; ) {
|
|
1316
1318
|
var i = t[s];
|
|
1317
1319
|
if (i === 0 || Zt(i) && s + 1 < a && Zt(t[s + 1]))
|
|
@@ -1328,7 +1330,7 @@ function es(t, e, r) {
|
|
|
1328
1330
|
k.VARDELTAS = function(t) {
|
|
1329
1331
|
for (var e = 0, r = []; e < t.length; ) {
|
|
1330
1332
|
var n = t[e];
|
|
1331
|
-
n === 0 ? e =
|
|
1333
|
+
n === 0 ? e = Ja(t, e, r) : n >= -128 && n <= 127 ? e = es(t, e, r) : e = ts(t, e, r);
|
|
1332
1334
|
}
|
|
1333
1335
|
return r;
|
|
1334
1336
|
};
|
|
@@ -1568,43 +1570,43 @@ var F = {
|
|
|
1568
1570
|
tableList: jt,
|
|
1569
1571
|
recordList: Xe
|
|
1570
1572
|
};
|
|
1571
|
-
function
|
|
1573
|
+
function Ar(t, e) {
|
|
1572
1574
|
return t.getUint8(e);
|
|
1573
1575
|
}
|
|
1574
1576
|
function gt(t, e) {
|
|
1575
1577
|
return t.getUint16(e, !1);
|
|
1576
1578
|
}
|
|
1577
|
-
function
|
|
1579
|
+
function rs(t, e) {
|
|
1578
1580
|
return t.getInt16(e, !1);
|
|
1579
1581
|
}
|
|
1580
1582
|
function sr(t, e) {
|
|
1581
1583
|
return t.getUint32(e, !1);
|
|
1582
1584
|
}
|
|
1583
|
-
function
|
|
1585
|
+
function Pn(t, e) {
|
|
1584
1586
|
var r = t.getInt16(e, !1), n = t.getUint16(e + 2, !1);
|
|
1585
1587
|
return r + n / 65535;
|
|
1586
1588
|
}
|
|
1587
|
-
function
|
|
1589
|
+
function ns(t, e) {
|
|
1588
1590
|
for (var r = "", n = e; n < e + 4; n += 1)
|
|
1589
1591
|
r += String.fromCharCode(t.getInt8(n));
|
|
1590
1592
|
return r;
|
|
1591
1593
|
}
|
|
1592
|
-
function
|
|
1594
|
+
function as(t, e, r) {
|
|
1593
1595
|
for (var n = 0, a = 0; a < r; a += 1)
|
|
1594
1596
|
n <<= 8, n += t.getUint8(e + a);
|
|
1595
1597
|
return n;
|
|
1596
1598
|
}
|
|
1597
|
-
function
|
|
1599
|
+
function ss(t, e, r) {
|
|
1598
1600
|
for (var n = [], a = e; a < r; a += 1)
|
|
1599
1601
|
n.push(t.getUint8(a));
|
|
1600
1602
|
return n;
|
|
1601
1603
|
}
|
|
1602
|
-
function
|
|
1604
|
+
function is(t) {
|
|
1603
1605
|
for (var e = "", r = 0; r < t.length; r += 1)
|
|
1604
1606
|
e += String.fromCharCode(t[r]);
|
|
1605
1607
|
return e;
|
|
1606
1608
|
}
|
|
1607
|
-
var
|
|
1609
|
+
var os = {
|
|
1608
1610
|
byte: 1,
|
|
1609
1611
|
uShort: 2,
|
|
1610
1612
|
short: 2,
|
|
@@ -1646,7 +1648,7 @@ g.prototype.parseULong = function() {
|
|
|
1646
1648
|
};
|
|
1647
1649
|
g.prototype.parseOffset32 = g.prototype.parseULong;
|
|
1648
1650
|
g.prototype.parseFixed = function() {
|
|
1649
|
-
var t =
|
|
1651
|
+
var t = Pn(this.data, this.offset + this.relativeOffset);
|
|
1650
1652
|
return this.relativeOffset += 4, t;
|
|
1651
1653
|
};
|
|
1652
1654
|
g.prototype.parseString = function(t) {
|
|
@@ -1668,7 +1670,7 @@ g.prototype.parseVersion = function(t) {
|
|
|
1668
1670
|
return this.relativeOffset += 4, t === void 0 && (t = 4096), e + r / t / 10;
|
|
1669
1671
|
};
|
|
1670
1672
|
g.prototype.skip = function(t, e) {
|
|
1671
|
-
e === void 0 && (e = 1), this.relativeOffset +=
|
|
1673
|
+
e === void 0 && (e = 1), this.relativeOffset += os[t] * e;
|
|
1672
1674
|
};
|
|
1673
1675
|
g.prototype.parseULongList = function(t) {
|
|
1674
1676
|
t === void 0 && (t = this.parseULong());
|
|
@@ -1851,7 +1853,7 @@ g.uLongList = g.prototype.parseULongList;
|
|
|
1851
1853
|
g.struct = g.prototype.parseStruct;
|
|
1852
1854
|
g.coverage = g.prototype.parseCoverage;
|
|
1853
1855
|
g.classDef = g.prototype.parseClassDef;
|
|
1854
|
-
var
|
|
1856
|
+
var Mr = {
|
|
1855
1857
|
reserved: g.uShort,
|
|
1856
1858
|
reqFeatureIndex: g.uShort,
|
|
1857
1859
|
featureIndexes: g.uShortList
|
|
@@ -1860,10 +1862,10 @@ g.prototype.parseScriptList = function() {
|
|
|
1860
1862
|
return this.parsePointer(g.recordList({
|
|
1861
1863
|
tag: g.tag,
|
|
1862
1864
|
script: g.pointer({
|
|
1863
|
-
defaultLangSys: g.pointer(
|
|
1865
|
+
defaultLangSys: g.pointer(Mr),
|
|
1864
1866
|
langSysRecords: g.recordList({
|
|
1865
1867
|
tag: g.tag,
|
|
1866
|
-
langSys: g.pointer(
|
|
1868
|
+
langSys: g.pointer(Mr)
|
|
1867
1869
|
})
|
|
1868
1870
|
})
|
|
1869
1871
|
})) || [];
|
|
@@ -1902,20 +1904,20 @@ g.prototype.parseFeatureVariationsList = function() {
|
|
|
1902
1904
|
}) || [];
|
|
1903
1905
|
};
|
|
1904
1906
|
var E = {
|
|
1905
|
-
getByte:
|
|
1906
|
-
getCard8:
|
|
1907
|
+
getByte: Ar,
|
|
1908
|
+
getCard8: Ar,
|
|
1907
1909
|
getUShort: gt,
|
|
1908
1910
|
getCard16: gt,
|
|
1909
|
-
getShort:
|
|
1911
|
+
getShort: rs,
|
|
1910
1912
|
getULong: sr,
|
|
1911
|
-
getFixed:
|
|
1912
|
-
getTag:
|
|
1913
|
-
getOffset:
|
|
1914
|
-
getBytes:
|
|
1915
|
-
bytesToString:
|
|
1913
|
+
getFixed: Pn,
|
|
1914
|
+
getTag: ns,
|
|
1915
|
+
getOffset: as,
|
|
1916
|
+
getBytes: ss,
|
|
1917
|
+
bytesToString: is,
|
|
1916
1918
|
Parser: g
|
|
1917
1919
|
};
|
|
1918
|
-
function
|
|
1920
|
+
function us(t, e) {
|
|
1919
1921
|
e.parseUShort(), t.length = e.parseULong(), t.language = e.parseULong();
|
|
1920
1922
|
var r;
|
|
1921
1923
|
t.groupCount = r = e.parseULong(), t.glyphIndexMap = {};
|
|
@@ -1923,7 +1925,7 @@ function os(t, e) {
|
|
|
1923
1925
|
for (var a = e.parseULong(), s = e.parseULong(), i = e.parseULong(), o = a; o <= s; o += 1)
|
|
1924
1926
|
t.glyphIndexMap[o] = i, i++;
|
|
1925
1927
|
}
|
|
1926
|
-
function
|
|
1928
|
+
function ls(t, e, r, n, a) {
|
|
1927
1929
|
t.length = e.parseUShort(), t.language = e.parseUShort();
|
|
1928
1930
|
var s;
|
|
1929
1931
|
t.segCount = s = e.parseUShort() >> 1, e.skip("uShort", 3), t.glyphIndexMap = {};
|
|
@@ -1931,7 +1933,7 @@ function us(t, e, r, n, a) {
|
|
|
1931
1933
|
for (var c = void 0, p = i.parseUShort(), d = o.parseUShort(), v = u.parseShort(), y = l.parseUShort(), m = d; m <= p; m += 1)
|
|
1932
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;
|
|
1933
1935
|
}
|
|
1934
|
-
function
|
|
1936
|
+
function hs(t, e) {
|
|
1935
1937
|
var r = {};
|
|
1936
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);
|
|
1937
1939
|
for (var n = -1, a = r.numTables - 1; a >= 0; a -= 1) {
|
|
@@ -1945,14 +1947,14 @@ function ls(t, e) {
|
|
|
1945
1947
|
throw new Error("No valid cmap sub-tables found.");
|
|
1946
1948
|
var o = new E.Parser(t, e + n);
|
|
1947
1949
|
if (r.format = o.parseUShort(), r.format === 12)
|
|
1948
|
-
|
|
1950
|
+
us(r, o);
|
|
1949
1951
|
else if (r.format === 4)
|
|
1950
|
-
|
|
1952
|
+
ls(r, o, t, e, n);
|
|
1951
1953
|
else
|
|
1952
1954
|
throw new Error("Only format 4 and 12 cmap tables are supported (found format " + r.format + ").");
|
|
1953
1955
|
return r;
|
|
1954
1956
|
}
|
|
1955
|
-
function
|
|
1957
|
+
function cs(t, e, r) {
|
|
1956
1958
|
t.segments.push({
|
|
1957
1959
|
end: e,
|
|
1958
1960
|
start: e,
|
|
@@ -1961,7 +1963,7 @@ function hs(t, e, r) {
|
|
|
1961
1963
|
glyphIndex: r
|
|
1962
1964
|
});
|
|
1963
1965
|
}
|
|
1964
|
-
function
|
|
1966
|
+
function fs(t) {
|
|
1965
1967
|
t.segments.push({
|
|
1966
1968
|
end: 65535,
|
|
1967
1969
|
start: 65535,
|
|
@@ -1969,7 +1971,7 @@ function cs(t) {
|
|
|
1969
1971
|
offset: 0
|
|
1970
1972
|
});
|
|
1971
1973
|
}
|
|
1972
|
-
function
|
|
1974
|
+
function ps(t) {
|
|
1973
1975
|
var e = !0, r;
|
|
1974
1976
|
for (r = t.length - 1; r > 0; r -= 1) {
|
|
1975
1977
|
var n = t.get(r);
|
|
@@ -2005,12 +2007,12 @@ function fs(t) {
|
|
|
2005
2007
|
var s = new F.Table("cmap", a);
|
|
2006
2008
|
for (s.segments = [], r = 0; r < t.length; r += 1) {
|
|
2007
2009
|
for (var i = t.get(r), o = 0; o < i.unicodes.length; o += 1)
|
|
2008
|
-
|
|
2010
|
+
cs(s, i.unicodes[o], r);
|
|
2009
2011
|
s.segments = s.segments.sort(function(b, x) {
|
|
2010
2012
|
return b.start - x.start;
|
|
2011
2013
|
});
|
|
2012
2014
|
}
|
|
2013
|
-
|
|
2015
|
+
fs(s);
|
|
2014
2016
|
var u = s.segments.length, l = 0, h = [], f = [], c = [], p = [], d = [], v = [];
|
|
2015
2017
|
for (r = 0; r < u; r += 1) {
|
|
2016
2018
|
var y = s.segments[r];
|
|
@@ -2031,7 +2033,7 @@ function fs(t) {
|
|
|
2031
2033
|
}
|
|
2032
2034
|
return s;
|
|
2033
2035
|
}
|
|
2034
|
-
var
|
|
2036
|
+
var Bn = { parse: hs, make: ps }, lt = [
|
|
2035
2037
|
".notdef",
|
|
2036
2038
|
"space",
|
|
2037
2039
|
"exclam",
|
|
@@ -2423,7 +2425,7 @@ var Pn = { parse: ls, make: fs }, lt = [
|
|
|
2423
2425
|
"Regular",
|
|
2424
2426
|
"Roman",
|
|
2425
2427
|
"Semibold"
|
|
2426
|
-
],
|
|
2428
|
+
], ds = [
|
|
2427
2429
|
"",
|
|
2428
2430
|
"",
|
|
2429
2431
|
"",
|
|
@@ -2676,7 +2678,7 @@ var Pn = { parse: ls, make: fs }, lt = [
|
|
|
2676
2678
|
"oslash",
|
|
2677
2679
|
"oe",
|
|
2678
2680
|
"germandbls"
|
|
2679
|
-
],
|
|
2681
|
+
], gs = [
|
|
2680
2682
|
"",
|
|
2681
2683
|
"",
|
|
2682
2684
|
"",
|
|
@@ -3192,10 +3194,10 @@ var Pn = { parse: ls, make: fs }, lt = [
|
|
|
3192
3194
|
"ccaron",
|
|
3193
3195
|
"dcroat"
|
|
3194
3196
|
];
|
|
3195
|
-
function
|
|
3197
|
+
function Dn(t) {
|
|
3196
3198
|
this.font = t;
|
|
3197
3199
|
}
|
|
3198
|
-
|
|
3200
|
+
Dn.prototype.charToGlyphIndex = function(t) {
|
|
3199
3201
|
var e = t.codePointAt(0), r = this.font.glyphs;
|
|
3200
3202
|
if (r) {
|
|
3201
3203
|
for (var n = 0; n < r.length; n += 1)
|
|
@@ -3247,7 +3249,7 @@ ir.prototype.nameToGlyphIndex = function(t) {
|
|
|
3247
3249
|
ir.prototype.glyphIndexToName = function(t) {
|
|
3248
3250
|
return this.names[t];
|
|
3249
3251
|
};
|
|
3250
|
-
function
|
|
3252
|
+
function vs(t) {
|
|
3251
3253
|
for (var e, r = t.tables.cmap.glyphIndexMap, n = Object.keys(r), a = 0; a < n.length; a += 1) {
|
|
3252
3254
|
var s = n[a], i = r[s];
|
|
3253
3255
|
e = t.glyphs.get(i), e.addUnicode(parseInt(s));
|
|
@@ -3255,7 +3257,7 @@ function gs(t) {
|
|
|
3255
3257
|
for (var o = 0; o < t.glyphs.length; o += 1)
|
|
3256
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));
|
|
3257
3259
|
}
|
|
3258
|
-
function
|
|
3260
|
+
function ms(t) {
|
|
3259
3261
|
t._IndexToUnicodeMap = {};
|
|
3260
3262
|
for (var e = t.tables.cmap.glyphIndexMap, r = Object.keys(e), n = 0; n < r.length; n += 1) {
|
|
3261
3263
|
var a = r[n], s = e[a];
|
|
@@ -3264,14 +3266,14 @@ function vs(t) {
|
|
|
3264
3266
|
} : t._IndexToUnicodeMap[s].unicodes.push(parseInt(a));
|
|
3265
3267
|
}
|
|
3266
3268
|
}
|
|
3267
|
-
function
|
|
3268
|
-
e.lowMemory ?
|
|
3269
|
+
function ys(t, e) {
|
|
3270
|
+
e.lowMemory ? ms(t) : vs(t);
|
|
3269
3271
|
}
|
|
3270
|
-
function
|
|
3272
|
+
function xs(t, e, r, n, a) {
|
|
3271
3273
|
t.beginPath(), t.moveTo(e, r), t.lineTo(n, a), t.stroke();
|
|
3272
3274
|
}
|
|
3273
|
-
var Ce = { line:
|
|
3274
|
-
function
|
|
3275
|
+
var Ce = { line: xs };
|
|
3276
|
+
function bs(t, e) {
|
|
3275
3277
|
var r = e || new V();
|
|
3276
3278
|
return {
|
|
3277
3279
|
configurable: !0,
|
|
@@ -3287,7 +3289,7 @@ function ae(t) {
|
|
|
3287
3289
|
this.bindConstructorValues(t);
|
|
3288
3290
|
}
|
|
3289
3291
|
ae.prototype.bindConstructorValues = function(t) {
|
|
3290
|
-
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", bs(this, t.path));
|
|
3291
3293
|
};
|
|
3292
3294
|
ae.prototype.addUnicode = function(t) {
|
|
3293
3295
|
this.unicodes.length === 0 && (this.unicode = t), this.unicodes.push(t);
|
|
@@ -3406,10 +3408,10 @@ or.prototype.get = function(t) {
|
|
|
3406
3408
|
or.prototype.push = function(t, e) {
|
|
3407
3409
|
this.glyphs[t] = e, this.length++;
|
|
3408
3410
|
};
|
|
3409
|
-
function
|
|
3411
|
+
function Ss(t, e) {
|
|
3410
3412
|
return new ae({ index: e, font: t });
|
|
3411
3413
|
}
|
|
3412
|
-
function
|
|
3414
|
+
function ks(t, e, r, n, a, s) {
|
|
3413
3415
|
return function() {
|
|
3414
3416
|
var i = new ae({ index: e, font: t });
|
|
3415
3417
|
return i.path = function() {
|
|
@@ -3419,7 +3421,7 @@ function Ss(t, e, r, n, a, s) {
|
|
|
3419
3421
|
}, it(i, "xMin", "_xMin"), it(i, "xMax", "_xMax"), it(i, "yMin", "_yMin"), it(i, "yMax", "_yMax"), i;
|
|
3420
3422
|
};
|
|
3421
3423
|
}
|
|
3422
|
-
function
|
|
3424
|
+
function Fs(t, e, r, n) {
|
|
3423
3425
|
return function() {
|
|
3424
3426
|
var a = new ae({ index: e, font: t });
|
|
3425
3427
|
return a.path = function() {
|
|
@@ -3428,15 +3430,15 @@ function ks(t, e, r, n) {
|
|
|
3428
3430
|
}, a;
|
|
3429
3431
|
};
|
|
3430
3432
|
}
|
|
3431
|
-
var de = { GlyphSet: or, glyphLoader:
|
|
3432
|
-
function
|
|
3433
|
+
var de = { GlyphSet: or, glyphLoader: Ss, ttfGlyphLoader: ks, cffGlyphLoader: Fs };
|
|
3434
|
+
function Gn(t, e) {
|
|
3433
3435
|
if (t === e)
|
|
3434
3436
|
return !0;
|
|
3435
3437
|
if (Array.isArray(t) && Array.isArray(e)) {
|
|
3436
3438
|
if (t.length !== e.length)
|
|
3437
3439
|
return !1;
|
|
3438
3440
|
for (var r = 0; r < t.length; r += 1)
|
|
3439
|
-
if (!
|
|
3441
|
+
if (!Gn(t[r], e[r]))
|
|
3440
3442
|
return !1;
|
|
3441
3443
|
return !0;
|
|
3442
3444
|
} else
|
|
@@ -3462,7 +3464,7 @@ function xe(t, e, r) {
|
|
|
3462
3464
|
}
|
|
3463
3465
|
return { objects: a, startOffset: e, endOffset: o };
|
|
3464
3466
|
}
|
|
3465
|
-
function
|
|
3467
|
+
function Ts(t, e) {
|
|
3466
3468
|
var r = [], n = E.getCard16(t, e), a, s;
|
|
3467
3469
|
if (n !== 0) {
|
|
3468
3470
|
var i = E.getByte(t, e + 2);
|
|
@@ -3474,7 +3476,7 @@ function Fs(t, e) {
|
|
|
3474
3476
|
s = e + 2;
|
|
3475
3477
|
return { offsets: r, startOffset: e, endOffset: s };
|
|
3476
3478
|
}
|
|
3477
|
-
function
|
|
3479
|
+
function ws(t, e, r, n, a) {
|
|
3478
3480
|
var s = E.getCard16(r, n), i = 0;
|
|
3479
3481
|
if (s !== 0) {
|
|
3480
3482
|
var o = E.getByte(r, n + 2);
|
|
@@ -3483,7 +3485,7 @@ function Ts(t, e, r, n, a) {
|
|
|
3483
3485
|
var u = E.getBytes(r, i + e[t], i + e[t + 1]);
|
|
3484
3486
|
return u;
|
|
3485
3487
|
}
|
|
3486
|
-
function
|
|
3488
|
+
function Cs(t) {
|
|
3487
3489
|
for (var e = "", r = 15, n = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "E", "E-", null, "-"]; ; ) {
|
|
3488
3490
|
var a = t.parseByte(), s = a >> 4, i = a & 15;
|
|
3489
3491
|
if (s === r || (e += n[s], i === r))
|
|
@@ -3492,14 +3494,14 @@ function ws(t) {
|
|
|
3492
3494
|
}
|
|
3493
3495
|
return parseFloat(e);
|
|
3494
3496
|
}
|
|
3495
|
-
function
|
|
3497
|
+
function Es(t, e) {
|
|
3496
3498
|
var r, n, a, s;
|
|
3497
3499
|
if (e === 28)
|
|
3498
3500
|
return r = t.parseByte(), n = t.parseByte(), r << 8 | n;
|
|
3499
3501
|
if (e === 29)
|
|
3500
3502
|
return r = t.parseByte(), n = t.parseByte(), a = t.parseByte(), s = t.parseByte(), r << 24 | n << 16 | a << 8 | s;
|
|
3501
3503
|
if (e === 30)
|
|
3502
|
-
return
|
|
3504
|
+
return Cs(t);
|
|
3503
3505
|
if (e >= 32 && e <= 246)
|
|
3504
3506
|
return e - 139;
|
|
3505
3507
|
if (e >= 247 && e <= 250)
|
|
@@ -3508,7 +3510,7 @@ function Cs(t, e) {
|
|
|
3508
3510
|
return r = t.parseByte(), -(e - 251) * 256 - r - 108;
|
|
3509
3511
|
throw new Error("Invalid b0 " + e);
|
|
3510
3512
|
}
|
|
3511
|
-
function
|
|
3513
|
+
function Os(t) {
|
|
3512
3514
|
for (var e = {}, r = 0; r < t.length; r += 1) {
|
|
3513
3515
|
var n = t[r][0], a = t[r][1], s = void 0;
|
|
3514
3516
|
if (a.length === 1 ? s = a[0] : s = a, e.hasOwnProperty(n) && !isNaN(e[n]))
|
|
@@ -3517,19 +3519,19 @@ function Es(t) {
|
|
|
3517
3519
|
}
|
|
3518
3520
|
return e;
|
|
3519
3521
|
}
|
|
3520
|
-
function
|
|
3522
|
+
function Nn(t, e, r) {
|
|
3521
3523
|
e = e !== void 0 ? e : 0;
|
|
3522
3524
|
var n = new E.Parser(t, e), a = [], s = [];
|
|
3523
3525
|
for (r = r !== void 0 ? r : t.length; n.relativeOffset < r; ) {
|
|
3524
3526
|
var i = n.parseByte();
|
|
3525
|
-
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(Es(n, i));
|
|
3526
3528
|
}
|
|
3527
|
-
return
|
|
3529
|
+
return Os(a);
|
|
3528
3530
|
}
|
|
3529
3531
|
function We(t, e) {
|
|
3530
3532
|
return e <= 390 ? e = lt[e] : e = t[e - 391], e;
|
|
3531
3533
|
}
|
|
3532
|
-
function
|
|
3534
|
+
function _n(t, e, r) {
|
|
3533
3535
|
for (var n = {}, a, s = 0; s < e.length; s += 1) {
|
|
3534
3536
|
var i = e[s];
|
|
3535
3537
|
if (Array.isArray(i.type)) {
|
|
@@ -3543,11 +3545,11 @@ function Nn(t, e, r) {
|
|
|
3543
3545
|
}
|
|
3544
3546
|
return n;
|
|
3545
3547
|
}
|
|
3546
|
-
function
|
|
3548
|
+
function Us(t, e) {
|
|
3547
3549
|
var r = {};
|
|
3548
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;
|
|
3549
3551
|
}
|
|
3550
|
-
var
|
|
3552
|
+
var Hn = [
|
|
3551
3553
|
{ name: "version", op: 0, type: "SID" },
|
|
3552
3554
|
{ name: "notice", op: 1, type: "SID" },
|
|
3553
3555
|
{ name: "copyright", op: 1200, type: "SID" },
|
|
@@ -3583,26 +3585,26 @@ var _n = [
|
|
|
3583
3585
|
{ name: "fdArray", op: 1236, type: "offset" },
|
|
3584
3586
|
{ name: "fdSelect", op: 1237, type: "offset" },
|
|
3585
3587
|
{ name: "fontName", op: 1238, type: "SID" }
|
|
3586
|
-
],
|
|
3588
|
+
], zn = [
|
|
3587
3589
|
{ name: "subrs", op: 19, type: "offset", value: 0 },
|
|
3588
3590
|
{ name: "defaultWidthX", op: 20, type: "number", value: 0 },
|
|
3589
3591
|
{ name: "nominalWidthX", op: 21, type: "number", value: 0 }
|
|
3590
3592
|
];
|
|
3591
|
-
function
|
|
3592
|
-
var r =
|
|
3593
|
-
return
|
|
3593
|
+
function Ls(t, e) {
|
|
3594
|
+
var r = Nn(t, 0, t.byteLength);
|
|
3595
|
+
return _n(r, Hn, e);
|
|
3594
3596
|
}
|
|
3595
|
-
function
|
|
3596
|
-
var a =
|
|
3597
|
-
return
|
|
3597
|
+
function Wn(t, e, r, n) {
|
|
3598
|
+
var a = Nn(t, e, r);
|
|
3599
|
+
return _n(a, zn, n);
|
|
3598
3600
|
}
|
|
3599
|
-
function
|
|
3601
|
+
function Pr(t, e, r, n) {
|
|
3600
3602
|
for (var a = [], s = 0; s < r.length; s += 1) {
|
|
3601
|
-
var i = new DataView(new Uint8Array(r[s]).buffer), o =
|
|
3603
|
+
var i = new DataView(new Uint8Array(r[s]).buffer), o = Ls(i, n);
|
|
3602
3604
|
o._subrs = [], o._subrsBias = 0, o._defaultWidthX = 0, o._nominalWidthX = 0;
|
|
3603
3605
|
var u = o.private[0], l = o.private[1];
|
|
3604
3606
|
if (u !== 0 && l !== 0) {
|
|
3605
|
-
var h =
|
|
3607
|
+
var h = Wn(t, l + e, u, n);
|
|
3606
3608
|
if (o._defaultWidthX = h.defaultWidthX, o._nominalWidthX = h.nominalWidthX, h.subrs !== 0) {
|
|
3607
3609
|
var f = l + h.subrs, c = xe(t, f + e);
|
|
3608
3610
|
o._subrs = c.objects, o._subrsBias = Kt(o._subrs);
|
|
@@ -3613,7 +3615,7 @@ function Mr(t, e, r, n) {
|
|
|
3613
3615
|
}
|
|
3614
3616
|
return a;
|
|
3615
3617
|
}
|
|
3616
|
-
function
|
|
3618
|
+
function Rs(t, e, r, n) {
|
|
3617
3619
|
var a, s, i = new E.Parser(t, e);
|
|
3618
3620
|
r -= 1;
|
|
3619
3621
|
var o = [".notdef"], u = i.parseCard8();
|
|
@@ -3636,7 +3638,7 @@ function Ls(t, e, r, n) {
|
|
|
3636
3638
|
throw new Error("Unknown charset format " + u);
|
|
3637
3639
|
return o;
|
|
3638
3640
|
}
|
|
3639
|
-
function
|
|
3641
|
+
function As(t, e, r) {
|
|
3640
3642
|
var n, a = {}, s = new E.Parser(t, e), i = s.parseCard8();
|
|
3641
3643
|
if (i === 0)
|
|
3642
3644
|
for (var o = s.parseCard8(), u = 0; u < o; u += 1)
|
|
@@ -3651,7 +3653,7 @@ function Rs(t, e, r) {
|
|
|
3651
3653
|
throw new Error("Unknown encoding format " + i);
|
|
3652
3654
|
return new vt(a, r);
|
|
3653
3655
|
}
|
|
3654
|
-
function
|
|
3656
|
+
function Br(t, e, r) {
|
|
3655
3657
|
var n, a, s, i, o = new V(), u = [], l = 0, h = !1, f = !1, c = 0, p = 0, d, v, y, m;
|
|
3656
3658
|
if (t.isCIDFont) {
|
|
3657
3659
|
var b = t.tables.cff.topDict._fdSelect[e.index], x = t.tables.cff.topDict._fdArray[b];
|
|
@@ -3667,7 +3669,7 @@ function Pr(t, e, r) {
|
|
|
3667
3669
|
w = u.length % 2 !== 0, w && !h && (T = u.shift() + m), l += u.length >> 1, u.length = 0, h = !0;
|
|
3668
3670
|
}
|
|
3669
3671
|
function O(w) {
|
|
3670
|
-
for (var M, N, K, $, Y,
|
|
3672
|
+
for (var M, N, K, $, Y, D, _, I, W, Z, q, Q, B = 0; B < w.length; ) {
|
|
3671
3673
|
var j = w[B];
|
|
3672
3674
|
switch (B += 1, j) {
|
|
3673
3675
|
case 1:
|
|
@@ -3696,23 +3698,23 @@ function Pr(t, e, r) {
|
|
|
3696
3698
|
n = c + u.shift(), a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), c = s + u.shift(), p = i + u.shift(), o.curveTo(n, a, s, i, c, p);
|
|
3697
3699
|
break;
|
|
3698
3700
|
case 10:
|
|
3699
|
-
Y = u.pop() + v,
|
|
3701
|
+
Y = u.pop() + v, D = d[Y], D && O(D);
|
|
3700
3702
|
break;
|
|
3701
3703
|
case 11:
|
|
3702
3704
|
return;
|
|
3703
3705
|
case 12:
|
|
3704
3706
|
switch (j = w[B], B += 1, j) {
|
|
3705
3707
|
case 35:
|
|
3706
|
-
n = c + u.shift(), a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(),
|
|
3708
|
+
n = c + u.shift(), a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(), I = i + u.shift(), W = _ + u.shift(), Z = I + u.shift(), q = W + u.shift(), Q = Z + u.shift(), c = q + u.shift(), p = Q + u.shift(), u.shift(), o.curveTo(n, a, s, i, _, I), o.curveTo(W, Z, q, Q, c, p);
|
|
3707
3709
|
break;
|
|
3708
3710
|
case 34:
|
|
3709
|
-
n = c + u.shift(), a = p, s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(),
|
|
3711
|
+
n = c + u.shift(), a = p, s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(), I = i, W = _ + u.shift(), Z = i, q = W + u.shift(), Q = p, c = q + u.shift(), o.curveTo(n, a, s, i, _, I), o.curveTo(W, Z, q, Q, c, p);
|
|
3710
3712
|
break;
|
|
3711
3713
|
case 36:
|
|
3712
|
-
n = c + u.shift(), a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(),
|
|
3714
|
+
n = c + u.shift(), a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(), I = i, W = _ + u.shift(), Z = i, q = W + u.shift(), Q = Z + u.shift(), c = q + u.shift(), o.curveTo(n, a, s, i, _, I), o.curveTo(W, Z, q, Q, c, p);
|
|
3713
3715
|
break;
|
|
3714
3716
|
case 37:
|
|
3715
|
-
n = c + u.shift(), a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(),
|
|
3717
|
+
n = c + u.shift(), a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), _ = s + u.shift(), I = i + u.shift(), W = _ + u.shift(), Z = I + u.shift(), q = W + u.shift(), Q = Z + u.shift(), Math.abs(q - c) > Math.abs(Q - p) ? c = q + u.shift() : p = Q + u.shift(), o.curveTo(n, a, s, i, _, I), o.curveTo(W, Z, q, Q, c, p);
|
|
3716
3718
|
break;
|
|
3717
3719
|
default:
|
|
3718
3720
|
console.log("Glyph " + e.index + ": unknown operator 1200" + j), u.length = 0;
|
|
@@ -3759,7 +3761,7 @@ function Pr(t, e, r) {
|
|
|
3759
3761
|
M = w[B], N = w[B + 1], u.push((M << 24 | N << 16) >> 16), B += 2;
|
|
3760
3762
|
break;
|
|
3761
3763
|
case 29:
|
|
3762
|
-
Y = u.pop() + t.gsubrsBias,
|
|
3764
|
+
Y = u.pop() + t.gsubrsBias, D = t.gsubrs[Y], D && O(D);
|
|
3763
3765
|
break;
|
|
3764
3766
|
case 30:
|
|
3765
3767
|
for (; u.length > 0 && (n = c, a = p + u.shift(), s = n + u.shift(), i = a + u.shift(), c = s + u.shift(), p = i + (u.length === 1 ? u.shift() : 0), o.curveTo(n, a, s, i, c, p), u.length !== 0); )
|
|
@@ -3776,7 +3778,7 @@ function Pr(t, e, r) {
|
|
|
3776
3778
|
}
|
|
3777
3779
|
return O(r), e.advanceWidth = T, o;
|
|
3778
3780
|
}
|
|
3779
|
-
function
|
|
3781
|
+
function Ms(t, e, r, n) {
|
|
3780
3782
|
var a = [], s, i = new E.Parser(t, e), o = i.parseCard8();
|
|
3781
3783
|
if (o === 0)
|
|
3782
3784
|
for (var u = 0; u < r; u++) {
|
|
@@ -3803,11 +3805,11 @@ function As(t, e, r, n) {
|
|
|
3803
3805
|
throw new Error("CFF Table CID Font FDSelect table has unsupported format " + o);
|
|
3804
3806
|
return a;
|
|
3805
3807
|
}
|
|
3806
|
-
function
|
|
3808
|
+
function Ps(t, e, r, n) {
|
|
3807
3809
|
r.tables.cff = {};
|
|
3808
|
-
var a =
|
|
3810
|
+
var a = Us(t, e), s = xe(t, a.endOffset, E.bytesToString), i = xe(t, s.endOffset), o = xe(t, i.endOffset, E.bytesToString), u = xe(t, o.endOffset);
|
|
3809
3811
|
r.gsubrs = u.objects, r.gsubrsBias = Kt(r.gsubrs);
|
|
3810
|
-
var l =
|
|
3812
|
+
var l = Pr(t, e, i.objects, o.objects);
|
|
3811
3813
|
if (l.length !== 1)
|
|
3812
3814
|
throw new Error("CFF table has too many fonts in 'FontSet' - count of fonts NameIndex.length = " + l.length);
|
|
3813
3815
|
var h = l[0];
|
|
@@ -3816,34 +3818,34 @@ function Ms(t, e, r, n) {
|
|
|
3816
3818
|
if (f === 0 || c === 0)
|
|
3817
3819
|
throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
|
|
3818
3820
|
f += e;
|
|
3819
|
-
var p = xe(t, f), d =
|
|
3820
|
-
h._fdArray = d, c += e, h._fdSelect =
|
|
3821
|
+
var p = xe(t, f), d = Pr(t, e, p.objects, o.objects);
|
|
3822
|
+
h._fdArray = d, c += e, h._fdSelect = Ms(t, c, r.numGlyphs, d.length);
|
|
3821
3823
|
}
|
|
3822
|
-
var v = e + h.private[1], y =
|
|
3824
|
+
var v = e + h.private[1], y = Wn(t, v, h.private[0], o.objects);
|
|
3823
3825
|
if (r.defaultWidthX = y.defaultWidthX, r.nominalWidthX = y.nominalWidthX, y.subrs !== 0) {
|
|
3824
3826
|
var m = v + y.subrs, b = xe(t, m);
|
|
3825
3827
|
r.subrs = b.objects, r.subrsBias = Kt(r.subrs);
|
|
3826
3828
|
} else
|
|
3827
3829
|
r.subrs = [], r.subrsBias = 0;
|
|
3828
3830
|
var x;
|
|
3829
|
-
n.lowMemory ? (x =
|
|
3830
|
-
var T =
|
|
3831
|
-
if (h.encoding === 0 ? r.cffEncoding = new vt(
|
|
3831
|
+
n.lowMemory ? (x = Ts(t, e + h.charStrings), r.nGlyphs = x.offsets.length) : (x = xe(t, e + h.charStrings), r.nGlyphs = x.objects.length);
|
|
3832
|
+
var T = Rs(t, e + h.charset, r.nGlyphs, o.objects);
|
|
3833
|
+
if (h.encoding === 0 ? r.cffEncoding = new vt(ds, T) : h.encoding === 1 ? r.cffEncoding = new vt(gs, T) : r.cffEncoding = As(t, e + h.encoding, T), r.encoding = r.encoding || r.cffEncoding, r.glyphs = new de.GlyphSet(r), n.lowMemory)
|
|
3832
3834
|
r._push = function(O) {
|
|
3833
|
-
var w =
|
|
3834
|
-
r.glyphs.push(O, de.cffGlyphLoader(r, O,
|
|
3835
|
+
var w = ws(O, x.offsets, t, e + h.charStrings);
|
|
3836
|
+
r.glyphs.push(O, de.cffGlyphLoader(r, O, Br, w));
|
|
3835
3837
|
};
|
|
3836
3838
|
else
|
|
3837
3839
|
for (var S = 0; S < r.nGlyphs; S += 1) {
|
|
3838
3840
|
var A = x.objects[S];
|
|
3839
|
-
r.glyphs.push(S, de.cffGlyphLoader(r, S,
|
|
3841
|
+
r.glyphs.push(S, de.cffGlyphLoader(r, S, Br, A));
|
|
3840
3842
|
}
|
|
3841
3843
|
}
|
|
3842
|
-
function
|
|
3844
|
+
function Vn(t, e) {
|
|
3843
3845
|
var r, n = lt.indexOf(t);
|
|
3844
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;
|
|
3845
3847
|
}
|
|
3846
|
-
function
|
|
3848
|
+
function Bs() {
|
|
3847
3849
|
return new F.Record("Header", [
|
|
3848
3850
|
{ name: "major", type: "Card8", value: 1 },
|
|
3849
3851
|
{ name: "minor", type: "Card8", value: 0 },
|
|
@@ -3851,7 +3853,7 @@ function Ps() {
|
|
|
3851
3853
|
{ name: "major", type: "Card8", value: 1 }
|
|
3852
3854
|
]);
|
|
3853
3855
|
}
|
|
3854
|
-
function
|
|
3856
|
+
function Ds(t) {
|
|
3855
3857
|
var e = new F.Record("Name INDEX", [
|
|
3856
3858
|
{ name: "names", type: "INDEX", value: [] }
|
|
3857
3859
|
]);
|
|
@@ -3860,18 +3862,18 @@ function Bs(t) {
|
|
|
3860
3862
|
e.names.push({ name: "name_" + r, type: "NAME", value: t[r] });
|
|
3861
3863
|
return e;
|
|
3862
3864
|
}
|
|
3863
|
-
function
|
|
3865
|
+
function qn(t, e, r) {
|
|
3864
3866
|
for (var n = {}, a = 0; a < t.length; a += 1) {
|
|
3865
3867
|
var s = t[a], i = e[s.name];
|
|
3866
|
-
i !== void 0 && !
|
|
3868
|
+
i !== void 0 && !Gn(i, s.value) && (s.type === "SID" && (i = Vn(i, r)), n[s.op] = { name: s.name, type: s.type, value: i });
|
|
3867
3869
|
}
|
|
3868
3870
|
return n;
|
|
3869
3871
|
}
|
|
3870
|
-
function
|
|
3872
|
+
function Dr(t, e) {
|
|
3871
3873
|
var r = new F.Record("Top DICT", [
|
|
3872
3874
|
{ name: "dict", type: "DICT", value: {} }
|
|
3873
3875
|
]);
|
|
3874
|
-
return r.dict =
|
|
3876
|
+
return r.dict = qn(Hn, t, e), r;
|
|
3875
3877
|
}
|
|
3876
3878
|
function Ir(t) {
|
|
3877
3879
|
var e = new F.Record("Top DICT INDEX", [
|
|
@@ -3888,21 +3890,21 @@ function Is(t) {
|
|
|
3888
3890
|
e.strings.push({ name: "string_" + r, type: "STRING", value: t[r] });
|
|
3889
3891
|
return e;
|
|
3890
3892
|
}
|
|
3891
|
-
function
|
|
3893
|
+
function Gs() {
|
|
3892
3894
|
return new F.Record("Global Subr INDEX", [
|
|
3893
3895
|
{ name: "subrs", type: "INDEX", value: [] }
|
|
3894
3896
|
]);
|
|
3895
3897
|
}
|
|
3896
|
-
function
|
|
3898
|
+
function Ns(t, e) {
|
|
3897
3899
|
for (var r = new F.Record("Charsets", [
|
|
3898
3900
|
{ name: "format", type: "Card8", value: 0 }
|
|
3899
3901
|
]), n = 0; n < t.length; n += 1) {
|
|
3900
|
-
var a = t[n], s =
|
|
3902
|
+
var a = t[n], s = Vn(a, e);
|
|
3901
3903
|
r.fields.push({ name: "glyph_" + n, type: "SID", value: s });
|
|
3902
3904
|
}
|
|
3903
3905
|
return r;
|
|
3904
3906
|
}
|
|
3905
|
-
function
|
|
3907
|
+
function _s(t) {
|
|
3906
3908
|
var e = [], r = t.path;
|
|
3907
3909
|
e.push({ name: "width", type: "NUMBER", value: t.advanceWidth });
|
|
3908
3910
|
for (var n = 0, a = 0, s = 0; s < r.commands.length; s += 1) {
|
|
@@ -3930,22 +3932,22 @@ function Ns(t) {
|
|
|
3930
3932
|
}
|
|
3931
3933
|
return e.push({ name: "endchar", type: "OP", value: 14 }), e;
|
|
3932
3934
|
}
|
|
3933
|
-
function
|
|
3935
|
+
function Hs(t) {
|
|
3934
3936
|
for (var e = new F.Record("CharStrings INDEX", [
|
|
3935
3937
|
{ name: "charStrings", type: "INDEX", value: [] }
|
|
3936
3938
|
]), r = 0; r < t.length; r += 1) {
|
|
3937
|
-
var n = t.get(r), a =
|
|
3939
|
+
var n = t.get(r), a = _s(n);
|
|
3938
3940
|
e.charStrings.push({ name: n.name, type: "CHARSTRING", value: a });
|
|
3939
3941
|
}
|
|
3940
3942
|
return e;
|
|
3941
3943
|
}
|
|
3942
|
-
function
|
|
3944
|
+
function zs(t, e) {
|
|
3943
3945
|
var r = new F.Record("Private DICT", [
|
|
3944
3946
|
{ name: "dict", type: "DICT", value: {} }
|
|
3945
3947
|
]);
|
|
3946
|
-
return r.dict =
|
|
3948
|
+
return r.dict = qn(zn, t, e), r;
|
|
3947
3949
|
}
|
|
3948
|
-
function
|
|
3950
|
+
function Ws(t, e) {
|
|
3949
3951
|
for (var r = new F.Table("CFF ", [
|
|
3950
3952
|
{ name: "header", type: "RECORD" },
|
|
3951
3953
|
{ name: "nameIndex", type: "RECORD" },
|
|
@@ -3969,18 +3971,18 @@ function zs(t, e) {
|
|
|
3969
3971
|
}, s = {}, i = [], o, u = 1; u < t.length; u += 1)
|
|
3970
3972
|
o = t.get(u), i.push(o.name);
|
|
3971
3973
|
var l = [];
|
|
3972
|
-
r.header =
|
|
3973
|
-
var h =
|
|
3974
|
-
r.topDictIndex = Ir(h), r.globalSubrIndex =
|
|
3974
|
+
r.header = Bs(), r.nameIndex = Ds([e.postScriptName]);
|
|
3975
|
+
var h = Dr(a, l);
|
|
3976
|
+
r.topDictIndex = Ir(h), r.globalSubrIndex = Gs(), r.charsets = Ns(i, l), r.charStringsIndex = Hs(t), r.privateDict = zs(s, l), r.stringIndex = Is(l);
|
|
3975
3977
|
var f = r.header.sizeOf() + r.nameIndex.sizeOf() + r.topDictIndex.sizeOf() + r.stringIndex.sizeOf() + r.globalSubrIndex.sizeOf();
|
|
3976
|
-
return a.charset = f, a.encoding = 0, a.charStrings = a.charset + r.charsets.sizeOf(), a.private[1] = a.charStrings + r.charStringsIndex.sizeOf(), h =
|
|
3978
|
+
return a.charset = f, a.encoding = 0, a.charStrings = a.charset + r.charsets.sizeOf(), a.private[1] = a.charStrings + r.charStringsIndex.sizeOf(), h = Dr(a, l), r.topDictIndex = Ir(h), r;
|
|
3977
3979
|
}
|
|
3978
|
-
var
|
|
3979
|
-
function
|
|
3980
|
+
var Xn = { parse: Ps, make: Ws };
|
|
3981
|
+
function Vs(t, e) {
|
|
3980
3982
|
var r = {}, n = new E.Parser(t, e);
|
|
3981
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;
|
|
3982
3984
|
}
|
|
3983
|
-
function
|
|
3985
|
+
function qs(t) {
|
|
3984
3986
|
var e = Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3) + 2082844800, r = e;
|
|
3985
3987
|
return t.createdTimestamp && (r = t.createdTimestamp + 2082844800), new F.Table("head", [
|
|
3986
3988
|
{ name: "version", type: "FIXED", value: 65536 },
|
|
@@ -4002,12 +4004,12 @@ function Vs(t) {
|
|
|
4002
4004
|
{ name: "glyphDataFormat", type: "SHORT", value: 0 }
|
|
4003
4005
|
], t);
|
|
4004
4006
|
}
|
|
4005
|
-
var
|
|
4006
|
-
function
|
|
4007
|
+
var Yn = { parse: Vs, make: qs };
|
|
4008
|
+
function Xs(t, e) {
|
|
4007
4009
|
var r = {}, n = new E.Parser(t, e);
|
|
4008
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;
|
|
4009
4011
|
}
|
|
4010
|
-
function
|
|
4012
|
+
function Ys(t) {
|
|
4011
4013
|
return new F.Table("hhea", [
|
|
4012
4014
|
{ name: "version", type: "FIXED", value: 65536 },
|
|
4013
4015
|
{ name: "ascender", type: "FWORD", value: 0 },
|
|
@@ -4028,15 +4030,15 @@ function Xs(t) {
|
|
|
4028
4030
|
{ name: "numberOfHMetrics", type: "USHORT", value: 0 }
|
|
4029
4031
|
], t);
|
|
4030
4032
|
}
|
|
4031
|
-
var
|
|
4032
|
-
function
|
|
4033
|
+
var Zn = { parse: Xs, make: Ys };
|
|
4034
|
+
function Zs(t, e, r, n, a) {
|
|
4033
4035
|
for (var s, i, o = new E.Parser(t, e), u = 0; u < n; u += 1) {
|
|
4034
4036
|
u < r && (s = o.parseUShort(), i = o.parseShort());
|
|
4035
4037
|
var l = a.get(u);
|
|
4036
4038
|
l.advanceWidth = s, l.leftSideBearing = i;
|
|
4037
4039
|
}
|
|
4038
4040
|
}
|
|
4039
|
-
function
|
|
4041
|
+
function js(t, e, r, n, a) {
|
|
4040
4042
|
t._hmtxTableData = {};
|
|
4041
4043
|
for (var s, i, o = new E.Parser(e, r), u = 0; u < a; u += 1)
|
|
4042
4044
|
u < n && (s = o.parseUShort(), i = o.parseShort()), t._hmtxTableData[u] = {
|
|
@@ -4044,18 +4046,18 @@ function Zs(t, e, r, n, a) {
|
|
|
4044
4046
|
leftSideBearing: i
|
|
4045
4047
|
};
|
|
4046
4048
|
}
|
|
4047
|
-
function
|
|
4048
|
-
i.lowMemory ?
|
|
4049
|
+
function Ks(t, e, r, n, a, s, i) {
|
|
4050
|
+
i.lowMemory ? js(t, e, r, n, a) : Zs(e, r, n, a, s);
|
|
4049
4051
|
}
|
|
4050
|
-
function
|
|
4052
|
+
function Qs(t) {
|
|
4051
4053
|
for (var e = new F.Table("hmtx", []), r = 0; r < t.length; r += 1) {
|
|
4052
4054
|
var n = t.get(r), a = n.advanceWidth || 0, s = n.leftSideBearing || 0;
|
|
4053
4055
|
e.fields.push({ name: "advanceWidth_" + r, type: "USHORT", value: a }), e.fields.push({ name: "leftSideBearing_" + r, type: "SHORT", value: s });
|
|
4054
4056
|
}
|
|
4055
4057
|
return e;
|
|
4056
4058
|
}
|
|
4057
|
-
var
|
|
4058
|
-
function
|
|
4059
|
+
var jn = { parse: Ks, make: Qs };
|
|
4060
|
+
function $s(t) {
|
|
4059
4061
|
for (var e = new F.Table("ltag", [
|
|
4060
4062
|
{ name: "version", type: "ULONG", value: 1 },
|
|
4061
4063
|
{ name: "flags", type: "ULONG", value: 0 },
|
|
@@ -4066,7 +4068,7 @@ function Qs(t) {
|
|
|
4066
4068
|
}
|
|
4067
4069
|
return e.fields.push({ name: "stringPool", type: "CHARARRAY", value: r }), e;
|
|
4068
4070
|
}
|
|
4069
|
-
function
|
|
4071
|
+
function Js(t, e) {
|
|
4070
4072
|
var r = new E.Parser(t, e), n = r.parseULong();
|
|
4071
4073
|
U.argument(n === 1, "Unsupported ltag table version."), r.skip("uLong", 1);
|
|
4072
4074
|
for (var a = r.parseULong(), s = [], i = 0; i < a; i++) {
|
|
@@ -4076,18 +4078,18 @@ function $s(t, e) {
|
|
|
4076
4078
|
}
|
|
4077
4079
|
return s;
|
|
4078
4080
|
}
|
|
4079
|
-
var
|
|
4080
|
-
function
|
|
4081
|
+
var Kn = { make: $s, parse: Js };
|
|
4082
|
+
function ei(t, e) {
|
|
4081
4083
|
var r = {}, n = new E.Parser(t, e);
|
|
4082
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;
|
|
4083
4085
|
}
|
|
4084
|
-
function
|
|
4086
|
+
function ti(t) {
|
|
4085
4087
|
return new F.Table("maxp", [
|
|
4086
4088
|
{ name: "version", type: "FIXED", value: 20480 },
|
|
4087
4089
|
{ name: "numGlyphs", type: "USHORT", value: t }
|
|
4088
4090
|
]);
|
|
4089
4091
|
}
|
|
4090
|
-
var
|
|
4092
|
+
var Qn = { parse: ei, make: ti }, $n = [
|
|
4091
4093
|
"copyright",
|
|
4092
4094
|
// 0
|
|
4093
4095
|
"fontFamily",
|
|
@@ -4134,7 +4136,7 @@ var Kn = { parse: Js, make: ei }, Qn = [
|
|
|
4134
4136
|
// 21
|
|
4135
4137
|
"wwsSubfamily"
|
|
4136
4138
|
// 22
|
|
4137
|
-
],
|
|
4139
|
+
], Jn = {
|
|
4138
4140
|
0: "en",
|
|
4139
4141
|
1: "fr",
|
|
4140
4142
|
2: "de",
|
|
@@ -4254,7 +4256,7 @@ var Kn = { parse: Js, make: ei }, Qn = [
|
|
|
4254
4256
|
149: "kl",
|
|
4255
4257
|
150: "az",
|
|
4256
4258
|
151: "nn"
|
|
4257
|
-
},
|
|
4259
|
+
}, ri = {
|
|
4258
4260
|
0: 0,
|
|
4259
4261
|
// langEnglish → smRoman
|
|
4260
4262
|
1: 0,
|
|
@@ -4493,7 +4495,7 @@ var Kn = { parse: Js, make: ei }, Qn = [
|
|
|
4493
4495
|
// langAzerbaijanRoman → smRoman
|
|
4494
4496
|
151: 0
|
|
4495
4497
|
// langNynorsk → smRoman
|
|
4496
|
-
},
|
|
4498
|
+
}, ea = {
|
|
4497
4499
|
1078: "af",
|
|
4498
4500
|
1052: "sq",
|
|
4499
4501
|
1156: "gsw",
|
|
@@ -4707,7 +4709,7 @@ var Kn = { parse: Js, make: ei }, Qn = [
|
|
|
4707
4709
|
1144: "ii",
|
|
4708
4710
|
1130: "yo"
|
|
4709
4711
|
};
|
|
4710
|
-
function
|
|
4712
|
+
function ni(t, e, r) {
|
|
4711
4713
|
switch (t) {
|
|
4712
4714
|
case 0:
|
|
4713
4715
|
if (e === 65535)
|
|
@@ -4716,12 +4718,12 @@ function ri(t, e, r) {
|
|
|
4716
4718
|
return r[e];
|
|
4717
4719
|
break;
|
|
4718
4720
|
case 1:
|
|
4719
|
-
return $n[e];
|
|
4720
|
-
case 3:
|
|
4721
4721
|
return Jn[e];
|
|
4722
|
+
case 3:
|
|
4723
|
+
return ea[e];
|
|
4722
4724
|
}
|
|
4723
4725
|
}
|
|
4724
|
-
var Qt = "utf-16",
|
|
4726
|
+
var Qt = "utf-16", ai = {
|
|
4725
4727
|
0: "macintosh",
|
|
4726
4728
|
// smRoman
|
|
4727
4729
|
1: "x-mac-japanese",
|
|
@@ -4780,7 +4782,7 @@ var Qt = "utf-16", ni = {
|
|
|
4780
4782
|
// smVietnamese
|
|
4781
4783
|
31: "x-mac-extarabic"
|
|
4782
4784
|
// smExtArabic
|
|
4783
|
-
},
|
|
4785
|
+
}, si = {
|
|
4784
4786
|
15: "x-mac-icelandic",
|
|
4785
4787
|
// langIcelandic
|
|
4786
4788
|
17: "x-mac-turkish",
|
|
@@ -4812,24 +4814,24 @@ var Qt = "utf-16", ni = {
|
|
|
4812
4814
|
146: "x-mac-gaelic"
|
|
4813
4815
|
// langIrishGaelicScript
|
|
4814
4816
|
};
|
|
4815
|
-
function
|
|
4817
|
+
function ta(t, e, r) {
|
|
4816
4818
|
switch (t) {
|
|
4817
4819
|
case 0:
|
|
4818
4820
|
return Qt;
|
|
4819
4821
|
case 1:
|
|
4820
|
-
return
|
|
4822
|
+
return si[r] || ai[e];
|
|
4821
4823
|
case 3:
|
|
4822
4824
|
if (e === 1 || e === 10)
|
|
4823
4825
|
return Qt;
|
|
4824
4826
|
break;
|
|
4825
4827
|
}
|
|
4826
4828
|
}
|
|
4827
|
-
function
|
|
4829
|
+
function ii(t, e, r) {
|
|
4828
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++) {
|
|
4829
|
-
var l = a.parseUShort(), h = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p =
|
|
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 = ni(l, f, r), m = ta(l, h, f);
|
|
4830
4832
|
if (m !== void 0 && y !== void 0) {
|
|
4831
4833
|
var b = void 0;
|
|
4832
|
-
if (m === Qt ? b =
|
|
4834
|
+
if (m === Qt ? b = Ie.UTF16(t, o + v, d) : b = Ie.MACSTRING(t, o + v, d, m), b) {
|
|
4833
4835
|
var x = n[p];
|
|
4834
4836
|
x === void 0 && (x = n[p] = {}), x[y] = b;
|
|
4835
4837
|
}
|
|
@@ -4843,7 +4845,7 @@ function Ct(t) {
|
|
|
4843
4845
|
e[t[r]] = parseInt(r);
|
|
4844
4846
|
return e;
|
|
4845
4847
|
}
|
|
4846
|
-
function
|
|
4848
|
+
function Gr(t, e, r, n, a, s) {
|
|
4847
4849
|
return new F.Record("NameRecord", [
|
|
4848
4850
|
{ name: "platformID", type: "USHORT", value: t },
|
|
4849
4851
|
{ name: "encodingID", type: "USHORT", value: e },
|
|
@@ -4853,7 +4855,7 @@ function Dr(t, e, r, n, a, s) {
|
|
|
4853
4855
|
{ name: "offset", type: "USHORT", value: s }
|
|
4854
4856
|
]);
|
|
4855
4857
|
}
|
|
4856
|
-
function
|
|
4858
|
+
function oi(t, e) {
|
|
4857
4859
|
var r = t.length, n = e.length - r + 1;
|
|
4858
4860
|
e:
|
|
4859
4861
|
for (var a = 0; a < n; a++)
|
|
@@ -4865,8 +4867,8 @@ function ii(t, e) {
|
|
|
4865
4867
|
}
|
|
4866
4868
|
return -1;
|
|
4867
4869
|
}
|
|
4868
|
-
function
|
|
4869
|
-
var r =
|
|
4870
|
+
function Nr(t, e) {
|
|
4871
|
+
var r = oi(t, e);
|
|
4870
4872
|
if (r < 0) {
|
|
4871
4873
|
r = e.length;
|
|
4872
4874
|
for (var n = 0, a = t.length; n < a; ++n)
|
|
@@ -4874,22 +4876,22 @@ function Gr(t, e) {
|
|
|
4874
4876
|
}
|
|
4875
4877
|
return r;
|
|
4876
4878
|
}
|
|
4877
|
-
function
|
|
4878
|
-
var r, n = [], a = {}, s = Ct(
|
|
4879
|
+
function ui(t, e) {
|
|
4880
|
+
var r, n = [], a = {}, s = Ct($n);
|
|
4879
4881
|
for (var i in t) {
|
|
4880
4882
|
var o = s[i];
|
|
4881
4883
|
if (o === void 0 && (o = i), r = parseInt(o), isNaN(r))
|
|
4882
4884
|
throw new Error('Name table entry "' + i + '" does not exist, see nameTableNames for complete list.');
|
|
4883
4885
|
a[r] = t[i], n.push(r);
|
|
4884
4886
|
}
|
|
4885
|
-
for (var u = Ct(
|
|
4887
|
+
for (var u = Ct(Jn), l = Ct(ea), h = [], f = [], c = 0; c < n.length; c++) {
|
|
4886
4888
|
r = n[c];
|
|
4887
4889
|
var p = a[r];
|
|
4888
4890
|
for (var d in p) {
|
|
4889
|
-
var v = p[d], y = 1, m = u[d], b =
|
|
4891
|
+
var v = p[d], y = 1, m = u[d], b = ri[m], x = ta(y, b, m), T = k.MACSTRING(v, x);
|
|
4890
4892
|
T === void 0 && (y = 0, m = e.indexOf(d), m < 0 && (m = e.length, e.push(d)), b = 4, T = k.UTF16(v));
|
|
4891
|
-
var S =
|
|
4892
|
-
h.push(
|
|
4893
|
+
var S = Nr(T, f);
|
|
4894
|
+
h.push(Gr(
|
|
4893
4895
|
y,
|
|
4894
4896
|
b,
|
|
4895
4897
|
m,
|
|
@@ -4899,8 +4901,8 @@ function oi(t, e) {
|
|
|
4899
4901
|
));
|
|
4900
4902
|
var A = l[d];
|
|
4901
4903
|
if (A !== void 0) {
|
|
4902
|
-
var O = k.UTF16(v), w =
|
|
4903
|
-
h.push(
|
|
4904
|
+
var O = k.UTF16(v), w = Nr(O, f);
|
|
4905
|
+
h.push(Gr(
|
|
4904
4906
|
3,
|
|
4905
4907
|
1,
|
|
4906
4908
|
A,
|
|
@@ -4922,7 +4924,7 @@ function oi(t, e) {
|
|
|
4922
4924
|
M.fields.push({ name: "record_" + N, type: "RECORD", value: h[N] });
|
|
4923
4925
|
return M.fields.push({ name: "strings", type: "LITERAL", value: f }), M;
|
|
4924
4926
|
}
|
|
4925
|
-
var
|
|
4927
|
+
var ra = { parse: ii, make: ui }, $t = [
|
|
4926
4928
|
{ begin: 0, end: 127 },
|
|
4927
4929
|
// Basic Latin
|
|
4928
4930
|
{ begin: 128, end: 255 },
|
|
@@ -5170,7 +5172,7 @@ var ta = { parse: si, make: oi }, $t = [
|
|
|
5170
5172
|
{ begin: 127024, end: 127135 }
|
|
5171
5173
|
// Domino Tiles
|
|
5172
5174
|
];
|
|
5173
|
-
function
|
|
5175
|
+
function li(t) {
|
|
5174
5176
|
for (var e = 0; e < $t.length; e += 1) {
|
|
5175
5177
|
var r = $t[e];
|
|
5176
5178
|
if (t >= r.begin && t < r.end)
|
|
@@ -5178,14 +5180,14 @@ function ui(t) {
|
|
|
5178
5180
|
}
|
|
5179
5181
|
return -1;
|
|
5180
5182
|
}
|
|
5181
|
-
function
|
|
5183
|
+
function hi(t, e) {
|
|
5182
5184
|
var r = {}, n = new E.Parser(t, e);
|
|
5183
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 = [];
|
|
5184
5186
|
for (var a = 0; a < 10; a++)
|
|
5185
5187
|
r.panose[a] = n.parseByte();
|
|
5186
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;
|
|
5187
5189
|
}
|
|
5188
|
-
function
|
|
5190
|
+
function ci(t) {
|
|
5189
5191
|
return new F.Table("OS/2", [
|
|
5190
5192
|
{ name: "version", type: "USHORT", value: 3 },
|
|
5191
5193
|
{ name: "xAvgCharWidth", type: "SHORT", value: 0 },
|
|
@@ -5235,8 +5237,8 @@ function hi(t) {
|
|
|
5235
5237
|
{ name: "usMaxContext", type: "USHORT", value: 0 }
|
|
5236
5238
|
], t);
|
|
5237
5239
|
}
|
|
5238
|
-
var Jt = { parse:
|
|
5239
|
-
function
|
|
5240
|
+
var Jt = { parse: hi, make: ci, unicodeRanges: $t, getUnicodeRange: li };
|
|
5241
|
+
function fi(t, e) {
|
|
5240
5242
|
var r = {}, n = new E.Parser(t, e);
|
|
5241
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) {
|
|
5242
5244
|
case 1:
|
|
@@ -5261,7 +5263,7 @@ function ci(t, e) {
|
|
|
5261
5263
|
}
|
|
5262
5264
|
return r;
|
|
5263
5265
|
}
|
|
5264
|
-
function
|
|
5266
|
+
function pi() {
|
|
5265
5267
|
return new F.Table("post", [
|
|
5266
5268
|
{ name: "version", type: "FIXED", value: 196608 },
|
|
5267
5269
|
{ name: "italicAngle", type: "FIXED", value: 0 },
|
|
@@ -5274,7 +5276,7 @@ function fi() {
|
|
|
5274
5276
|
{ name: "maxMemType1", type: "ULONG", value: 0 }
|
|
5275
5277
|
]);
|
|
5276
5278
|
}
|
|
5277
|
-
var
|
|
5279
|
+
var na = { parse: fi, make: pi }, ie = new Array(9);
|
|
5278
5280
|
ie[1] = function() {
|
|
5279
5281
|
var e = this.offset + this.relativeOffset, r = this.parseUShort();
|
|
5280
5282
|
if (r === 1)
|
|
@@ -5320,7 +5322,7 @@ ie[4] = function() {
|
|
|
5320
5322
|
})
|
|
5321
5323
|
};
|
|
5322
5324
|
};
|
|
5323
|
-
var
|
|
5325
|
+
var De = {
|
|
5324
5326
|
sequenceIndex: g.uShort,
|
|
5325
5327
|
lookupListIndex: g.uShort
|
|
5326
5328
|
};
|
|
@@ -5334,7 +5336,7 @@ ie[5] = function() {
|
|
|
5334
5336
|
var s = this.parseUShort(), i = this.parseUShort();
|
|
5335
5337
|
return {
|
|
5336
5338
|
input: this.parseUShortList(s - 1),
|
|
5337
|
-
lookupRecords: this.parseRecordList(i,
|
|
5339
|
+
lookupRecords: this.parseRecordList(i, De)
|
|
5338
5340
|
};
|
|
5339
5341
|
})
|
|
5340
5342
|
};
|
|
@@ -5347,7 +5349,7 @@ ie[5] = function() {
|
|
|
5347
5349
|
var s = this.parseUShort(), i = this.parseUShort();
|
|
5348
5350
|
return {
|
|
5349
5351
|
classes: this.parseUShortList(s - 1),
|
|
5350
|
-
lookupRecords: this.parseRecordList(i,
|
|
5352
|
+
lookupRecords: this.parseRecordList(i, De)
|
|
5351
5353
|
};
|
|
5352
5354
|
})
|
|
5353
5355
|
};
|
|
@@ -5356,7 +5358,7 @@ ie[5] = function() {
|
|
|
5356
5358
|
return {
|
|
5357
5359
|
substFormat: r,
|
|
5358
5360
|
coverages: this.parseList(n, g.pointer(g.coverage)),
|
|
5359
|
-
lookupRecords: this.parseRecordList(a,
|
|
5361
|
+
lookupRecords: this.parseRecordList(a, De)
|
|
5360
5362
|
};
|
|
5361
5363
|
}
|
|
5362
5364
|
U.assert(!1, "0x" + e.toString(16) + ": lookup type 5 format must be 1, 2 or 3.");
|
|
@@ -5372,7 +5374,7 @@ ie[6] = function() {
|
|
|
5372
5374
|
backtrack: this.parseUShortList(),
|
|
5373
5375
|
input: this.parseUShortList(this.parseShort() - 1),
|
|
5374
5376
|
lookahead: this.parseUShortList(),
|
|
5375
|
-
lookupRecords: this.parseRecordList(
|
|
5377
|
+
lookupRecords: this.parseRecordList(De)
|
|
5376
5378
|
};
|
|
5377
5379
|
})
|
|
5378
5380
|
};
|
|
@@ -5388,7 +5390,7 @@ ie[6] = function() {
|
|
|
5388
5390
|
backtrack: this.parseUShortList(),
|
|
5389
5391
|
input: this.parseUShortList(this.parseShort() - 1),
|
|
5390
5392
|
lookahead: this.parseUShortList(),
|
|
5391
|
-
lookupRecords: this.parseRecordList(
|
|
5393
|
+
lookupRecords: this.parseRecordList(De)
|
|
5392
5394
|
};
|
|
5393
5395
|
})
|
|
5394
5396
|
};
|
|
@@ -5398,7 +5400,7 @@ ie[6] = function() {
|
|
|
5398
5400
|
backtrackCoverage: this.parseList(g.pointer(g.coverage)),
|
|
5399
5401
|
inputCoverage: this.parseList(g.pointer(g.coverage)),
|
|
5400
5402
|
lookaheadCoverage: this.parseList(g.pointer(g.coverage)),
|
|
5401
|
-
lookupRecords: this.parseRecordList(
|
|
5403
|
+
lookupRecords: this.parseRecordList(De)
|
|
5402
5404
|
};
|
|
5403
5405
|
U.assert(!1, "0x" + e.toString(16) + ": lookup type 6 format must be 1, 2 or 3.");
|
|
5404
5406
|
};
|
|
@@ -5422,7 +5424,7 @@ ie[8] = function() {
|
|
|
5422
5424
|
substitutes: this.parseUShortList()
|
|
5423
5425
|
};
|
|
5424
5426
|
};
|
|
5425
|
-
function
|
|
5427
|
+
function di(t, e) {
|
|
5426
5428
|
e = e || 0;
|
|
5427
5429
|
var r = new g(t, e), n = r.parseVersion(1);
|
|
5428
5430
|
return U.argument(n === 1 || n === 1.1, "Unsupported GSUB table version."), n === 1 ? {
|
|
@@ -5512,7 +5514,7 @@ Ge[6] = function(e) {
|
|
|
5512
5514
|
}
|
|
5513
5515
|
U.assert(!1, "lookup type 6 format must be 1, 2 or 3.");
|
|
5514
5516
|
};
|
|
5515
|
-
function
|
|
5517
|
+
function gi(t) {
|
|
5516
5518
|
return new F.Table("GSUB", [
|
|
5517
5519
|
{ name: "version", type: "ULONG", value: 65536 },
|
|
5518
5520
|
{ name: "scripts", type: "TABLE", value: new F.ScriptList(t.scripts) },
|
|
@@ -5520,17 +5522,17 @@ function di(t) {
|
|
|
5520
5522
|
{ name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups, Ge) }
|
|
5521
5523
|
]);
|
|
5522
5524
|
}
|
|
5523
|
-
var
|
|
5524
|
-
function
|
|
5525
|
+
var aa = { parse: di, make: gi };
|
|
5526
|
+
function vi(t, e) {
|
|
5525
5527
|
var r = new E.Parser(t, e), n = r.parseULong();
|
|
5526
5528
|
U.argument(n === 1, "Unsupported META table version."), r.parseULong(), r.parseULong();
|
|
5527
5529
|
for (var a = r.parseULong(), s = {}, i = 0; i < a; i++) {
|
|
5528
|
-
var o = r.parseTag(), u = r.parseULong(), l = r.parseULong(), h =
|
|
5530
|
+
var o = r.parseTag(), u = r.parseULong(), l = r.parseULong(), h = Ie.UTF8(t, e + u, l);
|
|
5529
5531
|
s[o] = h;
|
|
5530
5532
|
}
|
|
5531
5533
|
return s;
|
|
5532
5534
|
}
|
|
5533
|
-
function
|
|
5535
|
+
function mi(t) {
|
|
5534
5536
|
var e = Object.keys(t).length, r = "", n = 16 + e * 12, a = new F.Table("meta", [
|
|
5535
5537
|
{ name: "version", type: "ULONG", value: 1 },
|
|
5536
5538
|
{ name: "flags", type: "ULONG", value: 0 },
|
|
@@ -5543,8 +5545,8 @@ function vi(t) {
|
|
|
5543
5545
|
}
|
|
5544
5546
|
return a.fields.push({ name: "stringPool", type: "CHARARRAY", value: r }), a;
|
|
5545
5547
|
}
|
|
5546
|
-
var
|
|
5547
|
-
function
|
|
5548
|
+
var sa = { parse: vi, make: mi };
|
|
5549
|
+
function _r(t) {
|
|
5548
5550
|
return Math.log(t) / Math.log(2) | 0;
|
|
5549
5551
|
}
|
|
5550
5552
|
function ur(t) {
|
|
@@ -5554,7 +5556,7 @@ function ur(t) {
|
|
|
5554
5556
|
e += (t[r] << 24) + (t[r + 1] << 16) + (t[r + 2] << 8) + t[r + 3];
|
|
5555
5557
|
return e %= Math.pow(2, 32), e;
|
|
5556
5558
|
}
|
|
5557
|
-
function
|
|
5559
|
+
function Hr(t, e, r, n) {
|
|
5558
5560
|
return new F.Record("Table Record", [
|
|
5559
5561
|
{ name: "tag", type: "TAG", value: t !== void 0 ? t : "" },
|
|
5560
5562
|
{ name: "checkSum", type: "ULONG", value: e !== void 0 ? e : 0 },
|
|
@@ -5562,7 +5564,7 @@ function _r(t, e, r, n) {
|
|
|
5562
5564
|
{ name: "length", type: "ULONG", value: n !== void 0 ? n : 0 }
|
|
5563
5565
|
]);
|
|
5564
5566
|
}
|
|
5565
|
-
function
|
|
5567
|
+
function ia(t) {
|
|
5566
5568
|
var e = new F.Table("sfnt", [
|
|
5567
5569
|
{ name: "version", type: "TAG", value: "OTTO" },
|
|
5568
5570
|
{ name: "numTables", type: "USHORT", value: 0 },
|
|
@@ -5571,14 +5573,14 @@ function sa(t) {
|
|
|
5571
5573
|
{ name: "rangeShift", type: "USHORT", value: 0 }
|
|
5572
5574
|
]);
|
|
5573
5575
|
e.tables = t, e.numTables = t.length;
|
|
5574
|
-
var r = Math.pow(2,
|
|
5575
|
-
e.searchRange = 16 * r, e.entrySelector =
|
|
5576
|
-
for (var n = [], a = [], s = e.sizeOf() +
|
|
5576
|
+
var r = Math.pow(2, _r(e.numTables));
|
|
5577
|
+
e.searchRange = 16 * r, e.entrySelector = _r(r), e.rangeShift = e.numTables * 16 - e.searchRange;
|
|
5578
|
+
for (var n = [], a = [], s = e.sizeOf() + Hr().sizeOf() * e.numTables; s % 4 !== 0; )
|
|
5577
5579
|
s += 1, a.push({ name: "padding", type: "BYTE", value: 0 });
|
|
5578
5580
|
for (var i = 0; i < t.length; i += 1) {
|
|
5579
5581
|
var o = t[i];
|
|
5580
5582
|
U.argument(o.tableName.length === 4, "Table name" + o.tableName + " is invalid.");
|
|
5581
|
-
var u = o.sizeOf(), l =
|
|
5583
|
+
var u = o.sizeOf(), l = Hr(o.tableName, ur(o.encode()), s, u);
|
|
5582
5584
|
for (n.push({ name: l.tag + " Table Record", type: "RECORD", value: l }), a.push({ name: o.tableName + " table", type: "RECORD", value: o }), s += u, U.argument(!isNaN(s), "Something went wrong calculating the offset."); s % 4 !== 0; )
|
|
5583
5585
|
s += 1, a.push({ name: "padding", type: "BYTE", value: 0 });
|
|
5584
5586
|
}
|
|
@@ -5586,7 +5588,7 @@ function sa(t) {
|
|
|
5586
5588
|
return h.value.tag > f.value.tag ? 1 : -1;
|
|
5587
5589
|
}), e.fields = e.fields.concat(n), e.fields = e.fields.concat(a), e;
|
|
5588
5590
|
}
|
|
5589
|
-
function
|
|
5591
|
+
function zr(t, e, r) {
|
|
5590
5592
|
for (var n = 0; n < e.length; n += 1) {
|
|
5591
5593
|
var a = t.charToGlyphIndex(e[n]);
|
|
5592
5594
|
if (a > 0) {
|
|
@@ -5596,12 +5598,12 @@ function Hr(t, e, r) {
|
|
|
5596
5598
|
}
|
|
5597
5599
|
return r;
|
|
5598
5600
|
}
|
|
5599
|
-
function
|
|
5601
|
+
function yi(t) {
|
|
5600
5602
|
for (var e = 0, r = 0; r < t.length; r += 1)
|
|
5601
5603
|
e += t[r];
|
|
5602
5604
|
return e / t.length;
|
|
5603
5605
|
}
|
|
5604
|
-
function
|
|
5606
|
+
function xi(t) {
|
|
5605
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) {
|
|
5606
5608
|
var v = t.glyphs.get(d), y = v.unicode | 0;
|
|
5607
5609
|
if (isNaN(v.advanceWidth))
|
|
@@ -5629,13 +5631,13 @@ function yi(t) {
|
|
|
5629
5631
|
xMax: Math.max.apply(null, n),
|
|
5630
5632
|
yMax: Math.max.apply(null, a),
|
|
5631
5633
|
advanceWidthMax: Math.max.apply(null, s),
|
|
5632
|
-
advanceWidthAvg:
|
|
5634
|
+
advanceWidthAvg: yi(s),
|
|
5633
5635
|
minLeftSideBearing: Math.min.apply(null, i),
|
|
5634
5636
|
maxLeftSideBearing: Math.max.apply(null, i),
|
|
5635
5637
|
minRightSideBearing: Math.min.apply(null, o)
|
|
5636
5638
|
};
|
|
5637
5639
|
x.ascender = t.ascender, x.descender = t.descender;
|
|
5638
|
-
var T =
|
|
5640
|
+
var T = Yn.make({
|
|
5639
5641
|
flags: 3,
|
|
5640
5642
|
// 00000011 (baseline for font at y=0; left sidebearing point at x=0)
|
|
5641
5643
|
unitsPerEm: t.unitsPerEm,
|
|
@@ -5645,7 +5647,7 @@ function yi(t) {
|
|
|
5645
5647
|
yMax: x.yMax,
|
|
5646
5648
|
lowestRecPPEM: 3,
|
|
5647
5649
|
createdTimestamp: t.createdTimestamp
|
|
5648
|
-
}), S =
|
|
5650
|
+
}), S = Zn.make({
|
|
5649
5651
|
ascender: x.ascender,
|
|
5650
5652
|
descender: x.descender,
|
|
5651
5653
|
advanceWidthMax: x.advanceWidthMax,
|
|
@@ -5653,7 +5655,7 @@ function yi(t) {
|
|
|
5653
5655
|
minRightSideBearing: x.minRightSideBearing,
|
|
5654
5656
|
xMaxExtent: x.maxLeftSideBearing + (x.xMax - x.xMin),
|
|
5655
5657
|
numberOfHMetrics: t.glyphs.length
|
|
5656
|
-
}), A =
|
|
5658
|
+
}), A = Qn.make(t.glyphs.length), O = Jt.make(Object.assign({
|
|
5657
5659
|
xAvgCharWidth: Math.round(x.advanceWidthAvg),
|
|
5658
5660
|
usFirstCharIndex: u,
|
|
5659
5661
|
usLastCharIndex: l,
|
|
@@ -5672,19 +5674,19 @@ function yi(t) {
|
|
|
5672
5674
|
usWinDescent: Math.abs(x.yMin),
|
|
5673
5675
|
ulCodePageRange1: 1,
|
|
5674
5676
|
// FIXME: hard-code Latin 1 support for now
|
|
5675
|
-
sxHeight:
|
|
5676
|
-
sCapHeight:
|
|
5677
|
+
sxHeight: zr(t, "xyvw", { yMax: Math.round(x.ascender / 2) }).yMax,
|
|
5678
|
+
sCapHeight: zr(t, "HIKLEFJMNTZBDPRAGOQSUVWXY", x).yMax,
|
|
5677
5679
|
usDefaultChar: t.hasChar(" ") ? 32 : 0,
|
|
5678
5680
|
// Use space as the default character, if available.
|
|
5679
5681
|
usBreakChar: t.hasChar(" ") ? 32 : 0
|
|
5680
5682
|
// Use space as the break character, if available.
|
|
5681
|
-
}, t.tables.os2)), w =
|
|
5683
|
+
}, t.tables.os2)), w = jn.make(t.glyphs), M = Bn.make(t.glyphs), N = t.getEnglishName("fontFamily"), K = t.getEnglishName("fontSubfamily"), $ = N + " " + K, Y = t.getEnglishName("postScriptName");
|
|
5682
5684
|
Y || (Y = N.replace(/\s/g, "") + "-" + K);
|
|
5683
|
-
var
|
|
5685
|
+
var D = {};
|
|
5684
5686
|
for (var _ in t.names)
|
|
5685
|
-
|
|
5686
|
-
|
|
5687
|
-
var
|
|
5687
|
+
D[_] = t.names[_];
|
|
5688
|
+
D.uniqueID || (D.uniqueID = { en: t.getEnglishName("manufacturer") + ":" + $ }), D.postScriptName || (D.postScriptName = { en: Y }), D.preferredFamily || (D.preferredFamily = t.names.fontFamily), D.preferredSubfamily || (D.preferredSubfamily = t.names.fontSubfamily);
|
|
5689
|
+
var I = [], W = ra.make(D, I), Z = I.length > 0 ? Kn.make(I) : void 0, q = na.make(), Q = Xn.make(t.glyphs, {
|
|
5688
5690
|
version: t.getEnglishName("version"),
|
|
5689
5691
|
fullName: $,
|
|
5690
5692
|
familyName: N,
|
|
@@ -5692,18 +5694,18 @@ function yi(t) {
|
|
|
5692
5694
|
postScriptName: Y,
|
|
5693
5695
|
unitsPerEm: t.unitsPerEm,
|
|
5694
5696
|
fontBBox: [0, x.yMin, x.ascender, x.advanceWidthMax]
|
|
5695
|
-
}), B = t.metas && Object.keys(t.metas).length > 0 ?
|
|
5696
|
-
Z && j.push(Z), t.tables.gsub && j.push(
|
|
5697
|
-
for (var bt =
|
|
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
|
+
Z && j.push(Z), t.tables.gsub && j.push(aa.make(t.tables.gsub)), B && j.push(B);
|
|
5699
|
+
for (var bt = ia(j), ba = bt.encode(), Sa = ur(ba), St = bt.fields, yr = !1, rt = 0; rt < St.length; rt += 1)
|
|
5698
5700
|
if (St[rt].name === "head table") {
|
|
5699
|
-
St[rt].value.checkSumAdjustment = 2981146554 -
|
|
5701
|
+
St[rt].value.checkSumAdjustment = 2981146554 - Sa, yr = !0;
|
|
5700
5702
|
break;
|
|
5701
5703
|
}
|
|
5702
|
-
if (!
|
|
5704
|
+
if (!yr)
|
|
5703
5705
|
throw new Error("Could not find head table with checkSum to adjust.");
|
|
5704
5706
|
return bt;
|
|
5705
5707
|
}
|
|
5706
|
-
var
|
|
5708
|
+
var bi = { make: ia, fontToTable: xi, computeCheckSum: ur };
|
|
5707
5709
|
function Et(t, e) {
|
|
5708
5710
|
for (var r = 0, n = t.length - 1; r <= n; ) {
|
|
5709
5711
|
var a = r + n >>> 1, s = t[a].tag;
|
|
@@ -5713,7 +5715,7 @@ function Et(t, e) {
|
|
|
5713
5715
|
}
|
|
5714
5716
|
return -r - 1;
|
|
5715
5717
|
}
|
|
5716
|
-
function
|
|
5718
|
+
function Wr(t, e) {
|
|
5717
5719
|
for (var r = 0, n = t.length - 1; r <= n; ) {
|
|
5718
5720
|
var a = r + n >>> 1, s = t[a];
|
|
5719
5721
|
if (s === e)
|
|
@@ -5722,7 +5724,7 @@ function zr(t, e) {
|
|
|
5722
5724
|
}
|
|
5723
5725
|
return -r - 1;
|
|
5724
5726
|
}
|
|
5725
|
-
function
|
|
5727
|
+
function Vr(t, e) {
|
|
5726
5728
|
for (var r, n = 0, a = t.length - 1; n <= a; ) {
|
|
5727
5729
|
var s = n + a >>> 1;
|
|
5728
5730
|
r = t[s];
|
|
@@ -5757,7 +5759,7 @@ Ke.prototype = {
|
|
|
5757
5759
|
* @param {number} value
|
|
5758
5760
|
* @return {number}
|
|
5759
5761
|
*/
|
|
5760
|
-
binSearch:
|
|
5762
|
+
binSearch: Wr,
|
|
5761
5763
|
/**
|
|
5762
5764
|
* Get or create the Layout table (GSUB, GPOS etc).
|
|
5763
5765
|
* @param {boolean} create - Whether to create a new one.
|
|
@@ -5912,7 +5914,7 @@ Ke.prototype = {
|
|
|
5912
5914
|
case 1:
|
|
5913
5915
|
return t.startGlyph <= e && e < t.startGlyph + t.classes.length ? t.classes[e - t.startGlyph] : 0;
|
|
5914
5916
|
case 2:
|
|
5915
|
-
var r =
|
|
5917
|
+
var r = Vr(t.ranges, e);
|
|
5916
5918
|
return r ? r.classId : 0;
|
|
5917
5919
|
}
|
|
5918
5920
|
},
|
|
@@ -5926,10 +5928,10 @@ Ke.prototype = {
|
|
|
5926
5928
|
getCoverageIndex: function(t, e) {
|
|
5927
5929
|
switch (t.format) {
|
|
5928
5930
|
case 1:
|
|
5929
|
-
var r =
|
|
5931
|
+
var r = Wr(t.glyphs, e);
|
|
5930
5932
|
return r >= 0 ? r : -1;
|
|
5931
5933
|
case 2:
|
|
5932
|
-
var n =
|
|
5934
|
+
var n = Vr(t.ranges, e);
|
|
5933
5935
|
return n ? n.index + e - n.start : -1;
|
|
5934
5936
|
}
|
|
5935
5937
|
},
|
|
@@ -5985,7 +5987,7 @@ Qe.prototype.getKerningTables = function(t, e) {
|
|
|
5985
5987
|
function re(t) {
|
|
5986
5988
|
Ke.call(this, t, "gsub");
|
|
5987
5989
|
}
|
|
5988
|
-
function
|
|
5990
|
+
function Si(t, e) {
|
|
5989
5991
|
var r = t.length;
|
|
5990
5992
|
if (r !== e.length)
|
|
5991
5993
|
return !1;
|
|
@@ -6115,7 +6117,7 @@ re.prototype.addLigature = function(t, e, r, n) {
|
|
|
6115
6117
|
}, l = this.binSearch(s.coverage.glyphs, i);
|
|
6116
6118
|
if (l >= 0) {
|
|
6117
6119
|
for (var h = s.ligatureSets[l], f = 0; f < h.length; f++)
|
|
6118
|
-
if (
|
|
6120
|
+
if (Si(h[f].components, o))
|
|
6119
6121
|
return;
|
|
6120
6122
|
h.push(u);
|
|
6121
6123
|
} else
|
|
@@ -6153,10 +6155,10 @@ re.prototype.add = function(t, e, r, n) {
|
|
|
6153
6155
|
return e.by instanceof Array ? this.addMultiple(t, e, r, n) : this.addLigature(t, e, r, n);
|
|
6154
6156
|
}
|
|
6155
6157
|
};
|
|
6156
|
-
function
|
|
6158
|
+
function ki() {
|
|
6157
6159
|
return typeof window < "u";
|
|
6158
6160
|
}
|
|
6159
|
-
function
|
|
6161
|
+
function Fi(t) {
|
|
6160
6162
|
for (var e = new Buffer(t.byteLength), r = new Uint8Array(t), n = 0; n < e.length; ++n)
|
|
6161
6163
|
e[n] = r[n];
|
|
6162
6164
|
return e;
|
|
@@ -6165,11 +6167,11 @@ function _e(t, e) {
|
|
|
6165
6167
|
if (!t)
|
|
6166
6168
|
throw e;
|
|
6167
6169
|
}
|
|
6168
|
-
function
|
|
6170
|
+
function qr(t, e, r, n, a) {
|
|
6169
6171
|
var s;
|
|
6170
6172
|
return (e & n) > 0 ? (s = t.parseByte(), e & a || (s = -s), s = r + s) : (e & a) > 0 ? s = r : s = r + t.parseShort(), s;
|
|
6171
6173
|
}
|
|
6172
|
-
function
|
|
6174
|
+
function oa(t, e, r) {
|
|
6173
6175
|
var n = new E.Parser(e, r);
|
|
6174
6176
|
t.numberOfContours = n.parseShort(), t._xMin = n.parseShort(), t._yMin = n.parseShort(), t._xMax = n.parseShort(), t._yMax = n.parseShort();
|
|
6175
6177
|
var a, s;
|
|
@@ -6191,9 +6193,9 @@ function ia(t, e, r) {
|
|
|
6191
6193
|
for (var v = 0; v < l; v += 1)
|
|
6192
6194
|
s = a[v], d = {}, d.onCurve = !!(s & 1), d.lastPointOfContour = i.indexOf(v) >= 0, p.push(d);
|
|
6193
6195
|
for (var y = 0, m = 0; m < l; m += 1)
|
|
6194
|
-
s = a[m], d = p[m], d.x =
|
|
6196
|
+
s = a[m], d = p[m], d.x = qr(n, s, y, 2, 16), y = d.x;
|
|
6195
6197
|
for (var b = 0, x = 0; x < l; x += 1)
|
|
6196
|
-
s = a[x], d = p[x], d.y =
|
|
6198
|
+
s = a[x], d = p[x], d.y = qr(n, s, b, 4, 32), b = d.y;
|
|
6197
6199
|
}
|
|
6198
6200
|
t.points = p;
|
|
6199
6201
|
} else
|
|
@@ -6234,18 +6236,18 @@ function Ot(t, e) {
|
|
|
6234
6236
|
}
|
|
6235
6237
|
return r;
|
|
6236
6238
|
}
|
|
6237
|
-
function
|
|
6239
|
+
function Ti(t) {
|
|
6238
6240
|
for (var e = [], r = [], n = 0; n < t.length; n += 1) {
|
|
6239
6241
|
var a = t[n];
|
|
6240
6242
|
r.push(a), a.lastPointOfContour && (e.push(r), r = []);
|
|
6241
6243
|
}
|
|
6242
6244
|
return U.argument(r.length === 0, "There are still points left in the current contour."), e;
|
|
6243
6245
|
}
|
|
6244
|
-
function
|
|
6246
|
+
function ua(t) {
|
|
6245
6247
|
var e = new V();
|
|
6246
6248
|
if (!t)
|
|
6247
6249
|
return e;
|
|
6248
|
-
for (var r =
|
|
6250
|
+
for (var r = Ti(t), n = 0; n < r.length; ++n) {
|
|
6249
6251
|
var a = r[n], s = null, i = a[a.length - 1], o = a[0];
|
|
6250
6252
|
if (i.onCurve)
|
|
6251
6253
|
e.moveTo(i.x, i.y);
|
|
@@ -6266,7 +6268,7 @@ function oa(t) {
|
|
|
6266
6268
|
}
|
|
6267
6269
|
return e;
|
|
6268
6270
|
}
|
|
6269
|
-
function
|
|
6271
|
+
function la(t, e) {
|
|
6270
6272
|
if (e.isComposite)
|
|
6271
6273
|
for (var r = 0; r < e.components.length; r += 1) {
|
|
6272
6274
|
var n = e.components[r], a = t.get(n.glyphIndex);
|
|
@@ -6290,50 +6292,50 @@ function ua(t, e) {
|
|
|
6290
6292
|
e.points = e.points.concat(s);
|
|
6291
6293
|
}
|
|
6292
6294
|
}
|
|
6293
|
-
return
|
|
6295
|
+
return ua(e.points);
|
|
6294
6296
|
}
|
|
6295
|
-
function
|
|
6297
|
+
function wi(t, e, r, n) {
|
|
6296
6298
|
for (var a = new de.GlyphSet(n), s = 0; s < r.length - 1; s += 1) {
|
|
6297
6299
|
var i = r[s], o = r[s + 1];
|
|
6298
|
-
i !== o ? a.push(s, de.ttfGlyphLoader(n, s,
|
|
6300
|
+
i !== o ? a.push(s, de.ttfGlyphLoader(n, s, oa, t, e + i, la)) : a.push(s, de.glyphLoader(n, s));
|
|
6299
6301
|
}
|
|
6300
6302
|
return a;
|
|
6301
6303
|
}
|
|
6302
|
-
function
|
|
6304
|
+
function Ci(t, e, r, n) {
|
|
6303
6305
|
var a = new de.GlyphSet(n);
|
|
6304
6306
|
return n._push = function(s) {
|
|
6305
6307
|
var i = r[s], o = r[s + 1];
|
|
6306
|
-
i !== o ? a.push(s, de.ttfGlyphLoader(n, s,
|
|
6308
|
+
i !== o ? a.push(s, de.ttfGlyphLoader(n, s, oa, t, e + i, la)) : a.push(s, de.glyphLoader(n, s));
|
|
6307
6309
|
}, a;
|
|
6308
6310
|
}
|
|
6309
|
-
function
|
|
6310
|
-
return a.lowMemory ?
|
|
6311
|
+
function Ei(t, e, r, n, a) {
|
|
6312
|
+
return a.lowMemory ? Ci(t, e, r, n) : wi(t, e, r, n);
|
|
6311
6313
|
}
|
|
6312
|
-
var
|
|
6313
|
-
function
|
|
6314
|
+
var ha = { getPath: ua, parse: Ei }, ca, Ae, fa, er;
|
|
6315
|
+
function pa(t) {
|
|
6314
6316
|
this.font = t, this.getCommands = function(e) {
|
|
6315
|
-
return
|
|
6317
|
+
return ha.getPath(e).commands;
|
|
6316
6318
|
}, this._fpgmState = this._prepState = void 0, this._errorState = 0;
|
|
6317
6319
|
}
|
|
6318
|
-
function
|
|
6320
|
+
function Oi(t) {
|
|
6319
6321
|
return t;
|
|
6320
6322
|
}
|
|
6321
|
-
function
|
|
6323
|
+
function da(t) {
|
|
6322
6324
|
return Math.sign(t) * Math.round(Math.abs(t));
|
|
6323
6325
|
}
|
|
6324
|
-
function
|
|
6326
|
+
function Ui(t) {
|
|
6325
6327
|
return Math.sign(t) * Math.round(Math.abs(t * 2)) / 2;
|
|
6326
6328
|
}
|
|
6327
|
-
function
|
|
6329
|
+
function Li(t) {
|
|
6328
6330
|
return Math.sign(t) * (Math.round(Math.abs(t) + 0.5) - 0.5);
|
|
6329
6331
|
}
|
|
6330
|
-
function
|
|
6332
|
+
function Ri(t) {
|
|
6331
6333
|
return Math.sign(t) * Math.ceil(Math.abs(t));
|
|
6332
6334
|
}
|
|
6333
|
-
function
|
|
6335
|
+
function Ai(t) {
|
|
6334
6336
|
return Math.sign(t) * Math.floor(Math.abs(t));
|
|
6335
6337
|
}
|
|
6336
|
-
var
|
|
6338
|
+
var ga = function(t) {
|
|
6337
6339
|
var e = this.srPeriod, r = this.srPhase, n = this.srThreshold, a = 1;
|
|
6338
6340
|
return t < 0 && (t = -t, a = -1), t += n - r, t = Math.trunc(t / e) * e, t += r, t < 0 ? r * a : t * a;
|
|
6339
6341
|
}, pe = {
|
|
@@ -6506,7 +6508,7 @@ ve.prototype.prevTouched = function(t) {
|
|
|
6506
6508
|
e = e.prevPointOnContour;
|
|
6507
6509
|
return e;
|
|
6508
6510
|
};
|
|
6509
|
-
var Ye = Object.freeze(new ve(0, 0)),
|
|
6511
|
+
var Ye = Object.freeze(new ve(0, 0)), Mi = {
|
|
6510
6512
|
cvCutIn: 17 / 16,
|
|
6511
6513
|
// control value cut in
|
|
6512
6514
|
deltaBase: 9,
|
|
@@ -6522,10 +6524,10 @@ function be(t, e) {
|
|
|
6522
6524
|
case "glyf":
|
|
6523
6525
|
this.zp0 = this.zp1 = this.zp2 = 1, this.rp0 = this.rp1 = this.rp2 = 0;
|
|
6524
6526
|
case "prep":
|
|
6525
|
-
this.fv = this.pv = this.dpv = pe, this.round =
|
|
6527
|
+
this.fv = this.pv = this.dpv = pe, this.round = da;
|
|
6526
6528
|
}
|
|
6527
6529
|
}
|
|
6528
|
-
|
|
6530
|
+
pa.prototype.exec = function(t, e) {
|
|
6529
6531
|
if (typeof e != "number")
|
|
6530
6532
|
throw new Error("Point size is not a number!");
|
|
6531
6533
|
if (!(this._errorState > 2)) {
|
|
@@ -6533,7 +6535,7 @@ fa.prototype.exec = function(t, e) {
|
|
|
6533
6535
|
if (!n || n.ppem !== e) {
|
|
6534
6536
|
var a = this._fpgmState;
|
|
6535
6537
|
if (!a) {
|
|
6536
|
-
be.prototype =
|
|
6538
|
+
be.prototype = Mi, a = this._fpgmState = new be("fpgm", r.tables.fpgm), a.funcs = [], a.font = r, exports.DEBUG && (console.log("---EXEC FPGM---"), a.step = -1);
|
|
6537
6539
|
try {
|
|
6538
6540
|
Ae(a);
|
|
6539
6541
|
} catch (l) {
|
|
@@ -6557,14 +6559,14 @@ fa.prototype.exec = function(t, e) {
|
|
|
6557
6559
|
}
|
|
6558
6560
|
if (!(this._errorState > 1))
|
|
6559
6561
|
try {
|
|
6560
|
-
return
|
|
6562
|
+
return fa(t, n);
|
|
6561
6563
|
} catch (l) {
|
|
6562
6564
|
this._errorState < 1 && (console.log("Hinting error:" + l), console.log("Note: further hinting errors are silenced")), this._errorState = 1;
|
|
6563
6565
|
return;
|
|
6564
6566
|
}
|
|
6565
6567
|
}
|
|
6566
6568
|
};
|
|
6567
|
-
|
|
6569
|
+
fa = function(t, e) {
|
|
6568
6570
|
var r = e.ppem / e.font.unitsPerEm, n = r, a = t.components, s, i, o;
|
|
6569
6571
|
if (be.prototype = e, !a)
|
|
6570
6572
|
o = new be("glyf", t.instructions), exports.DEBUG && (console.log("---EXEC GLYPH---"), o.step = -1), er(t, o, r, n), i = o.gZone;
|
|
@@ -6621,7 +6623,7 @@ Ae = function(t) {
|
|
|
6621
6623
|
if (e) {
|
|
6622
6624
|
var r = e.length, n;
|
|
6623
6625
|
for (t.ip = 0; t.ip < r; t.ip++) {
|
|
6624
|
-
if (exports.DEBUG && t.step++, n =
|
|
6626
|
+
if (exports.DEBUG && t.step++, n = ca[e[t.ip]], !n)
|
|
6625
6627
|
throw new Error(
|
|
6626
6628
|
"unknown instruction: 0x" + Number(e[t.ip]).toString(16)
|
|
6627
6629
|
);
|
|
@@ -6633,7 +6635,7 @@ function yt(t) {
|
|
|
6633
6635
|
for (var e = t.tZone = new Array(t.gZone.length), r = 0; r < e.length; r++)
|
|
6634
6636
|
e[r] = new ve(0, 0);
|
|
6635
6637
|
}
|
|
6636
|
-
function
|
|
6638
|
+
function va(t, e) {
|
|
6637
6639
|
var r = t.prog, n = t.ip, a = 1, s;
|
|
6638
6640
|
do
|
|
6639
6641
|
if (s = r[++n], s === 88)
|
|
@@ -6653,36 +6655,36 @@ function ga(t, e) {
|
|
|
6653
6655
|
while (a > 0);
|
|
6654
6656
|
t.ip = n;
|
|
6655
6657
|
}
|
|
6656
|
-
function
|
|
6658
|
+
function Xr(t, e) {
|
|
6657
6659
|
exports.DEBUG && console.log(e.step, "SVTCA[" + t.axis + "]"), e.fv = e.pv = e.dpv = t;
|
|
6658
6660
|
}
|
|
6659
|
-
function
|
|
6661
|
+
function Yr(t, e) {
|
|
6660
6662
|
exports.DEBUG && console.log(e.step, "SPVTCA[" + t.axis + "]"), e.pv = e.dpv = t;
|
|
6661
6663
|
}
|
|
6662
|
-
function
|
|
6664
|
+
function Zr(t, e) {
|
|
6663
6665
|
exports.DEBUG && console.log(e.step, "SFVTCA[" + t.axis + "]"), e.fv = t;
|
|
6664
6666
|
}
|
|
6665
|
-
function
|
|
6667
|
+
function jr(t, e) {
|
|
6666
6668
|
var r = e.stack, n = r.pop(), a = r.pop(), s = e.z2[n], i = e.z1[a];
|
|
6667
6669
|
exports.DEBUG && console.log("SPVTL[" + t + "]", n, a);
|
|
6668
6670
|
var o, u;
|
|
6669
6671
|
t ? (o = s.y - i.y, u = i.x - s.x) : (o = i.x - s.x, u = i.y - s.y), e.pv = e.dpv = Je(o, u);
|
|
6670
6672
|
}
|
|
6671
|
-
function
|
|
6673
|
+
function Kr(t, e) {
|
|
6672
6674
|
var r = e.stack, n = r.pop(), a = r.pop(), s = e.z2[n], i = e.z1[a];
|
|
6673
6675
|
exports.DEBUG && console.log("SFVTL[" + t + "]", n, a);
|
|
6674
6676
|
var o, u;
|
|
6675
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);
|
|
6676
6678
|
}
|
|
6677
|
-
function
|
|
6679
|
+
function Pi(t) {
|
|
6678
6680
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6679
6681
|
exports.DEBUG && console.log(t.step, "SPVFS[]", r, n), t.pv = t.dpv = Je(n, r);
|
|
6680
6682
|
}
|
|
6681
|
-
function
|
|
6683
|
+
function Bi(t) {
|
|
6682
6684
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6683
6685
|
exports.DEBUG && console.log(t.step, "SPVFS[]", r, n), t.fv = Je(n, r);
|
|
6684
6686
|
}
|
|
6685
|
-
function
|
|
6687
|
+
function Di(t) {
|
|
6686
6688
|
var e = t.stack, r = t.pv;
|
|
6687
6689
|
exports.DEBUG && console.log(t.step, "GPV[]"), e.push(r.x * 16384), e.push(r.y * 16384);
|
|
6688
6690
|
}
|
|
@@ -6690,25 +6692,25 @@ function Ii(t) {
|
|
|
6690
6692
|
var e = t.stack, r = t.fv;
|
|
6691
6693
|
exports.DEBUG && console.log(t.step, "GFV[]"), e.push(r.x * 16384), e.push(r.y * 16384);
|
|
6692
6694
|
}
|
|
6693
|
-
function
|
|
6695
|
+
function Gi(t) {
|
|
6694
6696
|
t.fv = t.pv, exports.DEBUG && console.log(t.step, "SFVTPV[]");
|
|
6695
6697
|
}
|
|
6696
|
-
function
|
|
6698
|
+
function Ni(t) {
|
|
6697
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];
|
|
6698
6700
|
exports.DEBUG && console.log("ISECT[], ", r, n, a, s, i);
|
|
6699
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;
|
|
6700
6702
|
p.x = (O * (b - T) - w * (d - y)) / A, p.y = (O * (x - S) - w * (v - m)) / A;
|
|
6701
6703
|
}
|
|
6702
|
-
function
|
|
6704
|
+
function _i(t) {
|
|
6703
6705
|
t.rp0 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP0[]", t.rp0);
|
|
6704
6706
|
}
|
|
6705
|
-
function
|
|
6707
|
+
function Hi(t) {
|
|
6706
6708
|
t.rp1 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP1[]", t.rp1);
|
|
6707
6709
|
}
|
|
6708
|
-
function
|
|
6710
|
+
function zi(t) {
|
|
6709
6711
|
t.rp2 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP2[]", t.rp2);
|
|
6710
6712
|
}
|
|
6711
|
-
function
|
|
6713
|
+
function Wi(t) {
|
|
6712
6714
|
var e = t.stack.pop();
|
|
6713
6715
|
switch (exports.DEBUG && console.log(t.step, "SZP0[]", e), t.zp0 = e, e) {
|
|
6714
6716
|
case 0:
|
|
@@ -6721,7 +6723,7 @@ function zi(t) {
|
|
|
6721
6723
|
throw new Error("Invalid zone pointer");
|
|
6722
6724
|
}
|
|
6723
6725
|
}
|
|
6724
|
-
function
|
|
6726
|
+
function Vi(t) {
|
|
6725
6727
|
var e = t.stack.pop();
|
|
6726
6728
|
switch (exports.DEBUG && console.log(t.step, "SZP1[]", e), t.zp1 = e, e) {
|
|
6727
6729
|
case 0:
|
|
@@ -6734,7 +6736,7 @@ function Wi(t) {
|
|
|
6734
6736
|
throw new Error("Invalid zone pointer");
|
|
6735
6737
|
}
|
|
6736
6738
|
}
|
|
6737
|
-
function
|
|
6739
|
+
function qi(t) {
|
|
6738
6740
|
var e = t.stack.pop();
|
|
6739
6741
|
switch (exports.DEBUG && console.log(t.step, "SZP2[]", e), t.zp2 = e, e) {
|
|
6740
6742
|
case 0:
|
|
@@ -6747,7 +6749,7 @@ function Vi(t) {
|
|
|
6747
6749
|
throw new Error("Invalid zone pointer");
|
|
6748
6750
|
}
|
|
6749
6751
|
}
|
|
6750
|
-
function
|
|
6752
|
+
function Xi(t) {
|
|
6751
6753
|
var e = t.stack.pop();
|
|
6752
6754
|
switch (exports.DEBUG && console.log(t.step, "SZPS[]", e), t.zp0 = t.zp1 = t.zp2 = e, e) {
|
|
6753
6755
|
case 0:
|
|
@@ -6760,49 +6762,49 @@ function qi(t) {
|
|
|
6760
6762
|
throw new Error("Invalid zone pointer");
|
|
6761
6763
|
}
|
|
6762
6764
|
}
|
|
6763
|
-
function Xi(t) {
|
|
6764
|
-
t.loop = t.stack.pop(), exports.DEBUG && console.log(t.step, "SLOOP[]", t.loop);
|
|
6765
|
-
}
|
|
6766
6765
|
function Yi(t) {
|
|
6767
|
-
exports.DEBUG && console.log(t.step, "
|
|
6766
|
+
t.loop = t.stack.pop(), exports.DEBUG && console.log(t.step, "SLOOP[]", t.loop);
|
|
6768
6767
|
}
|
|
6769
6768
|
function Zi(t) {
|
|
6770
|
-
exports.DEBUG && console.log(t.step, "
|
|
6769
|
+
exports.DEBUG && console.log(t.step, "RTG[]"), t.round = da;
|
|
6771
6770
|
}
|
|
6772
6771
|
function ji(t) {
|
|
6773
|
-
|
|
6774
|
-
exports.DEBUG && console.log(t.step, "SMD[]", e), t.minDis = e / 64;
|
|
6772
|
+
exports.DEBUG && console.log(t.step, "RTHG[]"), t.round = Li;
|
|
6775
6773
|
}
|
|
6776
6774
|
function Ki(t) {
|
|
6777
|
-
|
|
6775
|
+
var e = t.stack.pop();
|
|
6776
|
+
exports.DEBUG && console.log(t.step, "SMD[]", e), t.minDis = e / 64;
|
|
6778
6777
|
}
|
|
6779
6778
|
function Qi(t) {
|
|
6779
|
+
exports.DEBUG && console.log(t.step, "ELSE[]"), va(t, !1);
|
|
6780
|
+
}
|
|
6781
|
+
function $i(t) {
|
|
6780
6782
|
var e = t.stack.pop();
|
|
6781
6783
|
exports.DEBUG && console.log(t.step, "JMPR[]", e), t.ip += e - 1;
|
|
6782
6784
|
}
|
|
6783
|
-
function
|
|
6785
|
+
function Ji(t) {
|
|
6784
6786
|
var e = t.stack.pop();
|
|
6785
6787
|
exports.DEBUG && console.log(t.step, "SCVTCI[]", e), t.cvCutIn = e / 64;
|
|
6786
6788
|
}
|
|
6787
|
-
function
|
|
6789
|
+
function eo(t) {
|
|
6788
6790
|
var e = t.stack;
|
|
6789
6791
|
exports.DEBUG && console.log(t.step, "DUP[]"), e.push(e[e.length - 1]);
|
|
6790
6792
|
}
|
|
6791
6793
|
function Ut(t) {
|
|
6792
6794
|
exports.DEBUG && console.log(t.step, "POP[]"), t.stack.pop();
|
|
6793
6795
|
}
|
|
6794
|
-
function
|
|
6796
|
+
function to(t) {
|
|
6795
6797
|
exports.DEBUG && console.log(t.step, "CLEAR[]"), t.stack.length = 0;
|
|
6796
6798
|
}
|
|
6797
|
-
function
|
|
6799
|
+
function ro(t) {
|
|
6798
6800
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6799
6801
|
exports.DEBUG && console.log(t.step, "SWAP[]"), e.push(r), e.push(n);
|
|
6800
6802
|
}
|
|
6801
|
-
function
|
|
6803
|
+
function no(t) {
|
|
6802
6804
|
var e = t.stack;
|
|
6803
6805
|
exports.DEBUG && console.log(t.step, "DEPTH[]"), e.push(e.length);
|
|
6804
6806
|
}
|
|
6805
|
-
function
|
|
6807
|
+
function ao(t) {
|
|
6806
6808
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6807
6809
|
exports.DEBUG && console.log(t.step, "LOOPCALL[]", r, n);
|
|
6808
6810
|
var a = t.ip, s = t.prog;
|
|
@@ -6815,21 +6817,21 @@ function no(t) {
|
|
|
6815
6817
|
);
|
|
6816
6818
|
t.ip = a, t.prog = s;
|
|
6817
6819
|
}
|
|
6818
|
-
function
|
|
6820
|
+
function so(t) {
|
|
6819
6821
|
var e = t.stack.pop();
|
|
6820
6822
|
exports.DEBUG && console.log(t.step, "CALL[]", e);
|
|
6821
6823
|
var r = t.ip, n = t.prog;
|
|
6822
6824
|
t.prog = t.funcs[e], Ae(t), t.ip = r, t.prog = n, exports.DEBUG && console.log(++t.step, "returning from", e);
|
|
6823
6825
|
}
|
|
6824
|
-
function
|
|
6826
|
+
function io(t) {
|
|
6825
6827
|
var e = t.stack, r = e.pop();
|
|
6826
6828
|
exports.DEBUG && console.log(t.step, "CINDEX[]", r), e.push(e[e.length - r]);
|
|
6827
6829
|
}
|
|
6828
|
-
function
|
|
6830
|
+
function oo(t) {
|
|
6829
6831
|
var e = t.stack, r = e.pop();
|
|
6830
6832
|
exports.DEBUG && console.log(t.step, "MINDEX[]", r), e.push(e.splice(e.length - r, 1)[0]);
|
|
6831
6833
|
}
|
|
6832
|
-
function
|
|
6834
|
+
function uo(t) {
|
|
6833
6835
|
if (t.env !== "fpgm")
|
|
6834
6836
|
throw new Error("FDEF not allowed here");
|
|
6835
6837
|
var e = t.stack, r = t.prog, n = t.ip, a = e.pop(), s = n;
|
|
@@ -6837,19 +6839,19 @@ function oo(t) {
|
|
|
6837
6839
|
;
|
|
6838
6840
|
t.ip = n, t.funcs[a] = r.slice(s + 1, n);
|
|
6839
6841
|
}
|
|
6840
|
-
function
|
|
6842
|
+
function Qr(t, e) {
|
|
6841
6843
|
var r = e.stack.pop(), n = e.z0[r], a = e.fv, s = e.pv;
|
|
6842
6844
|
exports.DEBUG && console.log(e.step, "MDAP[" + t + "]", r);
|
|
6843
6845
|
var i = s.distance(n, Ye);
|
|
6844
6846
|
t && (i = e.round(i)), a.setRelative(n, Ye, i, s), a.touch(n), e.rp0 = e.rp1 = r;
|
|
6845
6847
|
}
|
|
6846
|
-
function
|
|
6848
|
+
function $r(t, e) {
|
|
6847
6849
|
var r = e.z2, n = r.length - 2, a, s, i;
|
|
6848
6850
|
exports.DEBUG && console.log(e.step, "IUP[" + t.axis + "]");
|
|
6849
6851
|
for (var o = 0; o < n; o++)
|
|
6850
6852
|
a = r[o], !t.touched(a) && (s = a.prevTouched(t), s !== a && (i = a.nextTouched(t), s === i && t.setRelative(a, a, t.distance(s, s, !1, !0), t, !0), t.interpolate(a, s, i, t)));
|
|
6851
6853
|
}
|
|
6852
|
-
function
|
|
6854
|
+
function Jr(t, e) {
|
|
6853
6855
|
for (var r = e.stack, n = t ? e.rp1 : e.rp2, a = (t ? e.z0 : e.z1)[n], s = e.fv, i = e.pv, o = e.loop, u = e.z2; o--; ) {
|
|
6854
6856
|
var l = r.pop(), h = u[l], f = i.distance(a, a, !1, !0);
|
|
6855
6857
|
s.setRelative(h, h, f, i), s.touch(h), exports.DEBUG && console.log(
|
|
@@ -6860,7 +6862,7 @@ function $r(t, e) {
|
|
|
6860
6862
|
}
|
|
6861
6863
|
e.loop = 1;
|
|
6862
6864
|
}
|
|
6863
|
-
function
|
|
6865
|
+
function en(t, e) {
|
|
6864
6866
|
var r = e.stack, n = t ? e.rp1 : e.rp2, a = (t ? e.z0 : e.z1)[n], s = e.fv, i = e.pv, o = r.pop(), u = e.z2[e.contours[o]], l = u;
|
|
6865
6867
|
exports.DEBUG && console.log(e.step, "SHC[" + t + "]", o);
|
|
6866
6868
|
var h = i.distance(a, a, !1, !0);
|
|
@@ -6868,7 +6870,7 @@ function Jr(t, e) {
|
|
|
6868
6870
|
l !== a && s.setRelative(l, l, h, i), l = l.nextPointOnContour;
|
|
6869
6871
|
while (l !== u);
|
|
6870
6872
|
}
|
|
6871
|
-
function
|
|
6873
|
+
function tn(t, e) {
|
|
6872
6874
|
var r = e.stack, n = t ? e.rp1 : e.rp2, a = (t ? e.z0 : e.z1)[n], s = e.fv, i = e.pv, o = r.pop();
|
|
6873
6875
|
exports.DEBUG && console.log(e.step, "SHZ[" + t + "]", o);
|
|
6874
6876
|
var u;
|
|
@@ -6885,7 +6887,7 @@ function en(t, e) {
|
|
|
6885
6887
|
for (var l, h = i.distance(a, a, !1, !0), f = u.length - 2, c = 0; c < f; c++)
|
|
6886
6888
|
l = u[c], s.setRelative(l, l, h, i);
|
|
6887
6889
|
}
|
|
6888
|
-
function
|
|
6890
|
+
function lo(t) {
|
|
6889
6891
|
for (var e = t.stack, r = t.loop, n = t.fv, a = e.pop() / 64, s = t.z2; r--; ) {
|
|
6890
6892
|
var i = e.pop(), o = s[i];
|
|
6891
6893
|
exports.DEBUG && console.log(
|
|
@@ -6897,7 +6899,7 @@ function uo(t) {
|
|
|
6897
6899
|
}
|
|
6898
6900
|
t.loop = 1;
|
|
6899
6901
|
}
|
|
6900
|
-
function
|
|
6902
|
+
function ho(t) {
|
|
6901
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--; ) {
|
|
6902
6904
|
var h = e.pop(), f = l[h];
|
|
6903
6905
|
exports.DEBUG && console.log(
|
|
@@ -6911,11 +6913,11 @@ function lo(t) {
|
|
|
6911
6913
|
}
|
|
6912
6914
|
t.loop = 1;
|
|
6913
6915
|
}
|
|
6914
|
-
function
|
|
6916
|
+
function rn(t, e) {
|
|
6915
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;
|
|
6916
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);
|
|
6917
6919
|
}
|
|
6918
|
-
function
|
|
6920
|
+
function co(t) {
|
|
6919
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--; ) {
|
|
6920
6922
|
var u = e.pop(), l = o[u];
|
|
6921
6923
|
exports.DEBUG && console.log(
|
|
@@ -6926,10 +6928,10 @@ function ho(t) {
|
|
|
6926
6928
|
}
|
|
6927
6929
|
t.loop = 1;
|
|
6928
6930
|
}
|
|
6929
|
-
function
|
|
6930
|
-
exports.DEBUG && console.log(t.step, "RTDG[]"), t.round =
|
|
6931
|
+
function fo(t) {
|
|
6932
|
+
exports.DEBUG && console.log(t.step, "RTDG[]"), t.round = Ui;
|
|
6931
6933
|
}
|
|
6932
|
-
function
|
|
6934
|
+
function nn(t, e) {
|
|
6933
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];
|
|
6934
6936
|
exports.DEBUG && console.log(
|
|
6935
6937
|
e.step,
|
|
@@ -6943,14 +6945,14 @@ function rn(t, e) {
|
|
|
6943
6945
|
var l = o.distance(s, Ye);
|
|
6944
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;
|
|
6945
6947
|
}
|
|
6946
|
-
function
|
|
6948
|
+
function po(t) {
|
|
6947
6949
|
var e = t.prog, r = t.ip, n = t.stack, a = e[++r];
|
|
6948
6950
|
exports.DEBUG && console.log(t.step, "NPUSHB[]", a);
|
|
6949
6951
|
for (var s = 0; s < a; s++)
|
|
6950
6952
|
n.push(e[++r]);
|
|
6951
6953
|
t.ip = r;
|
|
6952
6954
|
}
|
|
6953
|
-
function
|
|
6955
|
+
function go(t) {
|
|
6954
6956
|
var e = t.ip, r = t.prog, n = t.stack, a = r[++e];
|
|
6955
6957
|
exports.DEBUG && console.log(t.step, "NPUSHW[]", a);
|
|
6956
6958
|
for (var s = 0; s < a; s++) {
|
|
@@ -6959,88 +6961,88 @@ function po(t) {
|
|
|
6959
6961
|
}
|
|
6960
6962
|
t.ip = e;
|
|
6961
6963
|
}
|
|
6962
|
-
function
|
|
6964
|
+
function vo(t) {
|
|
6963
6965
|
var e = t.stack, r = t.store;
|
|
6964
6966
|
r || (r = t.store = []);
|
|
6965
6967
|
var n = e.pop(), a = e.pop();
|
|
6966
6968
|
exports.DEBUG && console.log(t.step, "WS", n, a), r[a] = n;
|
|
6967
6969
|
}
|
|
6968
|
-
function
|
|
6970
|
+
function mo(t) {
|
|
6969
6971
|
var e = t.stack, r = t.store, n = e.pop();
|
|
6970
6972
|
exports.DEBUG && console.log(t.step, "RS", n);
|
|
6971
6973
|
var a = r && r[n] || 0;
|
|
6972
6974
|
e.push(a);
|
|
6973
6975
|
}
|
|
6974
|
-
function
|
|
6976
|
+
function yo(t) {
|
|
6975
6977
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6976
6978
|
exports.DEBUG && console.log(t.step, "WCVTP", r, n), t.cvt[n] = r / 64;
|
|
6977
6979
|
}
|
|
6978
|
-
function
|
|
6980
|
+
function xo(t) {
|
|
6979
6981
|
var e = t.stack, r = e.pop();
|
|
6980
6982
|
exports.DEBUG && console.log(t.step, "RCVT", r), e.push(t.cvt[r] * 64);
|
|
6981
6983
|
}
|
|
6982
|
-
function
|
|
6984
|
+
function an(t, e) {
|
|
6983
6985
|
var r = e.stack, n = r.pop(), a = e.z2[n];
|
|
6984
6986
|
exports.DEBUG && console.log(e.step, "GC[" + t + "]", n), r.push(e.dpv.distance(a, Ye, t, !1) * 64);
|
|
6985
6987
|
}
|
|
6986
|
-
function
|
|
6988
|
+
function sn(t, e) {
|
|
6987
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);
|
|
6988
6990
|
exports.DEBUG && console.log(e.step, "MD[" + t + "]", n, a, "->", o), e.stack.push(Math.round(o * 64));
|
|
6989
6991
|
}
|
|
6990
|
-
function
|
|
6992
|
+
function bo(t) {
|
|
6991
6993
|
exports.DEBUG && console.log(t.step, "MPPEM[]"), t.stack.push(t.ppem);
|
|
6992
6994
|
}
|
|
6993
|
-
function
|
|
6995
|
+
function So(t) {
|
|
6994
6996
|
exports.DEBUG && console.log(t.step, "FLIPON[]"), t.autoFlip = !0;
|
|
6995
6997
|
}
|
|
6996
|
-
function
|
|
6998
|
+
function ko(t) {
|
|
6997
6999
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6998
7000
|
exports.DEBUG && console.log(t.step, "LT[]", r, n), e.push(n < r ? 1 : 0);
|
|
6999
7001
|
}
|
|
7000
|
-
function
|
|
7002
|
+
function Fo(t) {
|
|
7001
7003
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7002
7004
|
exports.DEBUG && console.log(t.step, "LTEQ[]", r, n), e.push(n <= r ? 1 : 0);
|
|
7003
7005
|
}
|
|
7004
|
-
function
|
|
7006
|
+
function To(t) {
|
|
7005
7007
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7006
7008
|
exports.DEBUG && console.log(t.step, "GT[]", r, n), e.push(n > r ? 1 : 0);
|
|
7007
7009
|
}
|
|
7008
|
-
function
|
|
7010
|
+
function wo(t) {
|
|
7009
7011
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7010
7012
|
exports.DEBUG && console.log(t.step, "GTEQ[]", r, n), e.push(n >= r ? 1 : 0);
|
|
7011
7013
|
}
|
|
7012
|
-
function
|
|
7014
|
+
function Co(t) {
|
|
7013
7015
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7014
7016
|
exports.DEBUG && console.log(t.step, "EQ[]", r, n), e.push(r === n ? 1 : 0);
|
|
7015
7017
|
}
|
|
7016
|
-
function
|
|
7018
|
+
function Eo(t) {
|
|
7017
7019
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7018
7020
|
exports.DEBUG && console.log(t.step, "NEQ[]", r, n), e.push(r !== n ? 1 : 0);
|
|
7019
7021
|
}
|
|
7020
|
-
function
|
|
7022
|
+
function Oo(t) {
|
|
7021
7023
|
var e = t.stack, r = e.pop();
|
|
7022
7024
|
exports.DEBUG && console.log(t.step, "ODD[]", r), e.push(Math.trunc(r) % 2 ? 1 : 0);
|
|
7023
7025
|
}
|
|
7024
|
-
function
|
|
7026
|
+
function Uo(t) {
|
|
7025
7027
|
var e = t.stack, r = e.pop();
|
|
7026
7028
|
exports.DEBUG && console.log(t.step, "EVEN[]", r), e.push(Math.trunc(r) % 2 ? 0 : 1);
|
|
7027
7029
|
}
|
|
7028
|
-
function
|
|
7030
|
+
function Lo(t) {
|
|
7029
7031
|
var e = t.stack.pop();
|
|
7030
|
-
exports.DEBUG && console.log(t.step, "IF[]", e), e || (
|
|
7032
|
+
exports.DEBUG && console.log(t.step, "IF[]", e), e || (va(t, !0), exports.DEBUG && console.log(t.step, "EIF[]"));
|
|
7031
7033
|
}
|
|
7032
|
-
function
|
|
7034
|
+
function Ro(t) {
|
|
7033
7035
|
exports.DEBUG && console.log(t.step, "EIF[]");
|
|
7034
7036
|
}
|
|
7035
|
-
function
|
|
7037
|
+
function Ao(t) {
|
|
7036
7038
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7037
7039
|
exports.DEBUG && console.log(t.step, "AND[]", r, n), e.push(r && n ? 1 : 0);
|
|
7038
7040
|
}
|
|
7039
|
-
function
|
|
7041
|
+
function Mo(t) {
|
|
7040
7042
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7041
7043
|
exports.DEBUG && console.log(t.step, "OR[]", r, n), e.push(r || n ? 1 : 0);
|
|
7042
7044
|
}
|
|
7043
|
-
function
|
|
7045
|
+
function Po(t) {
|
|
7044
7046
|
var e = t.stack, r = e.pop();
|
|
7045
7047
|
exports.DEBUG && console.log(t.step, "NOT[]", r), e.push(r ? 0 : 1);
|
|
7046
7048
|
}
|
|
@@ -7057,11 +7059,11 @@ function Lt(t, e) {
|
|
|
7057
7059
|
}
|
|
7058
7060
|
}
|
|
7059
7061
|
}
|
|
7060
|
-
function
|
|
7062
|
+
function Bo(t) {
|
|
7061
7063
|
var e = t.stack, r = e.pop();
|
|
7062
7064
|
exports.DEBUG && console.log(t.step, "SDB[]", r), t.deltaBase = r;
|
|
7063
7065
|
}
|
|
7064
|
-
function
|
|
7066
|
+
function Do(t) {
|
|
7065
7067
|
var e = t.stack, r = e.pop();
|
|
7066
7068
|
exports.DEBUG && console.log(t.step, "SDS[]", r), t.deltaShift = Math.pow(0.5, r);
|
|
7067
7069
|
}
|
|
@@ -7069,31 +7071,31 @@ function Io(t) {
|
|
|
7069
7071
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7070
7072
|
exports.DEBUG && console.log(t.step, "ADD[]", r, n), e.push(n + r);
|
|
7071
7073
|
}
|
|
7072
|
-
function
|
|
7074
|
+
function Go(t) {
|
|
7073
7075
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7074
7076
|
exports.DEBUG && console.log(t.step, "SUB[]", r, n), e.push(n - r);
|
|
7075
7077
|
}
|
|
7076
|
-
function
|
|
7078
|
+
function No(t) {
|
|
7077
7079
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7078
7080
|
exports.DEBUG && console.log(t.step, "DIV[]", r, n), e.push(n * 64 / r);
|
|
7079
7081
|
}
|
|
7080
|
-
function
|
|
7082
|
+
function _o(t) {
|
|
7081
7083
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7082
7084
|
exports.DEBUG && console.log(t.step, "MUL[]", r, n), e.push(n * r / 64);
|
|
7083
7085
|
}
|
|
7084
|
-
function
|
|
7086
|
+
function Ho(t) {
|
|
7085
7087
|
var e = t.stack, r = e.pop();
|
|
7086
7088
|
exports.DEBUG && console.log(t.step, "ABS[]", r), e.push(Math.abs(r));
|
|
7087
7089
|
}
|
|
7088
|
-
function
|
|
7090
|
+
function zo(t) {
|
|
7089
7091
|
var e = t.stack, r = e.pop();
|
|
7090
7092
|
exports.DEBUG && console.log(t.step, "NEG[]", r), e.push(-r);
|
|
7091
7093
|
}
|
|
7092
|
-
function
|
|
7094
|
+
function Wo(t) {
|
|
7093
7095
|
var e = t.stack, r = e.pop();
|
|
7094
7096
|
exports.DEBUG && console.log(t.step, "FLOOR[]", r), e.push(Math.floor(r / 64) * 64);
|
|
7095
7097
|
}
|
|
7096
|
-
function
|
|
7098
|
+
function Vo(t) {
|
|
7097
7099
|
var e = t.stack, r = e.pop();
|
|
7098
7100
|
exports.DEBUG && console.log(t.step, "CEILING[]", r), e.push(Math.ceil(r / 64) * 64);
|
|
7099
7101
|
}
|
|
@@ -7101,7 +7103,7 @@ function ot(t, e) {
|
|
|
7101
7103
|
var r = e.stack, n = r.pop();
|
|
7102
7104
|
exports.DEBUG && console.log(e.step, "ROUND[]"), r.push(e.round(n / 64) * 64);
|
|
7103
7105
|
}
|
|
7104
|
-
function
|
|
7106
|
+
function qo(t) {
|
|
7105
7107
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7106
7108
|
exports.DEBUG && console.log(t.step, "WCVTF[]", r, n), t.cvt[n] = r * t.ppem / t.font.unitsPerEm;
|
|
7107
7109
|
}
|
|
@@ -7118,9 +7120,9 @@ function Rt(t, e) {
|
|
|
7118
7120
|
}
|
|
7119
7121
|
}
|
|
7120
7122
|
}
|
|
7121
|
-
function
|
|
7123
|
+
function Xo(t) {
|
|
7122
7124
|
var e = t.stack.pop();
|
|
7123
|
-
exports.DEBUG && console.log(t.step, "SROUND[]", e), t.round =
|
|
7125
|
+
exports.DEBUG && console.log(t.step, "SROUND[]", e), t.round = ga;
|
|
7124
7126
|
var r;
|
|
7125
7127
|
switch (e & 192) {
|
|
7126
7128
|
case 0:
|
|
@@ -7153,9 +7155,9 @@ function qo(t) {
|
|
|
7153
7155
|
}
|
|
7154
7156
|
e &= 15, e === 0 ? t.srThreshold = 0 : t.srThreshold = (e / 8 - 0.5) * r;
|
|
7155
7157
|
}
|
|
7156
|
-
function
|
|
7158
|
+
function Yo(t) {
|
|
7157
7159
|
var e = t.stack.pop();
|
|
7158
|
-
exports.DEBUG && console.log(t.step, "S45ROUND[]", e), t.round =
|
|
7160
|
+
exports.DEBUG && console.log(t.step, "S45ROUND[]", e), t.round = ga;
|
|
7159
7161
|
var r;
|
|
7160
7162
|
switch (e & 192) {
|
|
7161
7163
|
case 0:
|
|
@@ -7188,46 +7190,46 @@ function Xo(t) {
|
|
|
7188
7190
|
}
|
|
7189
7191
|
e &= 15, e === 0 ? t.srThreshold = 0 : t.srThreshold = (e / 8 - 0.5) * r;
|
|
7190
7192
|
}
|
|
7191
|
-
function Yo(t) {
|
|
7192
|
-
exports.DEBUG && console.log(t.step, "ROFF[]"), t.round = Ei;
|
|
7193
|
-
}
|
|
7194
7193
|
function Zo(t) {
|
|
7195
|
-
exports.DEBUG && console.log(t.step, "
|
|
7194
|
+
exports.DEBUG && console.log(t.step, "ROFF[]"), t.round = Oi;
|
|
7196
7195
|
}
|
|
7197
7196
|
function jo(t) {
|
|
7198
|
-
exports.DEBUG && console.log(t.step, "
|
|
7197
|
+
exports.DEBUG && console.log(t.step, "RUTG[]"), t.round = Ri;
|
|
7199
7198
|
}
|
|
7200
7199
|
function Ko(t) {
|
|
7200
|
+
exports.DEBUG && console.log(t.step, "RDTG[]"), t.round = Ai;
|
|
7201
|
+
}
|
|
7202
|
+
function Qo(t) {
|
|
7201
7203
|
var e = t.stack.pop();
|
|
7202
7204
|
exports.DEBUG && console.log(t.step, "SCANCTRL[]", e);
|
|
7203
7205
|
}
|
|
7204
|
-
function
|
|
7206
|
+
function on(t, e) {
|
|
7205
7207
|
var r = e.stack, n = r.pop(), a = r.pop(), s = e.z2[n], i = e.z1[a];
|
|
7206
7208
|
exports.DEBUG && console.log(e.step, "SDPVTL[" + t + "]", n, a);
|
|
7207
7209
|
var o, u;
|
|
7208
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);
|
|
7209
7211
|
}
|
|
7210
|
-
function
|
|
7212
|
+
function $o(t) {
|
|
7211
7213
|
var e = t.stack, r = e.pop(), n = 0;
|
|
7212
7214
|
exports.DEBUG && console.log(t.step, "GETINFO[]", r), r & 1 && (n = 35), r & 32 && (n |= 4096), e.push(n);
|
|
7213
7215
|
}
|
|
7214
|
-
function
|
|
7216
|
+
function Jo(t) {
|
|
7215
7217
|
var e = t.stack, r = e.pop(), n = e.pop(), a = e.pop();
|
|
7216
7218
|
exports.DEBUG && console.log(t.step, "ROLL[]"), e.push(n), e.push(r), e.push(a);
|
|
7217
7219
|
}
|
|
7218
|
-
function
|
|
7220
|
+
function eu(t) {
|
|
7219
7221
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7220
7222
|
exports.DEBUG && console.log(t.step, "MAX[]", r, n), e.push(Math.max(n, r));
|
|
7221
7223
|
}
|
|
7222
|
-
function
|
|
7224
|
+
function tu(t) {
|
|
7223
7225
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7224
7226
|
exports.DEBUG && console.log(t.step, "MIN[]", r, n), e.push(Math.min(n, r));
|
|
7225
7227
|
}
|
|
7226
|
-
function
|
|
7228
|
+
function ru(t) {
|
|
7227
7229
|
var e = t.stack.pop();
|
|
7228
7230
|
exports.DEBUG && console.log(t.step, "SCANTYPE[]", e);
|
|
7229
7231
|
}
|
|
7230
|
-
function
|
|
7232
|
+
function nu(t) {
|
|
7231
7233
|
var e = t.stack.pop(), r = t.stack.pop();
|
|
7232
7234
|
switch (exports.DEBUG && console.log(t.step, "INSTCTRL[]", e, r), e) {
|
|
7233
7235
|
case 1:
|
|
@@ -7270,67 +7272,67 @@ function C(t, e, r, n, a, s) {
|
|
|
7270
7272
|
")"
|
|
7271
7273
|
), s.rp1 = s.rp0, s.rp2 = u, e && (s.rp0 = u);
|
|
7272
7274
|
}
|
|
7273
|
-
|
|
7275
|
+
ca = [
|
|
7274
7276
|
/* 0x00 */
|
|
7275
|
-
|
|
7277
|
+
Xr.bind(void 0, ge),
|
|
7276
7278
|
/* 0x01 */
|
|
7277
|
-
|
|
7279
|
+
Xr.bind(void 0, pe),
|
|
7278
7280
|
/* 0x02 */
|
|
7279
|
-
|
|
7281
|
+
Yr.bind(void 0, ge),
|
|
7280
7282
|
/* 0x03 */
|
|
7281
|
-
|
|
7283
|
+
Yr.bind(void 0, pe),
|
|
7282
7284
|
/* 0x04 */
|
|
7283
|
-
|
|
7285
|
+
Zr.bind(void 0, ge),
|
|
7284
7286
|
/* 0x05 */
|
|
7285
|
-
|
|
7287
|
+
Zr.bind(void 0, pe),
|
|
7286
7288
|
/* 0x06 */
|
|
7287
|
-
|
|
7289
|
+
jr.bind(void 0, 0),
|
|
7288
7290
|
/* 0x07 */
|
|
7289
|
-
|
|
7291
|
+
jr.bind(void 0, 1),
|
|
7290
7292
|
/* 0x08 */
|
|
7291
|
-
|
|
7293
|
+
Kr.bind(void 0, 0),
|
|
7292
7294
|
/* 0x09 */
|
|
7293
|
-
|
|
7295
|
+
Kr.bind(void 0, 1),
|
|
7294
7296
|
/* 0x0A */
|
|
7295
|
-
Mi,
|
|
7296
|
-
/* 0x0B */
|
|
7297
7297
|
Pi,
|
|
7298
|
-
/*
|
|
7298
|
+
/* 0x0B */
|
|
7299
7299
|
Bi,
|
|
7300
|
+
/* 0x0C */
|
|
7301
|
+
Di,
|
|
7300
7302
|
/* 0x0D */
|
|
7301
7303
|
Ii,
|
|
7302
7304
|
/* 0x0E */
|
|
7303
|
-
Di,
|
|
7304
|
-
/* 0x0F */
|
|
7305
7305
|
Gi,
|
|
7306
|
-
/*
|
|
7306
|
+
/* 0x0F */
|
|
7307
7307
|
Ni,
|
|
7308
|
-
/*
|
|
7308
|
+
/* 0x10 */
|
|
7309
7309
|
_i,
|
|
7310
|
-
/*
|
|
7310
|
+
/* 0x11 */
|
|
7311
7311
|
Hi,
|
|
7312
|
-
/*
|
|
7312
|
+
/* 0x12 */
|
|
7313
7313
|
zi,
|
|
7314
|
-
/*
|
|
7314
|
+
/* 0x13 */
|
|
7315
7315
|
Wi,
|
|
7316
|
-
/*
|
|
7316
|
+
/* 0x14 */
|
|
7317
7317
|
Vi,
|
|
7318
|
-
/*
|
|
7318
|
+
/* 0x15 */
|
|
7319
7319
|
qi,
|
|
7320
|
-
/*
|
|
7320
|
+
/* 0x16 */
|
|
7321
7321
|
Xi,
|
|
7322
|
-
/*
|
|
7322
|
+
/* 0x17 */
|
|
7323
7323
|
Yi,
|
|
7324
|
-
/*
|
|
7324
|
+
/* 0x18 */
|
|
7325
7325
|
Zi,
|
|
7326
|
-
/*
|
|
7326
|
+
/* 0x19 */
|
|
7327
7327
|
ji,
|
|
7328
|
-
/*
|
|
7328
|
+
/* 0x1A */
|
|
7329
7329
|
Ki,
|
|
7330
|
-
/*
|
|
7330
|
+
/* 0x1B */
|
|
7331
7331
|
Qi,
|
|
7332
|
-
/*
|
|
7332
|
+
/* 0x1C */
|
|
7333
7333
|
$i,
|
|
7334
|
+
/* 0x1D */
|
|
7335
|
+
Ji,
|
|
7334
7336
|
/* 0x1E */
|
|
7335
7337
|
void 0,
|
|
7336
7338
|
// TODO SSWCI
|
|
@@ -7338,19 +7340,19 @@ ha = [
|
|
|
7338
7340
|
void 0,
|
|
7339
7341
|
// TODO SSW
|
|
7340
7342
|
/* 0x20 */
|
|
7341
|
-
|
|
7343
|
+
eo,
|
|
7342
7344
|
/* 0x21 */
|
|
7343
7345
|
Ut,
|
|
7344
7346
|
/* 0x22 */
|
|
7345
|
-
eo,
|
|
7346
|
-
/* 0x23 */
|
|
7347
7347
|
to,
|
|
7348
|
-
/*
|
|
7348
|
+
/* 0x23 */
|
|
7349
7349
|
ro,
|
|
7350
|
+
/* 0x24 */
|
|
7351
|
+
no,
|
|
7350
7352
|
/* 0x25 */
|
|
7351
|
-
so,
|
|
7352
|
-
/* 0x26 */
|
|
7353
7353
|
io,
|
|
7354
|
+
/* 0x26 */
|
|
7355
|
+
oo,
|
|
7354
7356
|
/* 0x27 */
|
|
7355
7357
|
void 0,
|
|
7356
7358
|
// TODO ALIGNPTS
|
|
@@ -7360,80 +7362,80 @@ ha = [
|
|
|
7360
7362
|
void 0,
|
|
7361
7363
|
// TODO UTP
|
|
7362
7364
|
/* 0x2A */
|
|
7363
|
-
no,
|
|
7364
|
-
/* 0x2B */
|
|
7365
7365
|
ao,
|
|
7366
|
+
/* 0x2B */
|
|
7367
|
+
so,
|
|
7366
7368
|
/* 0x2C */
|
|
7367
|
-
|
|
7369
|
+
uo,
|
|
7368
7370
|
/* 0x2D */
|
|
7369
7371
|
void 0,
|
|
7370
7372
|
// ENDF (eaten by FDEF)
|
|
7371
7373
|
/* 0x2E */
|
|
7372
|
-
|
|
7374
|
+
Qr.bind(void 0, 0),
|
|
7373
7375
|
/* 0x2F */
|
|
7374
|
-
|
|
7376
|
+
Qr.bind(void 0, 1),
|
|
7375
7377
|
/* 0x30 */
|
|
7376
|
-
|
|
7378
|
+
$r.bind(void 0, ge),
|
|
7377
7379
|
/* 0x31 */
|
|
7378
|
-
|
|
7380
|
+
$r.bind(void 0, pe),
|
|
7379
7381
|
/* 0x32 */
|
|
7380
|
-
|
|
7382
|
+
Jr.bind(void 0, 0),
|
|
7381
7383
|
/* 0x33 */
|
|
7382
|
-
|
|
7384
|
+
Jr.bind(void 0, 1),
|
|
7383
7385
|
/* 0x34 */
|
|
7384
|
-
|
|
7386
|
+
en.bind(void 0, 0),
|
|
7385
7387
|
/* 0x35 */
|
|
7386
|
-
|
|
7388
|
+
en.bind(void 0, 1),
|
|
7387
7389
|
/* 0x36 */
|
|
7388
|
-
|
|
7390
|
+
tn.bind(void 0, 0),
|
|
7389
7391
|
/* 0x37 */
|
|
7390
|
-
|
|
7392
|
+
tn.bind(void 0, 1),
|
|
7391
7393
|
/* 0x38 */
|
|
7392
|
-
uo,
|
|
7393
|
-
/* 0x39 */
|
|
7394
7394
|
lo,
|
|
7395
|
+
/* 0x39 */
|
|
7396
|
+
ho,
|
|
7395
7397
|
/* 0x3A */
|
|
7396
|
-
|
|
7398
|
+
rn.bind(void 0, 0),
|
|
7397
7399
|
/* 0x3B */
|
|
7398
|
-
|
|
7400
|
+
rn.bind(void 0, 1),
|
|
7399
7401
|
/* 0x3C */
|
|
7400
|
-
ho,
|
|
7401
|
-
/* 0x3D */
|
|
7402
7402
|
co,
|
|
7403
|
+
/* 0x3D */
|
|
7404
|
+
fo,
|
|
7403
7405
|
/* 0x3E */
|
|
7404
|
-
|
|
7406
|
+
nn.bind(void 0, 0),
|
|
7405
7407
|
/* 0x3F */
|
|
7406
|
-
|
|
7408
|
+
nn.bind(void 0, 1),
|
|
7407
7409
|
/* 0x40 */
|
|
7408
|
-
fo,
|
|
7409
|
-
/* 0x41 */
|
|
7410
7410
|
po,
|
|
7411
|
-
/*
|
|
7411
|
+
/* 0x41 */
|
|
7412
7412
|
go,
|
|
7413
|
-
/*
|
|
7413
|
+
/* 0x42 */
|
|
7414
7414
|
vo,
|
|
7415
|
-
/*
|
|
7415
|
+
/* 0x43 */
|
|
7416
7416
|
mo,
|
|
7417
|
-
/*
|
|
7417
|
+
/* 0x44 */
|
|
7418
7418
|
yo,
|
|
7419
|
+
/* 0x45 */
|
|
7420
|
+
xo,
|
|
7419
7421
|
/* 0x46 */
|
|
7420
|
-
|
|
7422
|
+
an.bind(void 0, 0),
|
|
7421
7423
|
/* 0x47 */
|
|
7422
|
-
|
|
7424
|
+
an.bind(void 0, 1),
|
|
7423
7425
|
/* 0x48 */
|
|
7424
7426
|
void 0,
|
|
7425
7427
|
// TODO SCFS
|
|
7426
7428
|
/* 0x49 */
|
|
7427
|
-
|
|
7429
|
+
sn.bind(void 0, 0),
|
|
7428
7430
|
/* 0x4A */
|
|
7429
|
-
|
|
7431
|
+
sn.bind(void 0, 1),
|
|
7430
7432
|
/* 0x4B */
|
|
7431
|
-
|
|
7433
|
+
bo,
|
|
7432
7434
|
/* 0x4C */
|
|
7433
7435
|
void 0,
|
|
7434
7436
|
// TODO MPS
|
|
7435
7437
|
/* 0x4D */
|
|
7436
|
-
|
|
7438
|
+
So,
|
|
7437
7439
|
/* 0x4E */
|
|
7438
7440
|
void 0,
|
|
7439
7441
|
// TODO FLIPOFF
|
|
@@ -7441,53 +7443,53 @@ ha = [
|
|
|
7441
7443
|
void 0,
|
|
7442
7444
|
// TODO DEBUG
|
|
7443
7445
|
/* 0x50 */
|
|
7444
|
-
So,
|
|
7445
|
-
/* 0x51 */
|
|
7446
7446
|
ko,
|
|
7447
|
-
/*
|
|
7447
|
+
/* 0x51 */
|
|
7448
7448
|
Fo,
|
|
7449
|
-
/*
|
|
7449
|
+
/* 0x52 */
|
|
7450
7450
|
To,
|
|
7451
|
-
/*
|
|
7451
|
+
/* 0x53 */
|
|
7452
7452
|
wo,
|
|
7453
|
-
/*
|
|
7453
|
+
/* 0x54 */
|
|
7454
7454
|
Co,
|
|
7455
|
-
/*
|
|
7455
|
+
/* 0x55 */
|
|
7456
7456
|
Eo,
|
|
7457
|
-
/*
|
|
7457
|
+
/* 0x56 */
|
|
7458
7458
|
Oo,
|
|
7459
|
-
/*
|
|
7459
|
+
/* 0x57 */
|
|
7460
7460
|
Uo,
|
|
7461
|
-
/*
|
|
7461
|
+
/* 0x58 */
|
|
7462
7462
|
Lo,
|
|
7463
|
-
/*
|
|
7463
|
+
/* 0x59 */
|
|
7464
7464
|
Ro,
|
|
7465
|
-
/*
|
|
7465
|
+
/* 0x5A */
|
|
7466
7466
|
Ao,
|
|
7467
|
-
/*
|
|
7467
|
+
/* 0x5B */
|
|
7468
7468
|
Mo,
|
|
7469
|
+
/* 0x5C */
|
|
7470
|
+
Po,
|
|
7469
7471
|
/* 0x5D */
|
|
7470
7472
|
Lt.bind(void 0, 1),
|
|
7471
7473
|
/* 0x5E */
|
|
7472
|
-
Po,
|
|
7473
|
-
/* 0x5F */
|
|
7474
7474
|
Bo,
|
|
7475
|
+
/* 0x5F */
|
|
7476
|
+
Do,
|
|
7475
7477
|
/* 0x60 */
|
|
7476
7478
|
Io,
|
|
7477
7479
|
/* 0x61 */
|
|
7478
|
-
Do,
|
|
7479
|
-
/* 0x62 */
|
|
7480
7480
|
Go,
|
|
7481
|
-
/*
|
|
7481
|
+
/* 0x62 */
|
|
7482
7482
|
No,
|
|
7483
|
-
/*
|
|
7483
|
+
/* 0x63 */
|
|
7484
7484
|
_o,
|
|
7485
|
-
/*
|
|
7485
|
+
/* 0x64 */
|
|
7486
7486
|
Ho,
|
|
7487
|
-
/*
|
|
7487
|
+
/* 0x65 */
|
|
7488
7488
|
zo,
|
|
7489
|
-
/*
|
|
7489
|
+
/* 0x66 */
|
|
7490
7490
|
Wo,
|
|
7491
|
+
/* 0x67 */
|
|
7492
|
+
Vo,
|
|
7491
7493
|
/* 0x68 */
|
|
7492
7494
|
ot.bind(void 0, 0),
|
|
7493
7495
|
/* 0x69 */
|
|
@@ -7509,7 +7511,7 @@ ha = [
|
|
|
7509
7511
|
void 0,
|
|
7510
7512
|
// TODO NROUND[ab]
|
|
7511
7513
|
/* 0x70 */
|
|
7512
|
-
|
|
7514
|
+
qo,
|
|
7513
7515
|
/* 0x71 */
|
|
7514
7516
|
Lt.bind(void 0, 2),
|
|
7515
7517
|
/* 0x72 */
|
|
@@ -7521,9 +7523,9 @@ ha = [
|
|
|
7521
7523
|
/* 0x75 */
|
|
7522
7524
|
Rt.bind(void 0, 3),
|
|
7523
7525
|
/* 0x76 */
|
|
7524
|
-
qo,
|
|
7525
|
-
/* 0x77 */
|
|
7526
7526
|
Xo,
|
|
7527
|
+
/* 0x77 */
|
|
7528
|
+
Yo,
|
|
7527
7529
|
/* 0x78 */
|
|
7528
7530
|
void 0,
|
|
7529
7531
|
// TODO JROT[]
|
|
@@ -7531,13 +7533,13 @@ ha = [
|
|
|
7531
7533
|
void 0,
|
|
7532
7534
|
// TODO JROF[]
|
|
7533
7535
|
/* 0x7A */
|
|
7534
|
-
|
|
7536
|
+
Zo,
|
|
7535
7537
|
/* 0x7B */
|
|
7536
7538
|
void 0,
|
|
7537
7539
|
/* 0x7C */
|
|
7538
|
-
Zo,
|
|
7539
|
-
/* 0x7D */
|
|
7540
7540
|
jo,
|
|
7541
|
+
/* 0x7D */
|
|
7542
|
+
Ko,
|
|
7541
7543
|
/* 0x7E */
|
|
7542
7544
|
Ut,
|
|
7543
7545
|
// actually SANGW, supposed to do only a pop though
|
|
@@ -7558,26 +7560,26 @@ ha = [
|
|
|
7558
7560
|
/* 0x84 */
|
|
7559
7561
|
void 0,
|
|
7560
7562
|
/* 0x85 */
|
|
7561
|
-
|
|
7563
|
+
Qo,
|
|
7562
7564
|
/* 0x86 */
|
|
7563
|
-
|
|
7565
|
+
on.bind(void 0, 0),
|
|
7564
7566
|
/* 0x87 */
|
|
7565
|
-
|
|
7567
|
+
on.bind(void 0, 1),
|
|
7566
7568
|
/* 0x88 */
|
|
7567
|
-
|
|
7569
|
+
$o,
|
|
7568
7570
|
/* 0x89 */
|
|
7569
7571
|
void 0,
|
|
7570
7572
|
// TODO IDEF
|
|
7571
7573
|
/* 0x8A */
|
|
7572
|
-
$o,
|
|
7573
|
-
/* 0x8B */
|
|
7574
7574
|
Jo,
|
|
7575
|
-
/*
|
|
7575
|
+
/* 0x8B */
|
|
7576
7576
|
eu,
|
|
7577
|
-
/*
|
|
7577
|
+
/* 0x8C */
|
|
7578
7578
|
tu,
|
|
7579
|
-
/*
|
|
7579
|
+
/* 0x8D */
|
|
7580
7580
|
ru,
|
|
7581
|
+
/* 0x8E */
|
|
7582
|
+
nu,
|
|
7581
7583
|
/* 0x8F */
|
|
7582
7584
|
void 0,
|
|
7583
7585
|
/* 0x90 */
|
|
@@ -7811,7 +7813,7 @@ function Ne(t) {
|
|
|
7811
7813
|
function hr(t, e, r) {
|
|
7812
7814
|
this.contextName = r, this.startIndex = t, this.endOffset = e;
|
|
7813
7815
|
}
|
|
7814
|
-
function
|
|
7816
|
+
function au(t, e, r) {
|
|
7815
7817
|
this.contextName = t, this.openRange = null, this.ranges = [], this.checkStart = e, this.checkEnd = r;
|
|
7816
7818
|
}
|
|
7817
7819
|
function oe(t, e) {
|
|
@@ -7820,7 +7822,7 @@ function oe(t, e) {
|
|
|
7820
7822
|
function xt(t) {
|
|
7821
7823
|
this.eventId = t, this.subscribers = [];
|
|
7822
7824
|
}
|
|
7823
|
-
function
|
|
7825
|
+
function su(t) {
|
|
7824
7826
|
var e = this, r = [
|
|
7825
7827
|
"start",
|
|
7826
7828
|
"end",
|
|
@@ -7859,7 +7861,7 @@ function au(t) {
|
|
|
7859
7861
|
});
|
|
7860
7862
|
}
|
|
7861
7863
|
function G(t) {
|
|
7862
|
-
this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [],
|
|
7864
|
+
this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], su.call(this, t);
|
|
7863
7865
|
}
|
|
7864
7866
|
Ne.prototype.setState = function(t, e) {
|
|
7865
7867
|
return this.state[t] = e, this.activeState = { key: t, value: this.state[t] }, this.activeState;
|
|
@@ -7997,7 +7999,7 @@ G.prototype.registerContextChecker = function(t, e, r) {
|
|
|
7997
7999
|
return {
|
|
7998
8000
|
FAIL: "missing context end check."
|
|
7999
8001
|
};
|
|
8000
|
-
var n = new
|
|
8002
|
+
var n = new au(
|
|
8001
8003
|
t,
|
|
8002
8004
|
e,
|
|
8003
8005
|
r
|
|
@@ -8061,7 +8063,7 @@ G.prototype.tokenize = function(t) {
|
|
|
8061
8063
|
function Fe(t) {
|
|
8062
8064
|
return /[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(t);
|
|
8063
8065
|
}
|
|
8064
|
-
function
|
|
8066
|
+
function ma(t) {
|
|
8065
8067
|
return /[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(t);
|
|
8066
8068
|
}
|
|
8067
8069
|
function Te(t) {
|
|
@@ -8070,7 +8072,7 @@ function Te(t) {
|
|
|
8070
8072
|
function ht(t) {
|
|
8071
8073
|
return /[A-z]/.test(t);
|
|
8072
8074
|
}
|
|
8073
|
-
function
|
|
8075
|
+
function iu(t) {
|
|
8074
8076
|
return /\s/.test(t);
|
|
8075
8077
|
}
|
|
8076
8078
|
function ne(t) {
|
|
@@ -8099,11 +8101,11 @@ function et(t, e) {
|
|
|
8099
8101
|
}
|
|
8100
8102
|
return -1;
|
|
8101
8103
|
}
|
|
8102
|
-
function
|
|
8104
|
+
function ou(t, e) {
|
|
8103
8105
|
var r = et(t, e.coverage);
|
|
8104
8106
|
return r === -1 ? null : t + e.deltaGlyphId;
|
|
8105
8107
|
}
|
|
8106
|
-
function
|
|
8108
|
+
function uu(t, e) {
|
|
8107
8109
|
var r = et(t, e.coverage);
|
|
8108
8110
|
return r === -1 ? null : e.substitute[r];
|
|
8109
8111
|
}
|
|
@@ -8116,7 +8118,7 @@ function At(t, e) {
|
|
|
8116
8118
|
}
|
|
8117
8119
|
return r.length !== t.length ? -1 : r;
|
|
8118
8120
|
}
|
|
8119
|
-
function
|
|
8121
|
+
function lu(t, e) {
|
|
8120
8122
|
var r = e.inputCoverage.length + e.lookaheadCoverage.length + e.backtrackCoverage.length;
|
|
8121
8123
|
if (t.context.length < r)
|
|
8122
8124
|
return [];
|
|
@@ -8155,7 +8157,7 @@ function uu(t, e) {
|
|
|
8155
8157
|
}
|
|
8156
8158
|
return c;
|
|
8157
8159
|
}
|
|
8158
|
-
function
|
|
8160
|
+
function hu(t, e) {
|
|
8159
8161
|
var r = t.current, n = et(r, e.coverage);
|
|
8160
8162
|
if (n === -1)
|
|
8161
8163
|
return null;
|
|
@@ -8171,7 +8173,7 @@ function lu(t, e) {
|
|
|
8171
8173
|
}
|
|
8172
8174
|
return null;
|
|
8173
8175
|
}
|
|
8174
|
-
function
|
|
8176
|
+
function cu(t, e) {
|
|
8175
8177
|
var r = et(t, e.coverage);
|
|
8176
8178
|
return r === -1 ? null : e.sequences[r];
|
|
8177
8179
|
}
|
|
@@ -8233,35 +8235,35 @@ ne.prototype.getLookupMethod = function(t, e) {
|
|
|
8233
8235
|
switch (n) {
|
|
8234
8236
|
case "11":
|
|
8235
8237
|
return function(a) {
|
|
8236
|
-
return
|
|
8238
|
+
return ou.apply(
|
|
8237
8239
|
r,
|
|
8238
8240
|
[a, e]
|
|
8239
8241
|
);
|
|
8240
8242
|
};
|
|
8241
8243
|
case "12":
|
|
8242
8244
|
return function(a) {
|
|
8243
|
-
return
|
|
8245
|
+
return uu.apply(
|
|
8244
8246
|
r,
|
|
8245
8247
|
[a, e]
|
|
8246
8248
|
);
|
|
8247
8249
|
};
|
|
8248
8250
|
case "63":
|
|
8249
8251
|
return function(a) {
|
|
8250
|
-
return
|
|
8252
|
+
return lu.apply(
|
|
8251
8253
|
r,
|
|
8252
8254
|
[a, e]
|
|
8253
8255
|
);
|
|
8254
8256
|
};
|
|
8255
8257
|
case "41":
|
|
8256
8258
|
return function(a) {
|
|
8257
|
-
return
|
|
8259
|
+
return hu.apply(
|
|
8258
8260
|
r,
|
|
8259
8261
|
[a, e]
|
|
8260
8262
|
);
|
|
8261
8263
|
};
|
|
8262
8264
|
case "21":
|
|
8263
8265
|
return function(a) {
|
|
8264
|
-
return
|
|
8266
|
+
return cu.apply(
|
|
8265
8267
|
r,
|
|
8266
8268
|
[a, e]
|
|
8267
8269
|
);
|
|
@@ -8354,7 +8356,7 @@ ne.prototype.getFeature = function(e) {
|
|
|
8354
8356
|
var r = this.features[e.script];
|
|
8355
8357
|
return r ? r.tags[e.tag] ? this.features[e.script].tags[e.tag] : null : { FAIL: "No feature for script " + e.script };
|
|
8356
8358
|
};
|
|
8357
|
-
function
|
|
8359
|
+
function fu(t) {
|
|
8358
8360
|
var e = t.current, r = t.get(-1);
|
|
8359
8361
|
return (
|
|
8360
8362
|
// ? arabic first char
|
|
@@ -8362,7 +8364,7 @@ function cu(t) {
|
|
|
8362
8364
|
!Fe(r) && Fe(e)
|
|
8363
8365
|
);
|
|
8364
8366
|
}
|
|
8365
|
-
function
|
|
8367
|
+
function pu(t) {
|
|
8366
8368
|
var e = t.get(1);
|
|
8367
8369
|
return (
|
|
8368
8370
|
// ? last arabic char
|
|
@@ -8370,24 +8372,24 @@ function fu(t) {
|
|
|
8370
8372
|
!Fe(e)
|
|
8371
8373
|
);
|
|
8372
8374
|
}
|
|
8373
|
-
var
|
|
8374
|
-
startCheck:
|
|
8375
|
-
endCheck:
|
|
8375
|
+
var du = {
|
|
8376
|
+
startCheck: fu,
|
|
8377
|
+
endCheck: pu
|
|
8376
8378
|
};
|
|
8377
|
-
function
|
|
8379
|
+
function gu(t) {
|
|
8378
8380
|
var e = t.current, r = t.get(-1);
|
|
8379
8381
|
return (
|
|
8380
8382
|
// ? an arabic char preceded with a non arabic char
|
|
8381
8383
|
(Fe(e) || Te(e)) && !Fe(r)
|
|
8382
8384
|
);
|
|
8383
8385
|
}
|
|
8384
|
-
function
|
|
8386
|
+
function vu(t) {
|
|
8385
8387
|
var e = t.get(1);
|
|
8386
8388
|
switch (!0) {
|
|
8387
8389
|
case e === null:
|
|
8388
8390
|
return !0;
|
|
8389
8391
|
case (!Fe(e) && !Te(e)):
|
|
8390
|
-
var r =
|
|
8392
|
+
var r = iu(e);
|
|
8391
8393
|
if (!r)
|
|
8392
8394
|
return !0;
|
|
8393
8395
|
if (r) {
|
|
@@ -8404,40 +8406,40 @@ function gu(t) {
|
|
|
8404
8406
|
return !1;
|
|
8405
8407
|
}
|
|
8406
8408
|
}
|
|
8407
|
-
var
|
|
8408
|
-
startCheck:
|
|
8409
|
-
endCheck:
|
|
8409
|
+
var mu = {
|
|
8410
|
+
startCheck: gu,
|
|
8411
|
+
endCheck: vu
|
|
8410
8412
|
};
|
|
8411
|
-
function mu(t, e, r) {
|
|
8412
|
-
e[r].setState(t.tag, t.substitution);
|
|
8413
|
-
}
|
|
8414
8413
|
function yu(t, e, r) {
|
|
8415
8414
|
e[r].setState(t.tag, t.substitution);
|
|
8416
8415
|
}
|
|
8417
8416
|
function xu(t, e, r) {
|
|
8417
|
+
e[r].setState(t.tag, t.substitution);
|
|
8418
|
+
}
|
|
8419
|
+
function bu(t, e, r) {
|
|
8418
8420
|
t.substitution.forEach(function(n, a) {
|
|
8419
8421
|
var s = e[r + a];
|
|
8420
8422
|
s.setState(t.tag, n);
|
|
8421
8423
|
});
|
|
8422
8424
|
}
|
|
8423
|
-
function
|
|
8425
|
+
function Su(t, e, r) {
|
|
8424
8426
|
var n = e[r];
|
|
8425
8427
|
n.setState(t.tag, t.substitution.ligGlyph);
|
|
8426
8428
|
for (var a = t.substitution.components.length, s = 0; s < a; s++)
|
|
8427
8429
|
n = e[r + s + 1], n.setState("deleted", !0);
|
|
8428
8430
|
}
|
|
8429
|
-
var
|
|
8430
|
-
11:
|
|
8431
|
-
12:
|
|
8432
|
-
63:
|
|
8433
|
-
41:
|
|
8431
|
+
var un = {
|
|
8432
|
+
11: yu,
|
|
8433
|
+
12: xu,
|
|
8434
|
+
63: bu,
|
|
8435
|
+
41: Su
|
|
8434
8436
|
};
|
|
8435
8437
|
function cr(t, e, r) {
|
|
8436
|
-
t instanceof Le &&
|
|
8438
|
+
t instanceof Le && un[t.id] && un[t.id](t, e, r);
|
|
8437
8439
|
}
|
|
8438
|
-
function
|
|
8440
|
+
function ku(t) {
|
|
8439
8441
|
for (var e = [].concat(t.backtrack), r = e.length - 1; r >= 0; r--) {
|
|
8440
|
-
var n = e[r], a =
|
|
8442
|
+
var n = e[r], a = ma(n), s = Te(n);
|
|
8441
8443
|
if (!a && !s)
|
|
8442
8444
|
return !0;
|
|
8443
8445
|
if (a)
|
|
@@ -8445,8 +8447,8 @@ function Su(t) {
|
|
|
8445
8447
|
}
|
|
8446
8448
|
return !1;
|
|
8447
8449
|
}
|
|
8448
|
-
function
|
|
8449
|
-
if (
|
|
8450
|
+
function Fu(t) {
|
|
8451
|
+
if (ma(t.current))
|
|
8450
8452
|
return !1;
|
|
8451
8453
|
for (var e = 0; e < t.lookahead.length; e++) {
|
|
8452
8454
|
var r = t.lookahead[e], n = Te(r);
|
|
@@ -8455,7 +8457,7 @@ function ku(t) {
|
|
|
8455
8457
|
}
|
|
8456
8458
|
return !1;
|
|
8457
8459
|
}
|
|
8458
|
-
function
|
|
8460
|
+
function Tu(t) {
|
|
8459
8461
|
var e = this, r = "arab", n = this.featuresTags[r], a = this.tokenizer.getRangeTokens(t);
|
|
8460
8462
|
if (a.length !== 1) {
|
|
8461
8463
|
var s = new oe(
|
|
@@ -8477,7 +8479,7 @@ function Fu(t) {
|
|
|
8477
8479
|
if (!Te(o.char)) {
|
|
8478
8480
|
s.setCurrentIndex(u), i.setCurrentIndex(u);
|
|
8479
8481
|
var l = 0;
|
|
8480
|
-
|
|
8482
|
+
ku(i) && (l |= 1), Fu(i) && (l |= 2);
|
|
8481
8483
|
var h;
|
|
8482
8484
|
switch (l) {
|
|
8483
8485
|
case 1:
|
|
@@ -8506,14 +8508,14 @@ function Fu(t) {
|
|
|
8506
8508
|
});
|
|
8507
8509
|
}
|
|
8508
8510
|
}
|
|
8509
|
-
function
|
|
8511
|
+
function ln(t, e) {
|
|
8510
8512
|
var r = t.map(function(n) {
|
|
8511
8513
|
return n.activeState.value;
|
|
8512
8514
|
});
|
|
8513
8515
|
return new oe(r, 0);
|
|
8514
8516
|
}
|
|
8515
|
-
function
|
|
8516
|
-
var e = this, r = "arab", n = this.tokenizer.getRangeTokens(t), a =
|
|
8517
|
+
function wu(t) {
|
|
8518
|
+
var e = this, r = "arab", n = this.tokenizer.getRangeTokens(t), a = ln(n);
|
|
8517
8519
|
a.context.forEach(function(s, i) {
|
|
8518
8520
|
a.setCurrentIndex(i);
|
|
8519
8521
|
var o = e.query.lookupFeature({
|
|
@@ -8525,10 +8527,10 @@ function Tu(t) {
|
|
|
8525
8527
|
function(u) {
|
|
8526
8528
|
return cr(u, n, i);
|
|
8527
8529
|
}
|
|
8528
|
-
), a =
|
|
8530
|
+
), a = ln(n));
|
|
8529
8531
|
});
|
|
8530
8532
|
}
|
|
8531
|
-
function
|
|
8533
|
+
function Cu(t) {
|
|
8532
8534
|
var e = t.current, r = t.get(-1);
|
|
8533
8535
|
return (
|
|
8534
8536
|
// ? latin first char
|
|
@@ -8536,7 +8538,7 @@ function wu(t) {
|
|
|
8536
8538
|
!ht(r) && ht(e)
|
|
8537
8539
|
);
|
|
8538
8540
|
}
|
|
8539
|
-
function
|
|
8541
|
+
function Eu(t) {
|
|
8540
8542
|
var e = t.get(1);
|
|
8541
8543
|
return (
|
|
8542
8544
|
// ? last latin char
|
|
@@ -8544,18 +8546,18 @@ function Cu(t) {
|
|
|
8544
8546
|
!ht(e)
|
|
8545
8547
|
);
|
|
8546
8548
|
}
|
|
8547
|
-
var
|
|
8548
|
-
startCheck:
|
|
8549
|
-
endCheck:
|
|
8549
|
+
var Ou = {
|
|
8550
|
+
startCheck: Cu,
|
|
8551
|
+
endCheck: Eu
|
|
8550
8552
|
};
|
|
8551
|
-
function
|
|
8553
|
+
function hn(t, e) {
|
|
8552
8554
|
var r = t.map(function(n) {
|
|
8553
8555
|
return n.activeState.value;
|
|
8554
8556
|
});
|
|
8555
8557
|
return new oe(r, 0);
|
|
8556
8558
|
}
|
|
8557
|
-
function
|
|
8558
|
-
var e = this, r = "latn", n = this.tokenizer.getRangeTokens(t), a =
|
|
8559
|
+
function Uu(t) {
|
|
8560
|
+
var e = this, r = "latn", n = this.tokenizer.getRangeTokens(t), a = hn(n);
|
|
8559
8561
|
a.context.forEach(function(s, i) {
|
|
8560
8562
|
a.setCurrentIndex(i);
|
|
8561
8563
|
var o = e.query.lookupFeature({
|
|
@@ -8567,7 +8569,7 @@ function Ou(t) {
|
|
|
8567
8569
|
function(u) {
|
|
8568
8570
|
return cr(u, n, i);
|
|
8569
8571
|
}
|
|
8570
|
-
), a =
|
|
8572
|
+
), a = hn(n));
|
|
8571
8573
|
});
|
|
8572
8574
|
}
|
|
8573
8575
|
function he(t) {
|
|
@@ -8577,9 +8579,9 @@ he.prototype.setText = function(t) {
|
|
|
8577
8579
|
this.text = t;
|
|
8578
8580
|
};
|
|
8579
8581
|
he.prototype.contextChecks = {
|
|
8580
|
-
latinWordCheck:
|
|
8581
|
-
arabicWordCheck:
|
|
8582
|
-
arabicSentenceCheck:
|
|
8582
|
+
latinWordCheck: Ou,
|
|
8583
|
+
arabicWordCheck: du,
|
|
8584
|
+
arabicSentenceCheck: mu
|
|
8583
8585
|
};
|
|
8584
8586
|
function Mt(t) {
|
|
8585
8587
|
var e = this.contextChecks[t + "Check"];
|
|
@@ -8589,10 +8591,10 @@ function Mt(t) {
|
|
|
8589
8591
|
e.endCheck
|
|
8590
8592
|
);
|
|
8591
8593
|
}
|
|
8592
|
-
function
|
|
8594
|
+
function Lu() {
|
|
8593
8595
|
return Mt.call(this, "latinWord"), Mt.call(this, "arabicWord"), Mt.call(this, "arabicSentence"), this.tokenizer.tokenize(this.text);
|
|
8594
8596
|
}
|
|
8595
|
-
function
|
|
8597
|
+
function Ru() {
|
|
8596
8598
|
var t = this, e = this.tokenizer.getContextRanges("arabicSentence");
|
|
8597
8599
|
e.forEach(function(r) {
|
|
8598
8600
|
var n = t.tokenizer.getRangeTokens(r);
|
|
@@ -8631,17 +8633,17 @@ function fr() {
|
|
|
8631
8633
|
"glyphIndex modifier is required to apply arabic presentation features."
|
|
8632
8634
|
);
|
|
8633
8635
|
}
|
|
8634
|
-
function
|
|
8636
|
+
function Au() {
|
|
8635
8637
|
var t = this, e = "arab";
|
|
8636
8638
|
if (this.featuresTags.hasOwnProperty(e)) {
|
|
8637
8639
|
fr.call(this);
|
|
8638
8640
|
var r = this.tokenizer.getContextRanges("arabicWord");
|
|
8639
8641
|
r.forEach(function(n) {
|
|
8640
|
-
|
|
8642
|
+
Tu.call(t, n);
|
|
8641
8643
|
});
|
|
8642
8644
|
}
|
|
8643
8645
|
}
|
|
8644
|
-
function
|
|
8646
|
+
function Mu() {
|
|
8645
8647
|
var t = this, e = "arab";
|
|
8646
8648
|
if (this.featuresTags.hasOwnProperty(e)) {
|
|
8647
8649
|
var r = this.featuresTags[e];
|
|
@@ -8649,12 +8651,12 @@ function Au() {
|
|
|
8649
8651
|
fr.call(this);
|
|
8650
8652
|
var n = this.tokenizer.getContextRanges("arabicWord");
|
|
8651
8653
|
n.forEach(function(a) {
|
|
8652
|
-
|
|
8654
|
+
wu.call(t, a);
|
|
8653
8655
|
});
|
|
8654
8656
|
}
|
|
8655
8657
|
}
|
|
8656
8658
|
}
|
|
8657
|
-
function
|
|
8659
|
+
function Pu() {
|
|
8658
8660
|
var t = this, e = "latn";
|
|
8659
8661
|
if (this.featuresTags.hasOwnProperty(e)) {
|
|
8660
8662
|
var r = this.featuresTags[e];
|
|
@@ -8662,7 +8664,7 @@ function Mu() {
|
|
|
8662
8664
|
fr.call(this);
|
|
8663
8665
|
var n = this.tokenizer.getContextRanges("latinWord");
|
|
8664
8666
|
n.forEach(function(a) {
|
|
8665
|
-
|
|
8667
|
+
Uu.call(t, a);
|
|
8666
8668
|
});
|
|
8667
8669
|
}
|
|
8668
8670
|
}
|
|
@@ -8671,10 +8673,10 @@ he.prototype.checkContextReady = function(t) {
|
|
|
8671
8673
|
return !!this.tokenizer.getContext(t);
|
|
8672
8674
|
};
|
|
8673
8675
|
he.prototype.applyFeaturesToContexts = function() {
|
|
8674
|
-
this.checkContextReady("arabicWord") && (
|
|
8676
|
+
this.checkContextReady("arabicWord") && (Au.call(this), Mu.call(this)), this.checkContextReady("latinWord") && Pu.call(this), this.checkContextReady("arabicSentence") && Ru.call(this);
|
|
8675
8677
|
};
|
|
8676
8678
|
he.prototype.processText = function(t) {
|
|
8677
|
-
(!this.text || this.text !== t) && (this.setText(t),
|
|
8679
|
+
(!this.text || this.text !== t) && (this.setText(t), Lu.call(this), this.applyFeaturesToContexts());
|
|
8678
8680
|
};
|
|
8679
8681
|
he.prototype.getBidiText = function(t) {
|
|
8680
8682
|
return this.processText(t), this.tokenizer.getText();
|
|
@@ -8713,12 +8715,12 @@ function P(t) {
|
|
|
8713
8715
|
usWidthClass: t.widthClass || this.usWidthClasses.MEDIUM,
|
|
8714
8716
|
fsSelection: t.fsSelection || this.fsSelectionValues.REGULAR
|
|
8715
8717
|
}, t.tables.os2)
|
|
8716
|
-
})), this.supported = !0, this.glyphs = new de.GlyphSet(this, t.glyphs || []), this.encoding = new
|
|
8718
|
+
})), this.supported = !0, this.glyphs = new de.GlyphSet(this, t.glyphs || []), this.encoding = new Dn(this), this.position = new Qe(this), this.substitution = new re(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
|
|
8717
8719
|
get: function() {
|
|
8718
8720
|
if (this._hinting)
|
|
8719
8721
|
return this._hinting;
|
|
8720
8722
|
if (this.outlinesFormat === "truetype")
|
|
8721
|
-
return this._hinting = new
|
|
8723
|
+
return this._hinting = new pa(this);
|
|
8722
8724
|
}
|
|
8723
8725
|
});
|
|
8724
8726
|
}
|
|
@@ -8843,7 +8845,7 @@ P.prototype.validate = function() {
|
|
|
8843
8845
|
r("fontFamily"), r("weightName"), r("manufacturer"), r("copyright"), r("version"), this.unitsPerEm > 0;
|
|
8844
8846
|
};
|
|
8845
8847
|
P.prototype.toTables = function() {
|
|
8846
|
-
return
|
|
8848
|
+
return bi.fontToTable(this);
|
|
8847
8849
|
};
|
|
8848
8850
|
P.prototype.toBuffer = function() {
|
|
8849
8851
|
return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."), this.toArrayBuffer();
|
|
@@ -8857,7 +8859,7 @@ P.prototype.download = function(t) {
|
|
|
8857
8859
|
var e = this.getEnglishName("fontFamily"), r = this.getEnglishName("fontSubfamily");
|
|
8858
8860
|
t = t || e.replace(/\s/g, "") + "-" + r + ".otf";
|
|
8859
8861
|
var n = this.toArrayBuffer();
|
|
8860
|
-
if (
|
|
8862
|
+
if (ki())
|
|
8861
8863
|
if (window.URL = window.URL || window.webkitURL, window.URL) {
|
|
8862
8864
|
var a = new DataView(n), s = new Blob([a], { type: "font/opentype" }), i = document.createElement("a");
|
|
8863
8865
|
i.href = window.URL.createObjectURL(s), i.download = t;
|
|
@@ -8866,7 +8868,7 @@ P.prototype.download = function(t) {
|
|
|
8866
8868
|
} else
|
|
8867
8869
|
console.warn("Font file could not be downloaded. Try using a different browser.");
|
|
8868
8870
|
else {
|
|
8869
|
-
var u = require("fs"), l =
|
|
8871
|
+
var u = require("fs"), l = Fi(n);
|
|
8870
8872
|
u.writeFileSync(t, l);
|
|
8871
8873
|
}
|
|
8872
8874
|
};
|
|
@@ -8914,7 +8916,7 @@ P.prototype.usWeightClasses = {
|
|
|
8914
8916
|
EXTRA_BOLD: 800,
|
|
8915
8917
|
BLACK: 900
|
|
8916
8918
|
};
|
|
8917
|
-
function
|
|
8919
|
+
function ya(t, e) {
|
|
8918
8920
|
var r = JSON.stringify(t), n = 256;
|
|
8919
8921
|
for (var a in e) {
|
|
8920
8922
|
var s = parseInt(a);
|
|
@@ -8926,8 +8928,8 @@ function ma(t, e) {
|
|
|
8926
8928
|
}
|
|
8927
8929
|
return e[n] = t, n;
|
|
8928
8930
|
}
|
|
8929
|
-
function
|
|
8930
|
-
var n =
|
|
8931
|
+
function Bu(t, e, r) {
|
|
8932
|
+
var n = ya(e.name, r);
|
|
8931
8933
|
return [
|
|
8932
8934
|
{ name: "tag_" + t, type: "TAG", value: e.tag },
|
|
8933
8935
|
{ name: "minValue_" + t, type: "FIXED", value: e.minValue << 16 },
|
|
@@ -8937,12 +8939,12 @@ function Pu(t, e, r) {
|
|
|
8937
8939
|
{ name: "nameID_" + t, type: "USHORT", value: n }
|
|
8938
8940
|
];
|
|
8939
8941
|
}
|
|
8940
|
-
function
|
|
8942
|
+
function Du(t, e, r) {
|
|
8941
8943
|
var n = {}, a = new E.Parser(t, e);
|
|
8942
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;
|
|
8943
8945
|
}
|
|
8944
8946
|
function Iu(t, e, r, n) {
|
|
8945
|
-
for (var a =
|
|
8947
|
+
for (var a = ya(e.name, n), s = [
|
|
8946
8948
|
{ name: "nameID_" + t, type: "USHORT", value: a },
|
|
8947
8949
|
{ name: "flags_" + t, type: "USHORT", value: 0 }
|
|
8948
8950
|
], i = 0; i < r.length; ++i) {
|
|
@@ -8955,14 +8957,14 @@ function Iu(t, e, r, n) {
|
|
|
8955
8957
|
}
|
|
8956
8958
|
return s;
|
|
8957
8959
|
}
|
|
8958
|
-
function
|
|
8960
|
+
function Gu(t, e, r, n) {
|
|
8959
8961
|
var a = {}, s = new E.Parser(t, e);
|
|
8960
8962
|
a.name = n[s.parseUShort()] || {}, s.skip("uShort", 1), a.coordinates = {};
|
|
8961
8963
|
for (var i = 0; i < r.length; ++i)
|
|
8962
8964
|
a.coordinates[r[i].tag] = s.parseFixed();
|
|
8963
8965
|
return a;
|
|
8964
8966
|
}
|
|
8965
|
-
function
|
|
8967
|
+
function Nu(t, e) {
|
|
8966
8968
|
var r = new F.Table("fvar", [
|
|
8967
8969
|
{ name: "version", type: "ULONG", value: 65536 },
|
|
8968
8970
|
{ name: "offsetToData", type: "USHORT", value: 0 },
|
|
@@ -8974,28 +8976,28 @@ function Gu(t, e) {
|
|
|
8974
8976
|
]);
|
|
8975
8977
|
r.offsetToData = r.sizeOf();
|
|
8976
8978
|
for (var n = 0; n < t.axes.length; n++)
|
|
8977
|
-
r.fields = r.fields.concat(
|
|
8979
|
+
r.fields = r.fields.concat(Bu(n, t.axes[n], e));
|
|
8978
8980
|
for (var a = 0; a < t.instances.length; a++)
|
|
8979
8981
|
r.fields = r.fields.concat(Iu(a, t.instances[a], t.axes, e));
|
|
8980
8982
|
return r;
|
|
8981
8983
|
}
|
|
8982
|
-
function
|
|
8984
|
+
function _u(t, e, r) {
|
|
8983
8985
|
var n = new E.Parser(t, e), a = n.parseULong();
|
|
8984
8986
|
U.argument(a === 65536, "Unsupported fvar table version.");
|
|
8985
8987
|
var s = n.parseOffset16();
|
|
8986
8988
|
n.skip("uShort", 1);
|
|
8987
8989
|
for (var i = n.parseUShort(), o = n.parseUShort(), u = n.parseUShort(), l = n.parseUShort(), h = [], f = 0; f < i; f++)
|
|
8988
|
-
h.push(
|
|
8990
|
+
h.push(Du(t, e + s + f * o, r));
|
|
8989
8991
|
for (var c = [], p = e + s + i * o, d = 0; d < u; d++)
|
|
8990
|
-
c.push(
|
|
8992
|
+
c.push(Gu(t, p + d * l, h, r));
|
|
8991
8993
|
return { axes: h, instances: c };
|
|
8992
8994
|
}
|
|
8993
|
-
var
|
|
8995
|
+
var Hu = { make: Nu, parse: _u }, zu = function() {
|
|
8994
8996
|
return {
|
|
8995
8997
|
coverage: this.parsePointer(g.coverage),
|
|
8996
8998
|
attachPoints: this.parseList(g.pointer(g.uShortList))
|
|
8997
8999
|
};
|
|
8998
|
-
},
|
|
9000
|
+
}, Wu = function() {
|
|
8999
9001
|
var t = this.parseUShort();
|
|
9000
9002
|
if (U.argument(
|
|
9001
9003
|
t === 1 || t === 2 || t === 3,
|
|
@@ -9006,17 +9008,17 @@ var _u = { make: Gu, parse: Nu }, Hu = function() {
|
|
|
9006
9008
|
return { pointindex: this.parseShort() };
|
|
9007
9009
|
if (t === 3)
|
|
9008
9010
|
return { coordinate: this.parseShort() };
|
|
9009
|
-
}, Wu = function() {
|
|
9010
|
-
return this.parseList(g.pointer(zu));
|
|
9011
9011
|
}, Vu = function() {
|
|
9012
|
+
return this.parseList(g.pointer(Wu));
|
|
9013
|
+
}, qu = function() {
|
|
9012
9014
|
return {
|
|
9013
9015
|
coverage: this.parsePointer(g.coverage),
|
|
9014
|
-
ligGlyphs: this.parseList(g.pointer(
|
|
9016
|
+
ligGlyphs: this.parseList(g.pointer(Vu))
|
|
9015
9017
|
};
|
|
9016
|
-
},
|
|
9018
|
+
}, Xu = function() {
|
|
9017
9019
|
return this.parseUShort(), this.parseList(g.pointer(g.coverage));
|
|
9018
9020
|
};
|
|
9019
|
-
function
|
|
9021
|
+
function Yu(t, e) {
|
|
9020
9022
|
e = e || 0;
|
|
9021
9023
|
var r = new g(t, e), n = r.parseVersion(1);
|
|
9022
9024
|
U.argument(
|
|
@@ -9026,13 +9028,13 @@ function Xu(t, e) {
|
|
|
9026
9028
|
var a = {
|
|
9027
9029
|
version: n,
|
|
9028
9030
|
classDef: r.parsePointer(g.classDef),
|
|
9029
|
-
attachList: r.parsePointer(
|
|
9030
|
-
ligCaretList: r.parsePointer(
|
|
9031
|
+
attachList: r.parsePointer(zu),
|
|
9032
|
+
ligCaretList: r.parsePointer(qu),
|
|
9031
9033
|
markAttachClassDef: r.parsePointer(g.classDef)
|
|
9032
9034
|
};
|
|
9033
|
-
return n >= 1.2 && (a.markGlyphSets = r.parsePointer(
|
|
9035
|
+
return n >= 1.2 && (a.markGlyphSets = r.parsePointer(Xu)), a;
|
|
9034
9036
|
}
|
|
9035
|
-
var
|
|
9037
|
+
var Zu = { parse: Yu }, ue = new Array(10);
|
|
9036
9038
|
ue[1] = function() {
|
|
9037
9039
|
var e = this.offset + this.relativeOffset, r = this.parseUShort();
|
|
9038
9040
|
if (r === 1)
|
|
@@ -9110,7 +9112,7 @@ ue[8] = function() {
|
|
|
9110
9112
|
ue[9] = function() {
|
|
9111
9113
|
return { error: "GPOS Lookup 9 not supported" };
|
|
9112
9114
|
};
|
|
9113
|
-
function
|
|
9115
|
+
function ju(t, e) {
|
|
9114
9116
|
e = e || 0;
|
|
9115
9117
|
var r = new g(t, e), n = r.parseVersion(1);
|
|
9116
9118
|
return U.argument(n === 1 || n === 1.1, "Unsupported GPOS table version " + n), n === 1 ? {
|
|
@@ -9126,17 +9128,17 @@ function Zu(t, e) {
|
|
|
9126
9128
|
variations: r.parseFeatureVariationsList()
|
|
9127
9129
|
};
|
|
9128
9130
|
}
|
|
9129
|
-
var
|
|
9130
|
-
function
|
|
9131
|
+
var Ku = new Array(10);
|
|
9132
|
+
function Qu(t) {
|
|
9131
9133
|
return new F.Table("GPOS", [
|
|
9132
9134
|
{ name: "version", type: "ULONG", value: 65536 },
|
|
9133
9135
|
{ name: "scripts", type: "TABLE", value: new F.ScriptList(t.scripts) },
|
|
9134
9136
|
{ name: "features", type: "TABLE", value: new F.FeatureList(t.features) },
|
|
9135
|
-
{ name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups,
|
|
9137
|
+
{ name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups, Ku) }
|
|
9136
9138
|
]);
|
|
9137
9139
|
}
|
|
9138
|
-
var
|
|
9139
|
-
function
|
|
9140
|
+
var $u = { parse: ju, make: Qu };
|
|
9141
|
+
function Ju(t) {
|
|
9140
9142
|
var e = {};
|
|
9141
9143
|
t.skip("uShort");
|
|
9142
9144
|
var r = t.parseUShort();
|
|
@@ -9149,7 +9151,7 @@ function $u(t) {
|
|
|
9149
9151
|
}
|
|
9150
9152
|
return e;
|
|
9151
9153
|
}
|
|
9152
|
-
function
|
|
9154
|
+
function el(t) {
|
|
9153
9155
|
var e = {};
|
|
9154
9156
|
t.skip("uShort");
|
|
9155
9157
|
var r = t.parseULong();
|
|
@@ -9165,31 +9167,31 @@ function Ju(t) {
|
|
|
9165
9167
|
}
|
|
9166
9168
|
return e;
|
|
9167
9169
|
}
|
|
9168
|
-
function
|
|
9170
|
+
function tl(t, e) {
|
|
9169
9171
|
var r = new E.Parser(t, e), n = r.parseUShort();
|
|
9170
9172
|
if (n === 0)
|
|
9171
|
-
return $u(r);
|
|
9172
|
-
if (n === 1)
|
|
9173
9173
|
return Ju(r);
|
|
9174
|
+
if (n === 1)
|
|
9175
|
+
return el(r);
|
|
9174
9176
|
throw new Error("Unsupported kern table version (" + n + ").");
|
|
9175
9177
|
}
|
|
9176
|
-
var
|
|
9177
|
-
function
|
|
9178
|
+
var rl = { parse: tl };
|
|
9179
|
+
function nl(t, e, r, n) {
|
|
9178
9180
|
for (var a = new E.Parser(t, e), s = n ? a.parseUShort : a.parseULong, i = [], o = 0; o < r + 1; o += 1) {
|
|
9179
9181
|
var u = s.call(a);
|
|
9180
9182
|
n && (u *= 2), i.push(u);
|
|
9181
9183
|
}
|
|
9182
9184
|
return i;
|
|
9183
9185
|
}
|
|
9184
|
-
var
|
|
9185
|
-
function
|
|
9186
|
+
var al = { parse: nl };
|
|
9187
|
+
function cn(t, e) {
|
|
9186
9188
|
for (var r = [], n = 12, a = 0; a < e; a += 1) {
|
|
9187
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);
|
|
9188
9190
|
r.push({ tag: s, checksum: i, offset: o, length: u, compression: !1 }), n += 16;
|
|
9189
9191
|
}
|
|
9190
9192
|
return r;
|
|
9191
9193
|
}
|
|
9192
|
-
function
|
|
9194
|
+
function sl(t, e) {
|
|
9193
9195
|
for (var r = [], n = 44, a = 0; a < e; a += 1) {
|
|
9194
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;
|
|
9195
9197
|
o < u ? l = "WOFF" : l = !1, r.push({
|
|
@@ -9205,20 +9207,20 @@ function al(t, e) {
|
|
|
9205
9207
|
function H(t, e) {
|
|
9206
9208
|
if (e.compression === "WOFF") {
|
|
9207
9209
|
var r = new Uint8Array(t.buffer, e.offset + 2, e.compressedLength - 2), n = new Uint8Array(e.length);
|
|
9208
|
-
if (
|
|
9210
|
+
if (Qa(r, n), n.byteLength !== e.length)
|
|
9209
9211
|
throw new Error("Decompression error: " + e.tag + " decompressed length doesn't match recorded length");
|
|
9210
9212
|
var a = new DataView(n.buffer, 0);
|
|
9211
9213
|
return { data: a, offset: 0 };
|
|
9212
9214
|
} else
|
|
9213
9215
|
return { data: t, offset: e.offset };
|
|
9214
9216
|
}
|
|
9215
|
-
function
|
|
9217
|
+
function il(t, e) {
|
|
9216
9218
|
e = e ?? {};
|
|
9217
9219
|
var r, n, a = new P({ empty: !0 }), s = new DataView(t, 0), i, o = [], u = E.getTag(s, 0);
|
|
9218
9220
|
if (u === "\0\0\0" || u === "true" || u === "typ1")
|
|
9219
|
-
a.outlinesFormat = "truetype", i = E.getUShort(s, 4), o =
|
|
9221
|
+
a.outlinesFormat = "truetype", i = E.getUShort(s, 4), o = cn(s, i);
|
|
9220
9222
|
else if (u === "OTTO")
|
|
9221
|
-
a.outlinesFormat = "cff", i = E.getUShort(s, 4), o =
|
|
9223
|
+
a.outlinesFormat = "cff", i = E.getUShort(s, 4), o = cn(s, i);
|
|
9222
9224
|
else if (u === "wOFF") {
|
|
9223
9225
|
var l = E.getTag(s, 4);
|
|
9224
9226
|
if (l === "\0\0\0")
|
|
@@ -9227,14 +9229,14 @@ function sl(t, e) {
|
|
|
9227
9229
|
a.outlinesFormat = "cff";
|
|
9228
9230
|
else
|
|
9229
9231
|
throw new Error("Unsupported OpenType flavor " + u);
|
|
9230
|
-
i = E.getUShort(s, 12), o =
|
|
9232
|
+
i = E.getUShort(s, 12), o = sl(s, i);
|
|
9231
9233
|
} else
|
|
9232
9234
|
throw new Error("Unsupported OpenType signature " + u);
|
|
9233
9235
|
for (var h, f, c, p, d, v, y, m, b, x, T, S, A = 0; A < i; A += 1) {
|
|
9234
9236
|
var O = o[A], w = void 0;
|
|
9235
9237
|
switch (O.tag) {
|
|
9236
9238
|
case "cmap":
|
|
9237
|
-
w = H(s, O), a.tables.cmap =
|
|
9239
|
+
w = H(s, O), a.tables.cmap = Bn.parse(w.data, w.offset), a.encoding = new In(a.tables.cmap);
|
|
9238
9240
|
break;
|
|
9239
9241
|
case "cvt ":
|
|
9240
9242
|
w = H(s, O), S = new E.Parser(w.data, w.offset), a.tables.cvt = S.parseShortList(O.length / 2);
|
|
@@ -9246,19 +9248,19 @@ function sl(t, e) {
|
|
|
9246
9248
|
w = H(s, O), S = new E.Parser(w.data, w.offset), a.tables.fpgm = S.parseByteList(O.length);
|
|
9247
9249
|
break;
|
|
9248
9250
|
case "head":
|
|
9249
|
-
w = H(s, O), a.tables.head =
|
|
9251
|
+
w = H(s, O), a.tables.head = Yn.parse(w.data, w.offset), a.unitsPerEm = a.tables.head.unitsPerEm, r = a.tables.head.indexToLocFormat;
|
|
9250
9252
|
break;
|
|
9251
9253
|
case "hhea":
|
|
9252
|
-
w = H(s, O), a.tables.hhea =
|
|
9254
|
+
w = H(s, O), a.tables.hhea = Zn.parse(w.data, w.offset), a.ascender = a.tables.hhea.ascender, a.descender = a.tables.hhea.descender, a.numberOfHMetrics = a.tables.hhea.numberOfHMetrics;
|
|
9253
9255
|
break;
|
|
9254
9256
|
case "hmtx":
|
|
9255
9257
|
y = O;
|
|
9256
9258
|
break;
|
|
9257
9259
|
case "ltag":
|
|
9258
|
-
w = H(s, O), n =
|
|
9260
|
+
w = H(s, O), n = Kn.parse(w.data, w.offset);
|
|
9259
9261
|
break;
|
|
9260
9262
|
case "maxp":
|
|
9261
|
-
w = H(s, O), a.tables.maxp =
|
|
9263
|
+
w = H(s, O), a.tables.maxp = Qn.parse(w.data, w.offset), a.numGlyphs = a.tables.maxp.numGlyphs;
|
|
9262
9264
|
break;
|
|
9263
9265
|
case "name":
|
|
9264
9266
|
x = O;
|
|
@@ -9267,7 +9269,7 @@ function sl(t, e) {
|
|
|
9267
9269
|
w = H(s, O), a.tables.os2 = Jt.parse(w.data, w.offset);
|
|
9268
9270
|
break;
|
|
9269
9271
|
case "post":
|
|
9270
|
-
w = H(s, O), a.tables.post =
|
|
9272
|
+
w = H(s, O), a.tables.post = na.parse(w.data, w.offset), a.glyphNames = new ir(a.tables.post);
|
|
9271
9273
|
break;
|
|
9272
9274
|
case "prep":
|
|
9273
9275
|
w = H(s, O), S = new E.Parser(w.data, w.offset), a.tables.prep = S.parseByteList(O.length);
|
|
@@ -9299,43 +9301,43 @@ function sl(t, e) {
|
|
|
9299
9301
|
}
|
|
9300
9302
|
}
|
|
9301
9303
|
var M = H(s, x);
|
|
9302
|
-
if (a.tables.name =
|
|
9303
|
-
var N = r === 0, K = H(s, b), $ =
|
|
9304
|
-
a.glyphs =
|
|
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), $ = al.parse(K.data, K.offset, a.numGlyphs, N), Y = H(s, c);
|
|
9306
|
+
a.glyphs = ha.parse(Y.data, Y.offset, $, a, e);
|
|
9305
9307
|
} else if (h) {
|
|
9306
|
-
var
|
|
9307
|
-
|
|
9308
|
+
var D = H(s, h);
|
|
9309
|
+
Xn.parse(D.data, D.offset, a, e);
|
|
9308
9310
|
} else
|
|
9309
9311
|
throw new Error("Font doesn't contain TrueType or CFF outlines.");
|
|
9310
9312
|
var _ = H(s, y);
|
|
9311
|
-
if (
|
|
9312
|
-
var
|
|
9313
|
-
a.kerningPairs =
|
|
9313
|
+
if (jn.parse(a, _.data, _.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, e), ys(a, e), m) {
|
|
9314
|
+
var I = H(s, m);
|
|
9315
|
+
a.kerningPairs = rl.parse(I.data, I.offset);
|
|
9314
9316
|
} else
|
|
9315
9317
|
a.kerningPairs = {};
|
|
9316
9318
|
if (p) {
|
|
9317
9319
|
var W = H(s, p);
|
|
9318
|
-
a.tables.gdef =
|
|
9320
|
+
a.tables.gdef = Zu.parse(W.data, W.offset);
|
|
9319
9321
|
}
|
|
9320
9322
|
if (d) {
|
|
9321
9323
|
var Z = H(s, d);
|
|
9322
|
-
a.tables.gpos =
|
|
9324
|
+
a.tables.gpos = $u.parse(Z.data, Z.offset), a.position.init();
|
|
9323
9325
|
}
|
|
9324
9326
|
if (v) {
|
|
9325
9327
|
var q = H(s, v);
|
|
9326
|
-
a.tables.gsub =
|
|
9328
|
+
a.tables.gsub = aa.parse(q.data, q.offset);
|
|
9327
9329
|
}
|
|
9328
9330
|
if (f) {
|
|
9329
9331
|
var Q = H(s, f);
|
|
9330
|
-
a.tables.fvar =
|
|
9332
|
+
a.tables.fvar = Hu.parse(Q.data, Q.offset, a.names);
|
|
9331
9333
|
}
|
|
9332
9334
|
if (T) {
|
|
9333
9335
|
var B = H(s, T);
|
|
9334
|
-
a.tables.meta =
|
|
9336
|
+
a.tables.meta = sa.parse(B.data, B.offset), a.metas = a.tables.meta;
|
|
9335
9337
|
}
|
|
9336
9338
|
return a;
|
|
9337
9339
|
}
|
|
9338
|
-
function
|
|
9340
|
+
function ol(t) {
|
|
9339
9341
|
return ((r, n) => {
|
|
9340
9342
|
const a = Math.round, s = {}, i = r.encoding.cmap.glyphIndexMap, o = Object.keys(i), u = r.glyphs.glyphs[i[65]];
|
|
9341
9343
|
let l = 1;
|
|
@@ -9371,9 +9373,9 @@ function il(t) {
|
|
|
9371
9373
|
scaleFactor: l,
|
|
9372
9374
|
original_font_information: r.tables.name
|
|
9373
9375
|
};
|
|
9374
|
-
})(
|
|
9376
|
+
})(il(t));
|
|
9375
9377
|
}
|
|
9376
|
-
class
|
|
9378
|
+
class ul extends Fa {
|
|
9377
9379
|
constructor(e, r = {}) {
|
|
9378
9380
|
const n = r.font;
|
|
9379
9381
|
if (n === void 0)
|
|
@@ -9385,7 +9387,7 @@ class ol extends ka {
|
|
|
9385
9387
|
this.type = "TextGeometry";
|
|
9386
9388
|
}
|
|
9387
9389
|
}
|
|
9388
|
-
function
|
|
9390
|
+
function fn(t, e = !1) {
|
|
9389
9391
|
const r = t[0].index !== null, n = new Set(Object.keys(t[0].attributes)), a = new Set(Object.keys(t[0].morphAttributes)), s = {}, i = {}, o = t[0].morphTargetsRelative, u = new ut();
|
|
9390
9392
|
let l = 0;
|
|
9391
9393
|
for (let h = 0; h < t.length; ++h) {
|
|
@@ -9430,7 +9432,7 @@ function cn(t, e = !1) {
|
|
|
9430
9432
|
u.setIndex(f);
|
|
9431
9433
|
}
|
|
9432
9434
|
for (const h in s) {
|
|
9433
|
-
const f =
|
|
9435
|
+
const f = pn(s[h]);
|
|
9434
9436
|
if (!f)
|
|
9435
9437
|
return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + h + " attribute."), null;
|
|
9436
9438
|
u.setAttribute(h, f);
|
|
@@ -9443,7 +9445,7 @@ function cn(t, e = !1) {
|
|
|
9443
9445
|
const p = [];
|
|
9444
9446
|
for (let v = 0; v < i[h].length; ++v)
|
|
9445
9447
|
p.push(i[h][v][c]);
|
|
9446
|
-
const d =
|
|
9448
|
+
const d = pn(p);
|
|
9447
9449
|
if (!d)
|
|
9448
9450
|
return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + h + " morphAttribute."), null;
|
|
9449
9451
|
u.morphAttributes[h].push(d);
|
|
@@ -9451,7 +9453,7 @@ function cn(t, e = !1) {
|
|
|
9451
9453
|
}
|
|
9452
9454
|
return u;
|
|
9453
9455
|
}
|
|
9454
|
-
function
|
|
9456
|
+
function pn(t) {
|
|
9455
9457
|
let e, r, n, a = -1, s = 0;
|
|
9456
9458
|
for (let l = 0; l < t.length; ++l) {
|
|
9457
9459
|
const h = t[l];
|
|
@@ -9465,7 +9467,7 @@ function fn(t) {
|
|
|
9465
9467
|
return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."), null;
|
|
9466
9468
|
s += h.count * r;
|
|
9467
9469
|
}
|
|
9468
|
-
const i = new e(s), o = new
|
|
9470
|
+
const i = new e(s), o = new Ta(i, r, n);
|
|
9469
9471
|
let u = 0;
|
|
9470
9472
|
for (let l = 0; l < t.length; ++l) {
|
|
9471
9473
|
const h = t[l];
|
|
@@ -9482,7 +9484,7 @@ function fn(t) {
|
|
|
9482
9484
|
}
|
|
9483
9485
|
return a !== void 0 && (o.gpuType = a), o;
|
|
9484
9486
|
}
|
|
9485
|
-
function
|
|
9487
|
+
function ll(t, e = 1e-4) {
|
|
9486
9488
|
e = Math.max(e, Number.EPSILON);
|
|
9487
9489
|
const r = {}, n = t.getIndex(), a = t.getAttribute("position"), s = n ? n.count : a.count;
|
|
9488
9490
|
let i = 0;
|
|
@@ -9515,10 +9517,10 @@ function ul(t, e = 1e-4) {
|
|
|
9515
9517
|
for (let S = 0, A = o.length; S < A; S++) {
|
|
9516
9518
|
const O = o[S], w = t.getAttribute(O), M = t.morphAttributes[O], N = w.itemSize, K = u[O], $ = l[O];
|
|
9517
9519
|
for (let Y = 0; Y < N; Y++) {
|
|
9518
|
-
const
|
|
9519
|
-
if (K[_](i, w[
|
|
9520
|
-
for (let
|
|
9521
|
-
$[
|
|
9520
|
+
const D = f[Y], _ = c[Y];
|
|
9521
|
+
if (K[_](i, w[D](x)), M)
|
|
9522
|
+
for (let I = 0, W = M.length; I < W; I++)
|
|
9523
|
+
$[I][_](i, M[I][D](x));
|
|
9522
9524
|
}
|
|
9523
9525
|
}
|
|
9524
9526
|
r[T] = i, h.push(i), i++;
|
|
@@ -9543,7 +9545,7 @@ function ul(t, e = 1e-4) {
|
|
|
9543
9545
|
}
|
|
9544
9546
|
return m.setIndex(h), m;
|
|
9545
9547
|
}
|
|
9546
|
-
const
|
|
9548
|
+
const mr = class mr {
|
|
9547
9549
|
/**
|
|
9548
9550
|
* Dummy replacement for `computeVertexNormals` that does nothing.
|
|
9549
9551
|
*/
|
|
@@ -9589,10 +9591,10 @@ const vr = class vr {
|
|
|
9589
9591
|
}
|
|
9590
9592
|
}
|
|
9591
9593
|
};
|
|
9592
|
-
|
|
9593
|
-
let tr =
|
|
9594
|
+
mr.originalComputeVertexNormals = ut.prototype.computeVertexNormals;
|
|
9595
|
+
let tr = mr;
|
|
9594
9596
|
const Ee = new L.Vector2();
|
|
9595
|
-
class
|
|
9597
|
+
class dn extends Fn {
|
|
9596
9598
|
constructor(e, r, n) {
|
|
9597
9599
|
super(e), this.isFound = !1, this.fontSize = r, this.font = n, this.width = this.getCharWidth(e, r, n);
|
|
9598
9600
|
}
|
|
@@ -9604,7 +9606,7 @@ class pn extends kn {
|
|
|
9604
9606
|
toGeometry() {
|
|
9605
9607
|
let e = this.font.cache.getGeometry(this.char, this.fontSize);
|
|
9606
9608
|
return e == null && (e = tr.runWithoutNormals(() => {
|
|
9607
|
-
const r = new
|
|
9609
|
+
const r = new ul(this.char, {
|
|
9608
9610
|
font: this.font.font,
|
|
9609
9611
|
depth: 0,
|
|
9610
9612
|
size: this.fontSize,
|
|
@@ -9618,7 +9620,7 @@ class pn extends kn {
|
|
|
9618
9620
|
generateSideWallUV: () => [Ee, Ee, Ee, Ee]
|
|
9619
9621
|
}
|
|
9620
9622
|
});
|
|
9621
|
-
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"), ll(r, 1e-6);
|
|
9622
9624
|
})), e;
|
|
9623
9625
|
}
|
|
9624
9626
|
/**
|
|
@@ -9633,13 +9635,13 @@ class pn extends kn {
|
|
|
9633
9635
|
return a ? (this.isFound = !0, a.ha * r / n.data.resolution) : (this.isFound = !1, 0);
|
|
9634
9636
|
}
|
|
9635
9637
|
}
|
|
9636
|
-
class
|
|
9638
|
+
class gn extends kn {
|
|
9637
9639
|
/**
|
|
9638
9640
|
* Creates a new instance of MeshFont.
|
|
9639
9641
|
* @param data - Either a MeshFontData object containing font information or an ArrayBuffer containing raw font data
|
|
9640
9642
|
*/
|
|
9641
9643
|
constructor(e) {
|
|
9642
|
-
super(), this.type = "mesh", e instanceof ArrayBuffer ? this.data =
|
|
9644
|
+
super(), this.type = "mesh", e instanceof ArrayBuffer ? this.data = ol(e) : this.data = e, this.font = new Ha(this.data);
|
|
9643
9645
|
}
|
|
9644
9646
|
/**
|
|
9645
9647
|
* Return true if this font contains glyph of the specified character. Otherwise, return false.
|
|
@@ -9669,7 +9671,7 @@ class dn extends Sn {
|
|
|
9669
9671
|
this.addUnsupportedChar(e);
|
|
9670
9672
|
return;
|
|
9671
9673
|
}
|
|
9672
|
-
return new
|
|
9674
|
+
return new dn(e, r, this);
|
|
9673
9675
|
}
|
|
9674
9676
|
/**
|
|
9675
9677
|
* Gets the scale factor for this font.
|
|
@@ -9686,7 +9688,7 @@ class dn extends Sn {
|
|
|
9686
9688
|
* @returns The shape data for the not found indicator
|
|
9687
9689
|
*/
|
|
9688
9690
|
getNotFoundTextShape(e) {
|
|
9689
|
-
return new
|
|
9691
|
+
return new dn("?", e, this);
|
|
9690
9692
|
}
|
|
9691
9693
|
}
|
|
9692
9694
|
class J {
|
|
@@ -9846,7 +9848,7 @@ class J {
|
|
|
9846
9848
|
}
|
|
9847
9849
|
}
|
|
9848
9850
|
var te = /* @__PURE__ */ ((t) => (t.SHAPES = "shapes", t.BIGFONT = "bigfont", t.UNIFONT = "unifont", t))(te || {});
|
|
9849
|
-
let
|
|
9851
|
+
let hl = class {
|
|
9850
9852
|
parse(e) {
|
|
9851
9853
|
const r = this.parseHeader(e).split(" "), n = r[1].toLocaleLowerCase();
|
|
9852
9854
|
if (!Object.values(te).includes(n))
|
|
@@ -9873,7 +9875,7 @@ let ll = class {
|
|
|
9873
9875
|
return r.trim();
|
|
9874
9876
|
}
|
|
9875
9877
|
};
|
|
9876
|
-
class
|
|
9878
|
+
class cl {
|
|
9877
9879
|
parse(e) {
|
|
9878
9880
|
try {
|
|
9879
9881
|
e.readBytes(4);
|
|
@@ -9925,7 +9927,7 @@ class hl {
|
|
|
9925
9927
|
}
|
|
9926
9928
|
}
|
|
9927
9929
|
}
|
|
9928
|
-
class
|
|
9930
|
+
class fl {
|
|
9929
9931
|
parse(e) {
|
|
9930
9932
|
try {
|
|
9931
9933
|
e.readInt16();
|
|
@@ -10010,7 +10012,7 @@ class cl {
|
|
|
10010
10012
|
return r;
|
|
10011
10013
|
}
|
|
10012
10014
|
}
|
|
10013
|
-
class
|
|
10015
|
+
class pl {
|
|
10014
10016
|
parse(e) {
|
|
10015
10017
|
try {
|
|
10016
10018
|
const r = e.readInt32();
|
|
@@ -10056,15 +10058,15 @@ class fl {
|
|
|
10056
10058
|
}
|
|
10057
10059
|
}
|
|
10058
10060
|
}
|
|
10059
|
-
class
|
|
10061
|
+
class dl {
|
|
10060
10062
|
static createParser(e) {
|
|
10061
10063
|
switch (e) {
|
|
10062
10064
|
case te.SHAPES:
|
|
10063
|
-
return new hl();
|
|
10064
|
-
case te.BIGFONT:
|
|
10065
10065
|
return new cl();
|
|
10066
|
-
case te.
|
|
10066
|
+
case te.BIGFONT:
|
|
10067
10067
|
return new fl();
|
|
10068
|
+
case te.UNIFONT:
|
|
10069
|
+
return new pl();
|
|
10068
10070
|
default:
|
|
10069
10071
|
throw new Error(`Unsupported font type: ${e}`);
|
|
10070
10072
|
}
|
|
@@ -10170,7 +10172,7 @@ class z {
|
|
|
10170
10172
|
return Math.sqrt(r * r + n * n);
|
|
10171
10173
|
}
|
|
10172
10174
|
}
|
|
10173
|
-
const
|
|
10175
|
+
const vn = Math.PI / 4;
|
|
10174
10176
|
class Ze {
|
|
10175
10177
|
/**
|
|
10176
10178
|
* Creates a bulge-defined arc
|
|
@@ -10216,8 +10218,8 @@ class Ze {
|
|
|
10216
10218
|
const s = this.start.clone().add(r.clone().divide(2)), i = new z(-r.y, r.x);
|
|
10217
10219
|
i.normalize(), i.multiply(Math.abs(this.radius * Math.cos(a / 2))), this.center = s.clone(), this.isClockwise ? this.center.subtract(i) : this.center.add(i), this.startAngle = Math.atan2(this.start.y - this.center.y, this.start.x - this.center.x), this.endAngle = Math.atan2(this.end.y - this.center.y, this.end.x - this.center.x), this.isClockwise ? this.endAngle >= this.startAngle && (this.endAngle -= 2 * Math.PI) : this.endAngle <= this.startAngle && (this.endAngle += 2 * Math.PI);
|
|
10218
10220
|
} else if (e.center && e.radius !== void 0 && e.startOctant !== void 0 && e.octantCount !== void 0 && e.isClockwise !== void 0) {
|
|
10219
|
-
this.center = e.center.clone(), this.radius = e.radius, this.isClockwise = e.isClockwise, this.startAngle = e.startOctant *
|
|
10220
|
-
const r = (e.octantCount === 0 ? 8 : e.octantCount) *
|
|
10221
|
+
this.center = e.center.clone(), this.radius = e.radius, this.isClockwise = e.isClockwise, this.startAngle = e.startOctant * vn;
|
|
10222
|
+
const r = (e.octantCount === 0 ? 8 : e.octantCount) * vn;
|
|
10221
10223
|
this.endAngle = this.startAngle + (this.isClockwise ? -r : r), this.start = this.center.clone().add(
|
|
10222
10224
|
new z(
|
|
10223
10225
|
this.radius * Math.cos(this.startAngle),
|
|
@@ -10254,7 +10256,7 @@ class Ze {
|
|
|
10254
10256
|
), r;
|
|
10255
10257
|
}
|
|
10256
10258
|
}
|
|
10257
|
-
let Pt = class
|
|
10259
|
+
let Pt = class xa {
|
|
10258
10260
|
constructor(e, r = []) {
|
|
10259
10261
|
this.lastPoint = e, this.polylines = r;
|
|
10260
10262
|
}
|
|
@@ -10278,7 +10280,7 @@ let Pt = class ya {
|
|
|
10278
10280
|
*/
|
|
10279
10281
|
offset(e, r = !0) {
|
|
10280
10282
|
var n, a;
|
|
10281
|
-
return r ? new
|
|
10283
|
+
return r ? new xa(
|
|
10282
10284
|
(n = this.lastPoint) == null ? void 0 : n.clone().add(e),
|
|
10283
10285
|
this.polylines.map((s) => s.map((i) => i.clone().add(e)))
|
|
10284
10286
|
) : ((a = this.lastPoint) == null || a.add(e), this.polylines.forEach((s) => s.forEach((i) => i.add(e))), this);
|
|
@@ -10311,8 +10313,8 @@ let Pt = class ya {
|
|
|
10311
10313
|
return `<svg width="100%" height="100%" viewBox="${s}" preserveAspectRatio="xMidYMid meet">${i}</svg>`;
|
|
10312
10314
|
}
|
|
10313
10315
|
};
|
|
10314
|
-
const
|
|
10315
|
-
let
|
|
10316
|
+
const gl = Math.PI / 18, mn = 12;
|
|
10317
|
+
let vl = class {
|
|
10316
10318
|
constructor(e) {
|
|
10317
10319
|
this.shapeCache = /* @__PURE__ */ new Map(), this.shapeData = /* @__PURE__ */ new Map(), this.fontData = e;
|
|
10318
10320
|
}
|
|
@@ -10338,11 +10340,11 @@ let gl = class {
|
|
|
10338
10340
|
const s = this.fontData.content.data;
|
|
10339
10341
|
let i;
|
|
10340
10342
|
if (!this.shapeData.has(e) && s[e]) {
|
|
10341
|
-
const o = s[e], u =
|
|
10343
|
+
const o = s[e], u = mn / this.fontData.content.baseUp;
|
|
10342
10344
|
i = this.parseShape(o, u), this.shapeData.set(e, i);
|
|
10343
10345
|
}
|
|
10344
10346
|
if (this.shapeData.has(e)) {
|
|
10345
|
-
const o = r /
|
|
10347
|
+
const o = r / mn, u = this.shapeData.get(e);
|
|
10346
10348
|
i = new Pt(
|
|
10347
10349
|
(n = u.lastPoint) == null ? void 0 : n.clone().multiply(o),
|
|
10348
10350
|
u.polylines.map((l) => l.map((h) => h.clone().multiply(o)))
|
|
@@ -10546,7 +10548,7 @@ let gl = class {
|
|
|
10546
10548
|
let c = h & 7;
|
|
10547
10549
|
c === 0 && (c = 8), i !== 0 && c--;
|
|
10548
10550
|
const p = Math.PI / 4;
|
|
10549
|
-
let d = p * c, v =
|
|
10551
|
+
let d = p * c, v = gl, y = 1;
|
|
10550
10552
|
h < 0 && (v = -v, d = -d, y = -1);
|
|
10551
10553
|
let m = p * f, b = m + d;
|
|
10552
10554
|
m += p * s / 256 * y, b += p * i / 256 * y;
|
|
@@ -10701,7 +10703,7 @@ let gl = class {
|
|
|
10701
10703
|
return o.add(r), o;
|
|
10702
10704
|
}
|
|
10703
10705
|
};
|
|
10704
|
-
class
|
|
10706
|
+
class ml {
|
|
10705
10707
|
/**
|
|
10706
10708
|
* Creates a new ShxFont instance.
|
|
10707
10709
|
* @param data - Either raw binary data of the SHX font file (ArrayBuffer) or pre-parsed font data (ShxFontData)
|
|
@@ -10709,14 +10711,14 @@ class vl {
|
|
|
10709
10711
|
*/
|
|
10710
10712
|
constructor(e) {
|
|
10711
10713
|
if (e instanceof ArrayBuffer) {
|
|
10712
|
-
const r = new J(e), n = new
|
|
10714
|
+
const r = new J(e), n = new hl().parse(r), a = dl.createParser(n.fontType).parse(r);
|
|
10713
10715
|
this.fontData = {
|
|
10714
10716
|
header: n,
|
|
10715
10717
|
content: a
|
|
10716
10718
|
};
|
|
10717
10719
|
} else
|
|
10718
10720
|
this.fontData = e;
|
|
10719
|
-
this.shapeParser = new
|
|
10721
|
+
this.shapeParser = new vl(this.fontData);
|
|
10720
10722
|
}
|
|
10721
10723
|
/**
|
|
10722
10724
|
* Return true if this font contains glyph of the specified character. Otherwise, return false.
|
|
@@ -10743,7 +10745,7 @@ class vl {
|
|
|
10743
10745
|
this.shapeParser.release();
|
|
10744
10746
|
}
|
|
10745
10747
|
}
|
|
10746
|
-
class pr extends
|
|
10748
|
+
class pr extends Fn {
|
|
10747
10749
|
/**
|
|
10748
10750
|
* Creates a new instance of ShxTextShape
|
|
10749
10751
|
* @param char - The character this shape represents
|
|
@@ -10757,7 +10759,12 @@ class pr extends kn {
|
|
|
10757
10759
|
return e.maxX - e.minX;
|
|
10758
10760
|
}
|
|
10759
10761
|
offset(e) {
|
|
10760
|
-
return new pr(
|
|
10762
|
+
return new pr(
|
|
10763
|
+
this.char,
|
|
10764
|
+
this.fontSize,
|
|
10765
|
+
this.shape.offset(e),
|
|
10766
|
+
this.font
|
|
10767
|
+
);
|
|
10761
10768
|
}
|
|
10762
10769
|
/**
|
|
10763
10770
|
* Converts the text shape to a THREE.js geometry
|
|
@@ -10776,14 +10783,17 @@ class pr extends kn {
|
|
|
10776
10783
|
n.push(l.x, l.y, 0), u === o.length - 1 || a.push(s, s + 1), s++;
|
|
10777
10784
|
}
|
|
10778
10785
|
}
|
|
10779
|
-
e.setAttribute(
|
|
10786
|
+
e.setAttribute(
|
|
10787
|
+
"position",
|
|
10788
|
+
new L.Float32BufferAttribute(n, 3)
|
|
10789
|
+
), e.setIndex(a);
|
|
10780
10790
|
}
|
|
10781
10791
|
return e;
|
|
10782
10792
|
}
|
|
10783
10793
|
}
|
|
10784
|
-
class
|
|
10794
|
+
class yn extends kn {
|
|
10785
10795
|
constructor(e) {
|
|
10786
|
-
super(), this.type = "shx", this.font = new
|
|
10796
|
+
super(), this.type = "shx", this.font = new ml(e), this.data = this.font.fontData;
|
|
10787
10797
|
}
|
|
10788
10798
|
/**
|
|
10789
10799
|
* Return true if this font contains glyph of the specified character. Otherwise, return false.
|
|
@@ -10838,7 +10848,9 @@ class mn extends Sn {
|
|
|
10838
10848
|
}
|
|
10839
10849
|
getCode(e) {
|
|
10840
10850
|
if (this.font.fontData.header.fontType === te.BIGFONT)
|
|
10841
|
-
throw new Error(
|
|
10851
|
+
throw new Error(
|
|
10852
|
+
`Can't get font glyph for '${e}' because big font is not supported yet!`
|
|
10853
|
+
);
|
|
10842
10854
|
return e.charCodeAt(0);
|
|
10843
10855
|
}
|
|
10844
10856
|
}
|
|
@@ -10862,9 +10874,9 @@ class Se {
|
|
|
10862
10874
|
*/
|
|
10863
10875
|
createFont(e) {
|
|
10864
10876
|
if (e.type === "shx")
|
|
10865
|
-
return new
|
|
10877
|
+
return new yn(e.data);
|
|
10866
10878
|
if (e.type === "mesh")
|
|
10867
|
-
return new
|
|
10879
|
+
return new gn(e.data);
|
|
10868
10880
|
throw new Error("Unsupported font data type");
|
|
10869
10881
|
}
|
|
10870
10882
|
/**
|
|
@@ -10877,11 +10889,11 @@ class Se {
|
|
|
10877
10889
|
* @throws {Error} If the file type is not supported
|
|
10878
10890
|
*/
|
|
10879
10891
|
createFontFromBuffer(e, r) {
|
|
10880
|
-
const n =
|
|
10892
|
+
const n = Ga(e).toLowerCase();
|
|
10881
10893
|
if (n === "shx")
|
|
10882
|
-
return new
|
|
10894
|
+
return new yn(r);
|
|
10883
10895
|
if (["ttf", "otf", "woff"].includes(n))
|
|
10884
|
-
return new
|
|
10896
|
+
return new gn(r);
|
|
10885
10897
|
throw new Error(`Unsupported font file type: ${n}`);
|
|
10886
10898
|
}
|
|
10887
10899
|
}
|
|
@@ -10889,10 +10901,10 @@ class ke {
|
|
|
10889
10901
|
constructor() {
|
|
10890
10902
|
this.fontMapping = {}, this.fontMap = /* @__PURE__ */ new Map(), this.unsupportedChars = {}, this.missedFonts = {}, this.enableFontCache = !0, this.defaultFont = "simsun", this.events = {
|
|
10891
10903
|
/** Event triggered when a font cannot be found */
|
|
10892
|
-
fontNotFound: new
|
|
10904
|
+
fontNotFound: new xr(),
|
|
10893
10905
|
/** Event triggered when a font is successfully loaded */
|
|
10894
|
-
fontLoaded: new
|
|
10895
|
-
}, this.loader = new L.FileLoader(), this.loader.setResponseType("arraybuffer"), this.fileNames = [];
|
|
10906
|
+
fontLoaded: new xr()
|
|
10907
|
+
}, this.loader = new L.FileLoader(), this.loader.setResponseType("arraybuffer"), this.fileNames = [], this.fontLoader = new yl();
|
|
10896
10908
|
}
|
|
10897
10909
|
/**
|
|
10898
10910
|
* Gets the singleton instance of the FontManager
|
|
@@ -10908,12 +10920,43 @@ class ke {
|
|
|
10908
10920
|
setFontMapping(e) {
|
|
10909
10921
|
this.fontMapping = e;
|
|
10910
10922
|
}
|
|
10923
|
+
/**
|
|
10924
|
+
* Sets the font loader
|
|
10925
|
+
* @param fontLoader - The font loader to set
|
|
10926
|
+
*/
|
|
10927
|
+
setFontLoader(e) {
|
|
10928
|
+
this.fontLoader = e;
|
|
10929
|
+
}
|
|
10930
|
+
/**
|
|
10931
|
+
* Retrieves information about all available fonts in the system.
|
|
10932
|
+
* Loads font metadata from a CDN if not already loaded.
|
|
10933
|
+
* @returns Promise that resolves to an array of FontInfo objects
|
|
10934
|
+
* @throws {Error} If font metadata cannot be loaded from the CDN
|
|
10935
|
+
*/
|
|
10936
|
+
async getAvaiableFonts() {
|
|
10937
|
+
return await this.fontLoader.getAvaiableFonts();
|
|
10938
|
+
}
|
|
10939
|
+
/**
|
|
10940
|
+
* Loads the default font
|
|
10941
|
+
* @returns Promise that resolves to the font load statuses
|
|
10942
|
+
*/
|
|
10943
|
+
async loadDefaultFont() {
|
|
10944
|
+
return await this.loadFontsByNames(this.defaultFont);
|
|
10945
|
+
}
|
|
10946
|
+
/**
|
|
10947
|
+
* Loads the specified fonts from font names
|
|
10948
|
+
* @param names - Font names to load.
|
|
10949
|
+
* @returns Promise that resolves to an array of font load statuses
|
|
10950
|
+
*/
|
|
10951
|
+
async loadFontsByNames(e) {
|
|
10952
|
+
return e = Array.isArray(e) ? e : [e], (await this.fontLoader.load(e))[0];
|
|
10953
|
+
}
|
|
10911
10954
|
/**
|
|
10912
10955
|
* Loads the specified fonts from URLs
|
|
10913
|
-
* @param urls - URLs of font files to load.
|
|
10956
|
+
* @param urls - URLs of font files to load.
|
|
10914
10957
|
* @returns Promise that resolves to an array of font load statuses
|
|
10915
10958
|
*/
|
|
10916
|
-
async
|
|
10959
|
+
async loadFontsByUrls(e) {
|
|
10917
10960
|
e = Array.isArray(e) ? e : [e];
|
|
10918
10961
|
const r = [];
|
|
10919
10962
|
for (let a = 0; a < e.length; a++) {
|
|
@@ -10923,7 +10966,7 @@ class ke {
|
|
|
10923
10966
|
const n = [];
|
|
10924
10967
|
return await Promise.allSettled(r).then((a) => {
|
|
10925
10968
|
a.forEach((s, i) => {
|
|
10926
|
-
const o = s.status === "fulfilled", u = e[i], l =
|
|
10969
|
+
const o = s.status === "fulfilled", u = e[i], l = wr(u.toLowerCase());
|
|
10927
10970
|
n.push({
|
|
10928
10971
|
fontName: l,
|
|
10929
10972
|
url: u,
|
|
@@ -11039,10 +11082,10 @@ class ke {
|
|
|
11039
11082
|
* @param url - The URL of the font file to load
|
|
11040
11083
|
*/
|
|
11041
11084
|
async loadFont(e) {
|
|
11042
|
-
const r =
|
|
11085
|
+
const r = Cn(e);
|
|
11043
11086
|
if (!r)
|
|
11044
11087
|
throw new Error(`Invalid font url: ${e}`);
|
|
11045
|
-
const n =
|
|
11088
|
+
const n = wr(e).toLowerCase(), a = await ze.instance.get(n);
|
|
11046
11089
|
if (a) {
|
|
11047
11090
|
const s = Se.instance.createFont(a);
|
|
11048
11091
|
this.fontMap.set(n, s);
|
|
@@ -11098,7 +11141,7 @@ class ke {
|
|
|
11098
11141
|
return e == null ? (this.fontMap.clear(), !0) : this.fontMap.delete(e);
|
|
11099
11142
|
}
|
|
11100
11143
|
}
|
|
11101
|
-
class
|
|
11144
|
+
class yl {
|
|
11102
11145
|
/**
|
|
11103
11146
|
* Creates a new instance of DefaultFontLoader
|
|
11104
11147
|
*/
|
|
@@ -11141,8 +11184,7 @@ class ml {
|
|
|
11141
11184
|
* @returns Promise that resolves to an array of FontLoadStatus objects
|
|
11142
11185
|
*/
|
|
11143
11186
|
async load(e) {
|
|
11144
|
-
|
|
11145
|
-
return await this.getAvaiableFonts(), [];
|
|
11187
|
+
e.length == 0 && await this.getAvaiableFonts();
|
|
11146
11188
|
const r = [], n = [], a = {};
|
|
11147
11189
|
this._avaiableFonts.forEach((o) => {
|
|
11148
11190
|
o.name.forEach((u) => {
|
|
@@ -11157,7 +11199,7 @@ class ml {
|
|
|
11157
11199
|
}) : r.push(l));
|
|
11158
11200
|
});
|
|
11159
11201
|
let s = [];
|
|
11160
|
-
r.length > 0 && (s = await ke.instance.
|
|
11202
|
+
r.length > 0 && (s = await ke.instance.loadFontsByUrls(r));
|
|
11161
11203
|
const i = {};
|
|
11162
11204
|
return [...n, ...s].forEach((o) => {
|
|
11163
11205
|
i[o.fontName] = o;
|
|
@@ -11172,11 +11214,11 @@ class ml {
|
|
|
11172
11214
|
}
|
|
11173
11215
|
}
|
|
11174
11216
|
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 || {});
|
|
11175
|
-
const
|
|
11217
|
+
const xl = {
|
|
11176
11218
|
c: "Ø",
|
|
11177
11219
|
d: "°",
|
|
11178
11220
|
p: "±"
|
|
11179
|
-
},
|
|
11221
|
+
}, bl = {
|
|
11180
11222
|
l: 1,
|
|
11181
11223
|
r: 2,
|
|
11182
11224
|
c: 3,
|
|
@@ -11184,14 +11226,14 @@ const yl = {
|
|
|
11184
11226
|
d: 5
|
|
11185
11227
|
/* DISTRIBUTED */
|
|
11186
11228
|
};
|
|
11187
|
-
function
|
|
11229
|
+
function Sl(t, e = !1) {
|
|
11188
11230
|
const r = /* @__PURE__ */ new Set(), n = /\\[fF](.*?)[;|]/g;
|
|
11189
11231
|
return [...t.matchAll(n)].forEach((a) => {
|
|
11190
11232
|
let s = a[1].toLowerCase();
|
|
11191
11233
|
e && (s = s.replace(/\.(ttf|otf|woff|shx)$/, "")), r.add(s);
|
|
11192
11234
|
}), r;
|
|
11193
11235
|
}
|
|
11194
|
-
class
|
|
11236
|
+
class kl {
|
|
11195
11237
|
/**
|
|
11196
11238
|
* Creates a new ContextStack with an initial context.
|
|
11197
11239
|
* @param initial The initial MTextContext to use as the base of the stack.
|
|
@@ -11243,7 +11285,7 @@ class Sl {
|
|
|
11243
11285
|
this.stack[this.stack.length - 1] = e;
|
|
11244
11286
|
}
|
|
11245
11287
|
}
|
|
11246
|
-
class
|
|
11288
|
+
class Fl {
|
|
11247
11289
|
/**
|
|
11248
11290
|
* Creates a new MTextParser instance
|
|
11249
11291
|
* @param content - The MText content to parse
|
|
@@ -11253,7 +11295,7 @@ class kl {
|
|
|
11253
11295
|
constructor(e, r, n = {}) {
|
|
11254
11296
|
this.continueStroke = !1, this.inStackContext = !1, this.scanner = new Bt(e);
|
|
11255
11297
|
const a = r ?? new tt();
|
|
11256
|
-
this.ctxStack = new
|
|
11298
|
+
this.ctxStack = new kl(a), this.yieldPropertyCommands = n.yieldPropertyCommands ?? !1, this.resetParagraphParameters = n.resetParagraphParameters ?? !1;
|
|
11257
11299
|
}
|
|
11258
11300
|
/**
|
|
11259
11301
|
* Decode multi-byte character from hex code
|
|
@@ -11608,7 +11650,7 @@ class kl {
|
|
|
11608
11650
|
break;
|
|
11609
11651
|
case "q": {
|
|
11610
11652
|
const l = r.get();
|
|
11611
|
-
for (i =
|
|
11653
|
+
for (i = bl[l] || 0; r.peek() === ","; )
|
|
11612
11654
|
r.consume(1);
|
|
11613
11655
|
break;
|
|
11614
11656
|
}
|
|
@@ -11746,7 +11788,7 @@ class kl {
|
|
|
11746
11788
|
continue;
|
|
11747
11789
|
}
|
|
11748
11790
|
if (o === "%" && this.scanner.peek(1) === "%") {
|
|
11749
|
-
const l = this.scanner.peek(2).toLowerCase(), h =
|
|
11791
|
+
const l = this.scanner.peek(2).toLowerCase(), h = xl[l];
|
|
11750
11792
|
if (h) {
|
|
11751
11793
|
this.scanner.consume(3), s += h;
|
|
11752
11794
|
continue;
|
|
@@ -11805,15 +11847,15 @@ class kl {
|
|
|
11805
11847
|
for (; ; ) {
|
|
11806
11848
|
const [a, s] = n.call(this);
|
|
11807
11849
|
if (a) {
|
|
11808
|
-
if (yield new
|
|
11850
|
+
if (yield new Dt(a, this.ctxStack.current.copy(), s), a === 6 && this.resetParagraphParameters) {
|
|
11809
11851
|
const i = this.ctxStack.current, o = r(i);
|
|
11810
|
-
this.yieldPropertyCommands && Object.keys(o).length > 0 && (yield new
|
|
11852
|
+
this.yieldPropertyCommands && Object.keys(o).length > 0 && (yield new Dt(9, i.copy(), {
|
|
11811
11853
|
command: void 0,
|
|
11812
11854
|
changes: { paragraph: o },
|
|
11813
11855
|
depth: this.ctxStack.depth
|
|
11814
11856
|
}));
|
|
11815
11857
|
}
|
|
11816
|
-
e && (yield new
|
|
11858
|
+
e && (yield new Dt(e, this.ctxStack.current.copy(), null), e = null);
|
|
11817
11859
|
} else
|
|
11818
11860
|
break;
|
|
11819
11861
|
}
|
|
@@ -12190,7 +12232,7 @@ class tt {
|
|
|
12190
12232
|
return e._stroke = this._stroke, e.continueStroke = this.continueStroke, e.color = this.color.copy(), e.align = this.align, e.fontFace = { ...this.fontFace }, e._capHeight = { ...this._capHeight }, e._widthFactor = { ...this._widthFactor }, e._charTrackingFactor = { ...this._charTrackingFactor }, e.oblique = this.oblique, e.paragraph = { ...this.paragraph }, e;
|
|
12191
12233
|
}
|
|
12192
12234
|
}
|
|
12193
|
-
class
|
|
12235
|
+
class Dt {
|
|
12194
12236
|
/**
|
|
12195
12237
|
* Create a new MText token
|
|
12196
12238
|
* @param type - The token type
|
|
@@ -12201,8 +12243,8 @@ class It {
|
|
|
12201
12243
|
this.type = e, this.ctx = r, this.data = n;
|
|
12202
12244
|
}
|
|
12203
12245
|
}
|
|
12204
|
-
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 || {}),
|
|
12205
|
-
const
|
|
12246
|
+
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 || {}), Tl = /* @__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))(Tl || {});
|
|
12247
|
+
const wl = /* @__PURE__ */ new L.Vector3(), Cl = 1.666666;
|
|
12206
12248
|
class gr extends tt {
|
|
12207
12249
|
/**
|
|
12208
12250
|
* Creates a new RenderContext instance with optional initial values.
|
|
@@ -12225,7 +12267,7 @@ class gr extends tt {
|
|
|
12225
12267
|
* @returns The color as a hex number (0xRRGGBB)
|
|
12226
12268
|
*/
|
|
12227
12269
|
getColorAsHex() {
|
|
12228
|
-
return this.color.isRgb && this.color.rgbValue !== null ? this.color.rgbValue : this.color.isAci && this.color.aci !== null ?
|
|
12270
|
+
return this.color.isRgb && this.color.rgbValue !== null ? this.color.rgbValue : this.color.isAci && this.color.aci !== null ? _a(this.color.aci) : 16777215;
|
|
12229
12271
|
}
|
|
12230
12272
|
/**
|
|
12231
12273
|
* Set the color using a hex value for rendering purposes.
|
|
@@ -12236,7 +12278,7 @@ class gr extends tt {
|
|
|
12236
12278
|
this.color.rgb = [r, n, a];
|
|
12237
12279
|
}
|
|
12238
12280
|
}
|
|
12239
|
-
class
|
|
12281
|
+
class El {
|
|
12240
12282
|
/**
|
|
12241
12283
|
* Construct one instance of this class and initialize some properties with default values.
|
|
12242
12284
|
* @param style Input text style
|
|
@@ -12246,7 +12288,9 @@ class Cl {
|
|
|
12246
12288
|
*/
|
|
12247
12289
|
constructor(e, r, n, a) {
|
|
12248
12290
|
this._contextStack = [], this._maxFontSize = 0, this._currentIndent = 0, this._currentLeftMargin = 0, this._currentRightMargin = 0, this._style = e, this._styleManager = r, this._fontManager = n, this._options = a, this._totalHeight = 0, this._hOffset = 0, this._vOffset = 0, this._lineCount = 1, this._currentLineObjects = [], this._currentContext = new gr({
|
|
12249
|
-
fontScaleFactor: this.fontManager.getFontScaleFactor(
|
|
12291
|
+
fontScaleFactor: this.fontManager.getFontScaleFactor(
|
|
12292
|
+
this.textStyle.font.toLowerCase()
|
|
12293
|
+
),
|
|
12250
12294
|
fontSize: a.fontSize,
|
|
12251
12295
|
fontSizeScaleFactor: 1,
|
|
12252
12296
|
italic: !1,
|
|
@@ -12255,7 +12299,10 @@ class Cl {
|
|
|
12255
12299
|
this.textStyle.font.toLowerCase(),
|
|
12256
12300
|
a.fontSize
|
|
12257
12301
|
)
|
|
12258
|
-
}), this._currentContext.setColorFromHex(e.color), this._currentContext.fontFace.family = this.textStyle.font.toLowerCase(), this._currentContext.widthFactor = {
|
|
12302
|
+
}), this._currentContext.setColorFromHex(e.color), this._currentContext.fontFace.family = this.textStyle.font.toLowerCase(), this._currentContext.widthFactor = {
|
|
12303
|
+
value: a.widthFactor,
|
|
12304
|
+
isRelative: !0
|
|
12305
|
+
}, this._currentContext.oblique = e.obliqueAngle || 0, this._maxFontSize = 0, this._currentHorizontalAlignment = a.horizontalAlignment, this._currentIndent = 0, this._currentLeftMargin = 0, this._currentRightMargin = 0, this.initLineParams();
|
|
12259
12306
|
}
|
|
12260
12307
|
get fontManager() {
|
|
12261
12308
|
return this._fontManager;
|
|
@@ -12330,7 +12377,7 @@ class Cl {
|
|
|
12330
12377
|
* The height of current line of texts
|
|
12331
12378
|
*/
|
|
12332
12379
|
get currentLineHeight() {
|
|
12333
|
-
return this.defaultLineSpaceFactor * this.currentFontSize *
|
|
12380
|
+
return this.defaultLineSpaceFactor * this.currentFontSize * Cl + this.currentMaxFontSize;
|
|
12334
12381
|
}
|
|
12335
12382
|
/**
|
|
12336
12383
|
* The maximum font size in current line. Characters in one line may have different font and font
|
|
@@ -12399,7 +12446,9 @@ class Cl {
|
|
|
12399
12446
|
switch (e.command) {
|
|
12400
12447
|
case "f":
|
|
12401
12448
|
case "F":
|
|
12402
|
-
e.changes.fontFace && (this.changeFont(e.changes.fontFace.family), this.fontManager.getFontType(
|
|
12449
|
+
e.changes.fontFace && (this.changeFont(e.changes.fontFace.family), this.fontManager.getFontType(
|
|
12450
|
+
this._currentContext.fontFace.family
|
|
12451
|
+
) === "mesh" ? (this._currentContext.italic = e.changes.fontFace.style === "Italic", this._currentContext.bold = (e.changes.fontFace.weight || 400) >= 700, this._currentContext.oblique = this.textStyle.obliqueAngle || 0) : (this._currentContext.italic = !1, this._currentContext.bold = !1, e.changes.fontFace.style === "Italic" ? this._currentContext.oblique = 15 : this._currentContext.oblique = this.textStyle.obliqueAngle || 0));
|
|
12403
12452
|
break;
|
|
12404
12453
|
case "c":
|
|
12405
12454
|
case "C":
|
|
@@ -12479,7 +12528,9 @@ class Cl {
|
|
|
12479
12528
|
this.startNewParagraph(r, n, a);
|
|
12480
12529
|
else if (s.type === Be.WORD) {
|
|
12481
12530
|
const i = s.data;
|
|
12482
|
-
Array.isArray(i) ? i.forEach(
|
|
12531
|
+
Array.isArray(i) ? i.forEach(
|
|
12532
|
+
(o) => this.processWord(o, r, n)
|
|
12533
|
+
) : typeof i == "string" && i.length > 0 && this.processWord(i, r, n);
|
|
12483
12534
|
} else if (s.type === Be.SPACE)
|
|
12484
12535
|
this.processBlank();
|
|
12485
12536
|
else if (s.type === Be.PROPERTIES_CHANGED) {
|
|
@@ -12525,13 +12576,21 @@ class Cl {
|
|
|
12525
12576
|
const m = [], b = [];
|
|
12526
12577
|
this._hOffset = o, this._vOffset = u + h * 0.1;
|
|
12527
12578
|
for (let x = 0; x < a.length; x++)
|
|
12528
|
-
this.processChar(
|
|
12579
|
+
this.processChar(
|
|
12580
|
+
a[x],
|
|
12581
|
+
m,
|
|
12582
|
+
b
|
|
12583
|
+
);
|
|
12529
12584
|
r.push(...m), n.push(...b), this._hOffset = o + c;
|
|
12530
12585
|
} else if (!a && s) {
|
|
12531
12586
|
const m = [], b = [];
|
|
12532
12587
|
this._hOffset = o, this._vOffset = u - h * 0.6;
|
|
12533
12588
|
for (let x = 0; x < s.length; x++)
|
|
12534
|
-
this.processChar(
|
|
12589
|
+
this.processChar(
|
|
12590
|
+
s[x],
|
|
12591
|
+
m,
|
|
12592
|
+
b
|
|
12593
|
+
);
|
|
12535
12594
|
r.push(...m), n.push(...b), this._hOffset = o + p;
|
|
12536
12595
|
}
|
|
12537
12596
|
this._currentContext.fontSizeScaleFactor = f, this.calcuateLineParams();
|
|
@@ -12539,12 +12598,20 @@ class Cl {
|
|
|
12539
12598
|
const m = [], b = [];
|
|
12540
12599
|
this._hOffset = o + v, this._vOffset = u + this.currentFontSize * 0.3;
|
|
12541
12600
|
for (let S = 0; S < a.length; S++)
|
|
12542
|
-
this.processChar(
|
|
12601
|
+
this.processChar(
|
|
12602
|
+
a[S],
|
|
12603
|
+
m,
|
|
12604
|
+
b
|
|
12605
|
+
);
|
|
12543
12606
|
r.push(...m), n.push(...b);
|
|
12544
12607
|
const x = [], T = [];
|
|
12545
12608
|
this._hOffset = o + y, this._vOffset = u - this.currentFontSize * 0.6;
|
|
12546
12609
|
for (let S = 0; S < s.length; S++)
|
|
12547
|
-
this.processChar(
|
|
12610
|
+
this.processChar(
|
|
12611
|
+
s[S],
|
|
12612
|
+
x,
|
|
12613
|
+
T
|
|
12614
|
+
);
|
|
12548
12615
|
if (r.push(...x), n.push(...T), i === "/" || i === "#") {
|
|
12549
12616
|
const S = new L.BufferGeometry(), A = new Float32Array([
|
|
12550
12617
|
o,
|
|
@@ -12554,11 +12621,17 @@ class Cl {
|
|
|
12554
12621
|
u - this.currentFontSize * 0.8,
|
|
12555
12622
|
0
|
|
12556
12623
|
]);
|
|
12557
|
-
S.setAttribute(
|
|
12624
|
+
S.setAttribute(
|
|
12625
|
+
"position",
|
|
12626
|
+
new L.BufferAttribute(A, 3)
|
|
12627
|
+
), S.setIndex(null), n.push(S);
|
|
12558
12628
|
}
|
|
12559
12629
|
this._hOffset = o + d;
|
|
12560
12630
|
}
|
|
12561
|
-
this._vOffset = u, this._currentContext.charTrackingFactor = {
|
|
12631
|
+
this._vOffset = u, this._currentContext.charTrackingFactor = {
|
|
12632
|
+
value: l,
|
|
12633
|
+
isRelative: !1
|
|
12634
|
+
};
|
|
12562
12635
|
}
|
|
12563
12636
|
processBlank() {
|
|
12564
12637
|
this._hOffset += this._currentContext.blankWidth;
|
|
@@ -12574,7 +12647,24 @@ class Cl {
|
|
|
12574
12647
|
let i = this._currentContext.oblique;
|
|
12575
12648
|
if (this._currentContext.italic && (i += 15), i) {
|
|
12576
12649
|
const d = i * Math.PI / 180, v = new L.Matrix4();
|
|
12577
|
-
v.set(
|
|
12650
|
+
v.set(
|
|
12651
|
+
1,
|
|
12652
|
+
Math.tan(d),
|
|
12653
|
+
0,
|
|
12654
|
+
0,
|
|
12655
|
+
0,
|
|
12656
|
+
1,
|
|
12657
|
+
0,
|
|
12658
|
+
0,
|
|
12659
|
+
0,
|
|
12660
|
+
0,
|
|
12661
|
+
1,
|
|
12662
|
+
0,
|
|
12663
|
+
0,
|
|
12664
|
+
0,
|
|
12665
|
+
0,
|
|
12666
|
+
1
|
|
12667
|
+
), s.applyMatrix4(v);
|
|
12578
12668
|
}
|
|
12579
12669
|
const o = this.fontManager.getFontType(this.currentFont);
|
|
12580
12670
|
this._currentContext.bold && o === "mesh" && s.scale(1.06, 1.06, 1), this.hOffset > (this.maxLineWidth || 1 / 0) && this.startNewLine();
|
|
@@ -12586,7 +12676,14 @@ class Cl {
|
|
|
12586
12676
|
d.setAttribute(
|
|
12587
12677
|
"position",
|
|
12588
12678
|
new L.BufferAttribute(
|
|
12589
|
-
new Float32Array([
|
|
12679
|
+
new Float32Array([
|
|
12680
|
+
u,
|
|
12681
|
+
v,
|
|
12682
|
+
p,
|
|
12683
|
+
u + h,
|
|
12684
|
+
v,
|
|
12685
|
+
p
|
|
12686
|
+
]),
|
|
12590
12687
|
3
|
|
12591
12688
|
)
|
|
12592
12689
|
), d.setIndex(null), n.push(d);
|
|
@@ -12596,7 +12693,14 @@ class Cl {
|
|
|
12596
12693
|
d.setAttribute(
|
|
12597
12694
|
"position",
|
|
12598
12695
|
new L.BufferAttribute(
|
|
12599
|
-
new Float32Array([
|
|
12696
|
+
new Float32Array([
|
|
12697
|
+
u,
|
|
12698
|
+
v,
|
|
12699
|
+
p,
|
|
12700
|
+
u + h,
|
|
12701
|
+
v,
|
|
12702
|
+
p
|
|
12703
|
+
]),
|
|
12600
12704
|
3
|
|
12601
12705
|
)
|
|
12602
12706
|
), d.setIndex(null), n.push(d);
|
|
@@ -12606,7 +12710,14 @@ class Cl {
|
|
|
12606
12710
|
d.setAttribute(
|
|
12607
12711
|
"position",
|
|
12608
12712
|
new L.BufferAttribute(
|
|
12609
|
-
new Float32Array([
|
|
12713
|
+
new Float32Array([
|
|
12714
|
+
u,
|
|
12715
|
+
v,
|
|
12716
|
+
p,
|
|
12717
|
+
u + h,
|
|
12718
|
+
v,
|
|
12719
|
+
p
|
|
12720
|
+
]),
|
|
12610
12721
|
3
|
|
12611
12722
|
)
|
|
12612
12723
|
), d.setIndex(null), n.push(d);
|
|
@@ -12629,7 +12740,9 @@ class Cl {
|
|
|
12629
12740
|
* Calcuate font size, line space, line height and other parameters.
|
|
12630
12741
|
*/
|
|
12631
12742
|
calcuateLineParams(e) {
|
|
12632
|
-
this._currentContext.fontScaleFactor = this.fontManager.getFontScaleFactor(
|
|
12743
|
+
this._currentContext.fontScaleFactor = this.fontManager.getFontScaleFactor(
|
|
12744
|
+
this.currentFont
|
|
12745
|
+
);
|
|
12633
12746
|
const r = e || this.defaultFontSize || this.textStyle.fixedTextHeight;
|
|
12634
12747
|
this._currentContext.fontSize = r * this._currentContext.fontScaleFactor * this._currentContext.fontSizeScaleFactor;
|
|
12635
12748
|
}
|
|
@@ -12639,8 +12752,16 @@ class Cl {
|
|
|
12639
12752
|
* @returns Return the text shape of the specified character
|
|
12640
12753
|
*/
|
|
12641
12754
|
getCharShape(e) {
|
|
12642
|
-
let r = this.fontManager.getCharShape(
|
|
12643
|
-
|
|
12755
|
+
let r = this.fontManager.getCharShape(
|
|
12756
|
+
e,
|
|
12757
|
+
this.currentFont,
|
|
12758
|
+
this.currentFontSize
|
|
12759
|
+
);
|
|
12760
|
+
return this.textStyle.bigFont && !r && (r = this.fontManager.getCharShape(
|
|
12761
|
+
e,
|
|
12762
|
+
this.textStyle.bigFont,
|
|
12763
|
+
this.currentFontSize
|
|
12764
|
+
)), r || (r = this.fontManager.getCharShape(e, "", this.currentFontSize)), r || (r = this.fontManager.getNotFoundTextShape(this.currentFontSize)), this.currentFontSize > this._maxFontSize && (this._maxFontSize = this.currentFontSize), r;
|
|
12644
12765
|
}
|
|
12645
12766
|
startNewLine() {
|
|
12646
12767
|
this._hOffset = 0, this.flowDirection == je.BOTTOM_TO_TOP ? this._vOffset += this.currentLineHeight : this._vOffset -= this.currentLineHeight, this._lineCount++, this.processAlignment(), this._currentLineObjects = [], this._lineCount == 2 ? this._totalHeight = this.currentMaxFontSize : this._totalHeight = this._totalHeight + this.currentLineHeight, this._maxFontSize = 0;
|
|
@@ -12659,10 +12780,12 @@ class Cl {
|
|
|
12659
12780
|
if (e.forEach((n, a) => {
|
|
12660
12781
|
n.boundingBox || n.computeBoundingBox(), a === 0 ? r = n.boundingBox : r.union(n.boundingBox);
|
|
12661
12782
|
}), r) {
|
|
12662
|
-
const n = r.getSize(
|
|
12783
|
+
const n = r.getSize(wl);
|
|
12663
12784
|
switch (this.currentHorizontalAlignment) {
|
|
12664
12785
|
case se.LEFT:
|
|
12665
|
-
e.forEach(
|
|
12786
|
+
e.forEach(
|
|
12787
|
+
(a) => a.translate(this._currentLeftMargin - r.min.x, 0, 0)
|
|
12788
|
+
);
|
|
12666
12789
|
break;
|
|
12667
12790
|
case se.CENTER:
|
|
12668
12791
|
e.forEach(
|
|
@@ -12675,7 +12798,11 @@ class Cl {
|
|
|
12675
12798
|
break;
|
|
12676
12799
|
case se.RIGHT:
|
|
12677
12800
|
e.forEach(
|
|
12678
|
-
(a) => a.translate(
|
|
12801
|
+
(a) => a.translate(
|
|
12802
|
+
this._currentLeftMargin + this.maxLineWidth - n.x - r.min.x,
|
|
12803
|
+
0,
|
|
12804
|
+
0
|
|
12805
|
+
)
|
|
12679
12806
|
);
|
|
12680
12807
|
break;
|
|
12681
12808
|
case se.DISTRIBUTED:
|
|
@@ -12684,7 +12811,9 @@ class Cl {
|
|
|
12684
12811
|
for (let s = 1; s < e.length; s++)
|
|
12685
12812
|
e[s].translate(a * s, 0, 0);
|
|
12686
12813
|
}
|
|
12687
|
-
e.forEach(
|
|
12814
|
+
e.forEach(
|
|
12815
|
+
(a) => a.translate(this._currentLeftMargin - r.min.x, 0, 0)
|
|
12816
|
+
);
|
|
12688
12817
|
break;
|
|
12689
12818
|
}
|
|
12690
12819
|
}
|
|
@@ -12711,7 +12840,7 @@ class Cl {
|
|
|
12711
12840
|
const n = new L.Group(), a = this._currentContext.getColorAsHex(), s = e.filter((o) => o instanceof L.ExtrudeGeometry);
|
|
12712
12841
|
if (s.length > 0) {
|
|
12713
12842
|
const o = new L.Mesh();
|
|
12714
|
-
o.geometry =
|
|
12843
|
+
o.geometry = fn(s), o.material = this.styleManager.getMeshBasicMaterial(a), o.userData.bboxIntersectionCheck = !0, n.add(o);
|
|
12715
12844
|
}
|
|
12716
12845
|
const i = [
|
|
12717
12846
|
...r,
|
|
@@ -12719,7 +12848,7 @@ class Cl {
|
|
|
12719
12848
|
];
|
|
12720
12849
|
if (i.length > 0) {
|
|
12721
12850
|
const o = new L.LineSegments();
|
|
12722
|
-
o.geometry =
|
|
12851
|
+
o.geometry = fn(i), o.material = this.styleManager.getLineBasicMaterial(a), o.userData.bboxIntersectionCheck = !0, n.add(o);
|
|
12723
12852
|
}
|
|
12724
12853
|
return n.children.length === 1 ? n.children[0] : n;
|
|
12725
12854
|
}
|
|
@@ -12730,8 +12859,8 @@ class Cl {
|
|
|
12730
12859
|
this._currentContext.fontSize = e * this._currentContext.fontScaleFactor * this._currentContext.fontSizeScaleFactor, this.calcuateLineParams();
|
|
12731
12860
|
}
|
|
12732
12861
|
}
|
|
12733
|
-
const
|
|
12734
|
-
class
|
|
12862
|
+
const It = /* @__PURE__ */ new L.Vector3(), Oe = /* @__PURE__ */ new L.Vector3(), Gt = /* @__PURE__ */ new L.Vector3(), Nt = /* @__PURE__ */ new L.Quaternion(), _t = /* @__PURE__ */ new L.Matrix4(), xn = /* @__PURE__ */ new L.Matrix4(), bn = /* @__PURE__ */ new L.Vector3(1, 0, 0);
|
|
12863
|
+
class vr extends L.Object3D {
|
|
12735
12864
|
/**
|
|
12736
12865
|
* Extracts all unique font names used in an MText string.
|
|
12737
12866
|
* This function searches for font commands in the format \f{fontname}| or \f{fontname}; and returns a set of unique font names.
|
|
@@ -12748,7 +12877,7 @@ class El extends L.Object3D {
|
|
|
12748
12877
|
* ```
|
|
12749
12878
|
*/
|
|
12750
12879
|
static getFonts(e, r = !1) {
|
|
12751
|
-
return
|
|
12880
|
+
return Sl(e, r);
|
|
12752
12881
|
}
|
|
12753
12882
|
/**
|
|
12754
12883
|
* Creates a new instance of MText.
|
|
@@ -12758,13 +12887,14 @@ class El extends L.Object3D {
|
|
|
12758
12887
|
* @param fontManager - The font manager instance
|
|
12759
12888
|
* @param colorSettings - Color settings used to decided font color
|
|
12760
12889
|
*/
|
|
12761
|
-
constructor(e, r, n, a, s = {
|
|
12890
|
+
constructor(e, r, n, a, s = {
|
|
12891
|
+
byLayerColor: 16777215,
|
|
12892
|
+
byBlockColor: 16777215
|
|
12893
|
+
}) {
|
|
12762
12894
|
super(), this._style = r, this._styleManager = n, this._fontManager = a, this._colorSettings = {
|
|
12763
12895
|
byLayerColor: s.byLayerColor,
|
|
12764
12896
|
byBlockColor: s.byBlockColor
|
|
12765
|
-
}, this._box = new L.Box3(), this._boxes = [];
|
|
12766
|
-
const i = this.loadMText(e, r);
|
|
12767
|
-
i && (this.getBoxes(i, this._boxes), this._boxes.forEach((o) => this.box.union(o)), this.add(i));
|
|
12897
|
+
}, this._box = new L.Box3(), this._boxes = [], this._mtextData = e;
|
|
12768
12898
|
}
|
|
12769
12899
|
/**
|
|
12770
12900
|
* Gets the font manager instance associated with this MText object.
|
|
@@ -12773,6 +12903,19 @@ class El extends L.Object3D {
|
|
|
12773
12903
|
get fontManager() {
|
|
12774
12904
|
return this._fontManager;
|
|
12775
12905
|
}
|
|
12906
|
+
/**
|
|
12907
|
+
* Draw the MText object. This method loads required fonts on demand and builds the object graph.
|
|
12908
|
+
*
|
|
12909
|
+
* @param isLoadFontsOnDemand - The flag indicate whether to load required fonts on demand
|
|
12910
|
+
*/
|
|
12911
|
+
async draw(e = !0) {
|
|
12912
|
+
if (e) {
|
|
12913
|
+
const n = Array.from(vr.getFonts(this._mtextData.text || "", !0));
|
|
12914
|
+
n.length > 0 && await this._fontManager.loadFontsByNames(n);
|
|
12915
|
+
}
|
|
12916
|
+
const r = this.loadMText(this._mtextData, this._style);
|
|
12917
|
+
r && (this.getBoxes(r, this._boxes), this._boxes.forEach((n) => this.box.union(n)), this.add(r));
|
|
12918
|
+
}
|
|
12776
12919
|
/**
|
|
12777
12920
|
* Gets the style manager instance associated with this MText object.
|
|
12778
12921
|
* @returns The StyleManager instance
|
|
@@ -12806,11 +12949,11 @@ class El extends L.Object3D {
|
|
|
12806
12949
|
*/
|
|
12807
12950
|
raycast(e, r) {
|
|
12808
12951
|
this._boxes.forEach((n) => {
|
|
12809
|
-
if (e.ray.intersectBox(n,
|
|
12810
|
-
const a = e.ray.origin.distanceTo(
|
|
12952
|
+
if (e.ray.intersectBox(n, It)) {
|
|
12953
|
+
const a = e.ray.origin.distanceTo(It);
|
|
12811
12954
|
r.push({
|
|
12812
12955
|
distance: a,
|
|
12813
|
-
point:
|
|
12956
|
+
point: It.clone(),
|
|
12814
12957
|
object: this,
|
|
12815
12958
|
face: null,
|
|
12816
12959
|
faceIndex: void 0,
|
|
@@ -12841,12 +12984,12 @@ class El extends L.Object3D {
|
|
|
12841
12984
|
});
|
|
12842
12985
|
let o = e.rotation || 0;
|
|
12843
12986
|
if (e.directionVector) {
|
|
12844
|
-
const l = e.directionVector, h = new L.Vector3(l.x, l.y, l.z), f = h.clone().cross(
|
|
12987
|
+
const l = e.directionVector, h = new L.Vector3(l.x, l.y, l.z), f = h.clone().cross(bn), c = bn.angleTo(h);
|
|
12845
12988
|
o = f.z > 0 ? -c : c;
|
|
12846
12989
|
}
|
|
12847
12990
|
n.matrix.compose(Oe, Nt, Gt);
|
|
12848
12991
|
const u = e.position ? Oe.clone().sub(e.position) : Oe;
|
|
12849
|
-
return _t.makeTranslation(-u.x, -u.y, 0),
|
|
12992
|
+
return _t.makeTranslation(-u.x, -u.y, 0), xn.makeRotationZ(o), n.matrix.multiply(_t), n.matrix.multiply(xn), n.matrix.multiply(_t.invert()), n.matrix.decompose(n.position, n.quaternion, n.scale), n;
|
|
12850
12993
|
}
|
|
12851
12994
|
/**
|
|
12852
12995
|
* Creates a group of text elements from MText data.
|
|
@@ -12875,13 +13018,16 @@ class El extends L.Object3D {
|
|
|
12875
13018
|
byLayerColor: this._colorSettings.byLayerColor,
|
|
12876
13019
|
removeFontExtension: !0
|
|
12877
13020
|
}, h = new tt();
|
|
12878
|
-
h.fontFace.family = r.font, h.capHeight = { value: e.height || 1, isRelative: !0 }, h.widthFactor = {
|
|
12879
|
-
|
|
13021
|
+
h.fontFace.family = r.font, h.capHeight = { value: e.height || 1, isRelative: !0 }, h.widthFactor = {
|
|
13022
|
+
value: e.widthFactor ?? 1,
|
|
13023
|
+
isRelative: !0
|
|
13024
|
+
}, h.align = s, h.paragraph.align = a;
|
|
13025
|
+
const f = new El(
|
|
12880
13026
|
r,
|
|
12881
13027
|
this.styleManager,
|
|
12882
13028
|
this.fontManager,
|
|
12883
13029
|
l
|
|
12884
|
-
), p = new
|
|
13030
|
+
), p = new Fl(e.text, h, {
|
|
12885
13031
|
resetParagraphParameters: !0,
|
|
12886
13032
|
yieldPropertyCommands: !0
|
|
12887
13033
|
}).parse();
|
|
@@ -12964,15 +13110,17 @@ class Ol {
|
|
|
12964
13110
|
})), this.lineBasicMaterials[e];
|
|
12965
13111
|
}
|
|
12966
13112
|
}
|
|
12967
|
-
class
|
|
12968
|
-
constructor(e = {}) {
|
|
13113
|
+
class Sn {
|
|
13114
|
+
constructor(e = { isLoadFontsOnDemand: !0 }) {
|
|
12969
13115
|
this.workers = [], this.inFlightPerWorker = [], this.pendingRequests = /* @__PURE__ */ new Map(), this.requestId = 0, this.readyPromise = null, this.poolSize = e.poolSize ?? Math.max(
|
|
12970
13116
|
1,
|
|
12971
13117
|
navigator.hardwareConcurrency ? Math.min(4, navigator.hardwareConcurrency) : 2
|
|
12972
|
-
);
|
|
13118
|
+
), this.isLoadFontsOnDemand = !!e.isLoadFontsOnDemand;
|
|
12973
13119
|
const r = e.workerUrl ?? "./mtext-renderer-worker.js";
|
|
12974
13120
|
for (let n = 0; n < this.poolSize; n++) {
|
|
12975
|
-
const a = new Worker(new URL(r, import.meta.url), {
|
|
13121
|
+
const a = new Worker(new URL(r, import.meta.url), {
|
|
13122
|
+
type: "module"
|
|
13123
|
+
});
|
|
12976
13124
|
this.attachWorkerHandlers(a, n), this.workers.push(a), this.inFlightPerWorker.push(0);
|
|
12977
13125
|
}
|
|
12978
13126
|
this.ensureInitialized();
|
|
@@ -12982,7 +13130,10 @@ class bn {
|
|
|
12982
13130
|
if (i) {
|
|
12983
13131
|
this.pendingRequests.delete(r);
|
|
12984
13132
|
const { workerIndex: o } = i;
|
|
12985
|
-
this.inFlightPerWorker[o] = Math.max(
|
|
13133
|
+
this.inFlightPerWorker[o] = Math.max(
|
|
13134
|
+
0,
|
|
13135
|
+
this.inFlightPerWorker[o] - 1
|
|
13136
|
+
), n ? i.resolve(a) : i.reject(new Error(s || "Unknown worker error"));
|
|
12986
13137
|
}
|
|
12987
13138
|
}
|
|
12988
13139
|
attachWorkerHandlers(e, r) {
|
|
@@ -13033,7 +13184,10 @@ class bn {
|
|
|
13033
13184
|
reject: a,
|
|
13034
13185
|
workerIndex: r
|
|
13035
13186
|
}), this.inFlightPerWorker[r] = (this.inFlightPerWorker[r] ?? 0) + 1, e.postMessage({ type: "getAvailableFonts", id: s }), setTimeout(() => {
|
|
13036
|
-
this.pendingRequests.get(s) && (this.pendingRequests.delete(s), this.inFlightPerWorker[r] = Math.max(
|
|
13187
|
+
this.pendingRequests.get(s) && (this.pendingRequests.delete(s), this.inFlightPerWorker[r] = Math.max(
|
|
13188
|
+
0,
|
|
13189
|
+
this.inFlightPerWorker[r] - 1
|
|
13190
|
+
), a(new Error("Worker init timeout")));
|
|
13037
13191
|
}, 3e4);
|
|
13038
13192
|
})
|
|
13039
13193
|
)
|
|
@@ -13043,12 +13197,16 @@ class bn {
|
|
|
13043
13197
|
/**
|
|
13044
13198
|
* Render MText in the worker and return serialized data
|
|
13045
13199
|
*/
|
|
13046
|
-
async renderMText(e, r, n = {
|
|
13200
|
+
async renderMText(e, r, n = {
|
|
13201
|
+
byLayerColor: 16777215,
|
|
13202
|
+
byBlockColor: 16777215
|
|
13203
|
+
}) {
|
|
13047
13204
|
await this.ensureInitialized();
|
|
13048
13205
|
const a = await this.sendMessage("render", {
|
|
13049
13206
|
mtextContent: e,
|
|
13050
13207
|
textStyle: r,
|
|
13051
|
-
colorSettings: n
|
|
13208
|
+
colorSettings: n,
|
|
13209
|
+
isLoadFontsOnDemand: this.isLoadFontsOnDemand
|
|
13052
13210
|
});
|
|
13053
13211
|
return this.reconstructMText(a);
|
|
13054
13212
|
}
|
|
@@ -13066,7 +13224,10 @@ class bn {
|
|
|
13066
13224
|
reject: o,
|
|
13067
13225
|
workerIndex: s
|
|
13068
13226
|
}), this.inFlightPerWorker[s] = (this.inFlightPerWorker[s] ?? 0) + 1, a.postMessage({ type: "loadFonts", id: u, data: { fonts: e } }), setTimeout(() => {
|
|
13069
|
-
this.pendingRequests.get(u) && (this.pendingRequests.delete(u), this.inFlightPerWorker[s] = Math.max(
|
|
13227
|
+
this.pendingRequests.get(u) && (this.pendingRequests.delete(u), this.inFlightPerWorker[s] = Math.max(
|
|
13228
|
+
0,
|
|
13229
|
+
this.inFlightPerWorker[s] - 1
|
|
13230
|
+
), o(new Error("Worker request timeout")));
|
|
13070
13231
|
}, 3e4);
|
|
13071
13232
|
})
|
|
13072
13233
|
)
|
|
@@ -13083,19 +13244,21 @@ class bn {
|
|
|
13083
13244
|
if (this.workers.length === 0) return { fonts: [] };
|
|
13084
13245
|
await this.ensureInitialized();
|
|
13085
13246
|
const e = 0, r = this.workers[e];
|
|
13086
|
-
return new Promise(
|
|
13087
|
-
|
|
13088
|
-
|
|
13089
|
-
|
|
13090
|
-
|
|
13091
|
-
|
|
13092
|
-
|
|
13093
|
-
this.
|
|
13094
|
-
|
|
13095
|
-
|
|
13096
|
-
|
|
13097
|
-
|
|
13098
|
-
|
|
13247
|
+
return new Promise(
|
|
13248
|
+
(n, a) => {
|
|
13249
|
+
const s = `req_${++this.requestId}`;
|
|
13250
|
+
this.pendingRequests.set(s, {
|
|
13251
|
+
resolve: (i) => n(i),
|
|
13252
|
+
reject: a,
|
|
13253
|
+
workerIndex: e
|
|
13254
|
+
}), this.inFlightPerWorker[e] = (this.inFlightPerWorker[e] ?? 0) + 1, r.postMessage({ type: "getAvailableFonts", id: s }), setTimeout(() => {
|
|
13255
|
+
this.pendingRequests.get(s) && (this.pendingRequests.delete(s), this.inFlightPerWorker[e] = Math.max(
|
|
13256
|
+
0,
|
|
13257
|
+
this.inFlightPerWorker[e] - 1
|
|
13258
|
+
), a(new Error("Worker request timeout")));
|
|
13259
|
+
}, 3e4);
|
|
13260
|
+
}
|
|
13261
|
+
);
|
|
13099
13262
|
}
|
|
13100
13263
|
/**
|
|
13101
13264
|
* Reconstruct MText object from JSON serialized data
|
|
@@ -13105,7 +13268,11 @@ class bn {
|
|
|
13105
13268
|
return e.children.forEach((n) => {
|
|
13106
13269
|
const a = new L.BufferGeometry();
|
|
13107
13270
|
if (Object.keys(n.geometry.attributes).forEach((o) => {
|
|
13108
|
-
const u = n.geometry.attributes[o], l = new Float32Array(
|
|
13271
|
+
const u = n.geometry.attributes[o], l = new Float32Array(
|
|
13272
|
+
u.arrayBuffer,
|
|
13273
|
+
u.byteOffset,
|
|
13274
|
+
u.length
|
|
13275
|
+
), h = new L.BufferAttribute(
|
|
13109
13276
|
l,
|
|
13110
13277
|
u.itemSize,
|
|
13111
13278
|
u.normalized
|
|
@@ -13140,7 +13307,11 @@ class bn {
|
|
|
13140
13307
|
linewidth: n.material.linewidth
|
|
13141
13308
|
});
|
|
13142
13309
|
let i;
|
|
13143
|
-
n.type === "mesh" ? i = new L.Mesh(a, s) : i = new L.Line(a, s), a.boundingBox || a.computeBoundingBox(), a.boundingSphere || a.computeBoundingSphere(), i.position.set(
|
|
13310
|
+
n.type === "mesh" ? i = new L.Mesh(a, s) : i = new L.Line(a, s), a.boundingBox || a.computeBoundingBox(), a.boundingSphere || a.computeBoundingSphere(), i.position.set(
|
|
13311
|
+
n.position.x,
|
|
13312
|
+
n.position.y,
|
|
13313
|
+
n.position.z
|
|
13314
|
+
), i.quaternion.set(
|
|
13144
13315
|
n.rotation.x,
|
|
13145
13316
|
n.rotation.y,
|
|
13146
13317
|
n.rotation.z,
|
|
@@ -13173,39 +13344,42 @@ class bn {
|
|
|
13173
13344
|
}
|
|
13174
13345
|
class Ul {
|
|
13175
13346
|
constructor() {
|
|
13176
|
-
this.fontManager = ke.instance, this.styleManager = new Ol(), this.
|
|
13347
|
+
this.fontManager = ke.instance, this.styleManager = new Ol(), this.fontManager.defaultFont = "simkai";
|
|
13177
13348
|
}
|
|
13178
13349
|
/**
|
|
13179
13350
|
* Render MText directly in the main thread
|
|
13180
13351
|
*/
|
|
13181
|
-
async renderMText(e, r, n = {
|
|
13182
|
-
|
|
13352
|
+
async renderMText(e, r, n = {
|
|
13353
|
+
byLayerColor: 16777215,
|
|
13354
|
+
byBlockColor: 16777215
|
|
13355
|
+
}) {
|
|
13356
|
+
const a = new vr(
|
|
13183
13357
|
e,
|
|
13184
13358
|
r,
|
|
13185
13359
|
this.styleManager,
|
|
13186
13360
|
this.fontManager,
|
|
13187
13361
|
n
|
|
13188
13362
|
);
|
|
13189
|
-
return a.updateMatrixWorld(!0), a;
|
|
13363
|
+
return await a.draw(), a.updateMatrixWorld(!0), a;
|
|
13190
13364
|
}
|
|
13191
13365
|
/**
|
|
13192
13366
|
* Load fonts in the main thread
|
|
13193
13367
|
*/
|
|
13194
13368
|
async loadFonts(e) {
|
|
13195
|
-
return await this.
|
|
13369
|
+
return await this.fontManager.loadFontsByNames(e), { loaded: e };
|
|
13196
13370
|
}
|
|
13197
13371
|
/**
|
|
13198
13372
|
* Get available fonts from the main thread
|
|
13199
13373
|
*/
|
|
13200
13374
|
async getAvailableFonts() {
|
|
13201
|
-
return { fonts: await this.
|
|
13375
|
+
return { fonts: await this.fontManager.getAvaiableFonts() };
|
|
13202
13376
|
}
|
|
13203
13377
|
destroy() {
|
|
13204
13378
|
}
|
|
13205
13379
|
}
|
|
13206
13380
|
class Pl {
|
|
13207
13381
|
constructor(e = "main") {
|
|
13208
|
-
this.workerManager = null, this.currentMode = e, this.mainThreadRenderer = new Ul(), this.adapter = this.mainThreadRenderer, e === "worker" && (this.workerManager = new
|
|
13382
|
+
this.workerManager = null, this.currentMode = e, this.mainThreadRenderer = new Ul(), this.adapter = this.mainThreadRenderer, e === "worker" && (this.workerManager = new Sn({}), this.adapter = this.workerManager);
|
|
13209
13383
|
}
|
|
13210
13384
|
/**
|
|
13211
13385
|
* Switch between main thread and worker rendering modes
|
|
@@ -13213,7 +13387,7 @@ class Pl {
|
|
|
13213
13387
|
* @param workerConfig Configuration options for WebWorkerRenderer when switching to worker mode
|
|
13214
13388
|
*/
|
|
13215
13389
|
switchMode(e, r) {
|
|
13216
|
-
this.currentMode !== e && (this.currentMode === "worker" && this.workerManager && (this.workerManager.terminate(), this.workerManager = null), this.currentMode = e, e === "worker" ? (this.workerManager = new
|
|
13390
|
+
this.currentMode !== e && (this.currentMode === "worker" && this.workerManager && (this.workerManager.terminate(), this.workerManager = null), this.currentMode = e, e === "worker" ? (this.workerManager = new Sn(r || {}), this.adapter = this.workerManager) : this.adapter = this.mainThreadRenderer);
|
|
13217
13391
|
}
|
|
13218
13392
|
/**
|
|
13219
13393
|
* Get current rendering mode
|
|
@@ -13224,7 +13398,10 @@ class Pl {
|
|
|
13224
13398
|
/**
|
|
13225
13399
|
* Render MText using the current mode
|
|
13226
13400
|
*/
|
|
13227
|
-
async renderMText(e, r, n = {
|
|
13401
|
+
async renderMText(e, r, n = {
|
|
13402
|
+
byLayerColor: 16777215,
|
|
13403
|
+
byBlockColor: 16777215
|
|
13404
|
+
}) {
|
|
13228
13405
|
return this.adapter.renderMText(e, r, n);
|
|
13229
13406
|
}
|
|
13230
13407
|
/**
|
|
@@ -13247,17 +13424,17 @@ class Pl {
|
|
|
13247
13424
|
}
|
|
13248
13425
|
}
|
|
13249
13426
|
export {
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13427
|
+
kn as BaseFont,
|
|
13428
|
+
Fn as BaseTextShape,
|
|
13429
|
+
yl as DefaultFontLoader,
|
|
13430
|
+
xr as EventManager,
|
|
13254
13431
|
Se as FontFactory,
|
|
13255
13432
|
ke as FontManager,
|
|
13256
|
-
|
|
13257
|
-
|
|
13433
|
+
vr as MText,
|
|
13434
|
+
Tl as MTextAttachmentPoint,
|
|
13258
13435
|
je as MTextFlowDirection,
|
|
13259
13436
|
Ul as MainThreadRenderer,
|
|
13260
13437
|
Ol as StyleManager,
|
|
13261
13438
|
Pl as UnifiedRenderer,
|
|
13262
|
-
|
|
13439
|
+
Sn as WebWorkerRenderer
|
|
13263
13440
|
};
|