@mlightcad/mtext-renderer 0.6.0 → 0.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +524 -0
- package/dist/index.js +692 -686
- package/dist/index.umd.cjs +3 -3
- package/lib/worker/unifiedRenderer.d.ts +15 -18
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as R from "three";
|
|
2
|
-
import { ShapePath as
|
|
2
|
+
import { ShapePath as Fa, ExtrudeGeometry as Ta, BufferGeometry as ot, BufferAttribute as wa } from "three";
|
|
3
3
|
class xr {
|
|
4
4
|
constructor() {
|
|
5
5
|
this.listeners = [];
|
|
@@ -34,7 +34,7 @@ class xr {
|
|
|
34
34
|
n.call(null, e, ...r);
|
|
35
35
|
}
|
|
36
36
|
}
|
|
37
|
-
class
|
|
37
|
+
class Ca {
|
|
38
38
|
constructor() {
|
|
39
39
|
this.cache = /* @__PURE__ */ new Map();
|
|
40
40
|
}
|
|
@@ -90,9 +90,9 @@ class Ea {
|
|
|
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 Ca();
|
|
96
96
|
}
|
|
97
97
|
/**
|
|
98
98
|
* Records an unsupported character in the font.
|
|
@@ -103,7 +103,7 @@ class Fn {
|
|
|
103
103
|
this.unsupportedChars[e] || (this.unsupportedChars[e] = 0), this.unsupportedChars[e]++;
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
class
|
|
106
|
+
class Fn extends R.Shape {
|
|
107
107
|
/**
|
|
108
108
|
* Creates a new instance of BaseTextShape
|
|
109
109
|
* @param char - The character this shape represents */
|
|
@@ -113,7 +113,7 @@ class Tn extends R.Shape {
|
|
|
113
113
|
}
|
|
114
114
|
const Ht = (t, e) => e.some((r) => t instanceof r);
|
|
115
115
|
let br, Sr;
|
|
116
|
-
function
|
|
116
|
+
function Ea() {
|
|
117
117
|
return br || (br = [
|
|
118
118
|
IDBDatabase,
|
|
119
119
|
IDBObjectStore,
|
|
@@ -122,7 +122,7 @@ function Oa() {
|
|
|
122
122
|
IDBTransaction
|
|
123
123
|
]);
|
|
124
124
|
}
|
|
125
|
-
function
|
|
125
|
+
function Oa() {
|
|
126
126
|
return Sr || (Sr = [
|
|
127
127
|
IDBCursor.prototype.advance,
|
|
128
128
|
IDBCursor.prototype.continue,
|
|
@@ -130,7 +130,7 @@ function Ua() {
|
|
|
130
130
|
]);
|
|
131
131
|
}
|
|
132
132
|
const zt = /* @__PURE__ */ new WeakMap(), kt = /* @__PURE__ */ new WeakMap(), yt = /* @__PURE__ */ new WeakMap();
|
|
133
|
-
function
|
|
133
|
+
function Ua(t) {
|
|
134
134
|
const e = new Promise((r, n) => {
|
|
135
135
|
const a = () => {
|
|
136
136
|
t.removeEventListener("success", s), t.removeEventListener("error", i);
|
|
@@ -143,7 +143,7 @@ function La(t) {
|
|
|
143
143
|
});
|
|
144
144
|
return yt.set(e, t), e;
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function La(t) {
|
|
147
147
|
if (zt.has(t))
|
|
148
148
|
return;
|
|
149
149
|
const e = new Promise((r, n) => {
|
|
@@ -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 Ra(t) {
|
|
182
|
+
return Oa().includes(t) ? function(...e) {
|
|
183
183
|
return t.apply(Vt(this), e), Re(this.request);
|
|
184
184
|
} : function(...e) {
|
|
185
185
|
return Re(t.apply(Vt(this), e));
|
|
186
186
|
};
|
|
187
187
|
}
|
|
188
188
|
function Aa(t) {
|
|
189
|
-
return typeof t == "function" ?
|
|
189
|
+
return typeof t == "function" ? Ra(t) : (t instanceof IDBTransaction && La(t), Ht(t, Ea()) ? new Proxy(t, Wt) : t);
|
|
190
190
|
}
|
|
191
191
|
function Re(t) {
|
|
192
192
|
if (t instanceof IDBRequest)
|
|
193
|
-
return
|
|
193
|
+
return Ua(t);
|
|
194
194
|
if (kt.has(t))
|
|
195
195
|
return kt.get(t);
|
|
196
196
|
const e = Aa(t);
|
|
197
197
|
return e !== t && (kt.set(t, e), yt.set(e, t)), e;
|
|
198
198
|
}
|
|
199
199
|
const Vt = (t) => yt.get(t);
|
|
200
|
-
function
|
|
200
|
+
function Ma(t, e, { blocked: r, upgrade: n, blocking: a, terminated: s } = {}) {
|
|
201
201
|
const i = indexedDB.open(t, e), o = Re(i);
|
|
202
202
|
return n && i.addEventListener("upgradeneeded", (u) => {
|
|
203
203
|
n(Re(i.result), u.oldVersion, u.newVersion, Re(i.transaction), u);
|
|
@@ -211,16 +211,16 @@ function Ba(t, e, { blocked: r, upgrade: n, blocking: a, terminated: s } = {}) {
|
|
|
211
211
|
}).catch(() => {
|
|
212
212
|
}), o;
|
|
213
213
|
}
|
|
214
|
-
const
|
|
214
|
+
const Ba = ["get", "getKey", "getAll", "getAllKeys", "count"], Pa = ["put", "add", "delete", "clear"], Ft = /* @__PURE__ */ new Map();
|
|
215
215
|
function kr(t, e) {
|
|
216
216
|
if (!(t instanceof IDBDatabase && !(e in t) && typeof e == "string"))
|
|
217
217
|
return;
|
|
218
218
|
if (Ft.get(e))
|
|
219
219
|
return Ft.get(e);
|
|
220
|
-
const r = e.replace(/FromIndex$/, ""), n = e !== r, a =
|
|
220
|
+
const r = e.replace(/FromIndex$/, ""), n = e !== r, a = 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 || Ba.includes(r))
|
|
224
224
|
)
|
|
225
225
|
return;
|
|
226
226
|
const s = async function(i, ...o) {
|
|
@@ -233,37 +233,37 @@ function kr(t, e) {
|
|
|
233
233
|
};
|
|
234
234
|
return Ft.set(e, s), s;
|
|
235
235
|
}
|
|
236
|
-
|
|
236
|
+
Tn((t) => ({
|
|
237
237
|
...t,
|
|
238
238
|
get: (e, r, n) => kr(e, r) || t.get(e, r, n),
|
|
239
239
|
has: (e, r) => !!kr(e, r) || t.has(e, r)
|
|
240
240
|
}));
|
|
241
|
-
const
|
|
241
|
+
const Ia = ["continue", "continuePrimaryKey", "advance"], Fr = {}, qt = /* @__PURE__ */ new WeakMap(), wn = /* @__PURE__ */ new WeakMap(), Da = {
|
|
242
242
|
get(t, e) {
|
|
243
|
-
if (!
|
|
243
|
+
if (!Ia.includes(e))
|
|
244
244
|
return t[e];
|
|
245
245
|
let r = Fr[e];
|
|
246
246
|
return r || (r = Fr[e] = function(...n) {
|
|
247
|
-
qt.set(this,
|
|
247
|
+
qt.set(this, wn.get(this)[e](...n));
|
|
248
248
|
}), r;
|
|
249
249
|
}
|
|
250
250
|
};
|
|
251
|
-
async function*
|
|
251
|
+
async function* Ga(...t) {
|
|
252
252
|
let e = this;
|
|
253
253
|
if (e instanceof IDBCursor || (e = await e.openCursor(...t)), !e)
|
|
254
254
|
return;
|
|
255
255
|
e = e;
|
|
256
|
-
const r = new Proxy(e,
|
|
257
|
-
for (
|
|
256
|
+
const r = new Proxy(e, Da);
|
|
257
|
+
for (wn.set(r, e), yt.set(r, Vt(e)); e; )
|
|
258
258
|
yield r, e = await (qt.get(r) || e.continue()), qt.delete(r);
|
|
259
259
|
}
|
|
260
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 Tr(e, r) ?
|
|
266
|
+
return Tr(e, r) ? Ga : t.get(e, r, n);
|
|
267
267
|
},
|
|
268
268
|
has(e, r) {
|
|
269
269
|
return Tr(e, r) || t.has(e, r);
|
|
@@ -361,7 +361,7 @@ const Be = {
|
|
|
361
361
|
async getDatabase() {
|
|
362
362
|
if (this.isClosing)
|
|
363
363
|
throw new Error("Cannot perform operation while database is closing");
|
|
364
|
-
return this.db ? this.db : (this.db = await
|
|
364
|
+
return this.db ? this.db : (this.db = await Ma(
|
|
365
365
|
ee.DATABASE_NAME,
|
|
366
366
|
ee.DATABASE_VERSION,
|
|
367
367
|
{
|
|
@@ -402,14 +402,14 @@ const Be = {
|
|
|
402
402
|
};
|
|
403
403
|
ee.DATABASE_NAME = "mlightcad", ee.DATABASE_VERSION = Tt[Tt.length - 1].version;
|
|
404
404
|
let ze = ee;
|
|
405
|
-
const
|
|
406
|
-
const e =
|
|
405
|
+
const Na = (t) => t.substring(t.lastIndexOf(".") + 1), Cn = (t) => t.split("/").pop(), wr = (t) => {
|
|
406
|
+
const e = Cn(t);
|
|
407
407
|
if (e) {
|
|
408
408
|
const r = e.lastIndexOf(".");
|
|
409
409
|
return r === -1 ? e : e.substring(0, r);
|
|
410
410
|
}
|
|
411
411
|
return t;
|
|
412
|
-
},
|
|
412
|
+
}, _a = [
|
|
413
413
|
0,
|
|
414
414
|
16711680,
|
|
415
415
|
16776960,
|
|
@@ -667,19 +667,19 @@ const _a = (t) => t.substring(t.lastIndexOf(".") + 1), En = (t) => t.split("/").
|
|
|
667
667
|
14079702,
|
|
668
668
|
16777215,
|
|
669
669
|
0
|
|
670
|
-
],
|
|
671
|
-
let
|
|
670
|
+
], Ha = (t) => _a[t];
|
|
671
|
+
let za = class {
|
|
672
672
|
constructor(e) {
|
|
673
673
|
this.isFont = !0, this.type = "Font", this.data = e;
|
|
674
674
|
}
|
|
675
675
|
generateShapes(e, r = 100) {
|
|
676
|
-
const n = [], a =
|
|
676
|
+
const n = [], a = Wa(e, r, this.data);
|
|
677
677
|
for (let s = 0, i = a.length; s < i; s++)
|
|
678
678
|
n.push(...a[s].toShapes());
|
|
679
679
|
return n;
|
|
680
680
|
}
|
|
681
681
|
};
|
|
682
|
-
function
|
|
682
|
+
function Wa(t, e, r) {
|
|
683
683
|
const n = Array.from(t), a = e / r.resolution, s = (r.boundingBox.yMax - r.boundingBox.yMin + r.underlineThickness) * a, i = [];
|
|
684
684
|
let o = 0, u = 0;
|
|
685
685
|
for (let l = 0; l < n.length; l++) {
|
|
@@ -688,19 +688,19 @@ function Va(t, e, r) {
|
|
|
688
688
|
`)
|
|
689
689
|
o = 0, u -= s;
|
|
690
690
|
else {
|
|
691
|
-
const f =
|
|
691
|
+
const f = Va(h, a, o, u, r);
|
|
692
692
|
o += f.offsetX, i.push(f.path);
|
|
693
693
|
}
|
|
694
694
|
}
|
|
695
695
|
return i;
|
|
696
696
|
}
|
|
697
|
-
function
|
|
697
|
+
function Va(t, e, r, n, a) {
|
|
698
698
|
const s = a.glyphs[t] || a.glyphs["?"];
|
|
699
699
|
if (!s) {
|
|
700
700
|
console.error('THREE.Font: character "' + t + '" does not exists in font family ' + a.familyName + ".");
|
|
701
701
|
return;
|
|
702
702
|
}
|
|
703
|
-
const i = new
|
|
703
|
+
const i = new Fa();
|
|
704
704
|
let o, u, l, h, f, c, p, d;
|
|
705
705
|
if (s.o) {
|
|
706
706
|
const v = s._cachedOutline || (s._cachedOutline = s.o.split(" "));
|
|
@@ -749,14 +749,14 @@ String.prototype.codePointAt || function() {
|
|
|
749
749
|
writable: !0
|
|
750
750
|
}) : String.prototype.codePointAt = e;
|
|
751
751
|
}();
|
|
752
|
-
var nr = 0,
|
|
752
|
+
var nr = 0, En = -3;
|
|
753
753
|
function Ve() {
|
|
754
754
|
this.table = new Uint16Array(16), this.trans = new Uint16Array(288);
|
|
755
755
|
}
|
|
756
|
-
function
|
|
756
|
+
function qa(t, e) {
|
|
757
757
|
this.source = t, this.sourceIndex = 0, this.tag = 0, this.bitcount = 0, this.dest = e, this.destLen = 0, this.ltree = new Ve(), this.dtree = new Ve();
|
|
758
758
|
}
|
|
759
|
-
var
|
|
759
|
+
var On = new Ve(), Un = new Ve(), ar = new Uint8Array(30), sr = new Uint16Array(30), Ln = new Uint8Array(30), Rn = new Uint16Array(30), Xa = new Uint8Array([
|
|
760
760
|
16,
|
|
761
761
|
17,
|
|
762
762
|
18,
|
|
@@ -786,7 +786,7 @@ function An(t, e, r, n) {
|
|
|
786
786
|
for (s = n, a = 0; a < 30; ++a)
|
|
787
787
|
e[a] = s, s += 1 << t[a];
|
|
788
788
|
}
|
|
789
|
-
function
|
|
789
|
+
function Ya(t, e) {
|
|
790
790
|
var r;
|
|
791
791
|
for (r = 0; r < 7; ++r)
|
|
792
792
|
t.table[r] = 0;
|
|
@@ -815,7 +815,7 @@ function wt(t, e, r, n) {
|
|
|
815
815
|
for (a = 0; a < n; ++a)
|
|
816
816
|
e[r + a] && (t.trans[Er[e[r + a]]++] = a);
|
|
817
817
|
}
|
|
818
|
-
function
|
|
818
|
+
function Za(t) {
|
|
819
819
|
t.bitcount-- || (t.tag = t.source[t.sourceIndex++], t.bitcount = 7);
|
|
820
820
|
var e = t.tag & 1;
|
|
821
821
|
return t.tag >>>= 1, e;
|
|
@@ -837,13 +837,13 @@ function Xt(t, e) {
|
|
|
837
837
|
while (n >= 0);
|
|
838
838
|
return t.tag = s, t.bitcount -= a, e.trans[r + n];
|
|
839
839
|
}
|
|
840
|
-
function
|
|
840
|
+
function ja(t, e, r) {
|
|
841
841
|
var n, a, s, i, o, u;
|
|
842
842
|
for (n = fe(t, 5, 257), a = fe(t, 5, 1), s = fe(t, 4, 4), i = 0; i < 19; ++i)
|
|
843
843
|
ce[i] = 0;
|
|
844
844
|
for (i = 0; i < s; ++i) {
|
|
845
845
|
var l = fe(t, 3, 0);
|
|
846
|
-
ce[
|
|
846
|
+
ce[Xa[i]] = l;
|
|
847
847
|
}
|
|
848
848
|
for (wt(Cr, ce, 0, 19), o = 0; o < n + a; ) {
|
|
849
849
|
var h = Xt(t, Cr);
|
|
@@ -877,48 +877,48 @@ function Or(t, e, r) {
|
|
|
877
877
|
t.dest[t.destLen++] = n;
|
|
878
878
|
else {
|
|
879
879
|
var a, s, i, o;
|
|
880
|
-
for (n -= 257, a = fe(t, ar[n], sr[n]), s = Xt(t, r), i = t.destLen - fe(t,
|
|
880
|
+
for (n -= 257, a = fe(t, ar[n], sr[n]), s = Xt(t, r), i = t.destLen - fe(t, Ln[s], Rn[s]), o = i; o < i + a; ++o)
|
|
881
881
|
t.dest[t.destLen++] = t.dest[o];
|
|
882
882
|
}
|
|
883
883
|
}
|
|
884
884
|
}
|
|
885
|
-
function
|
|
885
|
+
function Ka(t) {
|
|
886
886
|
for (var e, r, n; t.bitcount > 8; )
|
|
887
887
|
t.sourceIndex--, t.bitcount -= 8;
|
|
888
888
|
if (e = t.source[t.sourceIndex + 1], e = 256 * e + t.source[t.sourceIndex], r = t.source[t.sourceIndex + 3], r = 256 * r + t.source[t.sourceIndex + 2], e !== (~r & 65535))
|
|
889
|
-
return
|
|
889
|
+
return En;
|
|
890
890
|
for (t.sourceIndex += 4, n = e; n; --n)
|
|
891
891
|
t.dest[t.destLen++] = t.source[t.sourceIndex++];
|
|
892
892
|
return t.bitcount = 0, nr;
|
|
893
893
|
}
|
|
894
|
-
function
|
|
895
|
-
var r = new
|
|
894
|
+
function Qa(t, e) {
|
|
895
|
+
var r = new qa(t, e), n, a, s;
|
|
896
896
|
do {
|
|
897
|
-
switch (n =
|
|
897
|
+
switch (n = Za(r), a = fe(r, 2, 0), a) {
|
|
898
898
|
case 0:
|
|
899
|
-
s =
|
|
899
|
+
s = Ka(r);
|
|
900
900
|
break;
|
|
901
901
|
case 1:
|
|
902
|
-
s = Or(r,
|
|
902
|
+
s = Or(r, On, Un);
|
|
903
903
|
break;
|
|
904
904
|
case 2:
|
|
905
|
-
|
|
905
|
+
ja(r, r.ltree, r.dtree), s = Or(r, r.ltree, r.dtree);
|
|
906
906
|
break;
|
|
907
907
|
default:
|
|
908
|
-
s =
|
|
908
|
+
s = En;
|
|
909
909
|
}
|
|
910
910
|
if (s !== nr)
|
|
911
911
|
throw new Error("Data error");
|
|
912
912
|
} while (!n);
|
|
913
913
|
return r.destLen < r.dest.length ? typeof r.dest.slice == "function" ? r.dest.slice(0, r.destLen) : r.dest.subarray(0, r.destLen) : r.dest;
|
|
914
914
|
}
|
|
915
|
-
|
|
915
|
+
Ya(On, Un);
|
|
916
916
|
An(ar, sr, 4, 3);
|
|
917
|
-
An(
|
|
917
|
+
An(Ln, Rn, 2, 1);
|
|
918
918
|
ar[28] = 0;
|
|
919
919
|
sr[28] = 258;
|
|
920
|
-
var
|
|
921
|
-
function
|
|
920
|
+
var $a = Qa;
|
|
921
|
+
function Me(t, e, r, n, a) {
|
|
922
922
|
return Math.pow(1 - a, 3) * t + 3 * Math.pow(1 - a, 2) * a * e + 3 * (1 - a) * Math.pow(a, 2) * r + Math.pow(a, 3) * n;
|
|
923
923
|
}
|
|
924
924
|
function we() {
|
|
@@ -945,15 +945,15 @@ we.prototype.addBezier = function(t, e, r, n, a, s, i, o) {
|
|
|
945
945
|
if (p === 0)
|
|
946
946
|
continue;
|
|
947
947
|
var m = -v / p;
|
|
948
|
-
0 < m && m < 1 && (c === 0 && this.addX(
|
|
948
|
+
0 < m && m < 1 && (c === 0 && this.addX(Me(u[c], l[c], h[c], f[c], m)), c === 1 && this.addY(Me(u[c], l[c], h[c], f[c], m)));
|
|
949
949
|
continue;
|
|
950
950
|
}
|
|
951
951
|
var y = Math.pow(p, 2) - 4 * v * d;
|
|
952
952
|
if (!(y < 0)) {
|
|
953
953
|
var b = (-p + Math.sqrt(y)) / (2 * d);
|
|
954
|
-
0 < b && b < 1 && (c === 0 && this.addX(
|
|
954
|
+
0 < b && b < 1 && (c === 0 && this.addX(Me(u[c], l[c], h[c], f[c], b)), c === 1 && this.addY(Me(u[c], l[c], h[c], f[c], b)));
|
|
955
955
|
var x = (-p - Math.sqrt(y)) / (2 * d);
|
|
956
|
-
0 < x && x < 1 && (c === 0 && this.addX(
|
|
956
|
+
0 < x && x < 1 && (c === 0 && this.addX(Me(u[c], l[c], h[c], f[c], x)), c === 1 && this.addY(Me(u[c], l[c], h[c], f[c], x)));
|
|
957
957
|
}
|
|
958
958
|
}
|
|
959
959
|
};
|
|
@@ -1072,13 +1072,13 @@ V.prototype.toDOMElement = function(t) {
|
|
|
1072
1072
|
var e = this.toPathData(t), r = document.createElementNS("http://www.w3.org/2000/svg", "path");
|
|
1073
1073
|
return r.setAttribute("d", e), r;
|
|
1074
1074
|
};
|
|
1075
|
-
function
|
|
1075
|
+
function Mn(t) {
|
|
1076
1076
|
throw new Error(t);
|
|
1077
1077
|
}
|
|
1078
1078
|
function Ur(t, e) {
|
|
1079
|
-
t ||
|
|
1079
|
+
t || Mn(e);
|
|
1080
1080
|
}
|
|
1081
|
-
var U = { fail:
|
|
1081
|
+
var U = { fail: Mn, argument: Ur, assert: Ur }, Lr = 32768, Rr = 2147483648, De = {}, k = {}, L = {};
|
|
1082
1082
|
function le(t) {
|
|
1083
1083
|
return function() {
|
|
1084
1084
|
return t;
|
|
@@ -1256,7 +1256,7 @@ De.MACSTRING = function(t, e, r, n) {
|
|
|
1256
1256
|
return s;
|
|
1257
1257
|
}
|
|
1258
1258
|
};
|
|
1259
|
-
var rt = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), nt,
|
|
1259
|
+
var rt = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), nt, Ja = function(t) {
|
|
1260
1260
|
if (!nt) {
|
|
1261
1261
|
nt = {};
|
|
1262
1262
|
for (var e in Yt)
|
|
@@ -1278,7 +1278,7 @@ var rt = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), nt, es =
|
|
|
1278
1278
|
}
|
|
1279
1279
|
};
|
|
1280
1280
|
k.MACSTRING = function(t, e) {
|
|
1281
|
-
var r =
|
|
1281
|
+
var r = Ja(e);
|
|
1282
1282
|
if (r !== void 0) {
|
|
1283
1283
|
for (var n = [], a = 0; a < t.length; a++) {
|
|
1284
1284
|
var s = t.charCodeAt(a);
|
|
@@ -1296,12 +1296,12 @@ L.MACSTRING = function(t, e) {
|
|
|
1296
1296
|
function Zt(t) {
|
|
1297
1297
|
return t >= -128 && t <= 127;
|
|
1298
1298
|
}
|
|
1299
|
-
function
|
|
1299
|
+
function es(t, e, r) {
|
|
1300
1300
|
for (var n = 0, a = t.length; e < a && n < 64 && t[e] === 0; )
|
|
1301
1301
|
++e, ++n;
|
|
1302
1302
|
return r.push(128 | n - 1), e;
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function ts(t, e, r) {
|
|
1305
1305
|
for (var n = 0, a = t.length, s = e; s < a && n < 64; ) {
|
|
1306
1306
|
var i = t[s];
|
|
1307
1307
|
if (!Zt(i) || i === 0 && s + 1 < a && t[s + 1] === 0)
|
|
@@ -1313,7 +1313,7 @@ function rs(t, e, r) {
|
|
|
1313
1313
|
r.push(t[o] + 256 & 255);
|
|
1314
1314
|
return s;
|
|
1315
1315
|
}
|
|
1316
|
-
function
|
|
1316
|
+
function rs(t, e, r) {
|
|
1317
1317
|
for (var n = 0, a = t.length, s = e; s < a && n < 64; ) {
|
|
1318
1318
|
var i = t[s];
|
|
1319
1319
|
if (i === 0 || Zt(i) && s + 1 < a && Zt(t[s + 1]))
|
|
@@ -1330,7 +1330,7 @@ function ns(t, e, r) {
|
|
|
1330
1330
|
k.VARDELTAS = function(t) {
|
|
1331
1331
|
for (var e = 0, r = []; e < t.length; ) {
|
|
1332
1332
|
var n = t[e];
|
|
1333
|
-
n === 0 ? e =
|
|
1333
|
+
n === 0 ? e = es(t, e, r) : n >= -128 && n <= 127 ? e = ts(t, e, r) : e = rs(t, e, r);
|
|
1334
1334
|
}
|
|
1335
1335
|
return r;
|
|
1336
1336
|
};
|
|
@@ -1570,43 +1570,43 @@ var F = {
|
|
|
1570
1570
|
tableList: jt,
|
|
1571
1571
|
recordList: Xe
|
|
1572
1572
|
};
|
|
1573
|
-
function
|
|
1573
|
+
function Ar(t, e) {
|
|
1574
1574
|
return t.getUint8(e);
|
|
1575
1575
|
}
|
|
1576
1576
|
function dt(t, e) {
|
|
1577
1577
|
return t.getUint16(e, !1);
|
|
1578
1578
|
}
|
|
1579
|
-
function
|
|
1579
|
+
function ns(t, e) {
|
|
1580
1580
|
return t.getInt16(e, !1);
|
|
1581
1581
|
}
|
|
1582
1582
|
function ir(t, e) {
|
|
1583
1583
|
return t.getUint32(e, !1);
|
|
1584
1584
|
}
|
|
1585
|
-
function
|
|
1585
|
+
function Bn(t, e) {
|
|
1586
1586
|
var r = t.getInt16(e, !1), n = t.getUint16(e + 2, !1);
|
|
1587
1587
|
return r + n / 65535;
|
|
1588
1588
|
}
|
|
1589
|
-
function
|
|
1589
|
+
function as(t, e) {
|
|
1590
1590
|
for (var r = "", n = e; n < e + 4; n += 1)
|
|
1591
1591
|
r += String.fromCharCode(t.getInt8(n));
|
|
1592
1592
|
return r;
|
|
1593
1593
|
}
|
|
1594
|
-
function
|
|
1594
|
+
function ss(t, e, r) {
|
|
1595
1595
|
for (var n = 0, a = 0; a < r; a += 1)
|
|
1596
1596
|
n <<= 8, n += t.getUint8(e + a);
|
|
1597
1597
|
return n;
|
|
1598
1598
|
}
|
|
1599
|
-
function
|
|
1599
|
+
function is(t, e, r) {
|
|
1600
1600
|
for (var n = [], a = e; a < r; a += 1)
|
|
1601
1601
|
n.push(t.getUint8(a));
|
|
1602
1602
|
return n;
|
|
1603
1603
|
}
|
|
1604
|
-
function
|
|
1604
|
+
function os(t) {
|
|
1605
1605
|
for (var e = "", r = 0; r < t.length; r += 1)
|
|
1606
1606
|
e += String.fromCharCode(t[r]);
|
|
1607
1607
|
return e;
|
|
1608
1608
|
}
|
|
1609
|
-
var
|
|
1609
|
+
var us = {
|
|
1610
1610
|
byte: 1,
|
|
1611
1611
|
uShort: 2,
|
|
1612
1612
|
short: 2,
|
|
@@ -1648,7 +1648,7 @@ g.prototype.parseULong = function() {
|
|
|
1648
1648
|
};
|
|
1649
1649
|
g.prototype.parseOffset32 = g.prototype.parseULong;
|
|
1650
1650
|
g.prototype.parseFixed = function() {
|
|
1651
|
-
var t =
|
|
1651
|
+
var t = Bn(this.data, this.offset + this.relativeOffset);
|
|
1652
1652
|
return this.relativeOffset += 4, t;
|
|
1653
1653
|
};
|
|
1654
1654
|
g.prototype.parseString = function(t) {
|
|
@@ -1670,7 +1670,7 @@ g.prototype.parseVersion = function(t) {
|
|
|
1670
1670
|
return this.relativeOffset += 4, t === void 0 && (t = 4096), e + r / t / 10;
|
|
1671
1671
|
};
|
|
1672
1672
|
g.prototype.skip = function(t, e) {
|
|
1673
|
-
e === void 0 && (e = 1), this.relativeOffset +=
|
|
1673
|
+
e === void 0 && (e = 1), this.relativeOffset += us[t] * e;
|
|
1674
1674
|
};
|
|
1675
1675
|
g.prototype.parseULongList = function(t) {
|
|
1676
1676
|
t === void 0 && (t = this.parseULong());
|
|
@@ -1853,7 +1853,7 @@ g.uLongList = g.prototype.parseULongList;
|
|
|
1853
1853
|
g.struct = g.prototype.parseStruct;
|
|
1854
1854
|
g.coverage = g.prototype.parseCoverage;
|
|
1855
1855
|
g.classDef = g.prototype.parseClassDef;
|
|
1856
|
-
var
|
|
1856
|
+
var Mr = {
|
|
1857
1857
|
reserved: g.uShort,
|
|
1858
1858
|
reqFeatureIndex: g.uShort,
|
|
1859
1859
|
featureIndexes: g.uShortList
|
|
@@ -1862,10 +1862,10 @@ g.prototype.parseScriptList = function() {
|
|
|
1862
1862
|
return this.parsePointer(g.recordList({
|
|
1863
1863
|
tag: g.tag,
|
|
1864
1864
|
script: g.pointer({
|
|
1865
|
-
defaultLangSys: g.pointer(
|
|
1865
|
+
defaultLangSys: g.pointer(Mr),
|
|
1866
1866
|
langSysRecords: g.recordList({
|
|
1867
1867
|
tag: g.tag,
|
|
1868
|
-
langSys: g.pointer(
|
|
1868
|
+
langSys: g.pointer(Mr)
|
|
1869
1869
|
})
|
|
1870
1870
|
})
|
|
1871
1871
|
})) || [];
|
|
@@ -1904,20 +1904,20 @@ g.prototype.parseFeatureVariationsList = function() {
|
|
|
1904
1904
|
}) || [];
|
|
1905
1905
|
};
|
|
1906
1906
|
var E = {
|
|
1907
|
-
getByte:
|
|
1908
|
-
getCard8:
|
|
1907
|
+
getByte: Ar,
|
|
1908
|
+
getCard8: Ar,
|
|
1909
1909
|
getUShort: dt,
|
|
1910
1910
|
getCard16: dt,
|
|
1911
|
-
getShort:
|
|
1911
|
+
getShort: ns,
|
|
1912
1912
|
getULong: ir,
|
|
1913
|
-
getFixed:
|
|
1914
|
-
getTag:
|
|
1915
|
-
getOffset:
|
|
1916
|
-
getBytes:
|
|
1917
|
-
bytesToString:
|
|
1913
|
+
getFixed: Bn,
|
|
1914
|
+
getTag: as,
|
|
1915
|
+
getOffset: ss,
|
|
1916
|
+
getBytes: is,
|
|
1917
|
+
bytesToString: os,
|
|
1918
1918
|
Parser: g
|
|
1919
1919
|
};
|
|
1920
|
-
function
|
|
1920
|
+
function ls(t, e) {
|
|
1921
1921
|
e.parseUShort(), t.length = e.parseULong(), t.language = e.parseULong();
|
|
1922
1922
|
var r;
|
|
1923
1923
|
t.groupCount = r = e.parseULong(), t.glyphIndexMap = {};
|
|
@@ -1925,7 +1925,7 @@ function hs(t, e) {
|
|
|
1925
1925
|
for (var a = e.parseULong(), s = e.parseULong(), i = e.parseULong(), o = a; o <= s; o += 1)
|
|
1926
1926
|
t.glyphIndexMap[o] = i, i++;
|
|
1927
1927
|
}
|
|
1928
|
-
function
|
|
1928
|
+
function hs(t, e, r, n, a) {
|
|
1929
1929
|
t.length = e.parseUShort(), t.language = e.parseUShort();
|
|
1930
1930
|
var s;
|
|
1931
1931
|
t.segCount = s = e.parseUShort() >> 1, e.skip("uShort", 3), t.glyphIndexMap = {};
|
|
@@ -1933,7 +1933,7 @@ function cs(t, e, r, n, a) {
|
|
|
1933
1933
|
for (var c = void 0, p = i.parseUShort(), d = o.parseUShort(), v = u.parseShort(), m = l.parseUShort(), y = d; y <= p; y += 1)
|
|
1934
1934
|
m !== 0 ? (h = l.offset + l.relativeOffset - 2, h += m, h += (y - d) * 2, c = E.getUShort(r, h), c !== 0 && (c = c + v & 65535)) : c = y + v & 65535, t.glyphIndexMap[y] = c;
|
|
1935
1935
|
}
|
|
1936
|
-
function
|
|
1936
|
+
function cs(t, e) {
|
|
1937
1937
|
var r = {};
|
|
1938
1938
|
r.version = E.getUShort(t, e), U.argument(r.version === 0, "cmap table version should be 0."), r.numTables = E.getUShort(t, e + 2);
|
|
1939
1939
|
for (var n = -1, a = r.numTables - 1; a >= 0; a -= 1) {
|
|
@@ -1947,14 +1947,14 @@ function fs(t, e) {
|
|
|
1947
1947
|
throw new Error("No valid cmap sub-tables found.");
|
|
1948
1948
|
var o = new E.Parser(t, e + n);
|
|
1949
1949
|
if (r.format = o.parseUShort(), r.format === 12)
|
|
1950
|
-
|
|
1950
|
+
ls(r, o);
|
|
1951
1951
|
else if (r.format === 4)
|
|
1952
|
-
|
|
1952
|
+
hs(r, o, t, e, n);
|
|
1953
1953
|
else
|
|
1954
1954
|
throw new Error("Only format 4 and 12 cmap tables are supported (found format " + r.format + ").");
|
|
1955
1955
|
return r;
|
|
1956
1956
|
}
|
|
1957
|
-
function
|
|
1957
|
+
function fs(t, e, r) {
|
|
1958
1958
|
t.segments.push({
|
|
1959
1959
|
end: e,
|
|
1960
1960
|
start: e,
|
|
@@ -1963,7 +1963,7 @@ function ps(t, e, r) {
|
|
|
1963
1963
|
glyphIndex: r
|
|
1964
1964
|
});
|
|
1965
1965
|
}
|
|
1966
|
-
function
|
|
1966
|
+
function ps(t) {
|
|
1967
1967
|
t.segments.push({
|
|
1968
1968
|
end: 65535,
|
|
1969
1969
|
start: 65535,
|
|
@@ -1971,7 +1971,7 @@ function ds(t) {
|
|
|
1971
1971
|
offset: 0
|
|
1972
1972
|
});
|
|
1973
1973
|
}
|
|
1974
|
-
function
|
|
1974
|
+
function ds(t) {
|
|
1975
1975
|
var e = !0, r;
|
|
1976
1976
|
for (r = t.length - 1; r > 0; r -= 1) {
|
|
1977
1977
|
var n = t.get(r);
|
|
@@ -2007,12 +2007,12 @@ function gs(t) {
|
|
|
2007
2007
|
var s = new F.Table("cmap", a);
|
|
2008
2008
|
for (s.segments = [], r = 0; r < t.length; r += 1) {
|
|
2009
2009
|
for (var i = t.get(r), o = 0; o < i.unicodes.length; o += 1)
|
|
2010
|
-
|
|
2010
|
+
fs(s, i.unicodes[o], r);
|
|
2011
2011
|
s.segments = s.segments.sort(function(b, x) {
|
|
2012
2012
|
return b.start - x.start;
|
|
2013
2013
|
});
|
|
2014
2014
|
}
|
|
2015
|
-
|
|
2015
|
+
ps(s);
|
|
2016
2016
|
var u = s.segments.length, l = 0, h = [], f = [], c = [], p = [], d = [], v = [];
|
|
2017
2017
|
for (r = 0; r < u; r += 1) {
|
|
2018
2018
|
var m = s.segments[r];
|
|
@@ -2033,7 +2033,7 @@ function gs(t) {
|
|
|
2033
2033
|
}
|
|
2034
2034
|
return s;
|
|
2035
2035
|
}
|
|
2036
|
-
var
|
|
2036
|
+
var Pn = { parse: cs, make: ds }, ut = [
|
|
2037
2037
|
".notdef",
|
|
2038
2038
|
"space",
|
|
2039
2039
|
"exclam",
|
|
@@ -2425,7 +2425,7 @@ var In = { parse: fs, make: gs }, ut = [
|
|
|
2425
2425
|
"Regular",
|
|
2426
2426
|
"Roman",
|
|
2427
2427
|
"Semibold"
|
|
2428
|
-
],
|
|
2428
|
+
], gs = [
|
|
2429
2429
|
"",
|
|
2430
2430
|
"",
|
|
2431
2431
|
"",
|
|
@@ -2678,7 +2678,7 @@ var In = { parse: fs, make: gs }, ut = [
|
|
|
2678
2678
|
"oslash",
|
|
2679
2679
|
"oe",
|
|
2680
2680
|
"germandbls"
|
|
2681
|
-
],
|
|
2681
|
+
], vs = [
|
|
2682
2682
|
"",
|
|
2683
2683
|
"",
|
|
2684
2684
|
"",
|
|
@@ -3194,10 +3194,10 @@ var In = { parse: fs, make: gs }, ut = [
|
|
|
3194
3194
|
"ccaron",
|
|
3195
3195
|
"dcroat"
|
|
3196
3196
|
];
|
|
3197
|
-
function
|
|
3197
|
+
function In(t) {
|
|
3198
3198
|
this.font = t;
|
|
3199
3199
|
}
|
|
3200
|
-
|
|
3200
|
+
In.prototype.charToGlyphIndex = function(t) {
|
|
3201
3201
|
var e = t.codePointAt(0), r = this.font.glyphs;
|
|
3202
3202
|
if (r) {
|
|
3203
3203
|
for (var n = 0; n < r.length; n += 1)
|
|
@@ -3207,10 +3207,10 @@ Dn.prototype.charToGlyphIndex = function(t) {
|
|
|
3207
3207
|
}
|
|
3208
3208
|
return null;
|
|
3209
3209
|
};
|
|
3210
|
-
function
|
|
3210
|
+
function Dn(t) {
|
|
3211
3211
|
this.cmap = t;
|
|
3212
3212
|
}
|
|
3213
|
-
|
|
3213
|
+
Dn.prototype.charToGlyphIndex = function(t) {
|
|
3214
3214
|
return this.cmap.glyphIndexMap[t.codePointAt(0)] || 0;
|
|
3215
3215
|
};
|
|
3216
3216
|
function gt(t, e) {
|
|
@@ -3249,7 +3249,7 @@ or.prototype.nameToGlyphIndex = function(t) {
|
|
|
3249
3249
|
or.prototype.glyphIndexToName = function(t) {
|
|
3250
3250
|
return this.names[t];
|
|
3251
3251
|
};
|
|
3252
|
-
function
|
|
3252
|
+
function ys(t) {
|
|
3253
3253
|
for (var e, r = t.tables.cmap.glyphIndexMap, n = Object.keys(r), a = 0; a < n.length; a += 1) {
|
|
3254
3254
|
var s = n[a], i = r[s];
|
|
3255
3255
|
e = t.glyphs.get(i), e.addUnicode(parseInt(s));
|
|
@@ -3257,7 +3257,7 @@ function ms(t) {
|
|
|
3257
3257
|
for (var o = 0; o < t.glyphs.length; o += 1)
|
|
3258
3258
|
e = t.glyphs.get(o), t.cffEncoding ? t.isCIDFont ? e.name = "gid" + o : e.name = t.cffEncoding.charset[o] : t.glyphNames.names && (e.name = t.glyphNames.glyphIndexToName(o));
|
|
3259
3259
|
}
|
|
3260
|
-
function
|
|
3260
|
+
function ms(t) {
|
|
3261
3261
|
t._IndexToUnicodeMap = {};
|
|
3262
3262
|
for (var e = t.tables.cmap.glyphIndexMap, r = Object.keys(e), n = 0; n < r.length; n += 1) {
|
|
3263
3263
|
var a = r[n], s = e[a];
|
|
@@ -3266,14 +3266,14 @@ function xs(t) {
|
|
|
3266
3266
|
} : t._IndexToUnicodeMap[s].unicodes.push(parseInt(a));
|
|
3267
3267
|
}
|
|
3268
3268
|
}
|
|
3269
|
-
function
|
|
3270
|
-
e.lowMemory ?
|
|
3269
|
+
function xs(t, e) {
|
|
3270
|
+
e.lowMemory ? ms(t) : ys(t);
|
|
3271
3271
|
}
|
|
3272
|
-
function
|
|
3272
|
+
function bs(t, e, r, n, a) {
|
|
3273
3273
|
t.beginPath(), t.moveTo(e, r), t.lineTo(n, a), t.stroke();
|
|
3274
3274
|
}
|
|
3275
|
-
var Ce = { line:
|
|
3276
|
-
function
|
|
3275
|
+
var Ce = { line: bs };
|
|
3276
|
+
function Ss(t, e) {
|
|
3277
3277
|
var r = e || new V();
|
|
3278
3278
|
return {
|
|
3279
3279
|
configurable: !0,
|
|
@@ -3289,7 +3289,7 @@ function ae(t) {
|
|
|
3289
3289
|
this.bindConstructorValues(t);
|
|
3290
3290
|
}
|
|
3291
3291
|
ae.prototype.bindConstructorValues = function(t) {
|
|
3292
|
-
this.index = t.index || 0, this.name = t.name || null, this.unicode = t.unicode || void 0, this.unicodes = t.unicodes || t.unicode !== void 0 ? [t.unicode] : [], "xMin" in t && (this.xMin = t.xMin), "yMin" in t && (this.yMin = t.yMin), "xMax" in t && (this.xMax = t.xMax), "yMax" in t && (this.yMax = t.yMax), "advanceWidth" in t && (this.advanceWidth = t.advanceWidth), Object.defineProperty(this, "path",
|
|
3292
|
+
this.index = t.index || 0, this.name = t.name || null, this.unicode = t.unicode || void 0, this.unicodes = t.unicodes || t.unicode !== void 0 ? [t.unicode] : [], "xMin" in t && (this.xMin = t.xMin), "yMin" in t && (this.yMin = t.yMin), "xMax" in t && (this.xMax = t.xMax), "yMax" in t && (this.yMax = t.yMax), "advanceWidth" in t && (this.advanceWidth = t.advanceWidth), Object.defineProperty(this, "path", Ss(this, t.path));
|
|
3293
3293
|
};
|
|
3294
3294
|
ae.prototype.addUnicode = function(t) {
|
|
3295
3295
|
this.unicodes.length === 0 && (this.unicode = t), this.unicodes.push(t);
|
|
@@ -3408,10 +3408,10 @@ ur.prototype.get = function(t) {
|
|
|
3408
3408
|
ur.prototype.push = function(t, e) {
|
|
3409
3409
|
this.glyphs[t] = e, this.length++;
|
|
3410
3410
|
};
|
|
3411
|
-
function
|
|
3411
|
+
function ks(t, e) {
|
|
3412
3412
|
return new ae({ index: e, font: t });
|
|
3413
3413
|
}
|
|
3414
|
-
function
|
|
3414
|
+
function Fs(t, e, r, n, a, s) {
|
|
3415
3415
|
return function() {
|
|
3416
3416
|
var i = new ae({ index: e, font: t });
|
|
3417
3417
|
return i.path = function() {
|
|
@@ -3421,7 +3421,7 @@ function Ts(t, e, r, n, a, s) {
|
|
|
3421
3421
|
}, st(i, "xMin", "_xMin"), st(i, "xMax", "_xMax"), st(i, "yMin", "_yMin"), st(i, "yMax", "_yMax"), i;
|
|
3422
3422
|
};
|
|
3423
3423
|
}
|
|
3424
|
-
function
|
|
3424
|
+
function Ts(t, e, r, n) {
|
|
3425
3425
|
return function() {
|
|
3426
3426
|
var a = new ae({ index: e, font: t });
|
|
3427
3427
|
return a.path = function() {
|
|
@@ -3430,15 +3430,15 @@ function ws(t, e, r, n) {
|
|
|
3430
3430
|
}, a;
|
|
3431
3431
|
};
|
|
3432
3432
|
}
|
|
3433
|
-
var ge = { GlyphSet: ur, glyphLoader:
|
|
3434
|
-
function
|
|
3433
|
+
var ge = { GlyphSet: ur, glyphLoader: ks, ttfGlyphLoader: Fs, cffGlyphLoader: Ts };
|
|
3434
|
+
function Gn(t, e) {
|
|
3435
3435
|
if (t === e)
|
|
3436
3436
|
return !0;
|
|
3437
3437
|
if (Array.isArray(t) && Array.isArray(e)) {
|
|
3438
3438
|
if (t.length !== e.length)
|
|
3439
3439
|
return !1;
|
|
3440
3440
|
for (var r = 0; r < t.length; r += 1)
|
|
3441
|
-
if (!
|
|
3441
|
+
if (!Gn(t[r], e[r]))
|
|
3442
3442
|
return !1;
|
|
3443
3443
|
return !0;
|
|
3444
3444
|
} else
|
|
@@ -3464,7 +3464,7 @@ function be(t, e, r) {
|
|
|
3464
3464
|
}
|
|
3465
3465
|
return { objects: a, startOffset: e, endOffset: o };
|
|
3466
3466
|
}
|
|
3467
|
-
function
|
|
3467
|
+
function ws(t, e) {
|
|
3468
3468
|
var r = [], n = E.getCard16(t, e), a, s;
|
|
3469
3469
|
if (n !== 0) {
|
|
3470
3470
|
var i = E.getByte(t, e + 2);
|
|
@@ -3476,7 +3476,7 @@ function Cs(t, e) {
|
|
|
3476
3476
|
s = e + 2;
|
|
3477
3477
|
return { offsets: r, startOffset: e, endOffset: s };
|
|
3478
3478
|
}
|
|
3479
|
-
function
|
|
3479
|
+
function Cs(t, e, r, n, a) {
|
|
3480
3480
|
var s = E.getCard16(r, n), i = 0;
|
|
3481
3481
|
if (s !== 0) {
|
|
3482
3482
|
var o = E.getByte(r, n + 2);
|
|
@@ -3485,7 +3485,7 @@ function Es(t, e, r, n, a) {
|
|
|
3485
3485
|
var u = E.getBytes(r, i + e[t], i + e[t + 1]);
|
|
3486
3486
|
return u;
|
|
3487
3487
|
}
|
|
3488
|
-
function
|
|
3488
|
+
function Es(t) {
|
|
3489
3489
|
for (var e = "", r = 15, n = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "E", "E-", null, "-"]; ; ) {
|
|
3490
3490
|
var a = t.parseByte(), s = a >> 4, i = a & 15;
|
|
3491
3491
|
if (s === r || (e += n[s], i === r))
|
|
@@ -3494,14 +3494,14 @@ function Os(t) {
|
|
|
3494
3494
|
}
|
|
3495
3495
|
return parseFloat(e);
|
|
3496
3496
|
}
|
|
3497
|
-
function
|
|
3497
|
+
function Os(t, e) {
|
|
3498
3498
|
var r, n, a, s;
|
|
3499
3499
|
if (e === 28)
|
|
3500
3500
|
return r = t.parseByte(), n = t.parseByte(), r << 8 | n;
|
|
3501
3501
|
if (e === 29)
|
|
3502
3502
|
return r = t.parseByte(), n = t.parseByte(), a = t.parseByte(), s = t.parseByte(), r << 24 | n << 16 | a << 8 | s;
|
|
3503
3503
|
if (e === 30)
|
|
3504
|
-
return
|
|
3504
|
+
return Es(t);
|
|
3505
3505
|
if (e >= 32 && e <= 246)
|
|
3506
3506
|
return e - 139;
|
|
3507
3507
|
if (e >= 247 && e <= 250)
|
|
@@ -3510,7 +3510,7 @@ function Us(t, e) {
|
|
|
3510
3510
|
return r = t.parseByte(), -(e - 251) * 256 - r - 108;
|
|
3511
3511
|
throw new Error("Invalid b0 " + e);
|
|
3512
3512
|
}
|
|
3513
|
-
function
|
|
3513
|
+
function Us(t) {
|
|
3514
3514
|
for (var e = {}, r = 0; r < t.length; r += 1) {
|
|
3515
3515
|
var n = t[r][0], a = t[r][1], s = void 0;
|
|
3516
3516
|
if (a.length === 1 ? s = a[0] : s = a, e.hasOwnProperty(n) && !isNaN(e[n]))
|
|
@@ -3519,19 +3519,19 @@ function Ls(t) {
|
|
|
3519
3519
|
}
|
|
3520
3520
|
return e;
|
|
3521
3521
|
}
|
|
3522
|
-
function
|
|
3522
|
+
function Nn(t, e, r) {
|
|
3523
3523
|
e = e !== void 0 ? e : 0;
|
|
3524
3524
|
var n = new E.Parser(t, e), a = [], s = [];
|
|
3525
3525
|
for (r = r !== void 0 ? r : t.length; n.relativeOffset < r; ) {
|
|
3526
3526
|
var i = n.parseByte();
|
|
3527
|
-
i <= 21 ? (i === 12 && (i = 1200 + n.parseByte()), a.push([i, s]), s = []) : s.push(
|
|
3527
|
+
i <= 21 ? (i === 12 && (i = 1200 + n.parseByte()), a.push([i, s]), s = []) : s.push(Os(n, i));
|
|
3528
3528
|
}
|
|
3529
|
-
return
|
|
3529
|
+
return Us(a);
|
|
3530
3530
|
}
|
|
3531
3531
|
function We(t, e) {
|
|
3532
3532
|
return e <= 390 ? e = ut[e] : e = t[e - 391], e;
|
|
3533
3533
|
}
|
|
3534
|
-
function
|
|
3534
|
+
function _n(t, e, r) {
|
|
3535
3535
|
for (var n = {}, a, s = 0; s < e.length; s += 1) {
|
|
3536
3536
|
var i = e[s];
|
|
3537
3537
|
if (Array.isArray(i.type)) {
|
|
@@ -3545,11 +3545,11 @@ function Hn(t, e, r) {
|
|
|
3545
3545
|
}
|
|
3546
3546
|
return n;
|
|
3547
3547
|
}
|
|
3548
|
-
function
|
|
3548
|
+
function Ls(t, e) {
|
|
3549
3549
|
var r = {};
|
|
3550
3550
|
return r.formatMajor = E.getCard8(t, e), r.formatMinor = E.getCard8(t, e + 1), r.size = E.getCard8(t, e + 2), r.offsetSize = E.getCard8(t, e + 3), r.startOffset = e, r.endOffset = e + 4, r;
|
|
3551
3551
|
}
|
|
3552
|
-
var
|
|
3552
|
+
var Hn = [
|
|
3553
3553
|
{ name: "version", op: 0, type: "SID" },
|
|
3554
3554
|
{ name: "notice", op: 1, type: "SID" },
|
|
3555
3555
|
{ name: "copyright", op: 1200, type: "SID" },
|
|
@@ -3585,26 +3585,26 @@ var zn = [
|
|
|
3585
3585
|
{ name: "fdArray", op: 1236, type: "offset" },
|
|
3586
3586
|
{ name: "fdSelect", op: 1237, type: "offset" },
|
|
3587
3587
|
{ name: "fontName", op: 1238, type: "SID" }
|
|
3588
|
-
],
|
|
3588
|
+
], zn = [
|
|
3589
3589
|
{ name: "subrs", op: 19, type: "offset", value: 0 },
|
|
3590
3590
|
{ name: "defaultWidthX", op: 20, type: "number", value: 0 },
|
|
3591
3591
|
{ name: "nominalWidthX", op: 21, type: "number", value: 0 }
|
|
3592
3592
|
];
|
|
3593
|
-
function
|
|
3594
|
-
var r =
|
|
3595
|
-
return
|
|
3593
|
+
function Rs(t, e) {
|
|
3594
|
+
var r = Nn(t, 0, t.byteLength);
|
|
3595
|
+
return _n(r, Hn, e);
|
|
3596
3596
|
}
|
|
3597
|
-
function
|
|
3598
|
-
var a =
|
|
3599
|
-
return
|
|
3597
|
+
function Wn(t, e, r, n) {
|
|
3598
|
+
var a = Nn(t, e, r);
|
|
3599
|
+
return _n(a, zn, n);
|
|
3600
3600
|
}
|
|
3601
3601
|
function Br(t, e, r, n) {
|
|
3602
3602
|
for (var a = [], s = 0; s < r.length; s += 1) {
|
|
3603
|
-
var i = new DataView(new Uint8Array(r[s]).buffer), o =
|
|
3603
|
+
var i = new DataView(new Uint8Array(r[s]).buffer), o = Rs(i, n);
|
|
3604
3604
|
o._subrs = [], o._subrsBias = 0, o._defaultWidthX = 0, o._nominalWidthX = 0;
|
|
3605
3605
|
var u = o.private[0], l = o.private[1];
|
|
3606
3606
|
if (u !== 0 && l !== 0) {
|
|
3607
|
-
var h =
|
|
3607
|
+
var h = Wn(t, l + e, u, n);
|
|
3608
3608
|
if (o._defaultWidthX = h.defaultWidthX, o._nominalWidthX = h.nominalWidthX, h.subrs !== 0) {
|
|
3609
3609
|
var f = l + h.subrs, c = be(t, f + e);
|
|
3610
3610
|
o._subrs = c.objects, o._subrsBias = Kt(o._subrs);
|
|
@@ -3638,7 +3638,7 @@ function As(t, e, r, n) {
|
|
|
3638
3638
|
throw new Error("Unknown charset format " + u);
|
|
3639
3639
|
return o;
|
|
3640
3640
|
}
|
|
3641
|
-
function
|
|
3641
|
+
function Ms(t, e, r) {
|
|
3642
3642
|
var n, a = {}, s = new E.Parser(t, e), i = s.parseCard8();
|
|
3643
3643
|
if (i === 0)
|
|
3644
3644
|
for (var o = s.parseCard8(), u = 0; u < o; u += 1)
|
|
@@ -3661,22 +3661,22 @@ function Pr(t, e, r) {
|
|
|
3661
3661
|
} else
|
|
3662
3662
|
d = t.tables.cff.topDict._subrs, v = t.tables.cff.topDict._subrsBias, m = t.tables.cff.topDict._defaultWidthX, y = t.tables.cff.topDict._nominalWidthX;
|
|
3663
3663
|
var T = m;
|
|
3664
|
-
function S(w,
|
|
3665
|
-
f && o.closePath(), o.moveTo(w,
|
|
3664
|
+
function S(w, M) {
|
|
3665
|
+
f && o.closePath(), o.moveTo(w, M), f = !0;
|
|
3666
3666
|
}
|
|
3667
|
-
function
|
|
3667
|
+
function A() {
|
|
3668
3668
|
var w;
|
|
3669
3669
|
w = u.length % 2 !== 0, w && !h && (T = u.shift() + y), l += u.length >> 1, u.length = 0, h = !0;
|
|
3670
3670
|
}
|
|
3671
3671
|
function O(w) {
|
|
3672
|
-
for (var
|
|
3672
|
+
for (var M, N, K, $, Y, I, _, D, W, Z, q, Q, P = 0; P < w.length; ) {
|
|
3673
3673
|
var j = w[P];
|
|
3674
3674
|
switch (P += 1, j) {
|
|
3675
3675
|
case 1:
|
|
3676
|
-
|
|
3676
|
+
A();
|
|
3677
3677
|
break;
|
|
3678
3678
|
case 3:
|
|
3679
|
-
|
|
3679
|
+
A();
|
|
3680
3680
|
break;
|
|
3681
3681
|
case 4:
|
|
3682
3682
|
u.length > 1 && !h && (T = u.shift() + y, h = !0), p += u.pop(), S(c, p);
|
|
@@ -3724,11 +3724,11 @@ function Pr(t, e, r) {
|
|
|
3724
3724
|
u.length > 0 && !h && (T = u.shift() + y, h = !0), f && (o.closePath(), f = !1);
|
|
3725
3725
|
break;
|
|
3726
3726
|
case 18:
|
|
3727
|
-
|
|
3727
|
+
A();
|
|
3728
3728
|
break;
|
|
3729
3729
|
case 19:
|
|
3730
3730
|
case 20:
|
|
3731
|
-
|
|
3731
|
+
A(), P += l + 7 >> 3;
|
|
3732
3732
|
break;
|
|
3733
3733
|
case 21:
|
|
3734
3734
|
u.length > 2 && !h && (T = u.shift() + y, h = !0), p += u.pop(), c += u.pop(), S(c, p);
|
|
@@ -3737,7 +3737,7 @@ function Pr(t, e, r) {
|
|
|
3737
3737
|
u.length > 1 && !h && (T = u.shift() + y, h = !0), c += u.pop(), S(c, p);
|
|
3738
3738
|
break;
|
|
3739
3739
|
case 23:
|
|
3740
|
-
|
|
3740
|
+
A();
|
|
3741
3741
|
break;
|
|
3742
3742
|
case 24:
|
|
3743
3743
|
for (; u.length > 2; )
|
|
@@ -3758,7 +3758,7 @@ function Pr(t, e, r) {
|
|
|
3758
3758
|
n = c + u.shift(), a = p, s = n + u.shift(), i = a + u.shift(), c = s + u.shift(), p = i, o.curveTo(n, a, s, i, c, p);
|
|
3759
3759
|
break;
|
|
3760
3760
|
case 28:
|
|
3761
|
-
|
|
3761
|
+
M = w[P], N = w[P + 1], u.push((M << 24 | N << 16) >> 16), P += 2;
|
|
3762
3762
|
break;
|
|
3763
3763
|
case 29:
|
|
3764
3764
|
Y = u.pop() + t.gsubrsBias, I = t.gsubrs[Y], I && O(I);
|
|
@@ -3772,13 +3772,13 @@ function Pr(t, e, r) {
|
|
|
3772
3772
|
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);
|
|
3773
3773
|
break;
|
|
3774
3774
|
default:
|
|
3775
|
-
j < 32 ? console.log("Glyph " + e.index + ": unknown operator " + j) : j < 247 ? u.push(j - 139) : j < 251 ? (
|
|
3775
|
+
j < 32 ? console.log("Glyph " + e.index + ": unknown operator " + j) : j < 247 ? u.push(j - 139) : j < 251 ? (M = w[P], P += 1, u.push((j - 247) * 256 + M + 108)) : j < 255 ? (M = w[P], P += 1, u.push(-(j - 251) * 256 - M - 108)) : (M = w[P], N = w[P + 1], K = w[P + 2], $ = w[P + 3], P += 4, u.push((M << 24 | N << 16 | K << 8 | $) / 65536));
|
|
3776
3776
|
}
|
|
3777
3777
|
}
|
|
3778
3778
|
}
|
|
3779
3779
|
return O(r), e.advanceWidth = T, o;
|
|
3780
3780
|
}
|
|
3781
|
-
function
|
|
3781
|
+
function Bs(t, e, r, n) {
|
|
3782
3782
|
var a = [], s, i = new E.Parser(t, e), o = i.parseCard8();
|
|
3783
3783
|
if (o === 0)
|
|
3784
3784
|
for (var u = 0; u < r; u++) {
|
|
@@ -3805,9 +3805,9 @@ function Ps(t, e, r, n) {
|
|
|
3805
3805
|
throw new Error("CFF Table CID Font FDSelect table has unsupported format " + o);
|
|
3806
3806
|
return a;
|
|
3807
3807
|
}
|
|
3808
|
-
function
|
|
3808
|
+
function Ps(t, e, r, n) {
|
|
3809
3809
|
r.tables.cff = {};
|
|
3810
|
-
var a =
|
|
3810
|
+
var a = Ls(t, e), s = be(t, a.endOffset, E.bytesToString), i = be(t, s.endOffset), o = be(t, i.endOffset, E.bytesToString), u = be(t, o.endOffset);
|
|
3811
3811
|
r.gsubrs = u.objects, r.gsubrsBias = Kt(r.gsubrs);
|
|
3812
3812
|
var l = Br(t, e, i.objects, o.objects);
|
|
3813
3813
|
if (l.length !== 1)
|
|
@@ -3819,33 +3819,33 @@ function Is(t, e, r, n) {
|
|
|
3819
3819
|
throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
|
|
3820
3820
|
f += e;
|
|
3821
3821
|
var p = be(t, f), d = Br(t, e, p.objects, o.objects);
|
|
3822
|
-
h._fdArray = d, c += e, h._fdSelect =
|
|
3822
|
+
h._fdArray = d, c += e, h._fdSelect = Bs(t, c, r.numGlyphs, d.length);
|
|
3823
3823
|
}
|
|
3824
|
-
var v = e + h.private[1], m =
|
|
3824
|
+
var v = e + h.private[1], m = Wn(t, v, h.private[0], o.objects);
|
|
3825
3825
|
if (r.defaultWidthX = m.defaultWidthX, r.nominalWidthX = m.nominalWidthX, m.subrs !== 0) {
|
|
3826
3826
|
var y = v + m.subrs, b = be(t, y);
|
|
3827
3827
|
r.subrs = b.objects, r.subrsBias = Kt(r.subrs);
|
|
3828
3828
|
} else
|
|
3829
3829
|
r.subrs = [], r.subrsBias = 0;
|
|
3830
3830
|
var x;
|
|
3831
|
-
n.lowMemory ? (x =
|
|
3831
|
+
n.lowMemory ? (x = ws(t, e + h.charStrings), r.nGlyphs = x.offsets.length) : (x = be(t, e + h.charStrings), r.nGlyphs = x.objects.length);
|
|
3832
3832
|
var T = As(t, e + h.charset, r.nGlyphs, o.objects);
|
|
3833
|
-
if (h.encoding === 0 ? r.cffEncoding = new gt(
|
|
3833
|
+
if (h.encoding === 0 ? r.cffEncoding = new gt(gs, T) : h.encoding === 1 ? r.cffEncoding = new gt(vs, T) : r.cffEncoding = Ms(t, e + h.encoding, T), r.encoding = r.encoding || r.cffEncoding, r.glyphs = new ge.GlyphSet(r), n.lowMemory)
|
|
3834
3834
|
r._push = function(O) {
|
|
3835
|
-
var w =
|
|
3835
|
+
var w = Cs(O, x.offsets, t, e + h.charStrings);
|
|
3836
3836
|
r.glyphs.push(O, ge.cffGlyphLoader(r, O, Pr, w));
|
|
3837
3837
|
};
|
|
3838
3838
|
else
|
|
3839
3839
|
for (var S = 0; S < r.nGlyphs; S += 1) {
|
|
3840
|
-
var
|
|
3841
|
-
r.glyphs.push(S, ge.cffGlyphLoader(r, S, Pr,
|
|
3840
|
+
var A = x.objects[S];
|
|
3841
|
+
r.glyphs.push(S, ge.cffGlyphLoader(r, S, Pr, A));
|
|
3842
3842
|
}
|
|
3843
3843
|
}
|
|
3844
|
-
function
|
|
3844
|
+
function Vn(t, e) {
|
|
3845
3845
|
var r, n = ut.indexOf(t);
|
|
3846
3846
|
return n >= 0 && (r = n), n = e.indexOf(t), n >= 0 ? r = n + ut.length : (r = ut.length + e.length, e.push(t)), r;
|
|
3847
3847
|
}
|
|
3848
|
-
function
|
|
3848
|
+
function Is() {
|
|
3849
3849
|
return new F.Record("Header", [
|
|
3850
3850
|
{ name: "major", type: "Card8", value: 1 },
|
|
3851
3851
|
{ name: "minor", type: "Card8", value: 0 },
|
|
@@ -3853,7 +3853,7 @@ function Ds() {
|
|
|
3853
3853
|
{ name: "major", type: "Card8", value: 1 }
|
|
3854
3854
|
]);
|
|
3855
3855
|
}
|
|
3856
|
-
function
|
|
3856
|
+
function Ds(t) {
|
|
3857
3857
|
var e = new F.Record("Name INDEX", [
|
|
3858
3858
|
{ name: "names", type: "INDEX", value: [] }
|
|
3859
3859
|
]);
|
|
@@ -3862,10 +3862,10 @@ function Gs(t) {
|
|
|
3862
3862
|
e.names.push({ name: "name_" + r, type: "NAME", value: t[r] });
|
|
3863
3863
|
return e;
|
|
3864
3864
|
}
|
|
3865
|
-
function
|
|
3865
|
+
function qn(t, e, r) {
|
|
3866
3866
|
for (var n = {}, a = 0; a < t.length; a += 1) {
|
|
3867
3867
|
var s = t[a], i = e[s.name];
|
|
3868
|
-
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 });
|
|
3869
3869
|
}
|
|
3870
3870
|
return n;
|
|
3871
3871
|
}
|
|
@@ -3873,7 +3873,7 @@ function Ir(t, e) {
|
|
|
3873
3873
|
var r = new F.Record("Top DICT", [
|
|
3874
3874
|
{ name: "dict", type: "DICT", value: {} }
|
|
3875
3875
|
]);
|
|
3876
|
-
return r.dict =
|
|
3876
|
+
return r.dict = qn(Hn, t, e), r;
|
|
3877
3877
|
}
|
|
3878
3878
|
function Dr(t) {
|
|
3879
3879
|
var e = new F.Record("Top DICT INDEX", [
|
|
@@ -3881,7 +3881,7 @@ function Dr(t) {
|
|
|
3881
3881
|
]);
|
|
3882
3882
|
return e.topDicts = [{ name: "topDict_0", type: "TABLE", value: t }], e;
|
|
3883
3883
|
}
|
|
3884
|
-
function
|
|
3884
|
+
function Gs(t) {
|
|
3885
3885
|
var e = new F.Record("String INDEX", [
|
|
3886
3886
|
{ name: "strings", type: "INDEX", value: [] }
|
|
3887
3887
|
]);
|
|
@@ -3890,21 +3890,21 @@ function Ns(t) {
|
|
|
3890
3890
|
e.strings.push({ name: "string_" + r, type: "STRING", value: t[r] });
|
|
3891
3891
|
return e;
|
|
3892
3892
|
}
|
|
3893
|
-
function
|
|
3893
|
+
function Ns() {
|
|
3894
3894
|
return new F.Record("Global Subr INDEX", [
|
|
3895
3895
|
{ name: "subrs", type: "INDEX", value: [] }
|
|
3896
3896
|
]);
|
|
3897
3897
|
}
|
|
3898
|
-
function
|
|
3898
|
+
function _s(t, e) {
|
|
3899
3899
|
for (var r = new F.Record("Charsets", [
|
|
3900
3900
|
{ name: "format", type: "Card8", value: 0 }
|
|
3901
3901
|
]), n = 0; n < t.length; n += 1) {
|
|
3902
|
-
var a = t[n], s =
|
|
3902
|
+
var a = t[n], s = Vn(a, e);
|
|
3903
3903
|
r.fields.push({ name: "glyph_" + n, type: "SID", value: s });
|
|
3904
3904
|
}
|
|
3905
3905
|
return r;
|
|
3906
3906
|
}
|
|
3907
|
-
function
|
|
3907
|
+
function Hs(t) {
|
|
3908
3908
|
var e = [], r = t.path;
|
|
3909
3909
|
e.push({ name: "width", type: "NUMBER", value: t.advanceWidth });
|
|
3910
3910
|
for (var n = 0, a = 0, s = 0; s < r.commands.length; s += 1) {
|
|
@@ -3932,22 +3932,22 @@ function zs(t) {
|
|
|
3932
3932
|
}
|
|
3933
3933
|
return e.push({ name: "endchar", type: "OP", value: 14 }), e;
|
|
3934
3934
|
}
|
|
3935
|
-
function
|
|
3935
|
+
function zs(t) {
|
|
3936
3936
|
for (var e = new F.Record("CharStrings INDEX", [
|
|
3937
3937
|
{ name: "charStrings", type: "INDEX", value: [] }
|
|
3938
3938
|
]), r = 0; r < t.length; r += 1) {
|
|
3939
|
-
var n = t.get(r), a =
|
|
3939
|
+
var n = t.get(r), a = Hs(n);
|
|
3940
3940
|
e.charStrings.push({ name: n.name, type: "CHARSTRING", value: a });
|
|
3941
3941
|
}
|
|
3942
3942
|
return e;
|
|
3943
3943
|
}
|
|
3944
|
-
function
|
|
3944
|
+
function Ws(t, e) {
|
|
3945
3945
|
var r = new F.Record("Private DICT", [
|
|
3946
3946
|
{ name: "dict", type: "DICT", value: {} }
|
|
3947
3947
|
]);
|
|
3948
|
-
return r.dict =
|
|
3948
|
+
return r.dict = qn(zn, t, e), r;
|
|
3949
3949
|
}
|
|
3950
|
-
function
|
|
3950
|
+
function Vs(t, e) {
|
|
3951
3951
|
for (var r = new F.Table("CFF ", [
|
|
3952
3952
|
{ name: "header", type: "RECORD" },
|
|
3953
3953
|
{ name: "nameIndex", type: "RECORD" },
|
|
@@ -3971,18 +3971,18 @@ function qs(t, e) {
|
|
|
3971
3971
|
}, s = {}, i = [], o, u = 1; u < t.length; u += 1)
|
|
3972
3972
|
o = t.get(u), i.push(o.name);
|
|
3973
3973
|
var l = [];
|
|
3974
|
-
r.header =
|
|
3974
|
+
r.header = Is(), r.nameIndex = Ds([e.postScriptName]);
|
|
3975
3975
|
var h = Ir(a, l);
|
|
3976
|
-
r.topDictIndex = Dr(h), r.globalSubrIndex =
|
|
3976
|
+
r.topDictIndex = Dr(h), r.globalSubrIndex = Ns(), r.charsets = _s(i, l), r.charStringsIndex = zs(t), r.privateDict = Ws(s, l), r.stringIndex = Gs(l);
|
|
3977
3977
|
var f = r.header.sizeOf() + r.nameIndex.sizeOf() + r.topDictIndex.sizeOf() + r.stringIndex.sizeOf() + r.globalSubrIndex.sizeOf();
|
|
3978
3978
|
return a.charset = f, a.encoding = 0, a.charStrings = a.charset + r.charsets.sizeOf(), a.private[1] = a.charStrings + r.charStringsIndex.sizeOf(), h = Ir(a, l), r.topDictIndex = Dr(h), r;
|
|
3979
3979
|
}
|
|
3980
|
-
var
|
|
3981
|
-
function
|
|
3980
|
+
var Xn = { parse: Ps, make: Vs };
|
|
3981
|
+
function qs(t, e) {
|
|
3982
3982
|
var r = {}, n = new E.Parser(t, e);
|
|
3983
3983
|
return r.version = n.parseVersion(), r.fontRevision = Math.round(n.parseFixed() * 1e3) / 1e3, r.checkSumAdjustment = n.parseULong(), r.magicNumber = n.parseULong(), U.argument(r.magicNumber === 1594834165, "Font header has wrong magic number."), r.flags = n.parseUShort(), r.unitsPerEm = n.parseUShort(), r.created = n.parseLongDateTime(), r.modified = n.parseLongDateTime(), r.xMin = n.parseShort(), r.yMin = n.parseShort(), r.xMax = n.parseShort(), r.yMax = n.parseShort(), r.macStyle = n.parseUShort(), r.lowestRecPPEM = n.parseUShort(), r.fontDirectionHint = n.parseShort(), r.indexToLocFormat = n.parseShort(), r.glyphDataFormat = n.parseShort(), r;
|
|
3984
3984
|
}
|
|
3985
|
-
function
|
|
3985
|
+
function Xs(t) {
|
|
3986
3986
|
var e = Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3) + 2082844800, r = e;
|
|
3987
3987
|
return t.createdTimestamp && (r = t.createdTimestamp + 2082844800), new F.Table("head", [
|
|
3988
3988
|
{ name: "version", type: "FIXED", value: 65536 },
|
|
@@ -4004,12 +4004,12 @@ function Ys(t) {
|
|
|
4004
4004
|
{ name: "glyphDataFormat", type: "SHORT", value: 0 }
|
|
4005
4005
|
], t);
|
|
4006
4006
|
}
|
|
4007
|
-
var
|
|
4008
|
-
function
|
|
4007
|
+
var Yn = { parse: qs, make: Xs };
|
|
4008
|
+
function Ys(t, e) {
|
|
4009
4009
|
var r = {}, n = new E.Parser(t, e);
|
|
4010
4010
|
return r.version = n.parseVersion(), r.ascender = n.parseShort(), r.descender = n.parseShort(), r.lineGap = n.parseShort(), r.advanceWidthMax = n.parseUShort(), r.minLeftSideBearing = n.parseShort(), r.minRightSideBearing = n.parseShort(), r.xMaxExtent = n.parseShort(), r.caretSlopeRise = n.parseShort(), r.caretSlopeRun = n.parseShort(), r.caretOffset = n.parseShort(), n.relativeOffset += 8, r.metricDataFormat = n.parseShort(), r.numberOfHMetrics = n.parseUShort(), r;
|
|
4011
4011
|
}
|
|
4012
|
-
function
|
|
4012
|
+
function Zs(t) {
|
|
4013
4013
|
return new F.Table("hhea", [
|
|
4014
4014
|
{ name: "version", type: "FIXED", value: 65536 },
|
|
4015
4015
|
{ name: "ascender", type: "FWORD", value: 0 },
|
|
@@ -4030,15 +4030,15 @@ function js(t) {
|
|
|
4030
4030
|
{ name: "numberOfHMetrics", type: "USHORT", value: 0 }
|
|
4031
4031
|
], t);
|
|
4032
4032
|
}
|
|
4033
|
-
var
|
|
4034
|
-
function
|
|
4033
|
+
var Zn = { parse: Ys, make: Zs };
|
|
4034
|
+
function js(t, e, r, n, a) {
|
|
4035
4035
|
for (var s, i, o = new E.Parser(t, e), u = 0; u < n; u += 1) {
|
|
4036
4036
|
u < r && (s = o.parseUShort(), i = o.parseShort());
|
|
4037
4037
|
var l = a.get(u);
|
|
4038
4038
|
l.advanceWidth = s, l.leftSideBearing = i;
|
|
4039
4039
|
}
|
|
4040
4040
|
}
|
|
4041
|
-
function
|
|
4041
|
+
function Ks(t, e, r, n, a) {
|
|
4042
4042
|
t._hmtxTableData = {};
|
|
4043
4043
|
for (var s, i, o = new E.Parser(e, r), u = 0; u < a; u += 1)
|
|
4044
4044
|
u < n && (s = o.parseUShort(), i = o.parseShort()), t._hmtxTableData[u] = {
|
|
@@ -4046,18 +4046,18 @@ function Qs(t, e, r, n, a) {
|
|
|
4046
4046
|
leftSideBearing: i
|
|
4047
4047
|
};
|
|
4048
4048
|
}
|
|
4049
|
-
function
|
|
4050
|
-
i.lowMemory ?
|
|
4049
|
+
function Qs(t, e, r, n, a, s, i) {
|
|
4050
|
+
i.lowMemory ? Ks(t, e, r, n, a) : js(e, r, n, a, s);
|
|
4051
4051
|
}
|
|
4052
|
-
function
|
|
4052
|
+
function $s(t) {
|
|
4053
4053
|
for (var e = new F.Table("hmtx", []), r = 0; r < t.length; r += 1) {
|
|
4054
4054
|
var n = t.get(r), a = n.advanceWidth || 0, s = n.leftSideBearing || 0;
|
|
4055
4055
|
e.fields.push({ name: "advanceWidth_" + r, type: "USHORT", value: a }), e.fields.push({ name: "leftSideBearing_" + r, type: "SHORT", value: s });
|
|
4056
4056
|
}
|
|
4057
4057
|
return e;
|
|
4058
4058
|
}
|
|
4059
|
-
var
|
|
4060
|
-
function
|
|
4059
|
+
var jn = { parse: Qs, make: $s };
|
|
4060
|
+
function Js(t) {
|
|
4061
4061
|
for (var e = new F.Table("ltag", [
|
|
4062
4062
|
{ name: "version", type: "ULONG", value: 1 },
|
|
4063
4063
|
{ name: "flags", type: "ULONG", value: 0 },
|
|
@@ -4068,7 +4068,7 @@ function ei(t) {
|
|
|
4068
4068
|
}
|
|
4069
4069
|
return e.fields.push({ name: "stringPool", type: "CHARARRAY", value: r }), e;
|
|
4070
4070
|
}
|
|
4071
|
-
function
|
|
4071
|
+
function ei(t, e) {
|
|
4072
4072
|
var r = new E.Parser(t, e), n = r.parseULong();
|
|
4073
4073
|
U.argument(n === 1, "Unsupported ltag table version."), r.skip("uLong", 1);
|
|
4074
4074
|
for (var a = r.parseULong(), s = [], i = 0; i < a; i++) {
|
|
@@ -4078,18 +4078,18 @@ function ti(t, e) {
|
|
|
4078
4078
|
}
|
|
4079
4079
|
return s;
|
|
4080
4080
|
}
|
|
4081
|
-
var
|
|
4082
|
-
function
|
|
4081
|
+
var Kn = { make: Js, parse: ei };
|
|
4082
|
+
function ti(t, e) {
|
|
4083
4083
|
var r = {}, n = new E.Parser(t, e);
|
|
4084
4084
|
return r.version = n.parseVersion(), r.numGlyphs = n.parseUShort(), r.version === 1 && (r.maxPoints = n.parseUShort(), r.maxContours = n.parseUShort(), r.maxCompositePoints = n.parseUShort(), r.maxCompositeContours = n.parseUShort(), r.maxZones = n.parseUShort(), r.maxTwilightPoints = n.parseUShort(), r.maxStorage = n.parseUShort(), r.maxFunctionDefs = n.parseUShort(), r.maxInstructionDefs = n.parseUShort(), r.maxStackElements = n.parseUShort(), r.maxSizeOfInstructions = n.parseUShort(), r.maxComponentElements = n.parseUShort(), r.maxComponentDepth = n.parseUShort()), r;
|
|
4085
4085
|
}
|
|
4086
|
-
function
|
|
4086
|
+
function ri(t) {
|
|
4087
4087
|
return new F.Table("maxp", [
|
|
4088
4088
|
{ name: "version", type: "FIXED", value: 20480 },
|
|
4089
4089
|
{ name: "numGlyphs", type: "USHORT", value: t }
|
|
4090
4090
|
]);
|
|
4091
4091
|
}
|
|
4092
|
-
var
|
|
4092
|
+
var Qn = { parse: ti, make: ri }, $n = [
|
|
4093
4093
|
"copyright",
|
|
4094
4094
|
// 0
|
|
4095
4095
|
"fontFamily",
|
|
@@ -4136,7 +4136,7 @@ var $n = { parse: ri, make: ni }, Jn = [
|
|
|
4136
4136
|
// 21
|
|
4137
4137
|
"wwsSubfamily"
|
|
4138
4138
|
// 22
|
|
4139
|
-
],
|
|
4139
|
+
], Jn = {
|
|
4140
4140
|
0: "en",
|
|
4141
4141
|
1: "fr",
|
|
4142
4142
|
2: "de",
|
|
@@ -4256,7 +4256,7 @@ var $n = { parse: ri, make: ni }, Jn = [
|
|
|
4256
4256
|
149: "kl",
|
|
4257
4257
|
150: "az",
|
|
4258
4258
|
151: "nn"
|
|
4259
|
-
},
|
|
4259
|
+
}, ni = {
|
|
4260
4260
|
0: 0,
|
|
4261
4261
|
// langEnglish → smRoman
|
|
4262
4262
|
1: 0,
|
|
@@ -4495,7 +4495,7 @@ var $n = { parse: ri, make: ni }, Jn = [
|
|
|
4495
4495
|
// langAzerbaijanRoman → smRoman
|
|
4496
4496
|
151: 0
|
|
4497
4497
|
// langNynorsk → smRoman
|
|
4498
|
-
},
|
|
4498
|
+
}, ea = {
|
|
4499
4499
|
1078: "af",
|
|
4500
4500
|
1052: "sq",
|
|
4501
4501
|
1156: "gsw",
|
|
@@ -4709,7 +4709,7 @@ var $n = { parse: ri, make: ni }, Jn = [
|
|
|
4709
4709
|
1144: "ii",
|
|
4710
4710
|
1130: "yo"
|
|
4711
4711
|
};
|
|
4712
|
-
function
|
|
4712
|
+
function ai(t, e, r) {
|
|
4713
4713
|
switch (t) {
|
|
4714
4714
|
case 0:
|
|
4715
4715
|
if (e === 65535)
|
|
@@ -4718,12 +4718,12 @@ function si(t, e, r) {
|
|
|
4718
4718
|
return r[e];
|
|
4719
4719
|
break;
|
|
4720
4720
|
case 1:
|
|
4721
|
-
return
|
|
4721
|
+
return Jn[e];
|
|
4722
4722
|
case 3:
|
|
4723
|
-
return
|
|
4723
|
+
return ea[e];
|
|
4724
4724
|
}
|
|
4725
4725
|
}
|
|
4726
|
-
var Qt = "utf-16",
|
|
4726
|
+
var Qt = "utf-16", si = {
|
|
4727
4727
|
0: "macintosh",
|
|
4728
4728
|
// smRoman
|
|
4729
4729
|
1: "x-mac-japanese",
|
|
@@ -4782,7 +4782,7 @@ var Qt = "utf-16", ii = {
|
|
|
4782
4782
|
// smVietnamese
|
|
4783
4783
|
31: "x-mac-extarabic"
|
|
4784
4784
|
// smExtArabic
|
|
4785
|
-
},
|
|
4785
|
+
}, ii = {
|
|
4786
4786
|
15: "x-mac-icelandic",
|
|
4787
4787
|
// langIcelandic
|
|
4788
4788
|
17: "x-mac-turkish",
|
|
@@ -4814,21 +4814,21 @@ var Qt = "utf-16", ii = {
|
|
|
4814
4814
|
146: "x-mac-gaelic"
|
|
4815
4815
|
// langIrishGaelicScript
|
|
4816
4816
|
};
|
|
4817
|
-
function
|
|
4817
|
+
function ta(t, e, r) {
|
|
4818
4818
|
switch (t) {
|
|
4819
4819
|
case 0:
|
|
4820
4820
|
return Qt;
|
|
4821
4821
|
case 1:
|
|
4822
|
-
return
|
|
4822
|
+
return ii[r] || si[e];
|
|
4823
4823
|
case 3:
|
|
4824
4824
|
if (e === 1 || e === 10)
|
|
4825
4825
|
return Qt;
|
|
4826
4826
|
break;
|
|
4827
4827
|
}
|
|
4828
4828
|
}
|
|
4829
|
-
function
|
|
4829
|
+
function oi(t, e, r) {
|
|
4830
4830
|
for (var n = {}, a = new E.Parser(t, e), s = a.parseUShort(), i = a.parseUShort(), o = a.offset + a.parseUShort(), u = 0; u < i; u++) {
|
|
4831
|
-
var l = a.parseUShort(), h = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p =
|
|
4831
|
+
var l = a.parseUShort(), h = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p = $n[c] || c, d = a.parseUShort(), v = a.parseUShort(), m = ai(l, f, r), y = ta(l, h, f);
|
|
4832
4832
|
if (y !== void 0 && m !== void 0) {
|
|
4833
4833
|
var b = void 0;
|
|
4834
4834
|
if (y === Qt ? b = De.UTF16(t, o + v, d) : b = De.MACSTRING(t, o + v, d, y), b) {
|
|
@@ -4855,7 +4855,7 @@ function Gr(t, e, r, n, a, s) {
|
|
|
4855
4855
|
{ name: "offset", type: "USHORT", value: s }
|
|
4856
4856
|
]);
|
|
4857
4857
|
}
|
|
4858
|
-
function
|
|
4858
|
+
function ui(t, e) {
|
|
4859
4859
|
var r = t.length, n = e.length - r + 1;
|
|
4860
4860
|
e:
|
|
4861
4861
|
for (var a = 0; a < n; a++)
|
|
@@ -4868,7 +4868,7 @@ function li(t, e) {
|
|
|
4868
4868
|
return -1;
|
|
4869
4869
|
}
|
|
4870
4870
|
function Nr(t, e) {
|
|
4871
|
-
var r =
|
|
4871
|
+
var r = ui(t, e);
|
|
4872
4872
|
if (r < 0) {
|
|
4873
4873
|
r = e.length;
|
|
4874
4874
|
for (var n = 0, a = t.length; n < a; ++n)
|
|
@@ -4876,19 +4876,19 @@ function Nr(t, e) {
|
|
|
4876
4876
|
}
|
|
4877
4877
|
return r;
|
|
4878
4878
|
}
|
|
4879
|
-
function
|
|
4880
|
-
var r, n = [], a = {}, s = Ct(
|
|
4879
|
+
function li(t, e) {
|
|
4880
|
+
var r, n = [], a = {}, s = Ct($n);
|
|
4881
4881
|
for (var i in t) {
|
|
4882
4882
|
var o = s[i];
|
|
4883
4883
|
if (o === void 0 && (o = i), r = parseInt(o), isNaN(r))
|
|
4884
4884
|
throw new Error('Name table entry "' + i + '" does not exist, see nameTableNames for complete list.');
|
|
4885
4885
|
a[r] = t[i], n.push(r);
|
|
4886
4886
|
}
|
|
4887
|
-
for (var u = Ct(
|
|
4887
|
+
for (var u = Ct(Jn), l = Ct(ea), h = [], f = [], c = 0; c < n.length; c++) {
|
|
4888
4888
|
r = n[c];
|
|
4889
4889
|
var p = a[r];
|
|
4890
4890
|
for (var d in p) {
|
|
4891
|
-
var v = p[d], m = 1, y = u[d], b =
|
|
4891
|
+
var v = p[d], m = 1, y = u[d], b = ni[y], x = ta(m, b, y), T = k.MACSTRING(v, x);
|
|
4892
4892
|
T === void 0 && (m = 0, y = e.indexOf(d), y < 0 && (y = e.length, e.push(d)), b = 4, T = k.UTF16(v));
|
|
4893
4893
|
var S = Nr(T, f);
|
|
4894
4894
|
h.push(Gr(
|
|
@@ -4899,13 +4899,13 @@ function hi(t, e) {
|
|
|
4899
4899
|
T.length,
|
|
4900
4900
|
S
|
|
4901
4901
|
));
|
|
4902
|
-
var
|
|
4903
|
-
if (
|
|
4902
|
+
var A = l[d];
|
|
4903
|
+
if (A !== void 0) {
|
|
4904
4904
|
var O = k.UTF16(v), w = Nr(O, f);
|
|
4905
4905
|
h.push(Gr(
|
|
4906
4906
|
3,
|
|
4907
4907
|
1,
|
|
4908
|
-
|
|
4908
|
+
A,
|
|
4909
4909
|
r,
|
|
4910
4910
|
O.length,
|
|
4911
4911
|
w
|
|
@@ -4916,15 +4916,15 @@ function hi(t, e) {
|
|
|
4916
4916
|
h.sort(function(K, $) {
|
|
4917
4917
|
return K.platformID - $.platformID || K.encodingID - $.encodingID || K.languageID - $.languageID || K.nameID - $.nameID;
|
|
4918
4918
|
});
|
|
4919
|
-
for (var
|
|
4919
|
+
for (var M = new F.Table("name", [
|
|
4920
4920
|
{ name: "format", type: "USHORT", value: 0 },
|
|
4921
4921
|
{ name: "count", type: "USHORT", value: h.length },
|
|
4922
4922
|
{ name: "stringOffset", type: "USHORT", value: 6 + h.length * 12 }
|
|
4923
4923
|
]), N = 0; N < h.length; N++)
|
|
4924
|
-
|
|
4925
|
-
return
|
|
4924
|
+
M.fields.push({ name: "record_" + N, type: "RECORD", value: h[N] });
|
|
4925
|
+
return M.fields.push({ name: "strings", type: "LITERAL", value: f }), M;
|
|
4926
4926
|
}
|
|
4927
|
-
var
|
|
4927
|
+
var ra = { parse: oi, make: li }, $t = [
|
|
4928
4928
|
{ begin: 0, end: 127 },
|
|
4929
4929
|
// Basic Latin
|
|
4930
4930
|
{ begin: 128, end: 255 },
|
|
@@ -5172,7 +5172,7 @@ var na = { parse: ui, make: hi }, $t = [
|
|
|
5172
5172
|
{ begin: 127024, end: 127135 }
|
|
5173
5173
|
// Domino Tiles
|
|
5174
5174
|
];
|
|
5175
|
-
function
|
|
5175
|
+
function hi(t) {
|
|
5176
5176
|
for (var e = 0; e < $t.length; e += 1) {
|
|
5177
5177
|
var r = $t[e];
|
|
5178
5178
|
if (t >= r.begin && t < r.end)
|
|
@@ -5180,14 +5180,14 @@ function ci(t) {
|
|
|
5180
5180
|
}
|
|
5181
5181
|
return -1;
|
|
5182
5182
|
}
|
|
5183
|
-
function
|
|
5183
|
+
function ci(t, e) {
|
|
5184
5184
|
var r = {}, n = new E.Parser(t, e);
|
|
5185
5185
|
r.version = n.parseUShort(), r.xAvgCharWidth = n.parseShort(), r.usWeightClass = n.parseUShort(), r.usWidthClass = n.parseUShort(), r.fsType = n.parseUShort(), r.ySubscriptXSize = n.parseShort(), r.ySubscriptYSize = n.parseShort(), r.ySubscriptXOffset = n.parseShort(), r.ySubscriptYOffset = n.parseShort(), r.ySuperscriptXSize = n.parseShort(), r.ySuperscriptYSize = n.parseShort(), r.ySuperscriptXOffset = n.parseShort(), r.ySuperscriptYOffset = n.parseShort(), r.yStrikeoutSize = n.parseShort(), r.yStrikeoutPosition = n.parseShort(), r.sFamilyClass = n.parseShort(), r.panose = [];
|
|
5186
5186
|
for (var a = 0; a < 10; a++)
|
|
5187
5187
|
r.panose[a] = n.parseByte();
|
|
5188
5188
|
return r.ulUnicodeRange1 = n.parseULong(), r.ulUnicodeRange2 = n.parseULong(), r.ulUnicodeRange3 = n.parseULong(), r.ulUnicodeRange4 = n.parseULong(), r.achVendID = String.fromCharCode(n.parseByte(), n.parseByte(), n.parseByte(), n.parseByte()), r.fsSelection = n.parseUShort(), r.usFirstCharIndex = n.parseUShort(), r.usLastCharIndex = n.parseUShort(), r.sTypoAscender = n.parseShort(), r.sTypoDescender = n.parseShort(), r.sTypoLineGap = n.parseShort(), r.usWinAscent = n.parseUShort(), r.usWinDescent = n.parseUShort(), r.version >= 1 && (r.ulCodePageRange1 = n.parseULong(), r.ulCodePageRange2 = n.parseULong()), r.version >= 2 && (r.sxHeight = n.parseShort(), r.sCapHeight = n.parseShort(), r.usDefaultChar = n.parseUShort(), r.usBreakChar = n.parseUShort(), r.usMaxContent = n.parseUShort()), r;
|
|
5189
5189
|
}
|
|
5190
|
-
function
|
|
5190
|
+
function fi(t) {
|
|
5191
5191
|
return new F.Table("OS/2", [
|
|
5192
5192
|
{ name: "version", type: "USHORT", value: 3 },
|
|
5193
5193
|
{ name: "xAvgCharWidth", type: "SHORT", value: 0 },
|
|
@@ -5237,8 +5237,8 @@ function pi(t) {
|
|
|
5237
5237
|
{ name: "usMaxContext", type: "USHORT", value: 0 }
|
|
5238
5238
|
], t);
|
|
5239
5239
|
}
|
|
5240
|
-
var Jt = { parse:
|
|
5241
|
-
function
|
|
5240
|
+
var Jt = { parse: ci, make: fi, unicodeRanges: $t, getUnicodeRange: hi };
|
|
5241
|
+
function pi(t, e) {
|
|
5242
5242
|
var r = {}, n = new E.Parser(t, e);
|
|
5243
5243
|
switch (r.version = n.parseVersion(), r.italicAngle = n.parseFixed(), r.underlinePosition = n.parseShort(), r.underlineThickness = n.parseShort(), r.isFixedPitch = n.parseULong(), r.minMemType42 = n.parseULong(), r.maxMemType42 = n.parseULong(), r.minMemType1 = n.parseULong(), r.maxMemType1 = n.parseULong(), r.version) {
|
|
5244
5244
|
case 1:
|
|
@@ -5263,7 +5263,7 @@ function di(t, e) {
|
|
|
5263
5263
|
}
|
|
5264
5264
|
return r;
|
|
5265
5265
|
}
|
|
5266
|
-
function
|
|
5266
|
+
function di() {
|
|
5267
5267
|
return new F.Table("post", [
|
|
5268
5268
|
{ name: "version", type: "FIXED", value: 196608 },
|
|
5269
5269
|
{ name: "italicAngle", type: "FIXED", value: 0 },
|
|
@@ -5276,7 +5276,7 @@ function gi() {
|
|
|
5276
5276
|
{ name: "maxMemType1", type: "ULONG", value: 0 }
|
|
5277
5277
|
]);
|
|
5278
5278
|
}
|
|
5279
|
-
var
|
|
5279
|
+
var na = { parse: pi, make: di }, ie = new Array(9);
|
|
5280
5280
|
ie[1] = function() {
|
|
5281
5281
|
var e = this.offset + this.relativeOffset, r = this.parseUShort();
|
|
5282
5282
|
if (r === 1)
|
|
@@ -5424,7 +5424,7 @@ ie[8] = function() {
|
|
|
5424
5424
|
substitutes: this.parseUShortList()
|
|
5425
5425
|
};
|
|
5426
5426
|
};
|
|
5427
|
-
function
|
|
5427
|
+
function gi(t, e) {
|
|
5428
5428
|
e = e || 0;
|
|
5429
5429
|
var r = new g(t, e), n = r.parseVersion(1);
|
|
5430
5430
|
return U.argument(n === 1 || n === 1.1, "Unsupported GSUB table version."), n === 1 ? {
|
|
@@ -5514,7 +5514,7 @@ Ge[6] = function(e) {
|
|
|
5514
5514
|
}
|
|
5515
5515
|
U.assert(!1, "lookup type 6 format must be 1, 2 or 3.");
|
|
5516
5516
|
};
|
|
5517
|
-
function
|
|
5517
|
+
function vi(t) {
|
|
5518
5518
|
return new F.Table("GSUB", [
|
|
5519
5519
|
{ name: "version", type: "ULONG", value: 65536 },
|
|
5520
5520
|
{ name: "scripts", type: "TABLE", value: new F.ScriptList(t.scripts) },
|
|
@@ -5522,8 +5522,8 @@ function yi(t) {
|
|
|
5522
5522
|
{ name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups, Ge) }
|
|
5523
5523
|
]);
|
|
5524
5524
|
}
|
|
5525
|
-
var
|
|
5526
|
-
function
|
|
5525
|
+
var aa = { parse: gi, make: vi };
|
|
5526
|
+
function yi(t, e) {
|
|
5527
5527
|
var r = new E.Parser(t, e), n = r.parseULong();
|
|
5528
5528
|
U.argument(n === 1, "Unsupported META table version."), r.parseULong(), r.parseULong();
|
|
5529
5529
|
for (var a = r.parseULong(), s = {}, i = 0; i < a; i++) {
|
|
@@ -5532,7 +5532,7 @@ function mi(t, e) {
|
|
|
5532
5532
|
}
|
|
5533
5533
|
return s;
|
|
5534
5534
|
}
|
|
5535
|
-
function
|
|
5535
|
+
function mi(t) {
|
|
5536
5536
|
var e = Object.keys(t).length, r = "", n = 16 + e * 12, a = new F.Table("meta", [
|
|
5537
5537
|
{ name: "version", type: "ULONG", value: 1 },
|
|
5538
5538
|
{ name: "flags", type: "ULONG", value: 0 },
|
|
@@ -5545,7 +5545,7 @@ function xi(t) {
|
|
|
5545
5545
|
}
|
|
5546
5546
|
return a.fields.push({ name: "stringPool", type: "CHARARRAY", value: r }), a;
|
|
5547
5547
|
}
|
|
5548
|
-
var
|
|
5548
|
+
var sa = { parse: yi, make: mi };
|
|
5549
5549
|
function _r(t) {
|
|
5550
5550
|
return Math.log(t) / Math.log(2) | 0;
|
|
5551
5551
|
}
|
|
@@ -5564,7 +5564,7 @@ function Hr(t, e, r, n) {
|
|
|
5564
5564
|
{ name: "length", type: "ULONG", value: n !== void 0 ? n : 0 }
|
|
5565
5565
|
]);
|
|
5566
5566
|
}
|
|
5567
|
-
function
|
|
5567
|
+
function ia(t) {
|
|
5568
5568
|
var e = new F.Table("sfnt", [
|
|
5569
5569
|
{ name: "version", type: "TAG", value: "OTTO" },
|
|
5570
5570
|
{ name: "numTables", type: "USHORT", value: 0 },
|
|
@@ -5598,12 +5598,12 @@ function zr(t, e, r) {
|
|
|
5598
5598
|
}
|
|
5599
5599
|
return r;
|
|
5600
5600
|
}
|
|
5601
|
-
function
|
|
5601
|
+
function xi(t) {
|
|
5602
5602
|
for (var e = 0, r = 0; r < t.length; r += 1)
|
|
5603
5603
|
e += t[r];
|
|
5604
5604
|
return e / t.length;
|
|
5605
5605
|
}
|
|
5606
|
-
function
|
|
5606
|
+
function bi(t) {
|
|
5607
5607
|
for (var e = [], r = [], n = [], a = [], s = [], i = [], o = [], u, l = 0, h = 0, f = 0, c = 0, p = 0, d = 0; d < t.glyphs.length; d += 1) {
|
|
5608
5608
|
var v = t.glyphs.get(d), m = v.unicode | 0;
|
|
5609
5609
|
if (isNaN(v.advanceWidth))
|
|
@@ -5631,13 +5631,13 @@ function Si(t) {
|
|
|
5631
5631
|
xMax: Math.max.apply(null, n),
|
|
5632
5632
|
yMax: Math.max.apply(null, a),
|
|
5633
5633
|
advanceWidthMax: Math.max.apply(null, s),
|
|
5634
|
-
advanceWidthAvg:
|
|
5634
|
+
advanceWidthAvg: xi(s),
|
|
5635
5635
|
minLeftSideBearing: Math.min.apply(null, i),
|
|
5636
5636
|
maxLeftSideBearing: Math.max.apply(null, i),
|
|
5637
5637
|
minRightSideBearing: Math.min.apply(null, o)
|
|
5638
5638
|
};
|
|
5639
5639
|
x.ascender = t.ascender, x.descender = t.descender;
|
|
5640
|
-
var T =
|
|
5640
|
+
var T = Yn.make({
|
|
5641
5641
|
flags: 3,
|
|
5642
5642
|
// 00000011 (baseline for font at y=0; left sidebearing point at x=0)
|
|
5643
5643
|
unitsPerEm: t.unitsPerEm,
|
|
@@ -5647,7 +5647,7 @@ function Si(t) {
|
|
|
5647
5647
|
yMax: x.yMax,
|
|
5648
5648
|
lowestRecPPEM: 3,
|
|
5649
5649
|
createdTimestamp: t.createdTimestamp
|
|
5650
|
-
}), S =
|
|
5650
|
+
}), S = Zn.make({
|
|
5651
5651
|
ascender: x.ascender,
|
|
5652
5652
|
descender: x.descender,
|
|
5653
5653
|
advanceWidthMax: x.advanceWidthMax,
|
|
@@ -5655,7 +5655,7 @@ function Si(t) {
|
|
|
5655
5655
|
minRightSideBearing: x.minRightSideBearing,
|
|
5656
5656
|
xMaxExtent: x.maxLeftSideBearing + (x.xMax - x.xMin),
|
|
5657
5657
|
numberOfHMetrics: t.glyphs.length
|
|
5658
|
-
}),
|
|
5658
|
+
}), A = Qn.make(t.glyphs.length), O = Jt.make(Object.assign({
|
|
5659
5659
|
xAvgCharWidth: Math.round(x.advanceWidthAvg),
|
|
5660
5660
|
usFirstCharIndex: u,
|
|
5661
5661
|
usLastCharIndex: l,
|
|
@@ -5680,13 +5680,13 @@ function Si(t) {
|
|
|
5680
5680
|
// Use space as the default character, if available.
|
|
5681
5681
|
usBreakChar: t.hasChar(" ") ? 32 : 0
|
|
5682
5682
|
// Use space as the break character, if available.
|
|
5683
|
-
}, t.tables.os2)), w =
|
|
5683
|
+
}, t.tables.os2)), w = jn.make(t.glyphs), M = Pn.make(t.glyphs), N = t.getEnglishName("fontFamily"), K = t.getEnglishName("fontSubfamily"), $ = N + " " + K, Y = t.getEnglishName("postScriptName");
|
|
5684
5684
|
Y || (Y = N.replace(/\s/g, "") + "-" + K);
|
|
5685
5685
|
var I = {};
|
|
5686
5686
|
for (var _ in t.names)
|
|
5687
5687
|
I[_] = t.names[_];
|
|
5688
5688
|
I.uniqueID || (I.uniqueID = { en: t.getEnglishName("manufacturer") + ":" + $ }), I.postScriptName || (I.postScriptName = { en: Y }), I.preferredFamily || (I.preferredFamily = t.names.fontFamily), I.preferredSubfamily || (I.preferredSubfamily = t.names.fontSubfamily);
|
|
5689
|
-
var D = [], W =
|
|
5689
|
+
var D = [], W = ra.make(I, D), Z = D.length > 0 ? Kn.make(D) : void 0, q = na.make(), Q = Xn.make(t.glyphs, {
|
|
5690
5690
|
version: t.getEnglishName("version"),
|
|
5691
5691
|
fullName: $,
|
|
5692
5692
|
familyName: N,
|
|
@@ -5694,18 +5694,18 @@ function Si(t) {
|
|
|
5694
5694
|
postScriptName: Y,
|
|
5695
5695
|
unitsPerEm: t.unitsPerEm,
|
|
5696
5696
|
fontBBox: [0, x.yMin, x.ascender, x.advanceWidthMax]
|
|
5697
|
-
}), P = t.metas && Object.keys(t.metas).length > 0 ?
|
|
5698
|
-
Z && j.push(Z), t.tables.gsub && j.push(
|
|
5699
|
-
for (var bt =
|
|
5697
|
+
}), P = 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)), P && j.push(P);
|
|
5699
|
+
for (var bt = ia(j), Sa = bt.encode(), ka = lr(Sa), St = bt.fields, mr = !1, tt = 0; tt < St.length; tt += 1)
|
|
5700
5700
|
if (St[tt].name === "head table") {
|
|
5701
|
-
St[tt].value.checkSumAdjustment = 2981146554 -
|
|
5701
|
+
St[tt].value.checkSumAdjustment = 2981146554 - ka, mr = !0;
|
|
5702
5702
|
break;
|
|
5703
5703
|
}
|
|
5704
5704
|
if (!mr)
|
|
5705
5705
|
throw new Error("Could not find head table with checkSum to adjust.");
|
|
5706
5706
|
return bt;
|
|
5707
5707
|
}
|
|
5708
|
-
var
|
|
5708
|
+
var Si = { make: ia, fontToTable: bi, computeCheckSum: lr };
|
|
5709
5709
|
function Et(t, e) {
|
|
5710
5710
|
for (var r = 0, n = t.length - 1; r <= n; ) {
|
|
5711
5711
|
var a = r + n >>> 1, s = t[a].tag;
|
|
@@ -5987,7 +5987,7 @@ Ke.prototype.getKerningTables = function(t, e) {
|
|
|
5987
5987
|
function re(t) {
|
|
5988
5988
|
je.call(this, t, "gsub");
|
|
5989
5989
|
}
|
|
5990
|
-
function
|
|
5990
|
+
function ki(t, e) {
|
|
5991
5991
|
var r = t.length;
|
|
5992
5992
|
if (r !== e.length)
|
|
5993
5993
|
return !1;
|
|
@@ -6117,7 +6117,7 @@ re.prototype.addLigature = function(t, e, r, n) {
|
|
|
6117
6117
|
}, l = this.binSearch(s.coverage.glyphs, i);
|
|
6118
6118
|
if (l >= 0) {
|
|
6119
6119
|
for (var h = s.ligatureSets[l], f = 0; f < h.length; f++)
|
|
6120
|
-
if (
|
|
6120
|
+
if (ki(h[f].components, o))
|
|
6121
6121
|
return;
|
|
6122
6122
|
h.push(u);
|
|
6123
6123
|
} else
|
|
@@ -6155,10 +6155,10 @@ re.prototype.add = function(t, e, r, n) {
|
|
|
6155
6155
|
return e.by instanceof Array ? this.addMultiple(t, e, r, n) : this.addLigature(t, e, r, n);
|
|
6156
6156
|
}
|
|
6157
6157
|
};
|
|
6158
|
-
function
|
|
6158
|
+
function Fi() {
|
|
6159
6159
|
return typeof window < "u";
|
|
6160
6160
|
}
|
|
6161
|
-
function
|
|
6161
|
+
function Ti(t) {
|
|
6162
6162
|
for (var e = new Buffer(t.byteLength), r = new Uint8Array(t), n = 0; n < e.length; ++n)
|
|
6163
6163
|
e[n] = r[n];
|
|
6164
6164
|
return e;
|
|
@@ -6171,7 +6171,7 @@ function qr(t, e, r, n, a) {
|
|
|
6171
6171
|
var s;
|
|
6172
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;
|
|
6173
6173
|
}
|
|
6174
|
-
function
|
|
6174
|
+
function oa(t, e, r) {
|
|
6175
6175
|
var n = new E.Parser(e, r);
|
|
6176
6176
|
t.numberOfContours = n.parseShort(), t._xMin = n.parseShort(), t._yMin = n.parseShort(), t._xMax = n.parseShort(), t._yMax = n.parseShort();
|
|
6177
6177
|
var a, s;
|
|
@@ -6219,7 +6219,7 @@ function ua(t, e, r) {
|
|
|
6219
6219
|
}
|
|
6220
6220
|
if (a & 256) {
|
|
6221
6221
|
t.instructionLength = n.parseUShort(), t.instructions = [];
|
|
6222
|
-
for (var
|
|
6222
|
+
for (var A = 0; A < t.instructionLength; A += 1)
|
|
6223
6223
|
t.instructions.push(n.parseByte());
|
|
6224
6224
|
}
|
|
6225
6225
|
}
|
|
@@ -6236,18 +6236,18 @@ function Ot(t, e) {
|
|
|
6236
6236
|
}
|
|
6237
6237
|
return r;
|
|
6238
6238
|
}
|
|
6239
|
-
function
|
|
6239
|
+
function wi(t) {
|
|
6240
6240
|
for (var e = [], r = [], n = 0; n < t.length; n += 1) {
|
|
6241
6241
|
var a = t[n];
|
|
6242
6242
|
r.push(a), a.lastPointOfContour && (e.push(r), r = []);
|
|
6243
6243
|
}
|
|
6244
6244
|
return U.argument(r.length === 0, "There are still points left in the current contour."), e;
|
|
6245
6245
|
}
|
|
6246
|
-
function
|
|
6246
|
+
function ua(t) {
|
|
6247
6247
|
var e = new V();
|
|
6248
6248
|
if (!t)
|
|
6249
6249
|
return e;
|
|
6250
|
-
for (var r =
|
|
6250
|
+
for (var r = wi(t), n = 0; n < r.length; ++n) {
|
|
6251
6251
|
var a = r[n], s = null, i = a[a.length - 1], o = a[0];
|
|
6252
6252
|
if (i.onCurve)
|
|
6253
6253
|
e.moveTo(i.x, i.y);
|
|
@@ -6268,7 +6268,7 @@ function la(t) {
|
|
|
6268
6268
|
}
|
|
6269
6269
|
return e;
|
|
6270
6270
|
}
|
|
6271
|
-
function
|
|
6271
|
+
function la(t, e) {
|
|
6272
6272
|
if (e.isComposite)
|
|
6273
6273
|
for (var r = 0; r < e.components.length; r += 1) {
|
|
6274
6274
|
var n = e.components[r], a = t.get(n.glyphIndex);
|
|
@@ -6292,50 +6292,50 @@ function ha(t, e) {
|
|
|
6292
6292
|
e.points = e.points.concat(s);
|
|
6293
6293
|
}
|
|
6294
6294
|
}
|
|
6295
|
-
return
|
|
6295
|
+
return ua(e.points);
|
|
6296
6296
|
}
|
|
6297
|
-
function
|
|
6297
|
+
function Ci(t, e, r, n) {
|
|
6298
6298
|
for (var a = new ge.GlyphSet(n), s = 0; s < r.length - 1; s += 1) {
|
|
6299
6299
|
var i = r[s], o = r[s + 1];
|
|
6300
|
-
i !== o ? a.push(s, ge.ttfGlyphLoader(n, s,
|
|
6300
|
+
i !== o ? a.push(s, ge.ttfGlyphLoader(n, s, oa, t, e + i, la)) : a.push(s, ge.glyphLoader(n, s));
|
|
6301
6301
|
}
|
|
6302
6302
|
return a;
|
|
6303
6303
|
}
|
|
6304
|
-
function
|
|
6304
|
+
function Ei(t, e, r, n) {
|
|
6305
6305
|
var a = new ge.GlyphSet(n);
|
|
6306
6306
|
return n._push = function(s) {
|
|
6307
6307
|
var i = r[s], o = r[s + 1];
|
|
6308
|
-
i !== o ? a.push(s, ge.ttfGlyphLoader(n, s,
|
|
6308
|
+
i !== o ? a.push(s, ge.ttfGlyphLoader(n, s, oa, t, e + i, la)) : a.push(s, ge.glyphLoader(n, s));
|
|
6309
6309
|
}, a;
|
|
6310
6310
|
}
|
|
6311
|
-
function
|
|
6312
|
-
return a.lowMemory ?
|
|
6311
|
+
function Oi(t, e, r, n, a) {
|
|
6312
|
+
return a.lowMemory ? Ei(t, e, r, n) : Ci(t, e, r, n);
|
|
6313
6313
|
}
|
|
6314
|
-
var
|
|
6315
|
-
function
|
|
6314
|
+
var ha = { getPath: ua, parse: Oi }, ca, Ae, fa, er;
|
|
6315
|
+
function pa(t) {
|
|
6316
6316
|
this.font = t, this.getCommands = function(e) {
|
|
6317
|
-
return
|
|
6317
|
+
return ha.getPath(e).commands;
|
|
6318
6318
|
}, this._fpgmState = this._prepState = void 0, this._errorState = 0;
|
|
6319
6319
|
}
|
|
6320
|
-
function
|
|
6320
|
+
function Ui(t) {
|
|
6321
6321
|
return t;
|
|
6322
6322
|
}
|
|
6323
|
-
function
|
|
6323
|
+
function da(t) {
|
|
6324
6324
|
return Math.sign(t) * Math.round(Math.abs(t));
|
|
6325
6325
|
}
|
|
6326
|
-
function
|
|
6326
|
+
function Li(t) {
|
|
6327
6327
|
return Math.sign(t) * Math.round(Math.abs(t * 2)) / 2;
|
|
6328
6328
|
}
|
|
6329
|
-
function
|
|
6329
|
+
function Ri(t) {
|
|
6330
6330
|
return Math.sign(t) * (Math.round(Math.abs(t) + 0.5) - 0.5);
|
|
6331
6331
|
}
|
|
6332
6332
|
function Ai(t) {
|
|
6333
6333
|
return Math.sign(t) * Math.ceil(Math.abs(t));
|
|
6334
6334
|
}
|
|
6335
|
-
function
|
|
6335
|
+
function Mi(t) {
|
|
6336
6336
|
return Math.sign(t) * Math.floor(Math.abs(t));
|
|
6337
6337
|
}
|
|
6338
|
-
var
|
|
6338
|
+
var ga = function(t) {
|
|
6339
6339
|
var e = this.srPeriod, r = this.srPhase, n = this.srThreshold, a = 1;
|
|
6340
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;
|
|
6341
6341
|
}, pe = {
|
|
@@ -6508,7 +6508,7 @@ ye.prototype.prevTouched = function(t) {
|
|
|
6508
6508
|
e = e.prevPointOnContour;
|
|
6509
6509
|
return e;
|
|
6510
6510
|
};
|
|
6511
|
-
var Ye = Object.freeze(new ye(0, 0)),
|
|
6511
|
+
var Ye = Object.freeze(new ye(0, 0)), Bi = {
|
|
6512
6512
|
cvCutIn: 17 / 16,
|
|
6513
6513
|
// control value cut in
|
|
6514
6514
|
deltaBase: 9,
|
|
@@ -6524,10 +6524,10 @@ function Se(t, e) {
|
|
|
6524
6524
|
case "glyf":
|
|
6525
6525
|
this.zp0 = this.zp1 = this.zp2 = 1, this.rp0 = this.rp1 = this.rp2 = 0;
|
|
6526
6526
|
case "prep":
|
|
6527
|
-
this.fv = this.pv = this.dpv = pe, this.round =
|
|
6527
|
+
this.fv = this.pv = this.dpv = pe, this.round = da;
|
|
6528
6528
|
}
|
|
6529
6529
|
}
|
|
6530
|
-
|
|
6530
|
+
pa.prototype.exec = function(t, e) {
|
|
6531
6531
|
if (typeof e != "number")
|
|
6532
6532
|
throw new Error("Point size is not a number!");
|
|
6533
6533
|
if (!(this._errorState > 2)) {
|
|
@@ -6535,9 +6535,9 @@ da.prototype.exec = function(t, e) {
|
|
|
6535
6535
|
if (!n || n.ppem !== e) {
|
|
6536
6536
|
var a = this._fpgmState;
|
|
6537
6537
|
if (!a) {
|
|
6538
|
-
Se.prototype =
|
|
6538
|
+
Se.prototype = Bi, a = this._fpgmState = new Se("fpgm", r.tables.fpgm), a.funcs = [], a.font = r, exports.DEBUG && (console.log("---EXEC FPGM---"), a.step = -1);
|
|
6539
6539
|
try {
|
|
6540
|
-
|
|
6540
|
+
Ae(a);
|
|
6541
6541
|
} catch (l) {
|
|
6542
6542
|
console.log("Hinting error in FPGM:" + l), this._errorState = 3;
|
|
6543
6543
|
return;
|
|
@@ -6552,21 +6552,21 @@ da.prototype.exec = function(t, e) {
|
|
|
6552
6552
|
n.cvt = [];
|
|
6553
6553
|
exports.DEBUG && (console.log("---EXEC PREP---"), n.step = -1);
|
|
6554
6554
|
try {
|
|
6555
|
-
|
|
6555
|
+
Ae(n);
|
|
6556
6556
|
} catch (l) {
|
|
6557
6557
|
this._errorState < 2 && console.log("Hinting error in PREP:" + l), this._errorState = 2;
|
|
6558
6558
|
}
|
|
6559
6559
|
}
|
|
6560
6560
|
if (!(this._errorState > 1))
|
|
6561
6561
|
try {
|
|
6562
|
-
return
|
|
6562
|
+
return fa(t, n);
|
|
6563
6563
|
} catch (l) {
|
|
6564
6564
|
this._errorState < 1 && (console.log("Hinting error:" + l), console.log("Note: further hinting errors are silenced")), this._errorState = 1;
|
|
6565
6565
|
return;
|
|
6566
6566
|
}
|
|
6567
6567
|
}
|
|
6568
6568
|
};
|
|
6569
|
-
|
|
6569
|
+
fa = function(t, e) {
|
|
6570
6570
|
var r = e.ppem / e.font.unitsPerEm, n = r, a = t.components, s, i, o;
|
|
6571
6571
|
if (Se.prototype = e, !a)
|
|
6572
6572
|
o = new Se("glyf", t.instructions), exports.DEBUG && (console.log("---EXEC GLYPH---"), o.step = -1), er(t, o, r, n), i = o.gZone;
|
|
@@ -6588,7 +6588,7 @@ pa = function(t, e) {
|
|
|
6588
6588
|
t.instructions && !o.inhibitGridFit && (o = new Se("glyf", t.instructions), o.gZone = o.z0 = o.z1 = o.z2 = i, o.contours = s, i.push(
|
|
6589
6589
|
new ye(0, 0),
|
|
6590
6590
|
new ye(Math.round(t.advanceWidth * r), 0)
|
|
6591
|
-
), exports.DEBUG && (console.log("---EXEC COMPOSITE---"), o.step = -1),
|
|
6591
|
+
), exports.DEBUG && (console.log("---EXEC COMPOSITE---"), o.step = -1), Ae(o), i.length -= 2);
|
|
6592
6592
|
}
|
|
6593
6593
|
return i;
|
|
6594
6594
|
};
|
|
@@ -6611,19 +6611,19 @@ er = function(t, e, r, n) {
|
|
|
6611
6611
|
if (i.push(
|
|
6612
6612
|
new ye(0, 0),
|
|
6613
6613
|
new ye(Math.round(t.advanceWidth * r), 0)
|
|
6614
|
-
),
|
|
6614
|
+
), Ae(e), i.length -= 2, exports.DEBUG) {
|
|
6615
6615
|
console.log("FINISHED GLYPH", e.stack);
|
|
6616
6616
|
for (var d = 0; d < s; d++)
|
|
6617
6617
|
console.log(d, i[d].x, i[d].y);
|
|
6618
6618
|
}
|
|
6619
6619
|
}
|
|
6620
6620
|
};
|
|
6621
|
-
|
|
6621
|
+
Ae = function(t) {
|
|
6622
6622
|
var e = t.prog;
|
|
6623
6623
|
if (e) {
|
|
6624
6624
|
var r = e.length, n;
|
|
6625
6625
|
for (t.ip = 0; t.ip < r; t.ip++) {
|
|
6626
|
-
if (exports.DEBUG && t.step++, n =
|
|
6626
|
+
if (exports.DEBUG && t.step++, n = ca[e[t.ip]], !n)
|
|
6627
6627
|
throw new Error(
|
|
6628
6628
|
"unknown instruction: 0x" + Number(e[t.ip]).toString(16)
|
|
6629
6629
|
);
|
|
@@ -6635,7 +6635,7 @@ function mt(t) {
|
|
|
6635
6635
|
for (var e = t.tZone = new Array(t.gZone.length), r = 0; r < e.length; r++)
|
|
6636
6636
|
e[r] = new ye(0, 0);
|
|
6637
6637
|
}
|
|
6638
|
-
function
|
|
6638
|
+
function va(t, e) {
|
|
6639
6639
|
var r = t.prog, n = t.ip, a = 1, s;
|
|
6640
6640
|
do
|
|
6641
6641
|
if (s = r[++n], s === 88)
|
|
@@ -6676,41 +6676,41 @@ function Kr(t, e) {
|
|
|
6676
6676
|
var o, u;
|
|
6677
6677
|
t ? (o = s.y - i.y, u = i.x - s.x) : (o = i.x - s.x, u = i.y - s.y), e.fv = $e(o, u);
|
|
6678
6678
|
}
|
|
6679
|
-
function
|
|
6679
|
+
function Pi(t) {
|
|
6680
6680
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6681
6681
|
exports.DEBUG && console.log(t.step, "SPVFS[]", r, n), t.pv = t.dpv = $e(n, r);
|
|
6682
6682
|
}
|
|
6683
|
-
function
|
|
6683
|
+
function Ii(t) {
|
|
6684
6684
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6685
6685
|
exports.DEBUG && console.log(t.step, "SPVFS[]", r, n), t.fv = $e(n, r);
|
|
6686
6686
|
}
|
|
6687
|
-
function
|
|
6687
|
+
function Di(t) {
|
|
6688
6688
|
var e = t.stack, r = t.pv;
|
|
6689
6689
|
exports.DEBUG && console.log(t.step, "GPV[]"), e.push(r.x * 16384), e.push(r.y * 16384);
|
|
6690
6690
|
}
|
|
6691
|
-
function
|
|
6691
|
+
function Gi(t) {
|
|
6692
6692
|
var e = t.stack, r = t.fv;
|
|
6693
6693
|
exports.DEBUG && console.log(t.step, "GFV[]"), e.push(r.x * 16384), e.push(r.y * 16384);
|
|
6694
6694
|
}
|
|
6695
|
-
function
|
|
6695
|
+
function Ni(t) {
|
|
6696
6696
|
t.fv = t.pv, exports.DEBUG && console.log(t.step, "SFVTPV[]");
|
|
6697
6697
|
}
|
|
6698
|
-
function
|
|
6698
|
+
function _i(t) {
|
|
6699
6699
|
var e = t.stack, r = e.pop(), n = e.pop(), a = e.pop(), s = e.pop(), i = e.pop(), o = t.z0, u = t.z1, l = o[r], h = o[n], f = u[a], c = u[s], p = t.z2[i];
|
|
6700
6700
|
exports.DEBUG && console.log("ISECT[], ", r, n, a, s, i);
|
|
6701
|
-
var d = l.x, v = l.y, m = h.x, y = h.y, b = f.x, x = f.y, T = c.x, S = c.y,
|
|
6702
|
-
p.x = (O * (b - T) - w * (d - m)) /
|
|
6701
|
+
var d = l.x, v = l.y, m = h.x, y = h.y, b = f.x, x = f.y, T = c.x, S = c.y, A = (d - m) * (x - S) - (v - y) * (b - T), O = d * y - v * m, w = b * S - x * T;
|
|
6702
|
+
p.x = (O * (b - T) - w * (d - m)) / A, p.y = (O * (x - S) - w * (v - y)) / A;
|
|
6703
6703
|
}
|
|
6704
|
-
function
|
|
6704
|
+
function Hi(t) {
|
|
6705
6705
|
t.rp0 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP0[]", t.rp0);
|
|
6706
6706
|
}
|
|
6707
|
-
function
|
|
6707
|
+
function zi(t) {
|
|
6708
6708
|
t.rp1 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP1[]", t.rp1);
|
|
6709
6709
|
}
|
|
6710
|
-
function
|
|
6710
|
+
function Wi(t) {
|
|
6711
6711
|
t.rp2 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP2[]", t.rp2);
|
|
6712
6712
|
}
|
|
6713
|
-
function
|
|
6713
|
+
function Vi(t) {
|
|
6714
6714
|
var e = t.stack.pop();
|
|
6715
6715
|
switch (exports.DEBUG && console.log(t.step, "SZP0[]", e), t.zp0 = e, e) {
|
|
6716
6716
|
case 0:
|
|
@@ -6723,7 +6723,7 @@ function qi(t) {
|
|
|
6723
6723
|
throw new Error("Invalid zone pointer");
|
|
6724
6724
|
}
|
|
6725
6725
|
}
|
|
6726
|
-
function
|
|
6726
|
+
function qi(t) {
|
|
6727
6727
|
var e = t.stack.pop();
|
|
6728
6728
|
switch (exports.DEBUG && console.log(t.step, "SZP1[]", e), t.zp1 = e, e) {
|
|
6729
6729
|
case 0:
|
|
@@ -6736,7 +6736,7 @@ function Xi(t) {
|
|
|
6736
6736
|
throw new Error("Invalid zone pointer");
|
|
6737
6737
|
}
|
|
6738
6738
|
}
|
|
6739
|
-
function
|
|
6739
|
+
function Xi(t) {
|
|
6740
6740
|
var e = t.stack.pop();
|
|
6741
6741
|
switch (exports.DEBUG && console.log(t.step, "SZP2[]", e), t.zp2 = e, e) {
|
|
6742
6742
|
case 0:
|
|
@@ -6749,7 +6749,7 @@ function Yi(t) {
|
|
|
6749
6749
|
throw new Error("Invalid zone pointer");
|
|
6750
6750
|
}
|
|
6751
6751
|
}
|
|
6752
|
-
function
|
|
6752
|
+
function Yi(t) {
|
|
6753
6753
|
var e = t.stack.pop();
|
|
6754
6754
|
switch (exports.DEBUG && console.log(t.step, "SZPS[]", e), t.zp0 = t.zp1 = t.zp2 = e, e) {
|
|
6755
6755
|
case 0:
|
|
@@ -6762,76 +6762,76 @@ function Zi(t) {
|
|
|
6762
6762
|
throw new Error("Invalid zone pointer");
|
|
6763
6763
|
}
|
|
6764
6764
|
}
|
|
6765
|
-
function
|
|
6765
|
+
function Zi(t) {
|
|
6766
6766
|
t.loop = t.stack.pop(), exports.DEBUG && console.log(t.step, "SLOOP[]", t.loop);
|
|
6767
6767
|
}
|
|
6768
|
+
function ji(t) {
|
|
6769
|
+
exports.DEBUG && console.log(t.step, "RTG[]"), t.round = da;
|
|
6770
|
+
}
|
|
6768
6771
|
function Ki(t) {
|
|
6769
|
-
exports.DEBUG && console.log(t.step, "
|
|
6772
|
+
exports.DEBUG && console.log(t.step, "RTHG[]"), t.round = Ri;
|
|
6770
6773
|
}
|
|
6771
6774
|
function Qi(t) {
|
|
6772
|
-
exports.DEBUG && console.log(t.step, "RTHG[]"), t.round = Mi;
|
|
6773
|
-
}
|
|
6774
|
-
function $i(t) {
|
|
6775
6775
|
var e = t.stack.pop();
|
|
6776
6776
|
exports.DEBUG && console.log(t.step, "SMD[]", e), t.minDis = e / 64;
|
|
6777
6777
|
}
|
|
6778
|
-
function
|
|
6779
|
-
exports.DEBUG && console.log(t.step, "ELSE[]"),
|
|
6778
|
+
function $i(t) {
|
|
6779
|
+
exports.DEBUG && console.log(t.step, "ELSE[]"), va(t, !1);
|
|
6780
6780
|
}
|
|
6781
|
-
function
|
|
6781
|
+
function Ji(t) {
|
|
6782
6782
|
var e = t.stack.pop();
|
|
6783
6783
|
exports.DEBUG && console.log(t.step, "JMPR[]", e), t.ip += e - 1;
|
|
6784
6784
|
}
|
|
6785
|
-
function
|
|
6785
|
+
function eo(t) {
|
|
6786
6786
|
var e = t.stack.pop();
|
|
6787
6787
|
exports.DEBUG && console.log(t.step, "SCVTCI[]", e), t.cvCutIn = e / 64;
|
|
6788
6788
|
}
|
|
6789
|
-
function
|
|
6789
|
+
function to(t) {
|
|
6790
6790
|
var e = t.stack;
|
|
6791
6791
|
exports.DEBUG && console.log(t.step, "DUP[]"), e.push(e[e.length - 1]);
|
|
6792
6792
|
}
|
|
6793
6793
|
function Ut(t) {
|
|
6794
6794
|
exports.DEBUG && console.log(t.step, "POP[]"), t.stack.pop();
|
|
6795
6795
|
}
|
|
6796
|
-
function
|
|
6796
|
+
function ro(t) {
|
|
6797
6797
|
exports.DEBUG && console.log(t.step, "CLEAR[]"), t.stack.length = 0;
|
|
6798
6798
|
}
|
|
6799
|
-
function
|
|
6799
|
+
function no(t) {
|
|
6800
6800
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6801
6801
|
exports.DEBUG && console.log(t.step, "SWAP[]"), e.push(r), e.push(n);
|
|
6802
6802
|
}
|
|
6803
|
-
function
|
|
6803
|
+
function ao(t) {
|
|
6804
6804
|
var e = t.stack;
|
|
6805
6805
|
exports.DEBUG && console.log(t.step, "DEPTH[]"), e.push(e.length);
|
|
6806
6806
|
}
|
|
6807
|
-
function
|
|
6807
|
+
function so(t) {
|
|
6808
6808
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6809
6809
|
exports.DEBUG && console.log(t.step, "LOOPCALL[]", r, n);
|
|
6810
6810
|
var a = t.ip, s = t.prog;
|
|
6811
6811
|
t.prog = t.funcs[r];
|
|
6812
6812
|
for (var i = 0; i < n; i++)
|
|
6813
|
-
|
|
6813
|
+
Ae(t), exports.DEBUG && console.log(
|
|
6814
6814
|
++t.step,
|
|
6815
6815
|
i + 1 < n ? "next loopcall" : "done loopcall",
|
|
6816
6816
|
i
|
|
6817
6817
|
);
|
|
6818
6818
|
t.ip = a, t.prog = s;
|
|
6819
6819
|
}
|
|
6820
|
-
function
|
|
6820
|
+
function io(t) {
|
|
6821
6821
|
var e = t.stack.pop();
|
|
6822
6822
|
exports.DEBUG && console.log(t.step, "CALL[]", e);
|
|
6823
6823
|
var r = t.ip, n = t.prog;
|
|
6824
|
-
t.prog = t.funcs[e],
|
|
6824
|
+
t.prog = t.funcs[e], Ae(t), t.ip = r, t.prog = n, exports.DEBUG && console.log(++t.step, "returning from", e);
|
|
6825
6825
|
}
|
|
6826
|
-
function
|
|
6826
|
+
function oo(t) {
|
|
6827
6827
|
var e = t.stack, r = e.pop();
|
|
6828
6828
|
exports.DEBUG && console.log(t.step, "CINDEX[]", r), e.push(e[e.length - r]);
|
|
6829
6829
|
}
|
|
6830
|
-
function
|
|
6830
|
+
function uo(t) {
|
|
6831
6831
|
var e = t.stack, r = e.pop();
|
|
6832
6832
|
exports.DEBUG && console.log(t.step, "MINDEX[]", r), e.push(e.splice(e.length - r, 1)[0]);
|
|
6833
6833
|
}
|
|
6834
|
-
function
|
|
6834
|
+
function lo(t) {
|
|
6835
6835
|
if (t.env !== "fpgm")
|
|
6836
6836
|
throw new Error("FDEF not allowed here");
|
|
6837
6837
|
var e = t.stack, r = t.prog, n = t.ip, a = e.pop(), s = n;
|
|
@@ -6887,7 +6887,7 @@ function tn(t, e) {
|
|
|
6887
6887
|
for (var l, h = i.distance(a, a, !1, !0), f = u.length - 2, c = 0; c < f; c++)
|
|
6888
6888
|
l = u[c], s.setRelative(l, l, h, i);
|
|
6889
6889
|
}
|
|
6890
|
-
function
|
|
6890
|
+
function ho(t) {
|
|
6891
6891
|
for (var e = t.stack, r = t.loop, n = t.fv, a = e.pop() / 64, s = t.z2; r--; ) {
|
|
6892
6892
|
var i = e.pop(), o = s[i];
|
|
6893
6893
|
exports.DEBUG && console.log(
|
|
@@ -6899,7 +6899,7 @@ function co(t) {
|
|
|
6899
6899
|
}
|
|
6900
6900
|
t.loop = 1;
|
|
6901
6901
|
}
|
|
6902
|
-
function
|
|
6902
|
+
function co(t) {
|
|
6903
6903
|
for (var e = t.stack, r = t.rp1, n = t.rp2, a = t.loop, s = t.z0[r], i = t.z1[n], o = t.fv, u = t.dpv, l = t.z2; a--; ) {
|
|
6904
6904
|
var h = e.pop(), f = l[h];
|
|
6905
6905
|
exports.DEBUG && console.log(
|
|
@@ -6917,7 +6917,7 @@ function rn(t, e) {
|
|
|
6917
6917
|
var r = e.stack, n = r.pop() / 64, a = r.pop(), s = e.z1[a], i = e.z0[e.rp0], o = e.fv, u = e.pv;
|
|
6918
6918
|
o.setRelative(s, i, n, u), o.touch(s), exports.DEBUG && console.log(e.step, "MSIRP[" + t + "]", n, a), e.rp1 = e.rp0, e.rp2 = a, t && (e.rp0 = a);
|
|
6919
6919
|
}
|
|
6920
|
-
function
|
|
6920
|
+
function fo(t) {
|
|
6921
6921
|
for (var e = t.stack, r = t.rp0, n = t.z0[r], a = t.loop, s = t.fv, i = t.pv, o = t.z1; a--; ) {
|
|
6922
6922
|
var u = e.pop(), l = o[u];
|
|
6923
6923
|
exports.DEBUG && console.log(
|
|
@@ -6928,8 +6928,8 @@ function po(t) {
|
|
|
6928
6928
|
}
|
|
6929
6929
|
t.loop = 1;
|
|
6930
6930
|
}
|
|
6931
|
-
function
|
|
6932
|
-
exports.DEBUG && console.log(t.step, "RTDG[]"), t.round =
|
|
6931
|
+
function po(t) {
|
|
6932
|
+
exports.DEBUG && console.log(t.step, "RTDG[]"), t.round = Li;
|
|
6933
6933
|
}
|
|
6934
6934
|
function nn(t, e) {
|
|
6935
6935
|
var r = e.stack, n = r.pop(), a = r.pop(), s = e.z0[a], i = e.fv, o = e.pv, u = e.cvt[n];
|
|
@@ -6945,14 +6945,14 @@ function nn(t, e) {
|
|
|
6945
6945
|
var l = o.distance(s, Ye);
|
|
6946
6946
|
t && (Math.abs(l - u) < e.cvCutIn && (l = u), l = e.round(l)), i.setRelative(s, Ye, l, o), e.zp0 === 0 && (s.xo = s.x, s.yo = s.y), i.touch(s), e.rp0 = e.rp1 = a;
|
|
6947
6947
|
}
|
|
6948
|
-
function
|
|
6948
|
+
function go(t) {
|
|
6949
6949
|
var e = t.prog, r = t.ip, n = t.stack, a = e[++r];
|
|
6950
6950
|
exports.DEBUG && console.log(t.step, "NPUSHB[]", a);
|
|
6951
6951
|
for (var s = 0; s < a; s++)
|
|
6952
6952
|
n.push(e[++r]);
|
|
6953
6953
|
t.ip = r;
|
|
6954
6954
|
}
|
|
6955
|
-
function
|
|
6955
|
+
function vo(t) {
|
|
6956
6956
|
var e = t.ip, r = t.prog, n = t.stack, a = r[++e];
|
|
6957
6957
|
exports.DEBUG && console.log(t.step, "NPUSHW[]", a);
|
|
6958
6958
|
for (var s = 0; s < a; s++) {
|
|
@@ -6961,23 +6961,23 @@ function yo(t) {
|
|
|
6961
6961
|
}
|
|
6962
6962
|
t.ip = e;
|
|
6963
6963
|
}
|
|
6964
|
-
function
|
|
6964
|
+
function yo(t) {
|
|
6965
6965
|
var e = t.stack, r = t.store;
|
|
6966
6966
|
r || (r = t.store = []);
|
|
6967
6967
|
var n = e.pop(), a = e.pop();
|
|
6968
6968
|
exports.DEBUG && console.log(t.step, "WS", n, a), r[a] = n;
|
|
6969
6969
|
}
|
|
6970
|
-
function
|
|
6970
|
+
function mo(t) {
|
|
6971
6971
|
var e = t.stack, r = t.store, n = e.pop();
|
|
6972
6972
|
exports.DEBUG && console.log(t.step, "RS", n);
|
|
6973
6973
|
var a = r && r[n] || 0;
|
|
6974
6974
|
e.push(a);
|
|
6975
6975
|
}
|
|
6976
|
-
function
|
|
6976
|
+
function xo(t) {
|
|
6977
6977
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
6978
6978
|
exports.DEBUG && console.log(t.step, "WCVTP", r, n), t.cvt[n] = r / 64;
|
|
6979
6979
|
}
|
|
6980
|
-
function
|
|
6980
|
+
function bo(t) {
|
|
6981
6981
|
var e = t.stack, r = e.pop();
|
|
6982
6982
|
exports.DEBUG && console.log(t.step, "RCVT", r), e.push(t.cvt[r] * 64);
|
|
6983
6983
|
}
|
|
@@ -6989,60 +6989,60 @@ function sn(t, e) {
|
|
|
6989
6989
|
var r = e.stack, n = r.pop(), a = r.pop(), s = e.z1[n], i = e.z0[a], o = e.dpv.distance(i, s, t, t);
|
|
6990
6990
|
exports.DEBUG && console.log(e.step, "MD[" + t + "]", n, a, "->", o), e.stack.push(Math.round(o * 64));
|
|
6991
6991
|
}
|
|
6992
|
-
function
|
|
6992
|
+
function So(t) {
|
|
6993
6993
|
exports.DEBUG && console.log(t.step, "MPPEM[]"), t.stack.push(t.ppem);
|
|
6994
6994
|
}
|
|
6995
|
-
function
|
|
6995
|
+
function ko(t) {
|
|
6996
6996
|
exports.DEBUG && console.log(t.step, "FLIPON[]"), t.autoFlip = !0;
|
|
6997
6997
|
}
|
|
6998
|
-
function
|
|
6998
|
+
function Fo(t) {
|
|
6999
6999
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7000
7000
|
exports.DEBUG && console.log(t.step, "LT[]", r, n), e.push(n < r ? 1 : 0);
|
|
7001
7001
|
}
|
|
7002
|
-
function
|
|
7002
|
+
function To(t) {
|
|
7003
7003
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7004
7004
|
exports.DEBUG && console.log(t.step, "LTEQ[]", r, n), e.push(n <= r ? 1 : 0);
|
|
7005
7005
|
}
|
|
7006
|
-
function
|
|
7006
|
+
function wo(t) {
|
|
7007
7007
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7008
7008
|
exports.DEBUG && console.log(t.step, "GT[]", r, n), e.push(n > r ? 1 : 0);
|
|
7009
7009
|
}
|
|
7010
|
-
function
|
|
7010
|
+
function Co(t) {
|
|
7011
7011
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7012
7012
|
exports.DEBUG && console.log(t.step, "GTEQ[]", r, n), e.push(n >= r ? 1 : 0);
|
|
7013
7013
|
}
|
|
7014
|
-
function
|
|
7014
|
+
function Eo(t) {
|
|
7015
7015
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7016
7016
|
exports.DEBUG && console.log(t.step, "EQ[]", r, n), e.push(r === n ? 1 : 0);
|
|
7017
7017
|
}
|
|
7018
|
-
function
|
|
7018
|
+
function Oo(t) {
|
|
7019
7019
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7020
7020
|
exports.DEBUG && console.log(t.step, "NEQ[]", r, n), e.push(r !== n ? 1 : 0);
|
|
7021
7021
|
}
|
|
7022
|
-
function
|
|
7022
|
+
function Uo(t) {
|
|
7023
7023
|
var e = t.stack, r = e.pop();
|
|
7024
7024
|
exports.DEBUG && console.log(t.step, "ODD[]", r), e.push(Math.trunc(r) % 2 ? 1 : 0);
|
|
7025
7025
|
}
|
|
7026
|
-
function
|
|
7026
|
+
function Lo(t) {
|
|
7027
7027
|
var e = t.stack, r = e.pop();
|
|
7028
7028
|
exports.DEBUG && console.log(t.step, "EVEN[]", r), e.push(Math.trunc(r) % 2 ? 0 : 1);
|
|
7029
7029
|
}
|
|
7030
|
-
function
|
|
7030
|
+
function Ro(t) {
|
|
7031
7031
|
var e = t.stack.pop();
|
|
7032
|
-
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[]"));
|
|
7033
7033
|
}
|
|
7034
7034
|
function Ao(t) {
|
|
7035
7035
|
exports.DEBUG && console.log(t.step, "EIF[]");
|
|
7036
7036
|
}
|
|
7037
|
-
function
|
|
7037
|
+
function Mo(t) {
|
|
7038
7038
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7039
7039
|
exports.DEBUG && console.log(t.step, "AND[]", r, n), e.push(r && n ? 1 : 0);
|
|
7040
7040
|
}
|
|
7041
|
-
function
|
|
7041
|
+
function Bo(t) {
|
|
7042
7042
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7043
7043
|
exports.DEBUG && console.log(t.step, "OR[]", r, n), e.push(r || n ? 1 : 0);
|
|
7044
7044
|
}
|
|
7045
|
-
function
|
|
7045
|
+
function Po(t) {
|
|
7046
7046
|
var e = t.stack, r = e.pop();
|
|
7047
7047
|
exports.DEBUG && console.log(t.step, "NOT[]", r), e.push(r ? 0 : 1);
|
|
7048
7048
|
}
|
|
@@ -7059,43 +7059,43 @@ function Lt(t, e) {
|
|
|
7059
7059
|
}
|
|
7060
7060
|
}
|
|
7061
7061
|
}
|
|
7062
|
-
function
|
|
7062
|
+
function Io(t) {
|
|
7063
7063
|
var e = t.stack, r = e.pop();
|
|
7064
7064
|
exports.DEBUG && console.log(t.step, "SDB[]", r), t.deltaBase = r;
|
|
7065
7065
|
}
|
|
7066
|
-
function
|
|
7066
|
+
function Do(t) {
|
|
7067
7067
|
var e = t.stack, r = e.pop();
|
|
7068
7068
|
exports.DEBUG && console.log(t.step, "SDS[]", r), t.deltaShift = Math.pow(0.5, r);
|
|
7069
7069
|
}
|
|
7070
|
-
function
|
|
7070
|
+
function Go(t) {
|
|
7071
7071
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7072
7072
|
exports.DEBUG && console.log(t.step, "ADD[]", r, n), e.push(n + r);
|
|
7073
7073
|
}
|
|
7074
|
-
function
|
|
7074
|
+
function No(t) {
|
|
7075
7075
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7076
7076
|
exports.DEBUG && console.log(t.step, "SUB[]", r, n), e.push(n - r);
|
|
7077
7077
|
}
|
|
7078
|
-
function
|
|
7078
|
+
function _o(t) {
|
|
7079
7079
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7080
7080
|
exports.DEBUG && console.log(t.step, "DIV[]", r, n), e.push(n * 64 / r);
|
|
7081
7081
|
}
|
|
7082
|
-
function
|
|
7082
|
+
function Ho(t) {
|
|
7083
7083
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7084
7084
|
exports.DEBUG && console.log(t.step, "MUL[]", r, n), e.push(n * r / 64);
|
|
7085
7085
|
}
|
|
7086
|
-
function
|
|
7086
|
+
function zo(t) {
|
|
7087
7087
|
var e = t.stack, r = e.pop();
|
|
7088
7088
|
exports.DEBUG && console.log(t.step, "ABS[]", r), e.push(Math.abs(r));
|
|
7089
7089
|
}
|
|
7090
|
-
function
|
|
7090
|
+
function Wo(t) {
|
|
7091
7091
|
var e = t.stack, r = e.pop();
|
|
7092
7092
|
exports.DEBUG && console.log(t.step, "NEG[]", r), e.push(-r);
|
|
7093
7093
|
}
|
|
7094
|
-
function
|
|
7094
|
+
function Vo(t) {
|
|
7095
7095
|
var e = t.stack, r = e.pop();
|
|
7096
7096
|
exports.DEBUG && console.log(t.step, "FLOOR[]", r), e.push(Math.floor(r / 64) * 64);
|
|
7097
7097
|
}
|
|
7098
|
-
function
|
|
7098
|
+
function qo(t) {
|
|
7099
7099
|
var e = t.stack, r = e.pop();
|
|
7100
7100
|
exports.DEBUG && console.log(t.step, "CEILING[]", r), e.push(Math.ceil(r / 64) * 64);
|
|
7101
7101
|
}
|
|
@@ -7103,7 +7103,7 @@ function it(t, e) {
|
|
|
7103
7103
|
var r = e.stack, n = r.pop();
|
|
7104
7104
|
exports.DEBUG && console.log(e.step, "ROUND[]"), r.push(e.round(n / 64) * 64);
|
|
7105
7105
|
}
|
|
7106
|
-
function
|
|
7106
|
+
function Xo(t) {
|
|
7107
7107
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7108
7108
|
exports.DEBUG && console.log(t.step, "WCVTF[]", r, n), t.cvt[n] = r * t.ppem / t.font.unitsPerEm;
|
|
7109
7109
|
}
|
|
@@ -7120,9 +7120,9 @@ function Rt(t, e) {
|
|
|
7120
7120
|
}
|
|
7121
7121
|
}
|
|
7122
7122
|
}
|
|
7123
|
-
function
|
|
7123
|
+
function Yo(t) {
|
|
7124
7124
|
var e = t.stack.pop();
|
|
7125
|
-
exports.DEBUG && console.log(t.step, "SROUND[]", e), t.round =
|
|
7125
|
+
exports.DEBUG && console.log(t.step, "SROUND[]", e), t.round = ga;
|
|
7126
7126
|
var r;
|
|
7127
7127
|
switch (e & 192) {
|
|
7128
7128
|
case 0:
|
|
@@ -7155,9 +7155,9 @@ function Zo(t) {
|
|
|
7155
7155
|
}
|
|
7156
7156
|
e &= 15, e === 0 ? t.srThreshold = 0 : t.srThreshold = (e / 8 - 0.5) * r;
|
|
7157
7157
|
}
|
|
7158
|
-
function
|
|
7158
|
+
function Zo(t) {
|
|
7159
7159
|
var e = t.stack.pop();
|
|
7160
|
-
exports.DEBUG && console.log(t.step, "S45ROUND[]", e), t.round =
|
|
7160
|
+
exports.DEBUG && console.log(t.step, "S45ROUND[]", e), t.round = ga;
|
|
7161
7161
|
var r;
|
|
7162
7162
|
switch (e & 192) {
|
|
7163
7163
|
case 0:
|
|
@@ -7190,16 +7190,16 @@ function jo(t) {
|
|
|
7190
7190
|
}
|
|
7191
7191
|
e &= 15, e === 0 ? t.srThreshold = 0 : t.srThreshold = (e / 8 - 0.5) * r;
|
|
7192
7192
|
}
|
|
7193
|
+
function jo(t) {
|
|
7194
|
+
exports.DEBUG && console.log(t.step, "ROFF[]"), t.round = Ui;
|
|
7195
|
+
}
|
|
7193
7196
|
function Ko(t) {
|
|
7194
|
-
exports.DEBUG && console.log(t.step, "
|
|
7197
|
+
exports.DEBUG && console.log(t.step, "RUTG[]"), t.round = Ai;
|
|
7195
7198
|
}
|
|
7196
7199
|
function Qo(t) {
|
|
7197
|
-
exports.DEBUG && console.log(t.step, "
|
|
7200
|
+
exports.DEBUG && console.log(t.step, "RDTG[]"), t.round = Mi;
|
|
7198
7201
|
}
|
|
7199
7202
|
function $o(t) {
|
|
7200
|
-
exports.DEBUG && console.log(t.step, "RDTG[]"), t.round = Bi;
|
|
7201
|
-
}
|
|
7202
|
-
function Jo(t) {
|
|
7203
7203
|
var e = t.stack.pop();
|
|
7204
7204
|
exports.DEBUG && console.log(t.step, "SCANCTRL[]", e);
|
|
7205
7205
|
}
|
|
@@ -7209,27 +7209,27 @@ function on(t, e) {
|
|
|
7209
7209
|
var o, u;
|
|
7210
7210
|
t ? (o = s.y - i.y, u = i.x - s.x) : (o = i.x - s.x, u = i.y - s.y), e.dpv = $e(o, u);
|
|
7211
7211
|
}
|
|
7212
|
-
function
|
|
7212
|
+
function Jo(t) {
|
|
7213
7213
|
var e = t.stack, r = e.pop(), n = 0;
|
|
7214
7214
|
exports.DEBUG && console.log(t.step, "GETINFO[]", r), r & 1 && (n = 35), r & 32 && (n |= 4096), e.push(n);
|
|
7215
7215
|
}
|
|
7216
|
-
function
|
|
7216
|
+
function eu(t) {
|
|
7217
7217
|
var e = t.stack, r = e.pop(), n = e.pop(), a = e.pop();
|
|
7218
7218
|
exports.DEBUG && console.log(t.step, "ROLL[]"), e.push(n), e.push(r), e.push(a);
|
|
7219
7219
|
}
|
|
7220
|
-
function
|
|
7220
|
+
function tu(t) {
|
|
7221
7221
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7222
7222
|
exports.DEBUG && console.log(t.step, "MAX[]", r, n), e.push(Math.max(n, r));
|
|
7223
7223
|
}
|
|
7224
|
-
function
|
|
7224
|
+
function ru(t) {
|
|
7225
7225
|
var e = t.stack, r = e.pop(), n = e.pop();
|
|
7226
7226
|
exports.DEBUG && console.log(t.step, "MIN[]", r, n), e.push(Math.min(n, r));
|
|
7227
7227
|
}
|
|
7228
|
-
function
|
|
7228
|
+
function nu(t) {
|
|
7229
7229
|
var e = t.stack.pop();
|
|
7230
7230
|
exports.DEBUG && console.log(t.step, "SCANTYPE[]", e);
|
|
7231
7231
|
}
|
|
7232
|
-
function
|
|
7232
|
+
function au(t) {
|
|
7233
7233
|
var e = t.stack.pop(), r = t.stack.pop();
|
|
7234
7234
|
switch (exports.DEBUG && console.log(t.step, "INSTCTRL[]", e, r), e) {
|
|
7235
7235
|
case 1:
|
|
@@ -7272,7 +7272,7 @@ function C(t, e, r, n, a, s) {
|
|
|
7272
7272
|
")"
|
|
7273
7273
|
), s.rp1 = s.rp0, s.rp2 = u, e && (s.rp0 = u);
|
|
7274
7274
|
}
|
|
7275
|
-
|
|
7275
|
+
ca = [
|
|
7276
7276
|
/* 0x00 */
|
|
7277
7277
|
Xr.bind(void 0, ve),
|
|
7278
7278
|
/* 0x01 */
|
|
@@ -7294,45 +7294,45 @@ fa = [
|
|
|
7294
7294
|
/* 0x09 */
|
|
7295
7295
|
Kr.bind(void 0, 1),
|
|
7296
7296
|
/* 0x0A */
|
|
7297
|
-
|
|
7297
|
+
Pi,
|
|
7298
7298
|
/* 0x0B */
|
|
7299
|
-
|
|
7299
|
+
Ii,
|
|
7300
7300
|
/* 0x0C */
|
|
7301
|
-
|
|
7301
|
+
Di,
|
|
7302
7302
|
/* 0x0D */
|
|
7303
|
-
|
|
7303
|
+
Gi,
|
|
7304
7304
|
/* 0x0E */
|
|
7305
|
-
|
|
7305
|
+
Ni,
|
|
7306
7306
|
/* 0x0F */
|
|
7307
|
-
|
|
7307
|
+
_i,
|
|
7308
7308
|
/* 0x10 */
|
|
7309
|
-
|
|
7309
|
+
Hi,
|
|
7310
7310
|
/* 0x11 */
|
|
7311
|
-
|
|
7311
|
+
zi,
|
|
7312
7312
|
/* 0x12 */
|
|
7313
|
-
|
|
7313
|
+
Wi,
|
|
7314
7314
|
/* 0x13 */
|
|
7315
|
-
|
|
7315
|
+
Vi,
|
|
7316
7316
|
/* 0x14 */
|
|
7317
|
-
|
|
7317
|
+
qi,
|
|
7318
7318
|
/* 0x15 */
|
|
7319
|
-
|
|
7319
|
+
Xi,
|
|
7320
7320
|
/* 0x16 */
|
|
7321
|
-
|
|
7321
|
+
Yi,
|
|
7322
7322
|
/* 0x17 */
|
|
7323
|
-
|
|
7323
|
+
Zi,
|
|
7324
7324
|
/* 0x18 */
|
|
7325
|
-
|
|
7325
|
+
ji,
|
|
7326
7326
|
/* 0x19 */
|
|
7327
|
-
|
|
7327
|
+
Ki,
|
|
7328
7328
|
/* 0x1A */
|
|
7329
|
-
|
|
7329
|
+
Qi,
|
|
7330
7330
|
/* 0x1B */
|
|
7331
|
-
|
|
7331
|
+
$i,
|
|
7332
7332
|
/* 0x1C */
|
|
7333
|
-
|
|
7333
|
+
Ji,
|
|
7334
7334
|
/* 0x1D */
|
|
7335
|
-
|
|
7335
|
+
eo,
|
|
7336
7336
|
/* 0x1E */
|
|
7337
7337
|
void 0,
|
|
7338
7338
|
// TODO SSWCI
|
|
@@ -7340,19 +7340,19 @@ fa = [
|
|
|
7340
7340
|
void 0,
|
|
7341
7341
|
// TODO SSW
|
|
7342
7342
|
/* 0x20 */
|
|
7343
|
-
|
|
7343
|
+
to,
|
|
7344
7344
|
/* 0x21 */
|
|
7345
7345
|
Ut,
|
|
7346
7346
|
/* 0x22 */
|
|
7347
|
-
|
|
7347
|
+
ro,
|
|
7348
7348
|
/* 0x23 */
|
|
7349
|
-
|
|
7349
|
+
no,
|
|
7350
7350
|
/* 0x24 */
|
|
7351
|
-
|
|
7351
|
+
ao,
|
|
7352
7352
|
/* 0x25 */
|
|
7353
|
-
|
|
7353
|
+
oo,
|
|
7354
7354
|
/* 0x26 */
|
|
7355
|
-
|
|
7355
|
+
uo,
|
|
7356
7356
|
/* 0x27 */
|
|
7357
7357
|
void 0,
|
|
7358
7358
|
// TODO ALIGNPTS
|
|
@@ -7362,11 +7362,11 @@ fa = [
|
|
|
7362
7362
|
void 0,
|
|
7363
7363
|
// TODO UTP
|
|
7364
7364
|
/* 0x2A */
|
|
7365
|
-
|
|
7365
|
+
so,
|
|
7366
7366
|
/* 0x2B */
|
|
7367
|
-
|
|
7367
|
+
io,
|
|
7368
7368
|
/* 0x2C */
|
|
7369
|
-
|
|
7369
|
+
lo,
|
|
7370
7370
|
/* 0x2D */
|
|
7371
7371
|
void 0,
|
|
7372
7372
|
// ENDF (eaten by FDEF)
|
|
@@ -7391,33 +7391,33 @@ fa = [
|
|
|
7391
7391
|
/* 0x37 */
|
|
7392
7392
|
tn.bind(void 0, 1),
|
|
7393
7393
|
/* 0x38 */
|
|
7394
|
-
|
|
7394
|
+
ho,
|
|
7395
7395
|
/* 0x39 */
|
|
7396
|
-
|
|
7396
|
+
co,
|
|
7397
7397
|
/* 0x3A */
|
|
7398
7398
|
rn.bind(void 0, 0),
|
|
7399
7399
|
/* 0x3B */
|
|
7400
7400
|
rn.bind(void 0, 1),
|
|
7401
7401
|
/* 0x3C */
|
|
7402
|
-
|
|
7402
|
+
fo,
|
|
7403
7403
|
/* 0x3D */
|
|
7404
|
-
|
|
7404
|
+
po,
|
|
7405
7405
|
/* 0x3E */
|
|
7406
7406
|
nn.bind(void 0, 0),
|
|
7407
7407
|
/* 0x3F */
|
|
7408
7408
|
nn.bind(void 0, 1),
|
|
7409
7409
|
/* 0x40 */
|
|
7410
|
-
|
|
7410
|
+
go,
|
|
7411
7411
|
/* 0x41 */
|
|
7412
|
-
|
|
7412
|
+
vo,
|
|
7413
7413
|
/* 0x42 */
|
|
7414
|
-
|
|
7414
|
+
yo,
|
|
7415
7415
|
/* 0x43 */
|
|
7416
|
-
|
|
7416
|
+
mo,
|
|
7417
7417
|
/* 0x44 */
|
|
7418
|
-
|
|
7418
|
+
xo,
|
|
7419
7419
|
/* 0x45 */
|
|
7420
|
-
|
|
7420
|
+
bo,
|
|
7421
7421
|
/* 0x46 */
|
|
7422
7422
|
an.bind(void 0, 0),
|
|
7423
7423
|
/* 0x47 */
|
|
@@ -7430,12 +7430,12 @@ fa = [
|
|
|
7430
7430
|
/* 0x4A */
|
|
7431
7431
|
sn.bind(void 0, 1),
|
|
7432
7432
|
/* 0x4B */
|
|
7433
|
-
|
|
7433
|
+
So,
|
|
7434
7434
|
/* 0x4C */
|
|
7435
7435
|
void 0,
|
|
7436
7436
|
// TODO MPS
|
|
7437
7437
|
/* 0x4D */
|
|
7438
|
-
|
|
7438
|
+
ko,
|
|
7439
7439
|
/* 0x4E */
|
|
7440
7440
|
void 0,
|
|
7441
7441
|
// TODO FLIPOFF
|
|
@@ -7443,53 +7443,53 @@ fa = [
|
|
|
7443
7443
|
void 0,
|
|
7444
7444
|
// TODO DEBUG
|
|
7445
7445
|
/* 0x50 */
|
|
7446
|
-
|
|
7446
|
+
Fo,
|
|
7447
7447
|
/* 0x51 */
|
|
7448
|
-
|
|
7448
|
+
To,
|
|
7449
7449
|
/* 0x52 */
|
|
7450
|
-
|
|
7450
|
+
wo,
|
|
7451
7451
|
/* 0x53 */
|
|
7452
|
-
|
|
7452
|
+
Co,
|
|
7453
7453
|
/* 0x54 */
|
|
7454
|
-
|
|
7454
|
+
Eo,
|
|
7455
7455
|
/* 0x55 */
|
|
7456
|
-
|
|
7456
|
+
Oo,
|
|
7457
7457
|
/* 0x56 */
|
|
7458
|
-
|
|
7458
|
+
Uo,
|
|
7459
7459
|
/* 0x57 */
|
|
7460
|
-
|
|
7460
|
+
Lo,
|
|
7461
7461
|
/* 0x58 */
|
|
7462
|
-
|
|
7462
|
+
Ro,
|
|
7463
7463
|
/* 0x59 */
|
|
7464
7464
|
Ao,
|
|
7465
7465
|
/* 0x5A */
|
|
7466
|
-
|
|
7466
|
+
Mo,
|
|
7467
7467
|
/* 0x5B */
|
|
7468
|
-
|
|
7468
|
+
Bo,
|
|
7469
7469
|
/* 0x5C */
|
|
7470
|
-
|
|
7470
|
+
Po,
|
|
7471
7471
|
/* 0x5D */
|
|
7472
7472
|
Lt.bind(void 0, 1),
|
|
7473
7473
|
/* 0x5E */
|
|
7474
|
-
|
|
7474
|
+
Io,
|
|
7475
7475
|
/* 0x5F */
|
|
7476
|
-
|
|
7476
|
+
Do,
|
|
7477
7477
|
/* 0x60 */
|
|
7478
|
-
|
|
7478
|
+
Go,
|
|
7479
7479
|
/* 0x61 */
|
|
7480
|
-
|
|
7480
|
+
No,
|
|
7481
7481
|
/* 0x62 */
|
|
7482
|
-
|
|
7482
|
+
_o,
|
|
7483
7483
|
/* 0x63 */
|
|
7484
|
-
|
|
7484
|
+
Ho,
|
|
7485
7485
|
/* 0x64 */
|
|
7486
|
-
|
|
7486
|
+
zo,
|
|
7487
7487
|
/* 0x65 */
|
|
7488
|
-
|
|
7488
|
+
Wo,
|
|
7489
7489
|
/* 0x66 */
|
|
7490
|
-
|
|
7490
|
+
Vo,
|
|
7491
7491
|
/* 0x67 */
|
|
7492
|
-
|
|
7492
|
+
qo,
|
|
7493
7493
|
/* 0x68 */
|
|
7494
7494
|
it.bind(void 0, 0),
|
|
7495
7495
|
/* 0x69 */
|
|
@@ -7511,7 +7511,7 @@ fa = [
|
|
|
7511
7511
|
void 0,
|
|
7512
7512
|
// TODO NROUND[ab]
|
|
7513
7513
|
/* 0x70 */
|
|
7514
|
-
|
|
7514
|
+
Xo,
|
|
7515
7515
|
/* 0x71 */
|
|
7516
7516
|
Lt.bind(void 0, 2),
|
|
7517
7517
|
/* 0x72 */
|
|
@@ -7523,9 +7523,9 @@ fa = [
|
|
|
7523
7523
|
/* 0x75 */
|
|
7524
7524
|
Rt.bind(void 0, 3),
|
|
7525
7525
|
/* 0x76 */
|
|
7526
|
-
|
|
7526
|
+
Yo,
|
|
7527
7527
|
/* 0x77 */
|
|
7528
|
-
|
|
7528
|
+
Zo,
|
|
7529
7529
|
/* 0x78 */
|
|
7530
7530
|
void 0,
|
|
7531
7531
|
// TODO JROT[]
|
|
@@ -7533,13 +7533,13 @@ fa = [
|
|
|
7533
7533
|
void 0,
|
|
7534
7534
|
// TODO JROF[]
|
|
7535
7535
|
/* 0x7A */
|
|
7536
|
-
|
|
7536
|
+
jo,
|
|
7537
7537
|
/* 0x7B */
|
|
7538
7538
|
void 0,
|
|
7539
7539
|
/* 0x7C */
|
|
7540
|
-
|
|
7540
|
+
Ko,
|
|
7541
7541
|
/* 0x7D */
|
|
7542
|
-
|
|
7542
|
+
Qo,
|
|
7543
7543
|
/* 0x7E */
|
|
7544
7544
|
Ut,
|
|
7545
7545
|
// actually SANGW, supposed to do only a pop though
|
|
@@ -7560,26 +7560,26 @@ fa = [
|
|
|
7560
7560
|
/* 0x84 */
|
|
7561
7561
|
void 0,
|
|
7562
7562
|
/* 0x85 */
|
|
7563
|
-
|
|
7563
|
+
$o,
|
|
7564
7564
|
/* 0x86 */
|
|
7565
7565
|
on.bind(void 0, 0),
|
|
7566
7566
|
/* 0x87 */
|
|
7567
7567
|
on.bind(void 0, 1),
|
|
7568
7568
|
/* 0x88 */
|
|
7569
|
-
|
|
7569
|
+
Jo,
|
|
7570
7570
|
/* 0x89 */
|
|
7571
7571
|
void 0,
|
|
7572
7572
|
// TODO IDEF
|
|
7573
7573
|
/* 0x8A */
|
|
7574
|
-
|
|
7574
|
+
eu,
|
|
7575
7575
|
/* 0x8B */
|
|
7576
|
-
|
|
7576
|
+
tu,
|
|
7577
7577
|
/* 0x8C */
|
|
7578
|
-
|
|
7578
|
+
ru,
|
|
7579
7579
|
/* 0x8D */
|
|
7580
|
-
|
|
7580
|
+
nu,
|
|
7581
7581
|
/* 0x8E */
|
|
7582
|
-
|
|
7582
|
+
au,
|
|
7583
7583
|
/* 0x8F */
|
|
7584
7584
|
void 0,
|
|
7585
7585
|
/* 0x90 */
|
|
@@ -7813,7 +7813,7 @@ function Ne(t) {
|
|
|
7813
7813
|
function cr(t, e, r) {
|
|
7814
7814
|
this.contextName = r, this.startIndex = t, this.endOffset = e;
|
|
7815
7815
|
}
|
|
7816
|
-
function
|
|
7816
|
+
function su(t, e, r) {
|
|
7817
7817
|
this.contextName = t, this.openRange = null, this.ranges = [], this.checkStart = e, this.checkEnd = r;
|
|
7818
7818
|
}
|
|
7819
7819
|
function oe(t, e) {
|
|
@@ -7822,7 +7822,7 @@ function oe(t, e) {
|
|
|
7822
7822
|
function xt(t) {
|
|
7823
7823
|
this.eventId = t, this.subscribers = [];
|
|
7824
7824
|
}
|
|
7825
|
-
function
|
|
7825
|
+
function iu(t) {
|
|
7826
7826
|
var e = this, r = [
|
|
7827
7827
|
"start",
|
|
7828
7828
|
"end",
|
|
@@ -7861,7 +7861,7 @@ function ou(t) {
|
|
|
7861
7861
|
});
|
|
7862
7862
|
}
|
|
7863
7863
|
function G(t) {
|
|
7864
|
-
this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [],
|
|
7864
|
+
this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], iu.call(this, t);
|
|
7865
7865
|
}
|
|
7866
7866
|
Ne.prototype.setState = function(t, e) {
|
|
7867
7867
|
return this.state[t] = e, this.activeState = { key: t, value: this.state[t] }, this.activeState;
|
|
@@ -7999,7 +7999,7 @@ G.prototype.registerContextChecker = function(t, e, r) {
|
|
|
7999
7999
|
return {
|
|
8000
8000
|
FAIL: "missing context end check."
|
|
8001
8001
|
};
|
|
8002
|
-
var n = new
|
|
8002
|
+
var n = new su(
|
|
8003
8003
|
t,
|
|
8004
8004
|
e,
|
|
8005
8005
|
r
|
|
@@ -8063,7 +8063,7 @@ G.prototype.tokenize = function(t) {
|
|
|
8063
8063
|
function Fe(t) {
|
|
8064
8064
|
return /[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(t);
|
|
8065
8065
|
}
|
|
8066
|
-
function
|
|
8066
|
+
function ya(t) {
|
|
8067
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);
|
|
8068
8068
|
}
|
|
8069
8069
|
function Te(t) {
|
|
@@ -8072,7 +8072,7 @@ function Te(t) {
|
|
|
8072
8072
|
function lt(t) {
|
|
8073
8073
|
return /[A-z]/.test(t);
|
|
8074
8074
|
}
|
|
8075
|
-
function
|
|
8075
|
+
function ou(t) {
|
|
8076
8076
|
return /\s/.test(t);
|
|
8077
8077
|
}
|
|
8078
8078
|
function ne(t) {
|
|
@@ -8101,15 +8101,15 @@ function Je(t, e) {
|
|
|
8101
8101
|
}
|
|
8102
8102
|
return -1;
|
|
8103
8103
|
}
|
|
8104
|
-
function
|
|
8104
|
+
function uu(t, e) {
|
|
8105
8105
|
var r = Je(t, e.coverage);
|
|
8106
8106
|
return r === -1 ? null : t + e.deltaGlyphId;
|
|
8107
8107
|
}
|
|
8108
|
-
function
|
|
8108
|
+
function lu(t, e) {
|
|
8109
8109
|
var r = Je(t, e.coverage);
|
|
8110
8110
|
return r === -1 ? null : e.substitute[r];
|
|
8111
8111
|
}
|
|
8112
|
-
function
|
|
8112
|
+
function At(t, e) {
|
|
8113
8113
|
for (var r = [], n = 0; n < t.length; n++) {
|
|
8114
8114
|
var a = t[n], s = e.current;
|
|
8115
8115
|
s = Array.isArray(s) ? s[0] : s;
|
|
@@ -8118,11 +8118,11 @@ function Mt(t, e) {
|
|
|
8118
8118
|
}
|
|
8119
8119
|
return r.length !== t.length ? -1 : r;
|
|
8120
8120
|
}
|
|
8121
|
-
function
|
|
8121
|
+
function hu(t, e) {
|
|
8122
8122
|
var r = e.inputCoverage.length + e.lookaheadCoverage.length + e.backtrackCoverage.length;
|
|
8123
8123
|
if (t.context.length < r)
|
|
8124
8124
|
return [];
|
|
8125
|
-
var n =
|
|
8125
|
+
var n = At(
|
|
8126
8126
|
e.inputCoverage,
|
|
8127
8127
|
t
|
|
8128
8128
|
);
|
|
@@ -8133,7 +8133,7 @@ function cu(t, e) {
|
|
|
8133
8133
|
return [];
|
|
8134
8134
|
for (var s = t.lookahead.slice(a); s.length && Te(s[0].char); )
|
|
8135
8135
|
s.shift();
|
|
8136
|
-
var i = new oe(s, 0), o =
|
|
8136
|
+
var i = new oe(s, 0), o = At(
|
|
8137
8137
|
e.lookaheadCoverage,
|
|
8138
8138
|
i
|
|
8139
8139
|
), u = [].concat(t.backtrack);
|
|
@@ -8141,7 +8141,7 @@ function cu(t, e) {
|
|
|
8141
8141
|
u.shift();
|
|
8142
8142
|
if (u.length < e.backtrackCoverage.length)
|
|
8143
8143
|
return [];
|
|
8144
|
-
var l = new oe(u, 0), h =
|
|
8144
|
+
var l = new oe(u, 0), h = At(
|
|
8145
8145
|
e.backtrackCoverage,
|
|
8146
8146
|
l
|
|
8147
8147
|
), f = n.length === e.inputCoverage.length && o.length === e.lookaheadCoverage.length && h.length === e.backtrackCoverage.length, c = [];
|
|
@@ -8151,13 +8151,13 @@ function cu(t, e) {
|
|
|
8151
8151
|
var b = m.subtables[y], x = this.getLookupMethod(m, b), T = this.getSubstitutionType(m, b);
|
|
8152
8152
|
if (T === "12")
|
|
8153
8153
|
for (var S = 0; S < n.length; S++) {
|
|
8154
|
-
var
|
|
8154
|
+
var A = t.get(S), O = x(A);
|
|
8155
8155
|
O && c.push(O);
|
|
8156
8156
|
}
|
|
8157
8157
|
}
|
|
8158
8158
|
return c;
|
|
8159
8159
|
}
|
|
8160
|
-
function
|
|
8160
|
+
function cu(t, e) {
|
|
8161
8161
|
var r = t.current, n = Je(r, e.coverage);
|
|
8162
8162
|
if (n === -1)
|
|
8163
8163
|
return null;
|
|
@@ -8173,7 +8173,7 @@ function fu(t, e) {
|
|
|
8173
8173
|
}
|
|
8174
8174
|
return null;
|
|
8175
8175
|
}
|
|
8176
|
-
function
|
|
8176
|
+
function fu(t, e) {
|
|
8177
8177
|
var r = Je(t, e.coverage);
|
|
8178
8178
|
return r === -1 ? null : e.sequences[r];
|
|
8179
8179
|
}
|
|
@@ -8235,35 +8235,35 @@ ne.prototype.getLookupMethod = function(t, e) {
|
|
|
8235
8235
|
switch (n) {
|
|
8236
8236
|
case "11":
|
|
8237
8237
|
return function(a) {
|
|
8238
|
-
return
|
|
8238
|
+
return uu.apply(
|
|
8239
8239
|
r,
|
|
8240
8240
|
[a, e]
|
|
8241
8241
|
);
|
|
8242
8242
|
};
|
|
8243
8243
|
case "12":
|
|
8244
8244
|
return function(a) {
|
|
8245
|
-
return
|
|
8245
|
+
return lu.apply(
|
|
8246
8246
|
r,
|
|
8247
8247
|
[a, e]
|
|
8248
8248
|
);
|
|
8249
8249
|
};
|
|
8250
8250
|
case "63":
|
|
8251
8251
|
return function(a) {
|
|
8252
|
-
return
|
|
8252
|
+
return hu.apply(
|
|
8253
8253
|
r,
|
|
8254
8254
|
[a, e]
|
|
8255
8255
|
);
|
|
8256
8256
|
};
|
|
8257
8257
|
case "41":
|
|
8258
8258
|
return function(a) {
|
|
8259
|
-
return
|
|
8259
|
+
return cu.apply(
|
|
8260
8260
|
r,
|
|
8261
8261
|
[a, e]
|
|
8262
8262
|
);
|
|
8263
8263
|
};
|
|
8264
8264
|
case "21":
|
|
8265
8265
|
return function(a) {
|
|
8266
|
-
return
|
|
8266
|
+
return fu.apply(
|
|
8267
8267
|
r,
|
|
8268
8268
|
[a, e]
|
|
8269
8269
|
);
|
|
@@ -8356,7 +8356,7 @@ ne.prototype.getFeature = function(e) {
|
|
|
8356
8356
|
var r = this.features[e.script];
|
|
8357
8357
|
return r ? r.tags[e.tag] ? this.features[e.script].tags[e.tag] : null : { FAIL: "No feature for script " + e.script };
|
|
8358
8358
|
};
|
|
8359
|
-
function
|
|
8359
|
+
function pu(t) {
|
|
8360
8360
|
var e = t.current, r = t.get(-1);
|
|
8361
8361
|
return (
|
|
8362
8362
|
// ? arabic first char
|
|
@@ -8364,7 +8364,7 @@ function du(t) {
|
|
|
8364
8364
|
!Fe(r) && Fe(e)
|
|
8365
8365
|
);
|
|
8366
8366
|
}
|
|
8367
|
-
function
|
|
8367
|
+
function du(t) {
|
|
8368
8368
|
var e = t.get(1);
|
|
8369
8369
|
return (
|
|
8370
8370
|
// ? last arabic char
|
|
@@ -8372,24 +8372,24 @@ function gu(t) {
|
|
|
8372
8372
|
!Fe(e)
|
|
8373
8373
|
);
|
|
8374
8374
|
}
|
|
8375
|
-
var
|
|
8376
|
-
startCheck:
|
|
8377
|
-
endCheck:
|
|
8375
|
+
var gu = {
|
|
8376
|
+
startCheck: pu,
|
|
8377
|
+
endCheck: du
|
|
8378
8378
|
};
|
|
8379
|
-
function
|
|
8379
|
+
function vu(t) {
|
|
8380
8380
|
var e = t.current, r = t.get(-1);
|
|
8381
8381
|
return (
|
|
8382
8382
|
// ? an arabic char preceded with a non arabic char
|
|
8383
8383
|
(Fe(e) || Te(e)) && !Fe(r)
|
|
8384
8384
|
);
|
|
8385
8385
|
}
|
|
8386
|
-
function
|
|
8386
|
+
function yu(t) {
|
|
8387
8387
|
var e = t.get(1);
|
|
8388
8388
|
switch (!0) {
|
|
8389
8389
|
case e === null:
|
|
8390
8390
|
return !0;
|
|
8391
8391
|
case (!Fe(e) && !Te(e)):
|
|
8392
|
-
var r =
|
|
8392
|
+
var r = ou(e);
|
|
8393
8393
|
if (!r)
|
|
8394
8394
|
return !0;
|
|
8395
8395
|
if (r) {
|
|
@@ -8406,40 +8406,40 @@ function mu(t) {
|
|
|
8406
8406
|
return !1;
|
|
8407
8407
|
}
|
|
8408
8408
|
}
|
|
8409
|
-
var
|
|
8410
|
-
startCheck:
|
|
8411
|
-
endCheck:
|
|
8409
|
+
var mu = {
|
|
8410
|
+
startCheck: vu,
|
|
8411
|
+
endCheck: yu
|
|
8412
8412
|
};
|
|
8413
|
-
function
|
|
8413
|
+
function xu(t, e, r) {
|
|
8414
8414
|
e[r].setState(t.tag, t.substitution);
|
|
8415
8415
|
}
|
|
8416
|
-
function
|
|
8416
|
+
function bu(t, e, r) {
|
|
8417
8417
|
e[r].setState(t.tag, t.substitution);
|
|
8418
8418
|
}
|
|
8419
|
-
function
|
|
8419
|
+
function Su(t, e, r) {
|
|
8420
8420
|
t.substitution.forEach(function(n, a) {
|
|
8421
8421
|
var s = e[r + a];
|
|
8422
8422
|
s.setState(t.tag, n);
|
|
8423
8423
|
});
|
|
8424
8424
|
}
|
|
8425
|
-
function
|
|
8425
|
+
function ku(t, e, r) {
|
|
8426
8426
|
var n = e[r];
|
|
8427
8427
|
n.setState(t.tag, t.substitution.ligGlyph);
|
|
8428
8428
|
for (var a = t.substitution.components.length, s = 0; s < a; s++)
|
|
8429
8429
|
n = e[r + s + 1], n.setState("deleted", !0);
|
|
8430
8430
|
}
|
|
8431
8431
|
var un = {
|
|
8432
|
-
11:
|
|
8433
|
-
12:
|
|
8434
|
-
63:
|
|
8435
|
-
41:
|
|
8432
|
+
11: xu,
|
|
8433
|
+
12: bu,
|
|
8434
|
+
63: Su,
|
|
8435
|
+
41: ku
|
|
8436
8436
|
};
|
|
8437
8437
|
function fr(t, e, r) {
|
|
8438
8438
|
t instanceof Le && un[t.id] && un[t.id](t, e, r);
|
|
8439
8439
|
}
|
|
8440
|
-
function
|
|
8440
|
+
function Fu(t) {
|
|
8441
8441
|
for (var e = [].concat(t.backtrack), r = e.length - 1; r >= 0; r--) {
|
|
8442
|
-
var n = e[r], a =
|
|
8442
|
+
var n = e[r], a = ya(n), s = Te(n);
|
|
8443
8443
|
if (!a && !s)
|
|
8444
8444
|
return !0;
|
|
8445
8445
|
if (a)
|
|
@@ -8447,8 +8447,8 @@ function Tu(t) {
|
|
|
8447
8447
|
}
|
|
8448
8448
|
return !1;
|
|
8449
8449
|
}
|
|
8450
|
-
function
|
|
8451
|
-
if (
|
|
8450
|
+
function Tu(t) {
|
|
8451
|
+
if (ya(t.current))
|
|
8452
8452
|
return !1;
|
|
8453
8453
|
for (var e = 0; e < t.lookahead.length; e++) {
|
|
8454
8454
|
var r = t.lookahead[e], n = Te(r);
|
|
@@ -8457,7 +8457,7 @@ function wu(t) {
|
|
|
8457
8457
|
}
|
|
8458
8458
|
return !1;
|
|
8459
8459
|
}
|
|
8460
|
-
function
|
|
8460
|
+
function wu(t) {
|
|
8461
8461
|
var e = this, r = "arab", n = this.featuresTags[r], a = this.tokenizer.getRangeTokens(t);
|
|
8462
8462
|
if (a.length !== 1) {
|
|
8463
8463
|
var s = new oe(
|
|
@@ -8479,7 +8479,7 @@ function Cu(t) {
|
|
|
8479
8479
|
if (!Te(o.char)) {
|
|
8480
8480
|
s.setCurrentIndex(u), i.setCurrentIndex(u);
|
|
8481
8481
|
var l = 0;
|
|
8482
|
-
|
|
8482
|
+
Fu(i) && (l |= 1), Tu(i) && (l |= 2);
|
|
8483
8483
|
var h;
|
|
8484
8484
|
switch (l) {
|
|
8485
8485
|
case 1:
|
|
@@ -8514,7 +8514,7 @@ function ln(t, e) {
|
|
|
8514
8514
|
});
|
|
8515
8515
|
return new oe(r, 0);
|
|
8516
8516
|
}
|
|
8517
|
-
function
|
|
8517
|
+
function Cu(t) {
|
|
8518
8518
|
var e = this, r = "arab", n = this.tokenizer.getRangeTokens(t), a = ln(n);
|
|
8519
8519
|
a.context.forEach(function(s, i) {
|
|
8520
8520
|
a.setCurrentIndex(i);
|
|
@@ -8530,7 +8530,7 @@ function Eu(t) {
|
|
|
8530
8530
|
), a = ln(n));
|
|
8531
8531
|
});
|
|
8532
8532
|
}
|
|
8533
|
-
function
|
|
8533
|
+
function Eu(t) {
|
|
8534
8534
|
var e = t.current, r = t.get(-1);
|
|
8535
8535
|
return (
|
|
8536
8536
|
// ? latin first char
|
|
@@ -8538,7 +8538,7 @@ function Ou(t) {
|
|
|
8538
8538
|
!lt(r) && lt(e)
|
|
8539
8539
|
);
|
|
8540
8540
|
}
|
|
8541
|
-
function
|
|
8541
|
+
function Ou(t) {
|
|
8542
8542
|
var e = t.get(1);
|
|
8543
8543
|
return (
|
|
8544
8544
|
// ? last latin char
|
|
@@ -8546,9 +8546,9 @@ function Uu(t) {
|
|
|
8546
8546
|
!lt(e)
|
|
8547
8547
|
);
|
|
8548
8548
|
}
|
|
8549
|
-
var
|
|
8550
|
-
startCheck:
|
|
8551
|
-
endCheck:
|
|
8549
|
+
var Uu = {
|
|
8550
|
+
startCheck: Eu,
|
|
8551
|
+
endCheck: Ou
|
|
8552
8552
|
};
|
|
8553
8553
|
function hn(t, e) {
|
|
8554
8554
|
var r = t.map(function(n) {
|
|
@@ -8556,7 +8556,7 @@ function hn(t, e) {
|
|
|
8556
8556
|
});
|
|
8557
8557
|
return new oe(r, 0);
|
|
8558
8558
|
}
|
|
8559
|
-
function
|
|
8559
|
+
function Lu(t) {
|
|
8560
8560
|
var e = this, r = "latn", n = this.tokenizer.getRangeTokens(t), a = hn(n);
|
|
8561
8561
|
a.context.forEach(function(s, i) {
|
|
8562
8562
|
a.setCurrentIndex(i);
|
|
@@ -8579,11 +8579,11 @@ he.prototype.setText = function(t) {
|
|
|
8579
8579
|
this.text = t;
|
|
8580
8580
|
};
|
|
8581
8581
|
he.prototype.contextChecks = {
|
|
8582
|
-
latinWordCheck:
|
|
8583
|
-
arabicWordCheck:
|
|
8584
|
-
arabicSentenceCheck:
|
|
8582
|
+
latinWordCheck: Uu,
|
|
8583
|
+
arabicWordCheck: gu,
|
|
8584
|
+
arabicSentenceCheck: mu
|
|
8585
8585
|
};
|
|
8586
|
-
function
|
|
8586
|
+
function Mt(t) {
|
|
8587
8587
|
var e = this.contextChecks[t + "Check"];
|
|
8588
8588
|
return this.tokenizer.registerContextChecker(
|
|
8589
8589
|
t,
|
|
@@ -8591,8 +8591,8 @@ function At(t) {
|
|
|
8591
8591
|
e.endCheck
|
|
8592
8592
|
);
|
|
8593
8593
|
}
|
|
8594
|
-
function
|
|
8595
|
-
return
|
|
8594
|
+
function Ru() {
|
|
8595
|
+
return Mt.call(this, "latinWord"), Mt.call(this, "arabicWord"), Mt.call(this, "arabicSentence"), this.tokenizer.tokenize(this.text);
|
|
8596
8596
|
}
|
|
8597
8597
|
function Au() {
|
|
8598
8598
|
var t = this, e = this.tokenizer.getContextRanges("arabicSentence");
|
|
@@ -8633,17 +8633,17 @@ function pr() {
|
|
|
8633
8633
|
"glyphIndex modifier is required to apply arabic presentation features."
|
|
8634
8634
|
);
|
|
8635
8635
|
}
|
|
8636
|
-
function
|
|
8636
|
+
function Mu() {
|
|
8637
8637
|
var t = this, e = "arab";
|
|
8638
8638
|
if (this.featuresTags.hasOwnProperty(e)) {
|
|
8639
8639
|
pr.call(this);
|
|
8640
8640
|
var r = this.tokenizer.getContextRanges("arabicWord");
|
|
8641
8641
|
r.forEach(function(n) {
|
|
8642
|
-
|
|
8642
|
+
wu.call(t, n);
|
|
8643
8643
|
});
|
|
8644
8644
|
}
|
|
8645
8645
|
}
|
|
8646
|
-
function
|
|
8646
|
+
function Bu() {
|
|
8647
8647
|
var t = this, e = "arab";
|
|
8648
8648
|
if (this.featuresTags.hasOwnProperty(e)) {
|
|
8649
8649
|
var r = this.featuresTags[e];
|
|
@@ -8651,12 +8651,12 @@ function Pu() {
|
|
|
8651
8651
|
pr.call(this);
|
|
8652
8652
|
var n = this.tokenizer.getContextRanges("arabicWord");
|
|
8653
8653
|
n.forEach(function(a) {
|
|
8654
|
-
|
|
8654
|
+
Cu.call(t, a);
|
|
8655
8655
|
});
|
|
8656
8656
|
}
|
|
8657
8657
|
}
|
|
8658
8658
|
}
|
|
8659
|
-
function
|
|
8659
|
+
function Pu() {
|
|
8660
8660
|
var t = this, e = "latn";
|
|
8661
8661
|
if (this.featuresTags.hasOwnProperty(e)) {
|
|
8662
8662
|
var r = this.featuresTags[e];
|
|
@@ -8664,7 +8664,7 @@ function Iu() {
|
|
|
8664
8664
|
pr.call(this);
|
|
8665
8665
|
var n = this.tokenizer.getContextRanges("latinWord");
|
|
8666
8666
|
n.forEach(function(a) {
|
|
8667
|
-
|
|
8667
|
+
Lu.call(t, a);
|
|
8668
8668
|
});
|
|
8669
8669
|
}
|
|
8670
8670
|
}
|
|
@@ -8673,10 +8673,10 @@ he.prototype.checkContextReady = function(t) {
|
|
|
8673
8673
|
return !!this.tokenizer.getContext(t);
|
|
8674
8674
|
};
|
|
8675
8675
|
he.prototype.applyFeaturesToContexts = function() {
|
|
8676
|
-
this.checkContextReady("arabicWord") && (
|
|
8676
|
+
this.checkContextReady("arabicWord") && (Mu.call(this), Bu.call(this)), this.checkContextReady("latinWord") && Pu.call(this), this.checkContextReady("arabicSentence") && Au.call(this);
|
|
8677
8677
|
};
|
|
8678
8678
|
he.prototype.processText = function(t) {
|
|
8679
|
-
(!this.text || this.text !== t) && (this.setText(t),
|
|
8679
|
+
(!this.text || this.text !== t) && (this.setText(t), Ru.call(this), this.applyFeaturesToContexts());
|
|
8680
8680
|
};
|
|
8681
8681
|
he.prototype.getBidiText = function(t) {
|
|
8682
8682
|
return this.processText(t), this.tokenizer.getText();
|
|
@@ -8715,12 +8715,12 @@ function B(t) {
|
|
|
8715
8715
|
usWidthClass: t.widthClass || this.usWidthClasses.MEDIUM,
|
|
8716
8716
|
fsSelection: t.fsSelection || this.fsSelectionValues.REGULAR
|
|
8717
8717
|
}, t.tables.os2)
|
|
8718
|
-
})), this.supported = !0, this.glyphs = new ge.GlyphSet(this, t.glyphs || []), this.encoding = new
|
|
8718
|
+
})), this.supported = !0, this.glyphs = new ge.GlyphSet(this, t.glyphs || []), this.encoding = new In(this), this.position = new Ke(this), this.substitution = new re(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
|
|
8719
8719
|
get: function() {
|
|
8720
8720
|
if (this._hinting)
|
|
8721
8721
|
return this._hinting;
|
|
8722
8722
|
if (this.outlinesFormat === "truetype")
|
|
8723
|
-
return this._hinting = new
|
|
8723
|
+
return this._hinting = new pa(this);
|
|
8724
8724
|
}
|
|
8725
8725
|
});
|
|
8726
8726
|
}
|
|
@@ -8845,7 +8845,7 @@ B.prototype.validate = function() {
|
|
|
8845
8845
|
r("fontFamily"), r("weightName"), r("manufacturer"), r("copyright"), r("version"), this.unitsPerEm > 0;
|
|
8846
8846
|
};
|
|
8847
8847
|
B.prototype.toTables = function() {
|
|
8848
|
-
return
|
|
8848
|
+
return Si.fontToTable(this);
|
|
8849
8849
|
};
|
|
8850
8850
|
B.prototype.toBuffer = function() {
|
|
8851
8851
|
return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."), this.toArrayBuffer();
|
|
@@ -8859,7 +8859,7 @@ B.prototype.download = function(t) {
|
|
|
8859
8859
|
var e = this.getEnglishName("fontFamily"), r = this.getEnglishName("fontSubfamily");
|
|
8860
8860
|
t = t || e.replace(/\s/g, "") + "-" + r + ".otf";
|
|
8861
8861
|
var n = this.toArrayBuffer();
|
|
8862
|
-
if (
|
|
8862
|
+
if (Fi())
|
|
8863
8863
|
if (window.URL = window.URL || window.webkitURL, window.URL) {
|
|
8864
8864
|
var a = new DataView(n), s = new Blob([a], { type: "font/opentype" }), i = document.createElement("a");
|
|
8865
8865
|
i.href = window.URL.createObjectURL(s), i.download = t;
|
|
@@ -8868,7 +8868,7 @@ B.prototype.download = function(t) {
|
|
|
8868
8868
|
} else
|
|
8869
8869
|
console.warn("Font file could not be downloaded. Try using a different browser.");
|
|
8870
8870
|
else {
|
|
8871
|
-
var u = require("fs"), l =
|
|
8871
|
+
var u = require("fs"), l = Ti(n);
|
|
8872
8872
|
u.writeFileSync(t, l);
|
|
8873
8873
|
}
|
|
8874
8874
|
};
|
|
@@ -8916,7 +8916,7 @@ B.prototype.usWeightClasses = {
|
|
|
8916
8916
|
EXTRA_BOLD: 800,
|
|
8917
8917
|
BLACK: 900
|
|
8918
8918
|
};
|
|
8919
|
-
function
|
|
8919
|
+
function ma(t, e) {
|
|
8920
8920
|
var r = JSON.stringify(t), n = 256;
|
|
8921
8921
|
for (var a in e) {
|
|
8922
8922
|
var s = parseInt(a);
|
|
@@ -8928,8 +8928,8 @@ function xa(t, e) {
|
|
|
8928
8928
|
}
|
|
8929
8929
|
return e[n] = t, n;
|
|
8930
8930
|
}
|
|
8931
|
-
function
|
|
8932
|
-
var n =
|
|
8931
|
+
function Iu(t, e, r) {
|
|
8932
|
+
var n = ma(e.name, r);
|
|
8933
8933
|
return [
|
|
8934
8934
|
{ name: "tag_" + t, type: "TAG", value: e.tag },
|
|
8935
8935
|
{ name: "minValue_" + t, type: "FIXED", value: e.minValue << 16 },
|
|
@@ -8939,12 +8939,12 @@ function Du(t, e, r) {
|
|
|
8939
8939
|
{ name: "nameID_" + t, type: "USHORT", value: n }
|
|
8940
8940
|
];
|
|
8941
8941
|
}
|
|
8942
|
-
function
|
|
8942
|
+
function Du(t, e, r) {
|
|
8943
8943
|
var n = {}, a = new E.Parser(t, e);
|
|
8944
8944
|
return n.tag = a.parseTag(), n.minValue = a.parseFixed(), n.defaultValue = a.parseFixed(), n.maxValue = a.parseFixed(), a.skip("uShort", 1), n.name = r[a.parseUShort()] || {}, n;
|
|
8945
8945
|
}
|
|
8946
|
-
function
|
|
8947
|
-
for (var a =
|
|
8946
|
+
function Gu(t, e, r, n) {
|
|
8947
|
+
for (var a = ma(e.name, n), s = [
|
|
8948
8948
|
{ name: "nameID_" + t, type: "USHORT", value: a },
|
|
8949
8949
|
{ name: "flags_" + t, type: "USHORT", value: 0 }
|
|
8950
8950
|
], i = 0; i < r.length; ++i) {
|
|
@@ -8957,14 +8957,14 @@ function Nu(t, e, r, n) {
|
|
|
8957
8957
|
}
|
|
8958
8958
|
return s;
|
|
8959
8959
|
}
|
|
8960
|
-
function
|
|
8960
|
+
function Nu(t, e, r, n) {
|
|
8961
8961
|
var a = {}, s = new E.Parser(t, e);
|
|
8962
8962
|
a.name = n[s.parseUShort()] || {}, s.skip("uShort", 1), a.coordinates = {};
|
|
8963
8963
|
for (var i = 0; i < r.length; ++i)
|
|
8964
8964
|
a.coordinates[r[i].tag] = s.parseFixed();
|
|
8965
8965
|
return a;
|
|
8966
8966
|
}
|
|
8967
|
-
function
|
|
8967
|
+
function _u(t, e) {
|
|
8968
8968
|
var r = new F.Table("fvar", [
|
|
8969
8969
|
{ name: "version", type: "ULONG", value: 65536 },
|
|
8970
8970
|
{ name: "offsetToData", type: "USHORT", value: 0 },
|
|
@@ -8976,28 +8976,28 @@ function Hu(t, e) {
|
|
|
8976
8976
|
]);
|
|
8977
8977
|
r.offsetToData = r.sizeOf();
|
|
8978
8978
|
for (var n = 0; n < t.axes.length; n++)
|
|
8979
|
-
r.fields = r.fields.concat(
|
|
8979
|
+
r.fields = r.fields.concat(Iu(n, t.axes[n], e));
|
|
8980
8980
|
for (var a = 0; a < t.instances.length; a++)
|
|
8981
|
-
r.fields = r.fields.concat(
|
|
8981
|
+
r.fields = r.fields.concat(Gu(a, t.instances[a], t.axes, e));
|
|
8982
8982
|
return r;
|
|
8983
8983
|
}
|
|
8984
|
-
function
|
|
8984
|
+
function Hu(t, e, r) {
|
|
8985
8985
|
var n = new E.Parser(t, e), a = n.parseULong();
|
|
8986
8986
|
U.argument(a === 65536, "Unsupported fvar table version.");
|
|
8987
8987
|
var s = n.parseOffset16();
|
|
8988
8988
|
n.skip("uShort", 1);
|
|
8989
8989
|
for (var i = n.parseUShort(), o = n.parseUShort(), u = n.parseUShort(), l = n.parseUShort(), h = [], f = 0; f < i; f++)
|
|
8990
|
-
h.push(
|
|
8990
|
+
h.push(Du(t, e + s + f * o, r));
|
|
8991
8991
|
for (var c = [], p = e + s + i * o, d = 0; d < u; d++)
|
|
8992
|
-
c.push(
|
|
8992
|
+
c.push(Nu(t, p + d * l, h, r));
|
|
8993
8993
|
return { axes: h, instances: c };
|
|
8994
8994
|
}
|
|
8995
|
-
var
|
|
8995
|
+
var zu = { make: _u, parse: Hu }, Wu = function() {
|
|
8996
8996
|
return {
|
|
8997
8997
|
coverage: this.parsePointer(g.coverage),
|
|
8998
8998
|
attachPoints: this.parseList(g.pointer(g.uShortList))
|
|
8999
8999
|
};
|
|
9000
|
-
},
|
|
9000
|
+
}, Vu = function() {
|
|
9001
9001
|
var t = this.parseUShort();
|
|
9002
9002
|
if (U.argument(
|
|
9003
9003
|
t === 1 || t === 2 || t === 3,
|
|
@@ -9008,17 +9008,17 @@ var Wu = { make: Hu, parse: zu }, Vu = function() {
|
|
|
9008
9008
|
return { pointindex: this.parseShort() };
|
|
9009
9009
|
if (t === 3)
|
|
9010
9010
|
return { coordinate: this.parseShort() };
|
|
9011
|
+
}, qu = function() {
|
|
9012
|
+
return this.parseList(g.pointer(Vu));
|
|
9011
9013
|
}, Xu = function() {
|
|
9012
|
-
return this.parseList(g.pointer(qu));
|
|
9013
|
-
}, Yu = function() {
|
|
9014
9014
|
return {
|
|
9015
9015
|
coverage: this.parsePointer(g.coverage),
|
|
9016
|
-
ligGlyphs: this.parseList(g.pointer(
|
|
9016
|
+
ligGlyphs: this.parseList(g.pointer(qu))
|
|
9017
9017
|
};
|
|
9018
|
-
},
|
|
9018
|
+
}, Yu = function() {
|
|
9019
9019
|
return this.parseUShort(), this.parseList(g.pointer(g.coverage));
|
|
9020
9020
|
};
|
|
9021
|
-
function
|
|
9021
|
+
function Zu(t, e) {
|
|
9022
9022
|
e = e || 0;
|
|
9023
9023
|
var r = new g(t, e), n = r.parseVersion(1);
|
|
9024
9024
|
U.argument(
|
|
@@ -9028,13 +9028,13 @@ function ju(t, e) {
|
|
|
9028
9028
|
var a = {
|
|
9029
9029
|
version: n,
|
|
9030
9030
|
classDef: r.parsePointer(g.classDef),
|
|
9031
|
-
attachList: r.parsePointer(
|
|
9032
|
-
ligCaretList: r.parsePointer(
|
|
9031
|
+
attachList: r.parsePointer(Wu),
|
|
9032
|
+
ligCaretList: r.parsePointer(Xu),
|
|
9033
9033
|
markAttachClassDef: r.parsePointer(g.classDef)
|
|
9034
9034
|
};
|
|
9035
|
-
return n >= 1.2 && (a.markGlyphSets = r.parsePointer(
|
|
9035
|
+
return n >= 1.2 && (a.markGlyphSets = r.parsePointer(Yu)), a;
|
|
9036
9036
|
}
|
|
9037
|
-
var
|
|
9037
|
+
var ju = { parse: Zu }, ue = new Array(10);
|
|
9038
9038
|
ue[1] = function() {
|
|
9039
9039
|
var e = this.offset + this.relativeOffset, r = this.parseUShort();
|
|
9040
9040
|
if (r === 1)
|
|
@@ -9112,7 +9112,7 @@ ue[8] = function() {
|
|
|
9112
9112
|
ue[9] = function() {
|
|
9113
9113
|
return { error: "GPOS Lookup 9 not supported" };
|
|
9114
9114
|
};
|
|
9115
|
-
function
|
|
9115
|
+
function Ku(t, e) {
|
|
9116
9116
|
e = e || 0;
|
|
9117
9117
|
var r = new g(t, e), n = r.parseVersion(1);
|
|
9118
9118
|
return U.argument(n === 1 || n === 1.1, "Unsupported GPOS table version " + n), n === 1 ? {
|
|
@@ -9128,17 +9128,17 @@ function Qu(t, e) {
|
|
|
9128
9128
|
variations: r.parseFeatureVariationsList()
|
|
9129
9129
|
};
|
|
9130
9130
|
}
|
|
9131
|
-
var
|
|
9132
|
-
function
|
|
9131
|
+
var Qu = new Array(10);
|
|
9132
|
+
function $u(t) {
|
|
9133
9133
|
return new F.Table("GPOS", [
|
|
9134
9134
|
{ name: "version", type: "ULONG", value: 65536 },
|
|
9135
9135
|
{ name: "scripts", type: "TABLE", value: new F.ScriptList(t.scripts) },
|
|
9136
9136
|
{ name: "features", type: "TABLE", value: new F.FeatureList(t.features) },
|
|
9137
|
-
{ name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups,
|
|
9137
|
+
{ name: "lookups", type: "TABLE", value: new F.LookupList(t.lookups, Qu) }
|
|
9138
9138
|
]);
|
|
9139
9139
|
}
|
|
9140
|
-
var
|
|
9141
|
-
function
|
|
9140
|
+
var Ju = { parse: Ku, make: $u };
|
|
9141
|
+
function el(t) {
|
|
9142
9142
|
var e = {};
|
|
9143
9143
|
t.skip("uShort");
|
|
9144
9144
|
var r = t.parseUShort();
|
|
@@ -9151,7 +9151,7 @@ function tl(t) {
|
|
|
9151
9151
|
}
|
|
9152
9152
|
return e;
|
|
9153
9153
|
}
|
|
9154
|
-
function
|
|
9154
|
+
function tl(t) {
|
|
9155
9155
|
var e = {};
|
|
9156
9156
|
t.skip("uShort");
|
|
9157
9157
|
var r = t.parseULong();
|
|
@@ -9167,23 +9167,23 @@ function rl(t) {
|
|
|
9167
9167
|
}
|
|
9168
9168
|
return e;
|
|
9169
9169
|
}
|
|
9170
|
-
function
|
|
9170
|
+
function rl(t, e) {
|
|
9171
9171
|
var r = new E.Parser(t, e), n = r.parseUShort();
|
|
9172
9172
|
if (n === 0)
|
|
9173
|
-
return
|
|
9173
|
+
return el(r);
|
|
9174
9174
|
if (n === 1)
|
|
9175
|
-
return
|
|
9175
|
+
return tl(r);
|
|
9176
9176
|
throw new Error("Unsupported kern table version (" + n + ").");
|
|
9177
9177
|
}
|
|
9178
|
-
var
|
|
9179
|
-
function
|
|
9178
|
+
var nl = { parse: rl };
|
|
9179
|
+
function al(t, e, r, n) {
|
|
9180
9180
|
for (var a = new E.Parser(t, e), s = n ? a.parseUShort : a.parseULong, i = [], o = 0; o < r + 1; o += 1) {
|
|
9181
9181
|
var u = s.call(a);
|
|
9182
9182
|
n && (u *= 2), i.push(u);
|
|
9183
9183
|
}
|
|
9184
9184
|
return i;
|
|
9185
9185
|
}
|
|
9186
|
-
var
|
|
9186
|
+
var sl = { parse: al };
|
|
9187
9187
|
function cn(t, e) {
|
|
9188
9188
|
for (var r = [], n = 12, a = 0; a < e; a += 1) {
|
|
9189
9189
|
var s = E.getTag(t, n), i = E.getULong(t, n + 4), o = E.getULong(t, n + 8), u = E.getULong(t, n + 12);
|
|
@@ -9191,7 +9191,7 @@ function cn(t, e) {
|
|
|
9191
9191
|
}
|
|
9192
9192
|
return r;
|
|
9193
9193
|
}
|
|
9194
|
-
function
|
|
9194
|
+
function il(t, e) {
|
|
9195
9195
|
for (var r = [], n = 44, a = 0; a < e; a += 1) {
|
|
9196
9196
|
var s = E.getTag(t, n), i = E.getULong(t, n + 4), o = E.getULong(t, n + 8), u = E.getULong(t, n + 12), l = void 0;
|
|
9197
9197
|
o < u ? l = "WOFF" : l = !1, r.push({
|
|
@@ -9207,14 +9207,14 @@ function ol(t, e) {
|
|
|
9207
9207
|
function H(t, e) {
|
|
9208
9208
|
if (e.compression === "WOFF") {
|
|
9209
9209
|
var r = new Uint8Array(t.buffer, e.offset + 2, e.compressedLength - 2), n = new Uint8Array(e.length);
|
|
9210
|
-
if (
|
|
9210
|
+
if ($a(r, n), n.byteLength !== e.length)
|
|
9211
9211
|
throw new Error("Decompression error: " + e.tag + " decompressed length doesn't match recorded length");
|
|
9212
9212
|
var a = new DataView(n.buffer, 0);
|
|
9213
9213
|
return { data: a, offset: 0 };
|
|
9214
9214
|
} else
|
|
9215
9215
|
return { data: t, offset: e.offset };
|
|
9216
9216
|
}
|
|
9217
|
-
function
|
|
9217
|
+
function ol(t, e) {
|
|
9218
9218
|
e = e ?? {};
|
|
9219
9219
|
var r, n, a = new B({ empty: !0 }), s = new DataView(t, 0), i, o = [], u = E.getTag(s, 0);
|
|
9220
9220
|
if (u === "\0\0\0" || u === "true" || u === "typ1")
|
|
@@ -9229,14 +9229,14 @@ function ul(t, e) {
|
|
|
9229
9229
|
a.outlinesFormat = "cff";
|
|
9230
9230
|
else
|
|
9231
9231
|
throw new Error("Unsupported OpenType flavor " + u);
|
|
9232
|
-
i = E.getUShort(s, 12), o =
|
|
9232
|
+
i = E.getUShort(s, 12), o = il(s, i);
|
|
9233
9233
|
} else
|
|
9234
9234
|
throw new Error("Unsupported OpenType signature " + u);
|
|
9235
|
-
for (var h, f, c, p, d, v, m, y, b, x, T, S,
|
|
9236
|
-
var O = o[
|
|
9235
|
+
for (var h, f, c, p, d, v, m, y, b, x, T, S, A = 0; A < i; A += 1) {
|
|
9236
|
+
var O = o[A], w = void 0;
|
|
9237
9237
|
switch (O.tag) {
|
|
9238
9238
|
case "cmap":
|
|
9239
|
-
w = H(s, O), a.tables.cmap =
|
|
9239
|
+
w = H(s, O), a.tables.cmap = Pn.parse(w.data, w.offset), a.encoding = new Dn(a.tables.cmap);
|
|
9240
9240
|
break;
|
|
9241
9241
|
case "cvt ":
|
|
9242
9242
|
w = H(s, O), S = new E.Parser(w.data, w.offset), a.tables.cvt = S.parseShortList(O.length / 2);
|
|
@@ -9248,19 +9248,19 @@ function ul(t, e) {
|
|
|
9248
9248
|
w = H(s, O), S = new E.Parser(w.data, w.offset), a.tables.fpgm = S.parseByteList(O.length);
|
|
9249
9249
|
break;
|
|
9250
9250
|
case "head":
|
|
9251
|
-
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;
|
|
9252
9252
|
break;
|
|
9253
9253
|
case "hhea":
|
|
9254
|
-
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;
|
|
9255
9255
|
break;
|
|
9256
9256
|
case "hmtx":
|
|
9257
9257
|
m = O;
|
|
9258
9258
|
break;
|
|
9259
9259
|
case "ltag":
|
|
9260
|
-
w = H(s, O), n =
|
|
9260
|
+
w = H(s, O), n = Kn.parse(w.data, w.offset);
|
|
9261
9261
|
break;
|
|
9262
9262
|
case "maxp":
|
|
9263
|
-
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;
|
|
9264
9264
|
break;
|
|
9265
9265
|
case "name":
|
|
9266
9266
|
x = O;
|
|
@@ -9269,7 +9269,7 @@ function ul(t, e) {
|
|
|
9269
9269
|
w = H(s, O), a.tables.os2 = Jt.parse(w.data, w.offset);
|
|
9270
9270
|
break;
|
|
9271
9271
|
case "post":
|
|
9272
|
-
w = H(s, O), a.tables.post =
|
|
9272
|
+
w = H(s, O), a.tables.post = na.parse(w.data, w.offset), a.glyphNames = new or(a.tables.post);
|
|
9273
9273
|
break;
|
|
9274
9274
|
case "prep":
|
|
9275
9275
|
w = H(s, O), S = new E.Parser(w.data, w.offset), a.tables.prep = S.parseByteList(O.length);
|
|
@@ -9300,44 +9300,44 @@ function ul(t, e) {
|
|
|
9300
9300
|
break;
|
|
9301
9301
|
}
|
|
9302
9302
|
}
|
|
9303
|
-
var
|
|
9304
|
-
if (a.tables.name =
|
|
9305
|
-
var N = r === 0, K = H(s, b), $ =
|
|
9306
|
-
a.glyphs =
|
|
9303
|
+
var M = H(s, x);
|
|
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), $ = sl.parse(K.data, K.offset, a.numGlyphs, N), Y = H(s, c);
|
|
9306
|
+
a.glyphs = ha.parse(Y.data, Y.offset, $, a, e);
|
|
9307
9307
|
} else if (h) {
|
|
9308
9308
|
var I = H(s, h);
|
|
9309
|
-
|
|
9309
|
+
Xn.parse(I.data, I.offset, a, e);
|
|
9310
9310
|
} else
|
|
9311
9311
|
throw new Error("Font doesn't contain TrueType or CFF outlines.");
|
|
9312
9312
|
var _ = H(s, m);
|
|
9313
|
-
if (
|
|
9313
|
+
if (jn.parse(a, _.data, _.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, e), xs(a, e), y) {
|
|
9314
9314
|
var D = H(s, y);
|
|
9315
|
-
a.kerningPairs =
|
|
9315
|
+
a.kerningPairs = nl.parse(D.data, D.offset);
|
|
9316
9316
|
} else
|
|
9317
9317
|
a.kerningPairs = {};
|
|
9318
9318
|
if (p) {
|
|
9319
9319
|
var W = H(s, p);
|
|
9320
|
-
a.tables.gdef =
|
|
9320
|
+
a.tables.gdef = ju.parse(W.data, W.offset);
|
|
9321
9321
|
}
|
|
9322
9322
|
if (d) {
|
|
9323
9323
|
var Z = H(s, d);
|
|
9324
|
-
a.tables.gpos =
|
|
9324
|
+
a.tables.gpos = Ju.parse(Z.data, Z.offset), a.position.init();
|
|
9325
9325
|
}
|
|
9326
9326
|
if (v) {
|
|
9327
9327
|
var q = H(s, v);
|
|
9328
|
-
a.tables.gsub =
|
|
9328
|
+
a.tables.gsub = aa.parse(q.data, q.offset);
|
|
9329
9329
|
}
|
|
9330
9330
|
if (f) {
|
|
9331
9331
|
var Q = H(s, f);
|
|
9332
|
-
a.tables.fvar =
|
|
9332
|
+
a.tables.fvar = zu.parse(Q.data, Q.offset, a.names);
|
|
9333
9333
|
}
|
|
9334
9334
|
if (T) {
|
|
9335
9335
|
var P = H(s, T);
|
|
9336
|
-
a.tables.meta =
|
|
9336
|
+
a.tables.meta = sa.parse(P.data, P.offset), a.metas = a.tables.meta;
|
|
9337
9337
|
}
|
|
9338
9338
|
return a;
|
|
9339
9339
|
}
|
|
9340
|
-
function
|
|
9340
|
+
function ul(t) {
|
|
9341
9341
|
return ((r, n) => {
|
|
9342
9342
|
const a = Math.round, s = {}, i = r.encoding.cmap.glyphIndexMap, o = Object.keys(i), u = r.glyphs.glyphs[i[65]];
|
|
9343
9343
|
let l = 1;
|
|
@@ -9373,9 +9373,9 @@ function ll(t) {
|
|
|
9373
9373
|
scaleFactor: l,
|
|
9374
9374
|
original_font_information: r.tables.name
|
|
9375
9375
|
};
|
|
9376
|
-
})(
|
|
9376
|
+
})(ol(t));
|
|
9377
9377
|
}
|
|
9378
|
-
class
|
|
9378
|
+
class ll extends Ta {
|
|
9379
9379
|
constructor(e, r = {}) {
|
|
9380
9380
|
const n = r.font;
|
|
9381
9381
|
if (n === void 0)
|
|
@@ -9467,7 +9467,7 @@ function pn(t) {
|
|
|
9467
9467
|
return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."), null;
|
|
9468
9468
|
s += h.count * r;
|
|
9469
9469
|
}
|
|
9470
|
-
const i = new e(s), o = new
|
|
9470
|
+
const i = new e(s), o = new wa(i, r, n);
|
|
9471
9471
|
let u = 0;
|
|
9472
9472
|
for (let l = 0; l < t.length; ++l) {
|
|
9473
9473
|
const h = t[l];
|
|
@@ -9484,7 +9484,7 @@ function pn(t) {
|
|
|
9484
9484
|
}
|
|
9485
9485
|
return a !== void 0 && (o.gpuType = a), o;
|
|
9486
9486
|
}
|
|
9487
|
-
function
|
|
9487
|
+
function hl(t, e = 1e-4) {
|
|
9488
9488
|
e = Math.max(e, Number.EPSILON);
|
|
9489
9489
|
const r = {}, n = t.getIndex(), a = t.getAttribute("position"), s = n ? n.count : a.count;
|
|
9490
9490
|
let i = 0;
|
|
@@ -9496,31 +9496,31 @@ function cl(t, e = 1e-4) {
|
|
|
9496
9496
|
S.itemSize,
|
|
9497
9497
|
S.normalized
|
|
9498
9498
|
);
|
|
9499
|
-
const
|
|
9500
|
-
|
|
9501
|
-
const
|
|
9502
|
-
l[T][w] = new O.constructor(
|
|
9499
|
+
const A = t.morphAttributes[T];
|
|
9500
|
+
A && (l[T] || (l[T] = []), A.forEach((O, w) => {
|
|
9501
|
+
const M = new O.array.constructor(O.count * O.itemSize);
|
|
9502
|
+
l[T][w] = new O.constructor(M, O.itemSize, O.normalized);
|
|
9503
9503
|
}));
|
|
9504
9504
|
}
|
|
9505
9505
|
const p = e * 0.5, d = Math.log10(1 / e), v = Math.pow(10, d), m = p * v;
|
|
9506
9506
|
for (let b = 0; b < s; b++) {
|
|
9507
9507
|
const x = n ? n.getX(b) : b;
|
|
9508
9508
|
let T = "";
|
|
9509
|
-
for (let S = 0,
|
|
9510
|
-
const O = o[S], w = t.getAttribute(O),
|
|
9511
|
-
for (let N = 0; N <
|
|
9509
|
+
for (let S = 0, A = o.length; S < A; S++) {
|
|
9510
|
+
const O = o[S], w = t.getAttribute(O), M = w.itemSize;
|
|
9511
|
+
for (let N = 0; N < M; N++)
|
|
9512
9512
|
T += `${~~(w[f[N]](x) * v + m)},`;
|
|
9513
9513
|
}
|
|
9514
9514
|
if (T in r)
|
|
9515
9515
|
h.push(r[T]);
|
|
9516
9516
|
else {
|
|
9517
|
-
for (let S = 0,
|
|
9518
|
-
const O = o[S], w = t.getAttribute(O),
|
|
9517
|
+
for (let S = 0, A = o.length; S < A; S++) {
|
|
9518
|
+
const O = o[S], w = t.getAttribute(O), M = t.morphAttributes[O], N = w.itemSize, K = u[O], $ = l[O];
|
|
9519
9519
|
for (let Y = 0; Y < N; Y++) {
|
|
9520
9520
|
const I = f[Y], _ = c[Y];
|
|
9521
|
-
if (K[_](i, w[I](x)),
|
|
9522
|
-
for (let D = 0, W =
|
|
9523
|
-
$[D][_](i,
|
|
9521
|
+
if (K[_](i, w[I](x)), M)
|
|
9522
|
+
for (let D = 0, W = M.length; D < W; D++)
|
|
9523
|
+
$[D][_](i, M[D][I](x));
|
|
9524
9524
|
}
|
|
9525
9525
|
}
|
|
9526
9526
|
r[T] = i, h.push(i), i++;
|
|
@@ -9594,7 +9594,7 @@ const yr = class yr {
|
|
|
9594
9594
|
yr.originalComputeVertexNormals = ot.prototype.computeVertexNormals;
|
|
9595
9595
|
let tr = yr;
|
|
9596
9596
|
const Ee = new R.Vector2();
|
|
9597
|
-
class dn extends
|
|
9597
|
+
class dn extends Fn {
|
|
9598
9598
|
constructor(e, r, n) {
|
|
9599
9599
|
super(e), this.isFound = !1, this.fontSize = r, this.font = n, this.width = this.getCharWidth(e, r, n);
|
|
9600
9600
|
}
|
|
@@ -9606,7 +9606,7 @@ class dn extends Tn {
|
|
|
9606
9606
|
toGeometry() {
|
|
9607
9607
|
let e = this.font.cache.getGeometry(this.char, this.fontSize);
|
|
9608
9608
|
return e == null && (e = tr.runWithoutNormals(() => {
|
|
9609
|
-
const r = new
|
|
9609
|
+
const r = new ll(this.char, {
|
|
9610
9610
|
font: this.font.font,
|
|
9611
9611
|
depth: 0,
|
|
9612
9612
|
size: this.fontSize,
|
|
@@ -9620,7 +9620,7 @@ class dn extends Tn {
|
|
|
9620
9620
|
generateSideWallUV: () => [Ee, Ee, Ee, Ee]
|
|
9621
9621
|
}
|
|
9622
9622
|
});
|
|
9623
|
-
return r.hasAttribute("uv") && r.deleteAttribute("uv"), r.hasAttribute("normal") && r.deleteAttribute("normal"),
|
|
9623
|
+
return r.hasAttribute("uv") && r.deleteAttribute("uv"), r.hasAttribute("normal") && r.deleteAttribute("normal"), hl(r, 1e-6);
|
|
9624
9624
|
})), e;
|
|
9625
9625
|
}
|
|
9626
9626
|
/**
|
|
@@ -9635,13 +9635,13 @@ class dn extends Tn {
|
|
|
9635
9635
|
return a ? (this.isFound = !0, a.ha * r / n.data.resolution) : (this.isFound = !1, 0);
|
|
9636
9636
|
}
|
|
9637
9637
|
}
|
|
9638
|
-
class gn extends
|
|
9638
|
+
class gn extends kn {
|
|
9639
9639
|
/**
|
|
9640
9640
|
* Creates a new instance of MeshFont.
|
|
9641
9641
|
* @param data - Either a MeshFontData object containing font information or an ArrayBuffer containing raw font data
|
|
9642
9642
|
*/
|
|
9643
9643
|
constructor(e) {
|
|
9644
|
-
super(), this.type = "mesh", e instanceof ArrayBuffer ? this.data =
|
|
9644
|
+
super(), this.type = "mesh", e instanceof ArrayBuffer ? this.data = ul(e) : this.data = e, this.font = new za(this.data);
|
|
9645
9645
|
}
|
|
9646
9646
|
/**
|
|
9647
9647
|
* Return true if this font contains glyph of the specified character. Otherwise, return false.
|
|
@@ -9848,7 +9848,7 @@ class J {
|
|
|
9848
9848
|
}
|
|
9849
9849
|
}
|
|
9850
9850
|
var te = /* @__PURE__ */ ((t) => (t.SHAPES = "shapes", t.BIGFONT = "bigfont", t.UNIFONT = "unifont", t))(te || {});
|
|
9851
|
-
let
|
|
9851
|
+
let cl = class {
|
|
9852
9852
|
parse(e) {
|
|
9853
9853
|
const r = this.parseHeader(e).split(" "), n = r[1].toLocaleLowerCase();
|
|
9854
9854
|
if (!Object.values(te).includes(n))
|
|
@@ -9875,7 +9875,7 @@ let fl = class {
|
|
|
9875
9875
|
return r.trim();
|
|
9876
9876
|
}
|
|
9877
9877
|
};
|
|
9878
|
-
class
|
|
9878
|
+
class fl {
|
|
9879
9879
|
parse(e) {
|
|
9880
9880
|
try {
|
|
9881
9881
|
e.readBytes(4);
|
|
@@ -9931,7 +9931,7 @@ class pl {
|
|
|
9931
9931
|
}
|
|
9932
9932
|
}
|
|
9933
9933
|
}
|
|
9934
|
-
class
|
|
9934
|
+
class pl {
|
|
9935
9935
|
parse(e) {
|
|
9936
9936
|
try {
|
|
9937
9937
|
e.readInt16();
|
|
@@ -10016,7 +10016,7 @@ class dl {
|
|
|
10016
10016
|
return r;
|
|
10017
10017
|
}
|
|
10018
10018
|
}
|
|
10019
|
-
class
|
|
10019
|
+
class dl {
|
|
10020
10020
|
parse(e) {
|
|
10021
10021
|
try {
|
|
10022
10022
|
const r = e.readInt32();
|
|
@@ -10066,15 +10066,15 @@ class gl {
|
|
|
10066
10066
|
}
|
|
10067
10067
|
}
|
|
10068
10068
|
}
|
|
10069
|
-
class
|
|
10069
|
+
class gl {
|
|
10070
10070
|
static createParser(e) {
|
|
10071
10071
|
switch (e) {
|
|
10072
10072
|
case te.SHAPES:
|
|
10073
|
-
return new
|
|
10073
|
+
return new fl();
|
|
10074
10074
|
case te.BIGFONT:
|
|
10075
|
-
return new
|
|
10075
|
+
return new pl();
|
|
10076
10076
|
case te.UNIFONT:
|
|
10077
|
-
return new
|
|
10077
|
+
return new dl();
|
|
10078
10078
|
default:
|
|
10079
10079
|
throw new Error(`Unsupported font type: ${e}`);
|
|
10080
10080
|
}
|
|
@@ -10263,7 +10263,7 @@ let yn = class rr {
|
|
|
10263
10263
|
)
|
|
10264
10264
|
), r;
|
|
10265
10265
|
}
|
|
10266
|
-
}, Bt = class
|
|
10266
|
+
}, Bt = class xa {
|
|
10267
10267
|
constructor(e, r = []) {
|
|
10268
10268
|
this.lastPoint = e, this.polylines = r;
|
|
10269
10269
|
}
|
|
@@ -10287,7 +10287,7 @@ let yn = class rr {
|
|
|
10287
10287
|
*/
|
|
10288
10288
|
offset(e, r = !0) {
|
|
10289
10289
|
var n, a;
|
|
10290
|
-
return r ? new
|
|
10290
|
+
return r ? new xa(
|
|
10291
10291
|
(n = this.lastPoint) == null ? void 0 : n.clone().add(e),
|
|
10292
10292
|
this.polylines.map((s) => s.map((i) => i.clone().add(e)))
|
|
10293
10293
|
) : ((a = this.lastPoint) == null || a.add(e), this.polylines.forEach((s) => s.forEach((i) => i.add(e))), this);
|
|
@@ -10320,8 +10320,8 @@ let yn = class rr {
|
|
|
10320
10320
|
return `<svg width="100%" height="100%" viewBox="${s}" preserveAspectRatio="xMidYMid meet">${i}</svg>`;
|
|
10321
10321
|
}
|
|
10322
10322
|
};
|
|
10323
|
-
const
|
|
10324
|
-
let
|
|
10323
|
+
const vl = Math.PI / 18, mn = 12;
|
|
10324
|
+
let yl = class {
|
|
10325
10325
|
constructor(e) {
|
|
10326
10326
|
this.shapeCache = /* @__PURE__ */ new Map(), this.shapeData = /* @__PURE__ */ new Map(), this.fontData = e;
|
|
10327
10327
|
}
|
|
@@ -10555,7 +10555,7 @@ let ml = class {
|
|
|
10555
10555
|
let c = h & 7;
|
|
10556
10556
|
c === 0 && (c = 8), i !== 0 && c--;
|
|
10557
10557
|
const p = Math.PI / 4;
|
|
10558
|
-
let d = p * c, v =
|
|
10558
|
+
let d = p * c, v = vl, m = 1;
|
|
10559
10559
|
h < 0 && (v = -v, d = -d, m = -1);
|
|
10560
10560
|
let y = p * f, b = y + d;
|
|
10561
10561
|
y += p * s / 256 * m, b += p * i / 256 * m;
|
|
@@ -10710,7 +10710,7 @@ let ml = class {
|
|
|
10710
10710
|
return o.add(r), o;
|
|
10711
10711
|
}
|
|
10712
10712
|
};
|
|
10713
|
-
class
|
|
10713
|
+
class ml {
|
|
10714
10714
|
/**
|
|
10715
10715
|
* Creates a new ShxFont instance.
|
|
10716
10716
|
* @param data - Either raw binary data of the SHX font file (ArrayBuffer) or pre-parsed font data (ShxFontData)
|
|
@@ -10718,14 +10718,14 @@ class xl {
|
|
|
10718
10718
|
*/
|
|
10719
10719
|
constructor(e) {
|
|
10720
10720
|
if (e instanceof ArrayBuffer) {
|
|
10721
|
-
const r = new J(e), n = new
|
|
10721
|
+
const r = new J(e), n = new cl().parse(r), a = gl.createParser(n.fontType).parse(r);
|
|
10722
10722
|
this.fontData = {
|
|
10723
10723
|
header: n,
|
|
10724
10724
|
content: a
|
|
10725
10725
|
};
|
|
10726
10726
|
} else
|
|
10727
10727
|
this.fontData = e;
|
|
10728
|
-
this.shapeParser = new
|
|
10728
|
+
this.shapeParser = new yl(this.fontData);
|
|
10729
10729
|
}
|
|
10730
10730
|
/**
|
|
10731
10731
|
* Return true if this font contains glyph of the specified character. Otherwise, return false.
|
|
@@ -10752,7 +10752,7 @@ class xl {
|
|
|
10752
10752
|
this.shapeParser.release();
|
|
10753
10753
|
}
|
|
10754
10754
|
}
|
|
10755
|
-
class dr extends
|
|
10755
|
+
class dr extends Fn {
|
|
10756
10756
|
/**
|
|
10757
10757
|
* Creates a new instance of ShxTextShape
|
|
10758
10758
|
* @param char - The character this shape represents
|
|
@@ -10798,9 +10798,9 @@ class dr extends Tn {
|
|
|
10798
10798
|
return e;
|
|
10799
10799
|
}
|
|
10800
10800
|
}
|
|
10801
|
-
class xn extends
|
|
10801
|
+
class xn extends kn {
|
|
10802
10802
|
constructor(e) {
|
|
10803
|
-
super(), this.type = "shx", this.font = new
|
|
10803
|
+
super(), this.type = "shx", this.font = new ml(e), this.data = this.font.fontData;
|
|
10804
10804
|
}
|
|
10805
10805
|
/**
|
|
10806
10806
|
* Return true if this font contains glyph of the specified character. Otherwise, return false.
|
|
@@ -10896,7 +10896,7 @@ class ke {
|
|
|
10896
10896
|
* @throws {Error} If the file type is not supported
|
|
10897
10897
|
*/
|
|
10898
10898
|
createFontFromBuffer(e, r) {
|
|
10899
|
-
const n =
|
|
10899
|
+
const n = Na(e).toLowerCase();
|
|
10900
10900
|
if (n === "shx")
|
|
10901
10901
|
return new xn(r);
|
|
10902
10902
|
if (["ttf", "otf", "woff"].includes(n))
|
|
@@ -10911,7 +10911,7 @@ class de {
|
|
|
10911
10911
|
fontNotFound: new xr(),
|
|
10912
10912
|
/** Event triggered when a font is successfully loaded */
|
|
10913
10913
|
fontLoaded: new xr()
|
|
10914
|
-
}, this.loader = new R.FileLoader(), this.loader.setResponseType("arraybuffer"), this.fileNames = [], this.fontLoader = new
|
|
10914
|
+
}, this.loader = new R.FileLoader(), this.loader.setResponseType("arraybuffer"), this.fileNames = [], this.fontLoader = new xl();
|
|
10915
10915
|
}
|
|
10916
10916
|
/**
|
|
10917
10917
|
* Gets the singleton instance of the FontManager
|
|
@@ -11096,7 +11096,7 @@ class de {
|
|
|
11096
11096
|
* @param url - The URL of the font file to load
|
|
11097
11097
|
*/
|
|
11098
11098
|
async loadFont(e) {
|
|
11099
|
-
const r =
|
|
11099
|
+
const r = Cn(e);
|
|
11100
11100
|
if (!r)
|
|
11101
11101
|
throw new Error(`Invalid font url: ${e}`);
|
|
11102
11102
|
const n = wr(e).toLowerCase(), a = await ze.instance.get(n);
|
|
@@ -11155,7 +11155,7 @@ class de {
|
|
|
11155
11155
|
return e == null ? (this.fontMap.clear(), !0) : this.fontMap.delete(e);
|
|
11156
11156
|
}
|
|
11157
11157
|
}
|
|
11158
|
-
class
|
|
11158
|
+
class xl {
|
|
11159
11159
|
/**
|
|
11160
11160
|
* Creates a new instance of DefaultFontLoader
|
|
11161
11161
|
*/
|
|
@@ -11228,11 +11228,11 @@ class bl {
|
|
|
11228
11228
|
}
|
|
11229
11229
|
}
|
|
11230
11230
|
var Pe = /* @__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))(Pe || {}), 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 || {});
|
|
11231
|
-
const
|
|
11231
|
+
const bl = {
|
|
11232
11232
|
c: "Ø",
|
|
11233
11233
|
d: "°",
|
|
11234
11234
|
p: "±"
|
|
11235
|
-
},
|
|
11235
|
+
}, Sl = {
|
|
11236
11236
|
l: 1,
|
|
11237
11237
|
r: 2,
|
|
11238
11238
|
c: 3,
|
|
@@ -11240,14 +11240,14 @@ const Sl = {
|
|
|
11240
11240
|
d: 5
|
|
11241
11241
|
/* DISTRIBUTED */
|
|
11242
11242
|
};
|
|
11243
|
-
function
|
|
11243
|
+
function kl(t, e = !1) {
|
|
11244
11244
|
const r = /* @__PURE__ */ new Set(), n = /\\[fF](.*?)[;|]/g;
|
|
11245
11245
|
return [...t.matchAll(n)].forEach((a) => {
|
|
11246
11246
|
let s = a[1].toLowerCase();
|
|
11247
11247
|
e && (s = s.replace(/\.(ttf|otf|woff|shx)$/, "")), r.add(s);
|
|
11248
11248
|
}), r;
|
|
11249
11249
|
}
|
|
11250
|
-
class
|
|
11250
|
+
class Fl {
|
|
11251
11251
|
/**
|
|
11252
11252
|
* Creates a new ContextStack with an initial context.
|
|
11253
11253
|
* @param initial The initial MTextContext to use as the base of the stack.
|
|
@@ -11299,7 +11299,7 @@ class Tl {
|
|
|
11299
11299
|
this.stack[this.stack.length - 1] = e;
|
|
11300
11300
|
}
|
|
11301
11301
|
}
|
|
11302
|
-
class
|
|
11302
|
+
class Tl {
|
|
11303
11303
|
/**
|
|
11304
11304
|
* Creates a new MTextParser instance
|
|
11305
11305
|
* @param content - The MText content to parse
|
|
@@ -11309,7 +11309,7 @@ class wl {
|
|
|
11309
11309
|
constructor(e, r, n = {}) {
|
|
11310
11310
|
this.continueStroke = !1, this.inStackContext = !1, this.scanner = new Pt(e);
|
|
11311
11311
|
const a = r ?? new et();
|
|
11312
|
-
this.ctxStack = new
|
|
11312
|
+
this.ctxStack = new Fl(a), this.yieldPropertyCommands = n.yieldPropertyCommands ?? !1, this.resetParagraphParameters = n.resetParagraphParameters ?? !1;
|
|
11313
11313
|
}
|
|
11314
11314
|
/**
|
|
11315
11315
|
* Decode multi-byte character from hex code
|
|
@@ -11664,7 +11664,7 @@ class wl {
|
|
|
11664
11664
|
break;
|
|
11665
11665
|
case "q": {
|
|
11666
11666
|
const l = r.get();
|
|
11667
|
-
for (i =
|
|
11667
|
+
for (i = Sl[l] || 0; r.peek() === ","; )
|
|
11668
11668
|
r.consume(1);
|
|
11669
11669
|
break;
|
|
11670
11670
|
}
|
|
@@ -11802,7 +11802,7 @@ class wl {
|
|
|
11802
11802
|
continue;
|
|
11803
11803
|
}
|
|
11804
11804
|
if (o === "%" && this.scanner.peek(1) === "%") {
|
|
11805
|
-
const l = this.scanner.peek(2).toLowerCase(), h =
|
|
11805
|
+
const l = this.scanner.peek(2).toLowerCase(), h = bl[l];
|
|
11806
11806
|
if (h) {
|
|
11807
11807
|
this.scanner.consume(3), s += h;
|
|
11808
11808
|
continue;
|
|
@@ -12257,8 +12257,8 @@ class It {
|
|
|
12257
12257
|
this.type = e, this.ctx = r, this.data = n;
|
|
12258
12258
|
}
|
|
12259
12259
|
}
|
|
12260
|
-
var Ze = /* @__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))(Ze || {}),
|
|
12261
|
-
const
|
|
12260
|
+
var Ze = /* @__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))(Ze || {}), wl = /* @__PURE__ */ ((t) => (t[t.TopLeft = 1] = "TopLeft", t[t.TopCenter = 2] = "TopCenter", t[t.TopRight = 3] = "TopRight", t[t.MiddleLeft = 4] = "MiddleLeft", t[t.MiddleCenter = 5] = "MiddleCenter", t[t.MiddleRight = 6] = "MiddleRight", t[t.BottomLeft = 7] = "BottomLeft", t[t.BottomCenter = 8] = "BottomCenter", t[t.BottomRight = 9] = "BottomRight", t))(wl || {});
|
|
12261
|
+
const Cl = /* @__PURE__ */ new R.Vector3(), El = 1.666666;
|
|
12262
12262
|
class vr extends et {
|
|
12263
12263
|
/**
|
|
12264
12264
|
* Creates a new RenderContext instance with optional initial values.
|
|
@@ -12281,7 +12281,7 @@ class vr extends et {
|
|
|
12281
12281
|
* @returns The color as a hex number (0xRRGGBB)
|
|
12282
12282
|
*/
|
|
12283
12283
|
getColorAsHex() {
|
|
12284
|
-
return this.color.isRgb && this.color.rgbValue !== null ? this.color.rgbValue : this.color.isAci && this.color.aci !== null ?
|
|
12284
|
+
return this.color.isRgb && this.color.rgbValue !== null ? this.color.rgbValue : this.color.isAci && this.color.aci !== null ? Ha(this.color.aci) : 16777215;
|
|
12285
12285
|
}
|
|
12286
12286
|
/**
|
|
12287
12287
|
* Set the color using a hex value for rendering purposes.
|
|
@@ -12292,7 +12292,7 @@ class vr extends et {
|
|
|
12292
12292
|
this.color.rgb = [r, n, a];
|
|
12293
12293
|
}
|
|
12294
12294
|
}
|
|
12295
|
-
class
|
|
12295
|
+
class Ol {
|
|
12296
12296
|
/**
|
|
12297
12297
|
* Construct one instance of this class and initialize some properties with default values.
|
|
12298
12298
|
* @param style Input text style
|
|
@@ -12391,7 +12391,7 @@ class Ul {
|
|
|
12391
12391
|
* The height of current line of texts
|
|
12392
12392
|
*/
|
|
12393
12393
|
get currentLineHeight() {
|
|
12394
|
-
return this.defaultLineSpaceFactor * this.currentFontSize *
|
|
12394
|
+
return this.defaultLineSpaceFactor * this.currentFontSize * El + this.currentMaxFontSize;
|
|
12395
12395
|
}
|
|
12396
12396
|
/**
|
|
12397
12397
|
* The maximum font size in current line. Characters in one line may have different font and font
|
|
@@ -12627,7 +12627,7 @@ class Ul {
|
|
|
12627
12627
|
T
|
|
12628
12628
|
);
|
|
12629
12629
|
if (r.push(...x), n.push(...T), i === "/" || i === "#") {
|
|
12630
|
-
const S = new R.BufferGeometry(),
|
|
12630
|
+
const S = new R.BufferGeometry(), A = new Float32Array([
|
|
12631
12631
|
o,
|
|
12632
12632
|
u - this.currentFontSize * 0.8,
|
|
12633
12633
|
0,
|
|
@@ -12637,7 +12637,7 @@ class Ul {
|
|
|
12637
12637
|
]);
|
|
12638
12638
|
S.setAttribute(
|
|
12639
12639
|
"position",
|
|
12640
|
-
new R.BufferAttribute(
|
|
12640
|
+
new R.BufferAttribute(A, 3)
|
|
12641
12641
|
), S.setIndex(null), n.push(S);
|
|
12642
12642
|
}
|
|
12643
12643
|
this._hOffset = o + d;
|
|
@@ -12794,7 +12794,7 @@ class Ul {
|
|
|
12794
12794
|
if (e.forEach((n, a) => {
|
|
12795
12795
|
n.boundingBox || n.computeBoundingBox(), a === 0 ? r = n.boundingBox : r.union(n.boundingBox);
|
|
12796
12796
|
}), r) {
|
|
12797
|
-
const n = r.getSize(
|
|
12797
|
+
const n = r.getSize(Cl);
|
|
12798
12798
|
switch (this.currentHorizontalAlignment) {
|
|
12799
12799
|
case se.LEFT:
|
|
12800
12800
|
e.forEach(
|
|
@@ -12891,7 +12891,7 @@ class vt extends R.Object3D {
|
|
|
12891
12891
|
* ```
|
|
12892
12892
|
*/
|
|
12893
12893
|
static getFonts(e, r = !1) {
|
|
12894
|
-
return
|
|
12894
|
+
return kl(e, r);
|
|
12895
12895
|
}
|
|
12896
12896
|
/**
|
|
12897
12897
|
* Creates a new instance of MText.
|
|
@@ -13038,12 +13038,12 @@ class vt extends R.Object3D {
|
|
|
13038
13038
|
value: e.widthFactor ?? 1,
|
|
13039
13039
|
isRelative: !0
|
|
13040
13040
|
}, h.align = s, h.paragraph.align = a;
|
|
13041
|
-
const f = new
|
|
13041
|
+
const f = new Ol(
|
|
13042
13042
|
r,
|
|
13043
13043
|
this.styleManager,
|
|
13044
13044
|
this.fontManager,
|
|
13045
13045
|
l
|
|
13046
|
-
), p = new
|
|
13046
|
+
), p = new Tl(e.text, h, {
|
|
13047
13047
|
resetParagraphParameters: !0,
|
|
13048
13048
|
yieldPropertyCommands: !0
|
|
13049
13049
|
}).parse();
|
|
@@ -13111,7 +13111,7 @@ class vt extends R.Object3D {
|
|
|
13111
13111
|
this.getBoxes(n[a], r);
|
|
13112
13112
|
}
|
|
13113
13113
|
}
|
|
13114
|
-
class
|
|
13114
|
+
class ba {
|
|
13115
13115
|
constructor() {
|
|
13116
13116
|
this.lineBasicMaterials = {}, this.meshBasicMaterials = {}, this.unsupportedTextStyles = {};
|
|
13117
13117
|
}
|
|
@@ -13126,12 +13126,12 @@ class Sa {
|
|
|
13126
13126
|
})), this.lineBasicMaterials[e];
|
|
13127
13127
|
}
|
|
13128
13128
|
}
|
|
13129
|
-
class
|
|
13129
|
+
class Ul {
|
|
13130
13130
|
constructor(e = {}) {
|
|
13131
13131
|
this.workers = [], this.inFlightPerWorker = [], this.pendingRequests = /* @__PURE__ */ new Map(), this.requestId = 0, this.readyPromise = null, this.poolSize = e.poolSize ?? Math.max(
|
|
13132
13132
|
1,
|
|
13133
13133
|
navigator.hardwareConcurrency ? Math.min(4, navigator.hardwareConcurrency) : 2
|
|
13134
|
-
), this.styleManager = new
|
|
13134
|
+
), this.styleManager = new ba();
|
|
13135
13135
|
const r = e.workerUrl ?? "./mtext-renderer-worker.js";
|
|
13136
13136
|
this.timeOut = e.timeOut ?? 12e4;
|
|
13137
13137
|
for (let n = 0; n < this.poolSize; n++) {
|
|
@@ -13369,7 +13369,7 @@ class kn {
|
|
|
13369
13369
|
}
|
|
13370
13370
|
class Ll {
|
|
13371
13371
|
constructor() {
|
|
13372
|
-
this.fontManager = de.instance, this.styleManager = new
|
|
13372
|
+
this.fontManager = de.instance, this.styleManager = new ba(), this.isInitialized = !1;
|
|
13373
13373
|
}
|
|
13374
13374
|
/**
|
|
13375
13375
|
* Render MText directly in the main thread asynchronously. It will ensure that default font
|
|
@@ -13428,79 +13428,85 @@ class Pl {
|
|
|
13428
13428
|
/**
|
|
13429
13429
|
* Constructor
|
|
13430
13430
|
*
|
|
13431
|
-
* @param
|
|
13431
|
+
* @param defaultMode - Default rendering mode. Default is 'main' which means rendering in main thread.
|
|
13432
13432
|
* @param workerConfig - Configuration options for WebWorkerRenderer which is used
|
|
13433
13433
|
* when render mode is 'worker'.
|
|
13434
13434
|
*/
|
|
13435
13435
|
constructor(e = "main", r = {}) {
|
|
13436
|
-
this.
|
|
13436
|
+
this.defaultMode = e, this.mainThreadRenderer = new Ll(), this.webWorkerRenderer = new Ul(r), this.renderer = this.mainThreadRenderer, e === "worker" && (this.renderer = this.webWorkerRenderer);
|
|
13437
13437
|
}
|
|
13438
13438
|
/**
|
|
13439
|
-
*
|
|
13440
|
-
* @param mode The rendering mode
|
|
13439
|
+
* Sets the default rendering mmode
|
|
13440
|
+
* @param mode The default rendering mode
|
|
13441
13441
|
*/
|
|
13442
|
-
|
|
13443
|
-
this.
|
|
13442
|
+
setDefaultMode(e) {
|
|
13443
|
+
this.defaultMode !== e && (this.defaultMode = e, e === "worker" ? this.renderer = this.webWorkerRenderer : this.renderer = this.mainThreadRenderer);
|
|
13444
13444
|
}
|
|
13445
13445
|
/**
|
|
13446
|
-
* Get
|
|
13446
|
+
* Get the default rendering mode
|
|
13447
13447
|
*/
|
|
13448
|
-
|
|
13449
|
-
return this.
|
|
13448
|
+
getDefaultMode() {
|
|
13449
|
+
return this.defaultMode;
|
|
13450
13450
|
}
|
|
13451
13451
|
/**
|
|
13452
|
-
* Render MText using the current mode asynchronously
|
|
13452
|
+
* Render MText using the current mode asynchronously.
|
|
13453
|
+
* @param mode - Rendering mode used. If undefined, the default rendering mode is used.
|
|
13453
13454
|
*/
|
|
13454
13455
|
async asyncRenderMText(e, r, n = {
|
|
13455
13456
|
byLayerColor: 16777215,
|
|
13456
13457
|
byBlockColor: 16777215
|
|
13457
|
-
}) {
|
|
13458
|
-
return this.
|
|
13458
|
+
}, a) {
|
|
13459
|
+
return a ? (a === "worker" ? this.webWorkerRenderer : this.mainThreadRenderer).asyncRenderMText(e, r, n) : this.renderer.asyncRenderMText(
|
|
13460
|
+
e,
|
|
13461
|
+
r,
|
|
13462
|
+
n
|
|
13463
|
+
);
|
|
13459
13464
|
}
|
|
13460
13465
|
/**
|
|
13461
|
-
* Render MText using the current mode synchronously.
|
|
13462
|
-
*
|
|
13463
|
-
* Notes:
|
|
13464
|
-
* One error will be thrown if calling this function in 'worker' mode because rendering
|
|
13465
|
-
* process is always asynchronous in web worker mode.
|
|
13466
|
+
* Render MText using the current mode synchronously. Main thread render is always used
|
|
13467
|
+
* for this function because web worker renderer doesn't support rendering synchronously.
|
|
13466
13468
|
*/
|
|
13467
13469
|
syncRenderMText(e, r, n = {
|
|
13468
13470
|
byLayerColor: 16777215,
|
|
13469
13471
|
byBlockColor: 16777215
|
|
13470
13472
|
}) {
|
|
13471
|
-
return this.
|
|
13473
|
+
return this.mainThreadRenderer.syncRenderMText(
|
|
13474
|
+
e,
|
|
13475
|
+
r,
|
|
13476
|
+
n
|
|
13477
|
+
);
|
|
13472
13478
|
}
|
|
13473
13479
|
/**
|
|
13474
13480
|
* Load fonts using the current mode
|
|
13475
13481
|
*/
|
|
13476
13482
|
async loadFonts(e) {
|
|
13477
|
-
return this.
|
|
13483
|
+
return this.renderer.loadFonts(e);
|
|
13478
13484
|
}
|
|
13479
13485
|
/**
|
|
13480
13486
|
* Get available fonts using the current mode
|
|
13481
13487
|
*/
|
|
13482
13488
|
async getAvailableFonts() {
|
|
13483
|
-
return this.
|
|
13489
|
+
return this.renderer.getAvailableFonts();
|
|
13484
13490
|
}
|
|
13485
13491
|
/**
|
|
13486
13492
|
* Clean up resources
|
|
13487
13493
|
*/
|
|
13488
13494
|
destroy() {
|
|
13489
|
-
this.
|
|
13495
|
+
this.webWorkerRenderer && this.webWorkerRenderer.terminate(), this.mainThreadRenderer.destroy();
|
|
13490
13496
|
}
|
|
13491
13497
|
}
|
|
13492
13498
|
export {
|
|
13493
|
-
|
|
13494
|
-
|
|
13495
|
-
|
|
13499
|
+
kn as BaseFont,
|
|
13500
|
+
Fn as BaseTextShape,
|
|
13501
|
+
xl as DefaultFontLoader,
|
|
13496
13502
|
xr as EventManager,
|
|
13497
13503
|
ke as FontFactory,
|
|
13498
13504
|
de as FontManager,
|
|
13499
13505
|
vt as MText,
|
|
13500
|
-
|
|
13506
|
+
wl as MTextAttachmentPoint,
|
|
13501
13507
|
Ze as MTextFlowDirection,
|
|
13502
13508
|
Ll as MainThreadRenderer,
|
|
13503
|
-
|
|
13509
|
+
ba as StyleManager,
|
|
13504
13510
|
Pl as UnifiedRenderer,
|
|
13505
|
-
|
|
13511
|
+
Ul as WebWorkerRenderer
|
|
13506
13512
|
};
|