@unmade/text-renderer 0.1.8 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { svgPathProperties as _n } from "svg-path-properties";
1
+ import { svgPathProperties as zn } from "svg-path-properties";
2
2
  String.prototype.codePointAt || (function() {
3
3
  var e = (function() {
4
4
  try {
@@ -29,10 +29,10 @@ var Pr = 0, Ht = -3;
29
29
  function Ne() {
30
30
  this.table = new Uint16Array(16), this.trans = new Uint16Array(288);
31
31
  }
32
- function Vn(e, r) {
32
+ function _n(e, r) {
33
33
  this.source = e, this.sourceIndex = 0, this.tag = 0, this.bitcount = 0, this.dest = r, this.destLen = 0, this.ltree = new Ne(), this.dtree = new Ne();
34
34
  }
35
- var Wt = new Ne(), zt = new Ne(), Gr = new Uint8Array(30), Nr = new Uint16Array(30), _t = new Uint8Array(30), Vt = new Uint16Array(30), qn = new Uint8Array([
35
+ var Wt = new Ne(), zt = new Ne(), Gr = new Uint8Array(30), Nr = new Uint16Array(30), _t = new Uint8Array(30), Vt = new Uint16Array(30), Vn = new Uint8Array([
36
36
  16,
37
37
  17,
38
38
  18,
@@ -62,7 +62,7 @@ function qt(e, r, t, n) {
62
62
  for (s = n, a = 0; a < 30; ++a)
63
63
  r[a] = s, s += 1 << e[a];
64
64
  }
65
- function Xn(e, r) {
65
+ function qn(e, r) {
66
66
  var t;
67
67
  for (t = 0; t < 7; ++t)
68
68
  e.table[t] = 0;
@@ -91,7 +91,7 @@ function vr(e, r, t, n) {
91
91
  for (a = 0; a < n; ++a)
92
92
  r[t + a] && (e.trans[Kr[r[t + a]]++] = a);
93
93
  }
94
- function Yn(e) {
94
+ function Xn(e) {
95
95
  e.bitcount-- || (e.tag = e.source[e.sourceIndex++], e.bitcount = 7);
96
96
  var r = e.tag & 1;
97
97
  return e.tag >>>= 1, r;
@@ -113,13 +113,13 @@ function Cr(e, r) {
113
113
  while (n >= 0);
114
114
  return e.tag = s, e.bitcount -= a, r.trans[t + n];
115
115
  }
116
- function $n(e, r, t) {
116
+ function Yn(e, r, t) {
117
117
  var n, a, s, o, u, i;
118
118
  for (n = ie(e, 5, 257), a = ie(e, 5, 1), s = ie(e, 4, 4), o = 0; o < 19; ++o)
119
119
  oe[o] = 0;
120
120
  for (o = 0; o < s; ++o) {
121
121
  var l = ie(e, 3, 0);
122
- oe[qn[o]] = l;
122
+ oe[Vn[o]] = l;
123
123
  }
124
124
  for (vr(Qr, oe, 0, 19), u = 0; u < n + a; ) {
125
125
  var f = Cr(e, Qr);
@@ -158,7 +158,7 @@ function jr(e, r, t) {
158
158
  }
159
159
  }
160
160
  }
161
- function Zn(e) {
161
+ function $n(e) {
162
162
  for (var r, t, n; e.bitcount > 8; )
163
163
  e.sourceIndex--, e.bitcount -= 8;
164
164
  if (r = e.source[e.sourceIndex + 1], r = 256 * r + e.source[e.sourceIndex], t = e.source[e.sourceIndex + 3], t = 256 * t + e.source[e.sourceIndex + 2], r !== (~t & 65535))
@@ -167,18 +167,18 @@ function Zn(e) {
167
167
  e.dest[e.destLen++] = e.source[e.sourceIndex++];
168
168
  return e.bitcount = 0, Pr;
169
169
  }
170
- function Qn(e, r) {
171
- var t = new Vn(e, r), n, a, s;
170
+ function Zn(e, r) {
171
+ var t = new _n(e, r), n, a, s;
172
172
  do {
173
- switch (n = Yn(t), a = ie(t, 2, 0), a) {
173
+ switch (n = Xn(t), a = ie(t, 2, 0), a) {
174
174
  case 0:
175
- s = Zn(t);
175
+ s = $n(t);
176
176
  break;
177
177
  case 1:
178
178
  s = jr(t, Wt, zt);
179
179
  break;
180
180
  case 2:
181
- $n(t, t.ltree, t.dtree), s = jr(t, t.ltree, t.dtree);
181
+ Yn(t, t.ltree, t.dtree), s = jr(t, t.ltree, t.dtree);
182
182
  break;
183
183
  default:
184
184
  s = Ht;
@@ -188,12 +188,12 @@ function Qn(e, r) {
188
188
  } while (!n);
189
189
  return t.destLen < t.dest.length ? typeof t.dest.slice == "function" ? t.dest.slice(0, t.destLen) : t.dest.subarray(0, t.destLen) : t.dest;
190
190
  }
191
- Xn(Wt, zt);
191
+ qn(Wt, zt);
192
192
  qt(Gr, Nr, 4, 3);
193
193
  qt(_t, Vt, 2, 1);
194
194
  Gr[28] = 0;
195
195
  Nr[28] = 258;
196
- var Kn = Qn;
196
+ var Qn = Zn;
197
197
  function we(e, r, t, n, a) {
198
198
  return Math.pow(1 - a, 3) * e + 3 * Math.pow(1 - a, 2) * a * r + 3 * (1 - a) * Math.pow(a, 2) * t + Math.pow(a, 3) * n;
199
199
  }
@@ -532,7 +532,7 @@ Oe.MACSTRING = function(e, r, t, n) {
532
532
  return s;
533
533
  }
534
534
  };
535
- var Ze = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), Qe, jn = function(e) {
535
+ var Ze = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), Qe, Kn = function(e) {
536
536
  if (!Qe) {
537
537
  Qe = {};
538
538
  for (var r in wr)
@@ -554,7 +554,7 @@ var Ze = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), Qe, jn =
554
554
  }
555
555
  };
556
556
  b.MACSTRING = function(e, r) {
557
- var t = jn(r);
557
+ var t = Kn(r);
558
558
  if (t !== void 0) {
559
559
  for (var n = [], a = 0; a < e.length; a++) {
560
560
  var s = e.charCodeAt(a);
@@ -572,12 +572,12 @@ O.MACSTRING = function(e, r) {
572
572
  function Er(e) {
573
573
  return e >= -128 && e <= 127;
574
574
  }
575
- function Jn(e, r, t) {
575
+ function jn(e, r, t) {
576
576
  for (var n = 0, a = e.length; r < a && n < 64 && e[r] === 0; )
577
577
  ++r, ++n;
578
578
  return t.push(128 | n - 1), r;
579
579
  }
580
- function ea(e, r, t) {
580
+ function Jn(e, r, t) {
581
581
  for (var n = 0, a = e.length, s = r; s < a && n < 64; ) {
582
582
  var o = e[s];
583
583
  if (!Er(o) || o === 0 && s + 1 < a && e[s + 1] === 0)
@@ -589,7 +589,7 @@ function ea(e, r, t) {
589
589
  t.push(e[u] + 256 & 255);
590
590
  return s;
591
591
  }
592
- function ra(e, r, t) {
592
+ function ea(e, r, t) {
593
593
  for (var n = 0, a = e.length, s = r; s < a && n < 64; ) {
594
594
  var o = e[s];
595
595
  if (o === 0 || Er(o) && s + 1 < a && Er(e[s + 1]))
@@ -606,7 +606,7 @@ function ra(e, r, t) {
606
606
  b.VARDELTAS = function(e) {
607
607
  for (var r = 0, t = []; r < e.length; ) {
608
608
  var n = e[r];
609
- n === 0 ? r = Jn(e, r, t) : n >= -128 && n <= 127 ? r = ea(e, r, t) : r = ra(e, r, t);
609
+ n === 0 ? r = jn(e, r, t) : n >= -128 && n <= 127 ? r = Jn(e, r, t) : r = ea(e, r, t);
610
610
  }
611
611
  return t;
612
612
  };
@@ -852,7 +852,7 @@ function tt(e, r) {
852
852
  function or(e, r) {
853
853
  return e.getUint16(r, !1);
854
854
  }
855
- function ta(e, r) {
855
+ function ra(e, r) {
856
856
  return e.getInt16(r, !1);
857
857
  }
858
858
  function Hr(e, r) {
@@ -862,27 +862,27 @@ function Yt(e, r) {
862
862
  var t = e.getInt16(r, !1), n = e.getUint16(r + 2, !1);
863
863
  return t + n / 65535;
864
864
  }
865
- function na(e, r) {
865
+ function ta(e, r) {
866
866
  for (var t = "", n = r; n < r + 4; n += 1)
867
867
  t += String.fromCharCode(e.getInt8(n));
868
868
  return t;
869
869
  }
870
- function aa(e, r, t) {
870
+ function na(e, r, t) {
871
871
  for (var n = 0, a = 0; a < t; a += 1)
872
872
  n <<= 8, n += e.getUint8(r + a);
873
873
  return n;
874
874
  }
875
- function sa(e, r, t) {
875
+ function aa(e, r, t) {
876
876
  for (var n = [], a = r; a < t; a += 1)
877
877
  n.push(e.getUint8(a));
878
878
  return n;
879
879
  }
880
- function oa(e) {
880
+ function sa(e) {
881
881
  for (var r = "", t = 0; t < e.length; t += 1)
882
882
  r += String.fromCharCode(e[t]);
883
883
  return r;
884
884
  }
885
- var ia = {
885
+ var oa = {
886
886
  byte: 1,
887
887
  uShort: 2,
888
888
  short: 2,
@@ -946,7 +946,7 @@ v.prototype.parseVersion = function(e) {
946
946
  return this.relativeOffset += 4, e === void 0 && (e = 4096), r + t / e / 10;
947
947
  };
948
948
  v.prototype.skip = function(e, r) {
949
- r === void 0 && (r = 1), this.relativeOffset += ia[e] * r;
949
+ r === void 0 && (r = 1), this.relativeOffset += oa[e] * r;
950
950
  };
951
951
  v.prototype.parseULongList = function(e) {
952
952
  e === void 0 && (e = this.parseULong());
@@ -1184,16 +1184,16 @@ var k = {
1184
1184
  getCard8: tt,
1185
1185
  getUShort: or,
1186
1186
  getCard16: or,
1187
- getShort: ta,
1187
+ getShort: ra,
1188
1188
  getULong: Hr,
1189
1189
  getFixed: Yt,
1190
- getTag: na,
1191
- getOffset: aa,
1192
- getBytes: sa,
1193
- bytesToString: oa,
1190
+ getTag: ta,
1191
+ getOffset: na,
1192
+ getBytes: aa,
1193
+ bytesToString: sa,
1194
1194
  Parser: v
1195
1195
  };
1196
- function ua(e, r) {
1196
+ function ia(e, r) {
1197
1197
  r.parseUShort(), e.length = r.parseULong(), e.language = r.parseULong();
1198
1198
  var t;
1199
1199
  e.groupCount = t = r.parseULong(), e.glyphIndexMap = {};
@@ -1201,7 +1201,7 @@ function ua(e, r) {
1201
1201
  for (var a = r.parseULong(), s = r.parseULong(), o = r.parseULong(), u = a; u <= s; u += 1)
1202
1202
  e.glyphIndexMap[u] = o, o++;
1203
1203
  }
1204
- function la(e, r, t, n, a) {
1204
+ function ua(e, r, t, n, a) {
1205
1205
  e.length = r.parseUShort(), e.language = r.parseUShort();
1206
1206
  var s;
1207
1207
  e.segCount = s = r.parseUShort() >> 1, r.skip("uShort", 3), e.glyphIndexMap = {};
@@ -1209,7 +1209,7 @@ function la(e, r, t, n, a) {
1209
1209
  for (var p = void 0, h = o.parseUShort(), d = u.parseUShort(), g = i.parseShort(), m = l.parseUShort(), x = d; x <= h; x += 1)
1210
1210
  m !== 0 ? (f = l.offset + l.relativeOffset - 2, f += m, f += (x - d) * 2, p = k.getUShort(t, f), p !== 0 && (p = p + g & 65535)) : p = x + g & 65535, e.glyphIndexMap[x] = p;
1211
1211
  }
1212
- function fa(e, r) {
1212
+ function la(e, r) {
1213
1213
  var t = {};
1214
1214
  t.version = k.getUShort(e, r), E.argument(t.version === 0, "cmap table version should be 0."), t.numTables = k.getUShort(e, r + 2);
1215
1215
  for (var n = -1, a = t.numTables - 1; a >= 0; a -= 1) {
@@ -1223,14 +1223,14 @@ function fa(e, r) {
1223
1223
  throw new Error("No valid cmap sub-tables found.");
1224
1224
  var u = new k.Parser(e, r + n);
1225
1225
  if (t.format = u.parseUShort(), t.format === 12)
1226
- ua(t, u);
1226
+ ia(t, u);
1227
1227
  else if (t.format === 4)
1228
- la(t, u, e, r, n);
1228
+ ua(t, u, e, r, n);
1229
1229
  else
1230
1230
  throw new Error("Only format 4 and 12 cmap tables are supported (found format " + t.format + ").");
1231
1231
  return t;
1232
1232
  }
1233
- function pa(e, r, t) {
1233
+ function fa(e, r, t) {
1234
1234
  e.segments.push({
1235
1235
  end: r,
1236
1236
  start: r,
@@ -1239,7 +1239,7 @@ function pa(e, r, t) {
1239
1239
  glyphIndex: t
1240
1240
  });
1241
1241
  }
1242
- function ca(e) {
1242
+ function pa(e) {
1243
1243
  e.segments.push({
1244
1244
  end: 65535,
1245
1245
  start: 65535,
@@ -1247,7 +1247,7 @@ function ca(e) {
1247
1247
  offset: 0
1248
1248
  });
1249
1249
  }
1250
- function ha(e) {
1250
+ function ca(e) {
1251
1251
  var r = !0, t;
1252
1252
  for (t = e.length - 1; t > 0; t -= 1) {
1253
1253
  var n = e.get(t);
@@ -1283,12 +1283,12 @@ function ha(e) {
1283
1283
  var s = new S.Table("cmap", a);
1284
1284
  for (s.segments = [], t = 0; t < e.length; t += 1) {
1285
1285
  for (var o = e.get(t), u = 0; u < o.unicodes.length; u += 1)
1286
- pa(s, o.unicodes[u], t);
1286
+ fa(s, o.unicodes[u], t);
1287
1287
  s.segments = s.segments.sort(function(U, y) {
1288
1288
  return U.start - y.start;
1289
1289
  });
1290
1290
  }
1291
- ca(s);
1291
+ pa(s);
1292
1292
  var i = s.segments.length, l = 0, f = [], c = [], p = [], h = [], d = [], g = [];
1293
1293
  for (t = 0; t < i; t += 1) {
1294
1294
  var m = s.segments[t];
@@ -1309,7 +1309,7 @@ function ha(e) {
1309
1309
  }
1310
1310
  return s;
1311
1311
  }
1312
- var $t = { parse: fa, make: ha }, er = [
1312
+ var $t = { parse: la, make: ca }, er = [
1313
1313
  ".notdef",
1314
1314
  "space",
1315
1315
  "exclam",
@@ -1701,7 +1701,7 @@ var $t = { parse: fa, make: ha }, er = [
1701
1701
  "Regular",
1702
1702
  "Roman",
1703
1703
  "Semibold"
1704
- ], va = [
1704
+ ], ha = [
1705
1705
  "",
1706
1706
  "",
1707
1707
  "",
@@ -1954,7 +1954,7 @@ var $t = { parse: fa, make: ha }, er = [
1954
1954
  "oslash",
1955
1955
  "oe",
1956
1956
  "germandbls"
1957
- ], da = [
1957
+ ], va = [
1958
1958
  "",
1959
1959
  "",
1960
1960
  "",
@@ -2525,7 +2525,7 @@ Wr.prototype.nameToGlyphIndex = function(e) {
2525
2525
  Wr.prototype.glyphIndexToName = function(e) {
2526
2526
  return this.names[e];
2527
2527
  };
2528
- function ga(e) {
2528
+ function da(e) {
2529
2529
  for (var r, t = e.tables.cmap.glyphIndexMap, n = Object.keys(t), a = 0; a < n.length; a += 1) {
2530
2530
  var s = n[a], o = t[s];
2531
2531
  r = e.glyphs.get(o), r.addUnicode(parseInt(s));
@@ -2533,7 +2533,7 @@ function ga(e) {
2533
2533
  for (var u = 0; u < e.glyphs.length; u += 1)
2534
2534
  r = e.glyphs.get(u), e.cffEncoding ? e.isCIDFont ? r.name = "gid" + u : r.name = e.cffEncoding.charset[u] : e.glyphNames.names && (r.name = e.glyphNames.glyphIndexToName(u));
2535
2535
  }
2536
- function ma(e) {
2536
+ function ga(e) {
2537
2537
  e._IndexToUnicodeMap = {};
2538
2538
  for (var r = e.tables.cmap.glyphIndexMap, t = Object.keys(r), n = 0; n < t.length; n += 1) {
2539
2539
  var a = t[n], s = r[a];
@@ -2542,14 +2542,14 @@ function ma(e) {
2542
2542
  } : e._IndexToUnicodeMap[s].unicodes.push(parseInt(a));
2543
2543
  }
2544
2544
  }
2545
- function ya(e, r) {
2546
- r.lowMemory ? ma(e) : ga(e);
2545
+ function ma(e, r) {
2546
+ r.lowMemory ? ga(e) : da(e);
2547
2547
  }
2548
- function xa(e, r, t, n, a) {
2548
+ function ya(e, r, t, n, a) {
2549
2549
  e.beginPath(), e.moveTo(r, t), e.lineTo(n, a), e.stroke();
2550
2550
  }
2551
- var Te = { line: xa };
2552
- function ba(e, r) {
2551
+ var Te = { line: ya };
2552
+ function xa(e, r) {
2553
2553
  var t = r || new X();
2554
2554
  return {
2555
2555
  configurable: !0,
@@ -2565,7 +2565,7 @@ function K(e) {
2565
2565
  this.bindConstructorValues(e);
2566
2566
  }
2567
2567
  K.prototype.bindConstructorValues = function(e) {
2568
- this.index = e.index || 0, this.name = e.name || null, this.unicode = e.unicode || void 0, this.unicodes = e.unicodes || e.unicode !== void 0 ? [e.unicode] : [], "xMin" in e && (this.xMin = e.xMin), "yMin" in e && (this.yMin = e.yMin), "xMax" in e && (this.xMax = e.xMax), "yMax" in e && (this.yMax = e.yMax), "advanceWidth" in e && (this.advanceWidth = e.advanceWidth), Object.defineProperty(this, "path", ba(this, e.path));
2568
+ this.index = e.index || 0, this.name = e.name || null, this.unicode = e.unicode || void 0, this.unicodes = e.unicodes || e.unicode !== void 0 ? [e.unicode] : [], "xMin" in e && (this.xMin = e.xMin), "yMin" in e && (this.yMin = e.yMin), "xMax" in e && (this.xMax = e.xMax), "yMax" in e && (this.yMax = e.yMax), "advanceWidth" in e && (this.advanceWidth = e.advanceWidth), Object.defineProperty(this, "path", xa(this, e.path));
2569
2569
  };
2570
2570
  K.prototype.addUnicode = function(e) {
2571
2571
  this.unicodes.length === 0 && (this.unicode = e), this.unicodes.push(e);
@@ -2684,10 +2684,10 @@ zr.prototype.get = function(e) {
2684
2684
  zr.prototype.push = function(e, r) {
2685
2685
  this.glyphs[e] = r, this.length++;
2686
2686
  };
2687
- function Sa(e, r) {
2687
+ function ba(e, r) {
2688
2688
  return new K({ index: r, font: e });
2689
2689
  }
2690
- function Ta(e, r, t, n, a, s) {
2690
+ function Sa(e, r, t, n, a, s) {
2691
2691
  return function() {
2692
2692
  var o = new K({ index: r, font: e });
2693
2693
  return o.path = function() {
@@ -2697,7 +2697,7 @@ function Ta(e, r, t, n, a, s) {
2697
2697
  }, je(o, "xMin", "_xMin"), je(o, "xMax", "_xMax"), je(o, "yMin", "_yMin"), je(o, "yMax", "_yMax"), o;
2698
2698
  };
2699
2699
  }
2700
- function ka(e, r, t, n) {
2700
+ function Ta(e, r, t, n) {
2701
2701
  return function() {
2702
2702
  var a = new K({ index: r, font: e });
2703
2703
  return a.path = function() {
@@ -2706,7 +2706,7 @@ function ka(e, r, t, n) {
2706
2706
  }, a;
2707
2707
  };
2708
2708
  }
2709
- var le = { GlyphSet: zr, glyphLoader: Sa, ttfGlyphLoader: Ta, cffGlyphLoader: ka };
2709
+ var le = { GlyphSet: zr, glyphLoader: ba, ttfGlyphLoader: Sa, cffGlyphLoader: Ta };
2710
2710
  function Kt(e, r) {
2711
2711
  if (e === r)
2712
2712
  return !0;
@@ -2740,7 +2740,7 @@ function ye(e, r, t) {
2740
2740
  }
2741
2741
  return { objects: a, startOffset: r, endOffset: u };
2742
2742
  }
2743
- function Fa(e, r) {
2743
+ function ka(e, r) {
2744
2744
  var t = [], n = k.getCard16(e, r), a, s;
2745
2745
  if (n !== 0) {
2746
2746
  var o = k.getByte(e, r + 2);
@@ -2752,7 +2752,7 @@ function Fa(e, r) {
2752
2752
  s = r + 2;
2753
2753
  return { offsets: t, startOffset: r, endOffset: s };
2754
2754
  }
2755
- function Ua(e, r, t, n, a) {
2755
+ function Fa(e, r, t, n, a) {
2756
2756
  var s = k.getCard16(t, n), o = 0;
2757
2757
  if (s !== 0) {
2758
2758
  var u = k.getByte(t, n + 2);
@@ -2761,7 +2761,7 @@ function Ua(e, r, t, n, a) {
2761
2761
  var i = k.getBytes(t, o + r[e], o + r[e + 1]);
2762
2762
  return i;
2763
2763
  }
2764
- function Ca(e) {
2764
+ function Ua(e) {
2765
2765
  for (var r = "", t = 15, n = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", ".", "E", "E-", null, "-"]; ; ) {
2766
2766
  var a = e.parseByte(), s = a >> 4, o = a & 15;
2767
2767
  if (s === t || (r += n[s], o === t))
@@ -2770,14 +2770,14 @@ function Ca(e) {
2770
2770
  }
2771
2771
  return parseFloat(r);
2772
2772
  }
2773
- function wa(e, r) {
2773
+ function Ca(e, r) {
2774
2774
  var t, n, a, s;
2775
2775
  if (r === 28)
2776
2776
  return t = e.parseByte(), n = e.parseByte(), t << 8 | n;
2777
2777
  if (r === 29)
2778
2778
  return t = e.parseByte(), n = e.parseByte(), a = e.parseByte(), s = e.parseByte(), t << 24 | n << 16 | a << 8 | s;
2779
2779
  if (r === 30)
2780
- return Ca(e);
2780
+ return Ua(e);
2781
2781
  if (r >= 32 && r <= 246)
2782
2782
  return r - 139;
2783
2783
  if (r >= 247 && r <= 250)
@@ -2786,7 +2786,7 @@ function wa(e, r) {
2786
2786
  return t = e.parseByte(), -(r - 251) * 256 - t - 108;
2787
2787
  throw new Error("Invalid b0 " + r);
2788
2788
  }
2789
- function Ea(e) {
2789
+ function wa(e) {
2790
2790
  for (var r = {}, t = 0; t < e.length; t += 1) {
2791
2791
  var n = e[t][0], a = e[t][1], s = void 0;
2792
2792
  if (a.length === 1 ? s = a[0] : s = a, r.hasOwnProperty(n) && !isNaN(r[n]))
@@ -2800,9 +2800,9 @@ function jt(e, r, t) {
2800
2800
  var n = new k.Parser(e, r), a = [], s = [];
2801
2801
  for (t = t !== void 0 ? t : e.length; n.relativeOffset < t; ) {
2802
2802
  var o = n.parseByte();
2803
- o <= 21 ? (o === 12 && (o = 1200 + n.parseByte()), a.push([o, s]), s = []) : s.push(wa(n, o));
2803
+ o <= 21 ? (o === 12 && (o = 1200 + n.parseByte()), a.push([o, s]), s = []) : s.push(Ca(n, o));
2804
2804
  }
2805
- return Ea(a);
2805
+ return wa(a);
2806
2806
  }
2807
2807
  function Ge(e, r) {
2808
2808
  return r <= 390 ? r = er[r] : r = e[r - 391], r;
@@ -2821,7 +2821,7 @@ function Jt(e, r, t) {
2821
2821
  }
2822
2822
  return n;
2823
2823
  }
2824
- function Oa(e, r) {
2824
+ function Ea(e, r) {
2825
2825
  var t = {};
2826
2826
  return t.formatMajor = k.getCard8(e, r), t.formatMinor = k.getCard8(e, r + 1), t.size = k.getCard8(e, r + 2), t.offsetSize = k.getCard8(e, r + 3), t.startOffset = r, t.endOffset = r + 4, t;
2827
2827
  }
@@ -2866,7 +2866,7 @@ var en = [
2866
2866
  { name: "defaultWidthX", op: 20, type: "number", value: 0 },
2867
2867
  { name: "nominalWidthX", op: 21, type: "number", value: 0 }
2868
2868
  ];
2869
- function La(e, r) {
2869
+ function Oa(e, r) {
2870
2870
  var t = jt(e, 0, e.byteLength);
2871
2871
  return Jt(t, en, r);
2872
2872
  }
@@ -2876,7 +2876,7 @@ function tn(e, r, t, n) {
2876
2876
  }
2877
2877
  function at(e, r, t, n) {
2878
2878
  for (var a = [], s = 0; s < t.length; s += 1) {
2879
- var o = new DataView(new Uint8Array(t[s]).buffer), u = La(o, n);
2879
+ var o = new DataView(new Uint8Array(t[s]).buffer), u = Oa(o, n);
2880
2880
  u._subrs = [], u._subrsBias = 0, u._defaultWidthX = 0, u._nominalWidthX = 0;
2881
2881
  var i = u.private[0], l = u.private[1];
2882
2882
  if (i !== 0 && l !== 0) {
@@ -2891,7 +2891,7 @@ function at(e, r, t, n) {
2891
2891
  }
2892
2892
  return a;
2893
2893
  }
2894
- function Ra(e, r, t, n) {
2894
+ function La(e, r, t, n) {
2895
2895
  var a, s, o = new k.Parser(e, r);
2896
2896
  t -= 1;
2897
2897
  var u = [".notdef"], i = o.parseCard8();
@@ -2914,7 +2914,7 @@ function Ra(e, r, t, n) {
2914
2914
  throw new Error("Unknown charset format " + i);
2915
2915
  return u;
2916
2916
  }
2917
- function Da(e, r, t) {
2917
+ function Ra(e, r, t) {
2918
2918
  var n, a = {}, s = new k.Parser(e, r), o = s.parseCard8();
2919
2919
  if (o === 0)
2920
2920
  for (var u = s.parseCard8(), i = 0; i < u; i += 1)
@@ -3055,7 +3055,7 @@ function st(e, r, t) {
3055
3055
  }
3056
3056
  return C(t), r.advanceWidth = L, u;
3057
3057
  }
3058
- function Aa(e, r, t, n) {
3058
+ function Da(e, r, t, n) {
3059
3059
  var a = [], s, o = new k.Parser(e, r), u = o.parseCard8();
3060
3060
  if (u === 0)
3061
3061
  for (var i = 0; i < t; i++) {
@@ -3082,9 +3082,9 @@ function Aa(e, r, t, n) {
3082
3082
  throw new Error("CFF Table CID Font FDSelect table has unsupported format " + u);
3083
3083
  return a;
3084
3084
  }
3085
- function Ba(e, r, t, n) {
3085
+ function Aa(e, r, t, n) {
3086
3086
  t.tables.cff = {};
3087
- var a = Oa(e, r), s = ye(e, a.endOffset, k.bytesToString), o = ye(e, s.endOffset), u = ye(e, o.endOffset, k.bytesToString), i = ye(e, u.endOffset);
3087
+ var a = Ea(e, r), s = ye(e, a.endOffset, k.bytesToString), o = ye(e, s.endOffset), u = ye(e, o.endOffset, k.bytesToString), i = ye(e, u.endOffset);
3088
3088
  t.gsubrs = i.objects, t.gsubrsBias = Lr(t.gsubrs);
3089
3089
  var l = at(e, r, o.objects, u.objects);
3090
3090
  if (l.length !== 1)
@@ -3096,7 +3096,7 @@ function Ba(e, r, t, n) {
3096
3096
  throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
3097
3097
  c += r;
3098
3098
  var h = ye(e, c), d = at(e, r, h.objects, u.objects);
3099
- f._fdArray = d, p += r, f._fdSelect = Aa(e, p, t.numGlyphs, d.length);
3099
+ f._fdArray = d, p += r, f._fdSelect = Da(e, p, t.numGlyphs, d.length);
3100
3100
  }
3101
3101
  var g = r + f.private[1], m = tn(e, g, f.private[0], u.objects);
3102
3102
  if (t.defaultWidthX = m.defaultWidthX, t.nominalWidthX = m.nominalWidthX, m.subrs !== 0) {
@@ -3105,11 +3105,11 @@ function Ba(e, r, t, n) {
3105
3105
  } else
3106
3106
  t.subrs = [], t.subrsBias = 0;
3107
3107
  var y;
3108
- n.lowMemory ? (y = Fa(e, r + f.charStrings), t.nGlyphs = y.offsets.length) : (y = ye(e, r + f.charStrings), t.nGlyphs = y.objects.length);
3109
- var L = Ra(e, r + f.charset, t.nGlyphs, u.objects);
3110
- if (f.encoding === 0 ? t.cffEncoding = new ir(va, L) : f.encoding === 1 ? t.cffEncoding = new ir(da, L) : t.cffEncoding = Da(e, r + f.encoding, L), t.encoding = t.encoding || t.cffEncoding, t.glyphs = new le.GlyphSet(t), n.lowMemory)
3108
+ n.lowMemory ? (y = ka(e, r + f.charStrings), t.nGlyphs = y.offsets.length) : (y = ye(e, r + f.charStrings), t.nGlyphs = y.objects.length);
3109
+ var L = La(e, r + f.charset, t.nGlyphs, u.objects);
3110
+ if (f.encoding === 0 ? t.cffEncoding = new ir(ha, L) : f.encoding === 1 ? t.cffEncoding = new ir(va, L) : t.cffEncoding = Ra(e, r + f.encoding, L), t.encoding = t.encoding || t.cffEncoding, t.glyphs = new le.GlyphSet(t), n.lowMemory)
3111
3111
  t._push = function(C) {
3112
- var F = Ua(C, y.offsets, e, r + f.charStrings);
3112
+ var F = Fa(C, y.offsets, e, r + f.charStrings);
3113
3113
  t.glyphs.push(C, le.cffGlyphLoader(t, C, st, F));
3114
3114
  };
3115
3115
  else
@@ -3122,7 +3122,7 @@ function nn(e, r) {
3122
3122
  var t, n = er.indexOf(e);
3123
3123
  return n >= 0 && (t = n), n = r.indexOf(e), n >= 0 ? t = n + er.length : (t = er.length + r.length, r.push(e)), t;
3124
3124
  }
3125
- function Ma() {
3125
+ function Ba() {
3126
3126
  return new S.Record("Header", [
3127
3127
  { name: "major", type: "Card8", value: 1 },
3128
3128
  { name: "minor", type: "Card8", value: 0 },
@@ -3130,7 +3130,7 @@ function Ma() {
3130
3130
  { name: "major", type: "Card8", value: 1 }
3131
3131
  ]);
3132
3132
  }
3133
- function Ia(e) {
3133
+ function Ma(e) {
3134
3134
  var r = new S.Record("Name INDEX", [
3135
3135
  { name: "names", type: "INDEX", value: [] }
3136
3136
  ]);
@@ -3158,7 +3158,7 @@ function it(e) {
3158
3158
  ]);
3159
3159
  return r.topDicts = [{ name: "topDict_0", type: "TABLE", value: e }], r;
3160
3160
  }
3161
- function Pa(e) {
3161
+ function Ia(e) {
3162
3162
  var r = new S.Record("String INDEX", [
3163
3163
  { name: "strings", type: "INDEX", value: [] }
3164
3164
  ]);
@@ -3167,12 +3167,12 @@ function Pa(e) {
3167
3167
  r.strings.push({ name: "string_" + t, type: "STRING", value: e[t] });
3168
3168
  return r;
3169
3169
  }
3170
- function Ga() {
3170
+ function Pa() {
3171
3171
  return new S.Record("Global Subr INDEX", [
3172
3172
  { name: "subrs", type: "INDEX", value: [] }
3173
3173
  ]);
3174
3174
  }
3175
- function Na(e, r) {
3175
+ function Ga(e, r) {
3176
3176
  for (var t = new S.Record("Charsets", [
3177
3177
  { name: "format", type: "Card8", value: 0 }
3178
3178
  ]), n = 0; n < e.length; n += 1) {
@@ -3181,7 +3181,7 @@ function Na(e, r) {
3181
3181
  }
3182
3182
  return t;
3183
3183
  }
3184
- function Ha(e) {
3184
+ function Na(e) {
3185
3185
  var r = [], t = e.path;
3186
3186
  r.push({ name: "width", type: "NUMBER", value: e.advanceWidth });
3187
3187
  for (var n = 0, a = 0, s = 0; s < t.commands.length; s += 1) {
@@ -3209,22 +3209,22 @@ function Ha(e) {
3209
3209
  }
3210
3210
  return r.push({ name: "endchar", type: "OP", value: 14 }), r;
3211
3211
  }
3212
- function Wa(e) {
3212
+ function Ha(e) {
3213
3213
  for (var r = new S.Record("CharStrings INDEX", [
3214
3214
  { name: "charStrings", type: "INDEX", value: [] }
3215
3215
  ]), t = 0; t < e.length; t += 1) {
3216
- var n = e.get(t), a = Ha(n);
3216
+ var n = e.get(t), a = Na(n);
3217
3217
  r.charStrings.push({ name: n.name, type: "CHARSTRING", value: a });
3218
3218
  }
3219
3219
  return r;
3220
3220
  }
3221
- function za(e, r) {
3221
+ function Wa(e, r) {
3222
3222
  var t = new S.Record("Private DICT", [
3223
3223
  { name: "dict", type: "DICT", value: {} }
3224
3224
  ]);
3225
3225
  return t.dict = an(rn, e, r), t;
3226
3226
  }
3227
- function _a(e, r) {
3227
+ function za(e, r) {
3228
3228
  for (var t = new S.Table("CFF ", [
3229
3229
  { name: "header", type: "RECORD" },
3230
3230
  { name: "nameIndex", type: "RECORD" },
@@ -3248,18 +3248,18 @@ function _a(e, r) {
3248
3248
  }, s = {}, o = [], u, i = 1; i < e.length; i += 1)
3249
3249
  u = e.get(i), o.push(u.name);
3250
3250
  var l = [];
3251
- t.header = Ma(), t.nameIndex = Ia([r.postScriptName]);
3251
+ t.header = Ba(), t.nameIndex = Ma([r.postScriptName]);
3252
3252
  var f = ot(a, l);
3253
- t.topDictIndex = it(f), t.globalSubrIndex = Ga(), t.charsets = Na(o, l), t.charStringsIndex = Wa(e), t.privateDict = za(s, l), t.stringIndex = Pa(l);
3253
+ t.topDictIndex = it(f), t.globalSubrIndex = Pa(), t.charsets = Ga(o, l), t.charStringsIndex = Ha(e), t.privateDict = Wa(s, l), t.stringIndex = Ia(l);
3254
3254
  var c = t.header.sizeOf() + t.nameIndex.sizeOf() + t.topDictIndex.sizeOf() + t.stringIndex.sizeOf() + t.globalSubrIndex.sizeOf();
3255
3255
  return a.charset = c, a.encoding = 0, a.charStrings = a.charset + t.charsets.sizeOf(), a.private[1] = a.charStrings + t.charStringsIndex.sizeOf(), f = ot(a, l), t.topDictIndex = it(f), t;
3256
3256
  }
3257
- var sn = { parse: Ba, make: _a };
3258
- function Va(e, r) {
3257
+ var sn = { parse: Aa, make: za };
3258
+ function _a(e, r) {
3259
3259
  var t = {}, n = new k.Parser(e, r);
3260
3260
  return t.version = n.parseVersion(), t.fontRevision = Math.round(n.parseFixed() * 1e3) / 1e3, t.checkSumAdjustment = n.parseULong(), t.magicNumber = n.parseULong(), E.argument(t.magicNumber === 1594834165, "Font header has wrong magic number."), t.flags = n.parseUShort(), t.unitsPerEm = n.parseUShort(), t.created = n.parseLongDateTime(), t.modified = n.parseLongDateTime(), t.xMin = n.parseShort(), t.yMin = n.parseShort(), t.xMax = n.parseShort(), t.yMax = n.parseShort(), t.macStyle = n.parseUShort(), t.lowestRecPPEM = n.parseUShort(), t.fontDirectionHint = n.parseShort(), t.indexToLocFormat = n.parseShort(), t.glyphDataFormat = n.parseShort(), t;
3261
3261
  }
3262
- function qa(e) {
3262
+ function Va(e) {
3263
3263
  var r = Math.round((/* @__PURE__ */ new Date()).getTime() / 1e3) + 2082844800, t = r;
3264
3264
  return e.createdTimestamp && (t = e.createdTimestamp + 2082844800), new S.Table("head", [
3265
3265
  { name: "version", type: "FIXED", value: 65536 },
@@ -3281,12 +3281,12 @@ function qa(e) {
3281
3281
  { name: "glyphDataFormat", type: "SHORT", value: 0 }
3282
3282
  ], e);
3283
3283
  }
3284
- var on = { parse: Va, make: qa };
3285
- function Xa(e, r) {
3284
+ var on = { parse: _a, make: Va };
3285
+ function qa(e, r) {
3286
3286
  var t = {}, n = new k.Parser(e, r);
3287
3287
  return t.version = n.parseVersion(), t.ascender = n.parseShort(), t.descender = n.parseShort(), t.lineGap = n.parseShort(), t.advanceWidthMax = n.parseUShort(), t.minLeftSideBearing = n.parseShort(), t.minRightSideBearing = n.parseShort(), t.xMaxExtent = n.parseShort(), t.caretSlopeRise = n.parseShort(), t.caretSlopeRun = n.parseShort(), t.caretOffset = n.parseShort(), n.relativeOffset += 8, t.metricDataFormat = n.parseShort(), t.numberOfHMetrics = n.parseUShort(), t;
3288
3288
  }
3289
- function Ya(e) {
3289
+ function Xa(e) {
3290
3290
  return new S.Table("hhea", [
3291
3291
  { name: "version", type: "FIXED", value: 65536 },
3292
3292
  { name: "ascender", type: "FWORD", value: 0 },
@@ -3307,15 +3307,15 @@ function Ya(e) {
3307
3307
  { name: "numberOfHMetrics", type: "USHORT", value: 0 }
3308
3308
  ], e);
3309
3309
  }
3310
- var un = { parse: Xa, make: Ya };
3311
- function $a(e, r, t, n, a) {
3310
+ var un = { parse: qa, make: Xa };
3311
+ function Ya(e, r, t, n, a) {
3312
3312
  for (var s, o, u = new k.Parser(e, r), i = 0; i < n; i += 1) {
3313
3313
  i < t && (s = u.parseUShort(), o = u.parseShort());
3314
3314
  var l = a.get(i);
3315
3315
  l.advanceWidth = s, l.leftSideBearing = o;
3316
3316
  }
3317
3317
  }
3318
- function Za(e, r, t, n, a) {
3318
+ function $a(e, r, t, n, a) {
3319
3319
  e._hmtxTableData = {};
3320
3320
  for (var s, o, u = new k.Parser(r, t), i = 0; i < a; i += 1)
3321
3321
  i < n && (s = u.parseUShort(), o = u.parseShort()), e._hmtxTableData[i] = {
@@ -3323,18 +3323,18 @@ function Za(e, r, t, n, a) {
3323
3323
  leftSideBearing: o
3324
3324
  };
3325
3325
  }
3326
- function Qa(e, r, t, n, a, s, o) {
3327
- o.lowMemory ? Za(e, r, t, n, a) : $a(r, t, n, a, s);
3326
+ function Za(e, r, t, n, a, s, o) {
3327
+ o.lowMemory ? $a(e, r, t, n, a) : Ya(r, t, n, a, s);
3328
3328
  }
3329
- function Ka(e) {
3329
+ function Qa(e) {
3330
3330
  for (var r = new S.Table("hmtx", []), t = 0; t < e.length; t += 1) {
3331
3331
  var n = e.get(t), a = n.advanceWidth || 0, s = n.leftSideBearing || 0;
3332
3332
  r.fields.push({ name: "advanceWidth_" + t, type: "USHORT", value: a }), r.fields.push({ name: "leftSideBearing_" + t, type: "SHORT", value: s });
3333
3333
  }
3334
3334
  return r;
3335
3335
  }
3336
- var ln = { parse: Qa, make: Ka };
3337
- function ja(e) {
3336
+ var ln = { parse: Za, make: Qa };
3337
+ function Ka(e) {
3338
3338
  for (var r = new S.Table("ltag", [
3339
3339
  { name: "version", type: "ULONG", value: 1 },
3340
3340
  { name: "flags", type: "ULONG", value: 0 },
@@ -3345,7 +3345,7 @@ function ja(e) {
3345
3345
  }
3346
3346
  return r.fields.push({ name: "stringPool", type: "CHARARRAY", value: t }), r;
3347
3347
  }
3348
- function Ja(e, r) {
3348
+ function ja(e, r) {
3349
3349
  var t = new k.Parser(e, r), n = t.parseULong();
3350
3350
  E.argument(n === 1, "Unsupported ltag table version."), t.skip("uLong", 1);
3351
3351
  for (var a = t.parseULong(), s = [], o = 0; o < a; o++) {
@@ -3355,18 +3355,18 @@ function Ja(e, r) {
3355
3355
  }
3356
3356
  return s;
3357
3357
  }
3358
- var fn = { make: ja, parse: Ja };
3359
- function es(e, r) {
3358
+ var fn = { make: Ka, parse: ja };
3359
+ function Ja(e, r) {
3360
3360
  var t = {}, n = new k.Parser(e, r);
3361
3361
  return t.version = n.parseVersion(), t.numGlyphs = n.parseUShort(), t.version === 1 && (t.maxPoints = n.parseUShort(), t.maxContours = n.parseUShort(), t.maxCompositePoints = n.parseUShort(), t.maxCompositeContours = n.parseUShort(), t.maxZones = n.parseUShort(), t.maxTwilightPoints = n.parseUShort(), t.maxStorage = n.parseUShort(), t.maxFunctionDefs = n.parseUShort(), t.maxInstructionDefs = n.parseUShort(), t.maxStackElements = n.parseUShort(), t.maxSizeOfInstructions = n.parseUShort(), t.maxComponentElements = n.parseUShort(), t.maxComponentDepth = n.parseUShort()), t;
3362
3362
  }
3363
- function rs(e) {
3363
+ function es(e) {
3364
3364
  return new S.Table("maxp", [
3365
3365
  { name: "version", type: "FIXED", value: 20480 },
3366
3366
  { name: "numGlyphs", type: "USHORT", value: e }
3367
3367
  ]);
3368
3368
  }
3369
- var pn = { parse: es, make: rs }, cn = [
3369
+ var pn = { parse: Ja, make: es }, cn = [
3370
3370
  "copyright",
3371
3371
  // 0
3372
3372
  "fontFamily",
@@ -3533,7 +3533,7 @@ var pn = { parse: es, make: rs }, cn = [
3533
3533
  149: "kl",
3534
3534
  150: "az",
3535
3535
  151: "nn"
3536
- }, ts = {
3536
+ }, rs = {
3537
3537
  0: 0,
3538
3538
  // langEnglish → smRoman
3539
3539
  1: 0,
@@ -3986,7 +3986,7 @@ var pn = { parse: es, make: rs }, cn = [
3986
3986
  1144: "ii",
3987
3987
  1130: "yo"
3988
3988
  };
3989
- function ns(e, r, t) {
3989
+ function ts(e, r, t) {
3990
3990
  switch (e) {
3991
3991
  case 0:
3992
3992
  if (r === 65535)
@@ -4000,7 +4000,7 @@ function ns(e, r, t) {
4000
4000
  return vn[r];
4001
4001
  }
4002
4002
  }
4003
- var Rr = "utf-16", as = {
4003
+ var Rr = "utf-16", ns = {
4004
4004
  0: "macintosh",
4005
4005
  // smRoman
4006
4006
  1: "x-mac-japanese",
@@ -4059,7 +4059,7 @@ var Rr = "utf-16", as = {
4059
4059
  // smVietnamese
4060
4060
  31: "x-mac-extarabic"
4061
4061
  // smExtArabic
4062
- }, ss = {
4062
+ }, as = {
4063
4063
  15: "x-mac-icelandic",
4064
4064
  // langIcelandic
4065
4065
  17: "x-mac-turkish",
@@ -4096,16 +4096,16 @@ function dn(e, r, t) {
4096
4096
  case 0:
4097
4097
  return Rr;
4098
4098
  case 1:
4099
- return ss[t] || as[r];
4099
+ return as[t] || ns[r];
4100
4100
  case 3:
4101
4101
  if (r === 1 || r === 10)
4102
4102
  return Rr;
4103
4103
  break;
4104
4104
  }
4105
4105
  }
4106
- function os(e, r, t) {
4106
+ function ss(e, r, t) {
4107
4107
  for (var n = {}, a = new k.Parser(e, r), s = a.parseUShort(), o = a.parseUShort(), u = a.offset + a.parseUShort(), i = 0; i < o; i++) {
4108
- var l = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p = a.parseUShort(), h = cn[p] || p, d = a.parseUShort(), g = a.parseUShort(), m = ns(l, c, t), x = dn(l, f, c);
4108
+ var l = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p = a.parseUShort(), h = cn[p] || p, d = a.parseUShort(), g = a.parseUShort(), m = ts(l, c, t), x = dn(l, f, c);
4109
4109
  if (x !== void 0 && m !== void 0) {
4110
4110
  var U = void 0;
4111
4111
  if (x === Rr ? U = Oe.UTF16(e, u + g, d) : U = Oe.MACSTRING(e, u + g, d, x), U) {
@@ -4132,7 +4132,7 @@ function ut(e, r, t, n, a, s) {
4132
4132
  { name: "offset", type: "USHORT", value: s }
4133
4133
  ]);
4134
4134
  }
4135
- function is(e, r) {
4135
+ function os(e, r) {
4136
4136
  var t = e.length, n = r.length - t + 1;
4137
4137
  e:
4138
4138
  for (var a = 0; a < n; a++)
@@ -4145,7 +4145,7 @@ function is(e, r) {
4145
4145
  return -1;
4146
4146
  }
4147
4147
  function lt(e, r) {
4148
- var t = is(e, r);
4148
+ var t = os(e, r);
4149
4149
  if (t < 0) {
4150
4150
  t = r.length;
4151
4151
  for (var n = 0, a = e.length; n < a; ++n)
@@ -4153,7 +4153,7 @@ function lt(e, r) {
4153
4153
  }
4154
4154
  return t;
4155
4155
  }
4156
- function us(e, r) {
4156
+ function is(e, r) {
4157
4157
  var t, n = [], a = {}, s = dr(cn);
4158
4158
  for (var o in e) {
4159
4159
  var u = s[o];
@@ -4165,7 +4165,7 @@ function us(e, r) {
4165
4165
  t = n[p];
4166
4166
  var h = a[t];
4167
4167
  for (var d in h) {
4168
- var g = h[d], m = 1, x = i[d], U = ts[x], y = dn(m, U, x), L = b.MACSTRING(g, y);
4168
+ var g = h[d], m = 1, x = i[d], U = rs[x], y = dn(m, U, x), L = b.MACSTRING(g, y);
4169
4169
  L === void 0 && (m = 0, x = r.indexOf(d), x < 0 && (x = r.length, r.push(d)), U = 4, L = b.UTF16(g));
4170
4170
  var w = lt(L, c);
4171
4171
  f.push(ut(
@@ -4201,7 +4201,7 @@ function us(e, r) {
4201
4201
  D.fields.push({ name: "record_" + R, type: "RECORD", value: f[R] });
4202
4202
  return D.fields.push({ name: "strings", type: "LITERAL", value: c }), D;
4203
4203
  }
4204
- var gn = { parse: os, make: us }, Dr = [
4204
+ var gn = { parse: ss, make: is }, Dr = [
4205
4205
  { begin: 0, end: 127 },
4206
4206
  // Basic Latin
4207
4207
  { begin: 128, end: 255 },
@@ -4449,7 +4449,7 @@ var gn = { parse: os, make: us }, Dr = [
4449
4449
  { begin: 127024, end: 127135 }
4450
4450
  // Domino Tiles
4451
4451
  ];
4452
- function ls(e) {
4452
+ function us(e) {
4453
4453
  for (var r = 0; r < Dr.length; r += 1) {
4454
4454
  var t = Dr[r];
4455
4455
  if (e >= t.begin && e < t.end)
@@ -4457,14 +4457,14 @@ function ls(e) {
4457
4457
  }
4458
4458
  return -1;
4459
4459
  }
4460
- function fs(e, r) {
4460
+ function ls(e, r) {
4461
4461
  var t = {}, n = new k.Parser(e, r);
4462
4462
  t.version = n.parseUShort(), t.xAvgCharWidth = n.parseShort(), t.usWeightClass = n.parseUShort(), t.usWidthClass = n.parseUShort(), t.fsType = n.parseUShort(), t.ySubscriptXSize = n.parseShort(), t.ySubscriptYSize = n.parseShort(), t.ySubscriptXOffset = n.parseShort(), t.ySubscriptYOffset = n.parseShort(), t.ySuperscriptXSize = n.parseShort(), t.ySuperscriptYSize = n.parseShort(), t.ySuperscriptXOffset = n.parseShort(), t.ySuperscriptYOffset = n.parseShort(), t.yStrikeoutSize = n.parseShort(), t.yStrikeoutPosition = n.parseShort(), t.sFamilyClass = n.parseShort(), t.panose = [];
4463
4463
  for (var a = 0; a < 10; a++)
4464
4464
  t.panose[a] = n.parseByte();
4465
4465
  return t.ulUnicodeRange1 = n.parseULong(), t.ulUnicodeRange2 = n.parseULong(), t.ulUnicodeRange3 = n.parseULong(), t.ulUnicodeRange4 = n.parseULong(), t.achVendID = String.fromCharCode(n.parseByte(), n.parseByte(), n.parseByte(), n.parseByte()), t.fsSelection = n.parseUShort(), t.usFirstCharIndex = n.parseUShort(), t.usLastCharIndex = n.parseUShort(), t.sTypoAscender = n.parseShort(), t.sTypoDescender = n.parseShort(), t.sTypoLineGap = n.parseShort(), t.usWinAscent = n.parseUShort(), t.usWinDescent = n.parseUShort(), t.version >= 1 && (t.ulCodePageRange1 = n.parseULong(), t.ulCodePageRange2 = n.parseULong()), t.version >= 2 && (t.sxHeight = n.parseShort(), t.sCapHeight = n.parseShort(), t.usDefaultChar = n.parseUShort(), t.usBreakChar = n.parseUShort(), t.usMaxContent = n.parseUShort()), t;
4466
4466
  }
4467
- function ps(e) {
4467
+ function fs(e) {
4468
4468
  return new S.Table("OS/2", [
4469
4469
  { name: "version", type: "USHORT", value: 3 },
4470
4470
  { name: "xAvgCharWidth", type: "SHORT", value: 0 },
@@ -4514,8 +4514,8 @@ function ps(e) {
4514
4514
  { name: "usMaxContext", type: "USHORT", value: 0 }
4515
4515
  ], e);
4516
4516
  }
4517
- var Ar = { parse: fs, make: ps, unicodeRanges: Dr, getUnicodeRange: ls };
4518
- function cs(e, r) {
4517
+ var Ar = { parse: ls, make: fs, unicodeRanges: Dr, getUnicodeRange: us };
4518
+ function ps(e, r) {
4519
4519
  var t = {}, n = new k.Parser(e, r);
4520
4520
  switch (t.version = n.parseVersion(), t.italicAngle = n.parseFixed(), t.underlinePosition = n.parseShort(), t.underlineThickness = n.parseShort(), t.isFixedPitch = n.parseULong(), t.minMemType42 = n.parseULong(), t.maxMemType42 = n.parseULong(), t.minMemType1 = n.parseULong(), t.maxMemType1 = n.parseULong(), t.version) {
4521
4521
  case 1:
@@ -4540,7 +4540,7 @@ function cs(e, r) {
4540
4540
  }
4541
4541
  return t;
4542
4542
  }
4543
- function hs() {
4543
+ function cs() {
4544
4544
  return new S.Table("post", [
4545
4545
  { name: "version", type: "FIXED", value: 196608 },
4546
4546
  { name: "italicAngle", type: "FIXED", value: 0 },
@@ -4553,7 +4553,7 @@ function hs() {
4553
4553
  { name: "maxMemType1", type: "ULONG", value: 0 }
4554
4554
  ]);
4555
4555
  }
4556
- var mn = { parse: cs, make: hs }, ee = new Array(9);
4556
+ var mn = { parse: ps, make: cs }, ee = new Array(9);
4557
4557
  ee[1] = function() {
4558
4558
  var r = this.offset + this.relativeOffset, t = this.parseUShort();
4559
4559
  if (t === 1)
@@ -4701,7 +4701,7 @@ ee[8] = function() {
4701
4701
  substitutes: this.parseUShortList()
4702
4702
  };
4703
4703
  };
4704
- function vs(e, r) {
4704
+ function hs(e, r) {
4705
4705
  r = r || 0;
4706
4706
  var t = new v(e, r), n = t.parseVersion(1);
4707
4707
  return E.argument(n === 1 || n === 1.1, "Unsupported GSUB table version."), n === 1 ? {
@@ -4791,7 +4791,7 @@ Le[6] = function(r) {
4791
4791
  }
4792
4792
  E.assert(!1, "lookup type 6 format must be 1, 2 or 3.");
4793
4793
  };
4794
- function ds(e) {
4794
+ function vs(e) {
4795
4795
  return new S.Table("GSUB", [
4796
4796
  { name: "version", type: "ULONG", value: 65536 },
4797
4797
  { name: "scripts", type: "TABLE", value: new S.ScriptList(e.scripts) },
@@ -4799,8 +4799,8 @@ function ds(e) {
4799
4799
  { name: "lookups", type: "TABLE", value: new S.LookupList(e.lookups, Le) }
4800
4800
  ]);
4801
4801
  }
4802
- var yn = { parse: vs, make: ds };
4803
- function gs(e, r) {
4802
+ var yn = { parse: hs, make: vs };
4803
+ function ds(e, r) {
4804
4804
  var t = new k.Parser(e, r), n = t.parseULong();
4805
4805
  E.argument(n === 1, "Unsupported META table version."), t.parseULong(), t.parseULong();
4806
4806
  for (var a = t.parseULong(), s = {}, o = 0; o < a; o++) {
@@ -4809,7 +4809,7 @@ function gs(e, r) {
4809
4809
  }
4810
4810
  return s;
4811
4811
  }
4812
- function ms(e) {
4812
+ function gs(e) {
4813
4813
  var r = Object.keys(e).length, t = "", n = 16 + r * 12, a = new S.Table("meta", [
4814
4814
  { name: "version", type: "ULONG", value: 1 },
4815
4815
  { name: "flags", type: "ULONG", value: 0 },
@@ -4822,7 +4822,7 @@ function ms(e) {
4822
4822
  }
4823
4823
  return a.fields.push({ name: "stringPool", type: "CHARARRAY", value: t }), a;
4824
4824
  }
4825
- var xn = { parse: gs, make: ms };
4825
+ var xn = { parse: ds, make: gs };
4826
4826
  function ft(e) {
4827
4827
  return Math.log(e) / Math.log(2) | 0;
4828
4828
  }
@@ -4875,12 +4875,12 @@ function ct(e, r, t) {
4875
4875
  }
4876
4876
  return t;
4877
4877
  }
4878
- function ys(e) {
4878
+ function ms(e) {
4879
4879
  for (var r = 0, t = 0; t < e.length; t += 1)
4880
4880
  r += e[t];
4881
4881
  return r / e.length;
4882
4882
  }
4883
- function xs(e) {
4883
+ function ys(e) {
4884
4884
  for (var r = [], t = [], n = [], a = [], s = [], o = [], u = [], i, l = 0, f = 0, c = 0, p = 0, h = 0, d = 0; d < e.glyphs.length; d += 1) {
4885
4885
  var g = e.glyphs.get(d), m = g.unicode | 0;
4886
4886
  if (isNaN(g.advanceWidth))
@@ -4908,7 +4908,7 @@ function xs(e) {
4908
4908
  xMax: Math.max.apply(null, n),
4909
4909
  yMax: Math.max.apply(null, a),
4910
4910
  advanceWidthMax: Math.max.apply(null, s),
4911
- advanceWidthAvg: ys(s),
4911
+ advanceWidthAvg: ms(s),
4912
4912
  minLeftSideBearing: Math.min.apply(null, o),
4913
4913
  maxLeftSideBearing: Math.max.apply(null, o),
4914
4914
  minRightSideBearing: Math.min.apply(null, u)
@@ -4982,7 +4982,7 @@ function xs(e) {
4982
4982
  throw new Error("Could not find head table with checkSum to adjust.");
4983
4983
  return De;
4984
4984
  }
4985
- var bs = { make: bn, fontToTable: xs, computeCheckSum: _r };
4985
+ var xs = { make: bn, fontToTable: ys, computeCheckSum: _r };
4986
4986
  function gr(e, r) {
4987
4987
  for (var t = 0, n = e.length - 1; t <= n; ) {
4988
4988
  var a = t + n >>> 1, s = e[a].tag;
@@ -5265,7 +5265,7 @@ Ve.prototype.getKerningTables = function(e, r) {
5265
5265
  function j(e) {
5266
5266
  _e.call(this, e, "gsub");
5267
5267
  }
5268
- function Ss(e, r) {
5268
+ function bs(e, r) {
5269
5269
  var t = e.length;
5270
5270
  if (t !== r.length)
5271
5271
  return !1;
@@ -5395,7 +5395,7 @@ j.prototype.addLigature = function(e, r, t, n) {
5395
5395
  }, l = this.binSearch(s.coverage.glyphs, o);
5396
5396
  if (l >= 0) {
5397
5397
  for (var f = s.ligatureSets[l], c = 0; c < f.length; c++)
5398
- if (Ss(f[c].components, u))
5398
+ if (bs(f[c].components, u))
5399
5399
  return;
5400
5400
  f.push(i);
5401
5401
  } else
@@ -5433,7 +5433,7 @@ j.prototype.add = function(e, r, t, n) {
5433
5433
  return r.by instanceof Array ? this.addMultiple(e, r, t, n) : this.addLigature(e, r, t, n);
5434
5434
  }
5435
5435
  };
5436
- function Ts() {
5436
+ function Ss() {
5437
5437
  return typeof window < "u";
5438
5438
  }
5439
5439
  function Sn(e) {
@@ -5441,7 +5441,7 @@ function Sn(e) {
5441
5441
  t[n] = e[n];
5442
5442
  return r;
5443
5443
  }
5444
- function ks(e) {
5444
+ function Ts(e) {
5445
5445
  for (var r = new Buffer(e.byteLength), t = new Uint8Array(e), n = 0; n < r.length; ++n)
5446
5446
  r[n] = t[n];
5447
5447
  return r;
@@ -5519,7 +5519,7 @@ function mr(e, r) {
5519
5519
  }
5520
5520
  return t;
5521
5521
  }
5522
- function Fs(e) {
5522
+ function ks(e) {
5523
5523
  for (var r = [], t = [], n = 0; n < e.length; n += 1) {
5524
5524
  var a = e[n];
5525
5525
  t.push(a), a.lastPointOfContour && (r.push(t), t = []);
@@ -5530,7 +5530,7 @@ function kn(e) {
5530
5530
  var r = new X();
5531
5531
  if (!e)
5532
5532
  return r;
5533
- for (var t = Fs(e), n = 0; n < t.length; ++n) {
5533
+ for (var t = ks(e), n = 0; n < t.length; ++n) {
5534
5534
  var a = t[n], s = null, o = a[a.length - 1], u = a[0];
5535
5535
  if (o.onCurve)
5536
5536
  r.moveTo(o.x, o.y);
@@ -5577,45 +5577,45 @@ function Fn(e, r) {
5577
5577
  }
5578
5578
  return kn(r.points);
5579
5579
  }
5580
- function Us(e, r, t, n) {
5580
+ function Fs(e, r, t, n) {
5581
5581
  for (var a = new le.GlyphSet(n), s = 0; s < t.length - 1; s += 1) {
5582
5582
  var o = t[s], u = t[s + 1];
5583
5583
  o !== u ? a.push(s, le.ttfGlyphLoader(n, s, Tn, e, r + o, Fn)) : a.push(s, le.glyphLoader(n, s));
5584
5584
  }
5585
5585
  return a;
5586
5586
  }
5587
- function Cs(e, r, t, n) {
5587
+ function Us(e, r, t, n) {
5588
5588
  var a = new le.GlyphSet(n);
5589
5589
  return n._push = function(s) {
5590
5590
  var o = t[s], u = t[s + 1];
5591
5591
  o !== u ? a.push(s, le.ttfGlyphLoader(n, s, Tn, e, r + o, Fn)) : a.push(s, le.glyphLoader(n, s));
5592
5592
  }, a;
5593
5593
  }
5594
- function ws(e, r, t, n, a) {
5595
- return a.lowMemory ? Cs(e, r, t, n) : Us(e, r, t, n);
5594
+ function Cs(e, r, t, n, a) {
5595
+ return a.lowMemory ? Us(e, r, t, n) : Fs(e, r, t, n);
5596
5596
  }
5597
- var Un = { getPath: kn, parse: ws }, Cn, Ue, wn, Br;
5597
+ var Un = { getPath: kn, parse: Cs }, Cn, Ue, wn, Br;
5598
5598
  function En(e) {
5599
5599
  this.font = e, this.getCommands = function(r) {
5600
5600
  return Un.getPath(r).commands;
5601
5601
  }, this._fpgmState = this._prepState = void 0, this._errorState = 0;
5602
5602
  }
5603
- function Es(e) {
5603
+ function ws(e) {
5604
5604
  return e;
5605
5605
  }
5606
5606
  function On(e) {
5607
5607
  return Math.sign(e) * Math.round(Math.abs(e));
5608
5608
  }
5609
- function Os(e) {
5609
+ function Es(e) {
5610
5610
  return Math.sign(e) * Math.round(Math.abs(e * 2)) / 2;
5611
5611
  }
5612
- function Ls(e) {
5612
+ function Os(e) {
5613
5613
  return Math.sign(e) * (Math.round(Math.abs(e) + 0.5) - 0.5);
5614
5614
  }
5615
- function Rs(e) {
5615
+ function Ls(e) {
5616
5616
  return Math.sign(e) * Math.ceil(Math.abs(e));
5617
5617
  }
5618
- function Ds(e) {
5618
+ function Rs(e) {
5619
5619
  return Math.sign(e) * Math.floor(Math.abs(e));
5620
5620
  }
5621
5621
  var Ln = function(e) {
@@ -5791,7 +5791,7 @@ ce.prototype.prevTouched = function(e) {
5791
5791
  r = r.prevPointOnContour;
5792
5792
  return r;
5793
5793
  };
5794
- var ze = Object.freeze(new ce(0, 0)), As = {
5794
+ var ze = Object.freeze(new ce(0, 0)), Ds = {
5795
5795
  cvCutIn: 17 / 16,
5796
5796
  // control value cut in
5797
5797
  deltaBase: 9,
@@ -5819,7 +5819,7 @@ En.prototype.exec = function(e, r) {
5819
5819
  if (!n || n.ppem !== r) {
5820
5820
  var a = this._fpgmState;
5821
5821
  if (!a) {
5822
- xe.prototype = As, a = this._fpgmState = new xe("fpgm", t.tables.fpgm), a.funcs = [], a.font = t, exports.DEBUG && (console.log("---EXEC FPGM---"), a.step = -1);
5822
+ xe.prototype = Ds, a = this._fpgmState = new xe("fpgm", t.tables.fpgm), a.funcs = [], a.font = t, exports.DEBUG && (console.log("---EXEC FPGM---"), a.step = -1);
5823
5823
  try {
5824
5824
  Ue(a);
5825
5825
  } catch (l) {
@@ -5960,41 +5960,41 @@ function bt(e, r) {
5960
5960
  var u, i;
5961
5961
  e ? (u = s.y - o.y, i = o.x - s.x) : (u = o.x - s.x, i = o.y - s.y), r.fv = Xe(u, i);
5962
5962
  }
5963
- function Bs(e) {
5963
+ function As(e) {
5964
5964
  var r = e.stack, t = r.pop(), n = r.pop();
5965
5965
  exports.DEBUG && console.log(e.step, "SPVFS[]", t, n), e.pv = e.dpv = Xe(n, t);
5966
5966
  }
5967
- function Ms(e) {
5967
+ function Bs(e) {
5968
5968
  var r = e.stack, t = r.pop(), n = r.pop();
5969
5969
  exports.DEBUG && console.log(e.step, "SPVFS[]", t, n), e.fv = Xe(n, t);
5970
5970
  }
5971
- function Is(e) {
5971
+ function Ms(e) {
5972
5972
  var r = e.stack, t = e.pv;
5973
5973
  exports.DEBUG && console.log(e.step, "GPV[]"), r.push(t.x * 16384), r.push(t.y * 16384);
5974
5974
  }
5975
- function Ps(e) {
5975
+ function Is(e) {
5976
5976
  var r = e.stack, t = e.fv;
5977
5977
  exports.DEBUG && console.log(e.step, "GFV[]"), r.push(t.x * 16384), r.push(t.y * 16384);
5978
5978
  }
5979
- function Gs(e) {
5979
+ function Ps(e) {
5980
5980
  e.fv = e.pv, exports.DEBUG && console.log(e.step, "SFVTPV[]");
5981
5981
  }
5982
- function Ns(e) {
5982
+ function Gs(e) {
5983
5983
  var r = e.stack, t = r.pop(), n = r.pop(), a = r.pop(), s = r.pop(), o = r.pop(), u = e.z0, i = e.z1, l = u[t], f = u[n], c = i[a], p = i[s], h = e.z2[o];
5984
5984
  exports.DEBUG && console.log("ISECT[], ", t, n, a, s, o);
5985
5985
  var d = l.x, g = l.y, m = f.x, x = f.y, U = c.x, y = c.y, L = p.x, w = p.y, B = (d - m) * (y - w) - (g - x) * (U - L), C = d * x - g * m, F = U * w - y * L;
5986
5986
  h.x = (C * (U - L) - F * (d - m)) / B, h.y = (C * (y - w) - F * (g - x)) / B;
5987
5987
  }
5988
- function Hs(e) {
5988
+ function Ns(e) {
5989
5989
  e.rp0 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP0[]", e.rp0);
5990
5990
  }
5991
- function Ws(e) {
5991
+ function Hs(e) {
5992
5992
  e.rp1 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP1[]", e.rp1);
5993
5993
  }
5994
- function zs(e) {
5994
+ function Ws(e) {
5995
5995
  e.rp2 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP2[]", e.rp2);
5996
5996
  }
5997
- function _s(e) {
5997
+ function zs(e) {
5998
5998
  var r = e.stack.pop();
5999
5999
  switch (exports.DEBUG && console.log(e.step, "SZP0[]", r), e.zp0 = r, r) {
6000
6000
  case 0:
@@ -6007,7 +6007,7 @@ function _s(e) {
6007
6007
  throw new Error("Invalid zone pointer");
6008
6008
  }
6009
6009
  }
6010
- function Vs(e) {
6010
+ function _s(e) {
6011
6011
  var r = e.stack.pop();
6012
6012
  switch (exports.DEBUG && console.log(e.step, "SZP1[]", r), e.zp1 = r, r) {
6013
6013
  case 0:
@@ -6020,7 +6020,7 @@ function Vs(e) {
6020
6020
  throw new Error("Invalid zone pointer");
6021
6021
  }
6022
6022
  }
6023
- function qs(e) {
6023
+ function Vs(e) {
6024
6024
  var r = e.stack.pop();
6025
6025
  switch (exports.DEBUG && console.log(e.step, "SZP2[]", r), e.zp2 = r, r) {
6026
6026
  case 0:
@@ -6033,7 +6033,7 @@ function qs(e) {
6033
6033
  throw new Error("Invalid zone pointer");
6034
6034
  }
6035
6035
  }
6036
- function Xs(e) {
6036
+ function qs(e) {
6037
6037
  var r = e.stack.pop();
6038
6038
  switch (exports.DEBUG && console.log(e.step, "SZPS[]", r), e.zp0 = e.zp1 = e.zp2 = r, r) {
6039
6039
  case 0:
@@ -6046,49 +6046,49 @@ function Xs(e) {
6046
6046
  throw new Error("Invalid zone pointer");
6047
6047
  }
6048
6048
  }
6049
- function Ys(e) {
6049
+ function Xs(e) {
6050
6050
  e.loop = e.stack.pop(), exports.DEBUG && console.log(e.step, "SLOOP[]", e.loop);
6051
6051
  }
6052
- function $s(e) {
6052
+ function Ys(e) {
6053
6053
  exports.DEBUG && console.log(e.step, "RTG[]"), e.round = On;
6054
6054
  }
6055
- function Zs(e) {
6056
- exports.DEBUG && console.log(e.step, "RTHG[]"), e.round = Ls;
6055
+ function $s(e) {
6056
+ exports.DEBUG && console.log(e.step, "RTHG[]"), e.round = Os;
6057
6057
  }
6058
- function Qs(e) {
6058
+ function Zs(e) {
6059
6059
  var r = e.stack.pop();
6060
6060
  exports.DEBUG && console.log(e.step, "SMD[]", r), e.minDis = r / 64;
6061
6061
  }
6062
- function Ks(e) {
6062
+ function Qs(e) {
6063
6063
  exports.DEBUG && console.log(e.step, "ELSE[]"), Rn(e, !1);
6064
6064
  }
6065
- function js(e) {
6065
+ function Ks(e) {
6066
6066
  var r = e.stack.pop();
6067
6067
  exports.DEBUG && console.log(e.step, "JMPR[]", r), e.ip += r - 1;
6068
6068
  }
6069
- function Js(e) {
6069
+ function js(e) {
6070
6070
  var r = e.stack.pop();
6071
6071
  exports.DEBUG && console.log(e.step, "SCVTCI[]", r), e.cvCutIn = r / 64;
6072
6072
  }
6073
- function eo(e) {
6073
+ function Js(e) {
6074
6074
  var r = e.stack;
6075
6075
  exports.DEBUG && console.log(e.step, "DUP[]"), r.push(r[r.length - 1]);
6076
6076
  }
6077
6077
  function yr(e) {
6078
6078
  exports.DEBUG && console.log(e.step, "POP[]"), e.stack.pop();
6079
6079
  }
6080
- function ro(e) {
6080
+ function eo(e) {
6081
6081
  exports.DEBUG && console.log(e.step, "CLEAR[]"), e.stack.length = 0;
6082
6082
  }
6083
- function to(e) {
6083
+ function ro(e) {
6084
6084
  var r = e.stack, t = r.pop(), n = r.pop();
6085
6085
  exports.DEBUG && console.log(e.step, "SWAP[]"), r.push(t), r.push(n);
6086
6086
  }
6087
- function no(e) {
6087
+ function to(e) {
6088
6088
  var r = e.stack;
6089
6089
  exports.DEBUG && console.log(e.step, "DEPTH[]"), r.push(r.length);
6090
6090
  }
6091
- function ao(e) {
6091
+ function no(e) {
6092
6092
  var r = e.stack, t = r.pop(), n = r.pop();
6093
6093
  exports.DEBUG && console.log(e.step, "LOOPCALL[]", t, n);
6094
6094
  var a = e.ip, s = e.prog;
@@ -6101,21 +6101,21 @@ function ao(e) {
6101
6101
  );
6102
6102
  e.ip = a, e.prog = s;
6103
6103
  }
6104
- function so(e) {
6104
+ function ao(e) {
6105
6105
  var r = e.stack.pop();
6106
6106
  exports.DEBUG && console.log(e.step, "CALL[]", r);
6107
6107
  var t = e.ip, n = e.prog;
6108
6108
  e.prog = e.funcs[r], Ue(e), e.ip = t, e.prog = n, exports.DEBUG && console.log(++e.step, "returning from", r);
6109
6109
  }
6110
- function oo(e) {
6110
+ function so(e) {
6111
6111
  var r = e.stack, t = r.pop();
6112
6112
  exports.DEBUG && console.log(e.step, "CINDEX[]", t), r.push(r[r.length - t]);
6113
6113
  }
6114
- function io(e) {
6114
+ function oo(e) {
6115
6115
  var r = e.stack, t = r.pop();
6116
6116
  exports.DEBUG && console.log(e.step, "MINDEX[]", t), r.push(r.splice(r.length - t, 1)[0]);
6117
6117
  }
6118
- function uo(e) {
6118
+ function io(e) {
6119
6119
  if (e.env !== "fpgm")
6120
6120
  throw new Error("FDEF not allowed here");
6121
6121
  var r = e.stack, t = e.prog, n = e.ip, a = r.pop(), s = n;
@@ -6171,7 +6171,7 @@ function Ut(e, r) {
6171
6171
  for (var l, f = o.distance(a, a, !1, !0), c = i.length - 2, p = 0; p < c; p++)
6172
6172
  l = i[p], s.setRelative(l, l, f, o);
6173
6173
  }
6174
- function lo(e) {
6174
+ function uo(e) {
6175
6175
  for (var r = e.stack, t = e.loop, n = e.fv, a = r.pop() / 64, s = e.z2; t--; ) {
6176
6176
  var o = r.pop(), u = s[o];
6177
6177
  exports.DEBUG && console.log(
@@ -6183,7 +6183,7 @@ function lo(e) {
6183
6183
  }
6184
6184
  e.loop = 1;
6185
6185
  }
6186
- function fo(e) {
6186
+ function lo(e) {
6187
6187
  for (var r = e.stack, t = e.rp1, n = e.rp2, a = e.loop, s = e.z0[t], o = e.z1[n], u = e.fv, i = e.dpv, l = e.z2; a--; ) {
6188
6188
  var f = r.pop(), c = l[f];
6189
6189
  exports.DEBUG && console.log(
@@ -6201,7 +6201,7 @@ function Ct(e, r) {
6201
6201
  var t = r.stack, n = t.pop() / 64, a = t.pop(), s = r.z1[a], o = r.z0[r.rp0], u = r.fv, i = r.pv;
6202
6202
  u.setRelative(s, o, n, i), u.touch(s), exports.DEBUG && console.log(r.step, "MSIRP[" + e + "]", n, a), r.rp1 = r.rp0, r.rp2 = a, e && (r.rp0 = a);
6203
6203
  }
6204
- function po(e) {
6204
+ function fo(e) {
6205
6205
  for (var r = e.stack, t = e.rp0, n = e.z0[t], a = e.loop, s = e.fv, o = e.pv, u = e.z1; a--; ) {
6206
6206
  var i = r.pop(), l = u[i];
6207
6207
  exports.DEBUG && console.log(
@@ -6212,8 +6212,8 @@ function po(e) {
6212
6212
  }
6213
6213
  e.loop = 1;
6214
6214
  }
6215
- function co(e) {
6216
- exports.DEBUG && console.log(e.step, "RTDG[]"), e.round = Os;
6215
+ function po(e) {
6216
+ exports.DEBUG && console.log(e.step, "RTDG[]"), e.round = Es;
6217
6217
  }
6218
6218
  function wt(e, r) {
6219
6219
  var t = r.stack, n = t.pop(), a = t.pop(), s = r.z0[a], o = r.fv, u = r.pv, i = r.cvt[n];
@@ -6229,14 +6229,14 @@ function wt(e, r) {
6229
6229
  var l = u.distance(s, ze);
6230
6230
  e && (Math.abs(l - i) < r.cvCutIn && (l = i), l = r.round(l)), o.setRelative(s, ze, l, u), r.zp0 === 0 && (s.xo = s.x, s.yo = s.y), o.touch(s), r.rp0 = r.rp1 = a;
6231
6231
  }
6232
- function ho(e) {
6232
+ function co(e) {
6233
6233
  var r = e.prog, t = e.ip, n = e.stack, a = r[++t];
6234
6234
  exports.DEBUG && console.log(e.step, "NPUSHB[]", a);
6235
6235
  for (var s = 0; s < a; s++)
6236
6236
  n.push(r[++t]);
6237
6237
  e.ip = t;
6238
6238
  }
6239
- function vo(e) {
6239
+ function ho(e) {
6240
6240
  var r = e.ip, t = e.prog, n = e.stack, a = t[++r];
6241
6241
  exports.DEBUG && console.log(e.step, "NPUSHW[]", a);
6242
6242
  for (var s = 0; s < a; s++) {
@@ -6245,23 +6245,23 @@ function vo(e) {
6245
6245
  }
6246
6246
  e.ip = r;
6247
6247
  }
6248
- function go(e) {
6248
+ function vo(e) {
6249
6249
  var r = e.stack, t = e.store;
6250
6250
  t || (t = e.store = []);
6251
6251
  var n = r.pop(), a = r.pop();
6252
6252
  exports.DEBUG && console.log(e.step, "WS", n, a), t[a] = n;
6253
6253
  }
6254
- function mo(e) {
6254
+ function go(e) {
6255
6255
  var r = e.stack, t = e.store, n = r.pop();
6256
6256
  exports.DEBUG && console.log(e.step, "RS", n);
6257
6257
  var a = t && t[n] || 0;
6258
6258
  r.push(a);
6259
6259
  }
6260
- function yo(e) {
6260
+ function mo(e) {
6261
6261
  var r = e.stack, t = r.pop(), n = r.pop();
6262
6262
  exports.DEBUG && console.log(e.step, "WCVTP", t, n), e.cvt[n] = t / 64;
6263
6263
  }
6264
- function xo(e) {
6264
+ function yo(e) {
6265
6265
  var r = e.stack, t = r.pop();
6266
6266
  exports.DEBUG && console.log(e.step, "RCVT", t), r.push(e.cvt[t] * 64);
6267
6267
  }
@@ -6273,60 +6273,60 @@ function Ot(e, r) {
6273
6273
  var t = r.stack, n = t.pop(), a = t.pop(), s = r.z1[n], o = r.z0[a], u = r.dpv.distance(o, s, e, e);
6274
6274
  exports.DEBUG && console.log(r.step, "MD[" + e + "]", n, a, "->", u), r.stack.push(Math.round(u * 64));
6275
6275
  }
6276
- function bo(e) {
6276
+ function xo(e) {
6277
6277
  exports.DEBUG && console.log(e.step, "MPPEM[]"), e.stack.push(e.ppem);
6278
6278
  }
6279
- function So(e) {
6279
+ function bo(e) {
6280
6280
  exports.DEBUG && console.log(e.step, "FLIPON[]"), e.autoFlip = !0;
6281
6281
  }
6282
- function To(e) {
6282
+ function So(e) {
6283
6283
  var r = e.stack, t = r.pop(), n = r.pop();
6284
6284
  exports.DEBUG && console.log(e.step, "LT[]", t, n), r.push(n < t ? 1 : 0);
6285
6285
  }
6286
- function ko(e) {
6286
+ function To(e) {
6287
6287
  var r = e.stack, t = r.pop(), n = r.pop();
6288
6288
  exports.DEBUG && console.log(e.step, "LTEQ[]", t, n), r.push(n <= t ? 1 : 0);
6289
6289
  }
6290
- function Fo(e) {
6290
+ function ko(e) {
6291
6291
  var r = e.stack, t = r.pop(), n = r.pop();
6292
6292
  exports.DEBUG && console.log(e.step, "GT[]", t, n), r.push(n > t ? 1 : 0);
6293
6293
  }
6294
- function Uo(e) {
6294
+ function Fo(e) {
6295
6295
  var r = e.stack, t = r.pop(), n = r.pop();
6296
6296
  exports.DEBUG && console.log(e.step, "GTEQ[]", t, n), r.push(n >= t ? 1 : 0);
6297
6297
  }
6298
- function Co(e) {
6298
+ function Uo(e) {
6299
6299
  var r = e.stack, t = r.pop(), n = r.pop();
6300
6300
  exports.DEBUG && console.log(e.step, "EQ[]", t, n), r.push(t === n ? 1 : 0);
6301
6301
  }
6302
- function wo(e) {
6302
+ function Co(e) {
6303
6303
  var r = e.stack, t = r.pop(), n = r.pop();
6304
6304
  exports.DEBUG && console.log(e.step, "NEQ[]", t, n), r.push(t !== n ? 1 : 0);
6305
6305
  }
6306
- function Eo(e) {
6306
+ function wo(e) {
6307
6307
  var r = e.stack, t = r.pop();
6308
6308
  exports.DEBUG && console.log(e.step, "ODD[]", t), r.push(Math.trunc(t) % 2 ? 1 : 0);
6309
6309
  }
6310
- function Oo(e) {
6310
+ function Eo(e) {
6311
6311
  var r = e.stack, t = r.pop();
6312
6312
  exports.DEBUG && console.log(e.step, "EVEN[]", t), r.push(Math.trunc(t) % 2 ? 0 : 1);
6313
6313
  }
6314
- function Lo(e) {
6314
+ function Oo(e) {
6315
6315
  var r = e.stack.pop();
6316
6316
  exports.DEBUG && console.log(e.step, "IF[]", r), r || (Rn(e, !0), exports.DEBUG && console.log(e.step, "EIF[]"));
6317
6317
  }
6318
- function Ro(e) {
6318
+ function Lo(e) {
6319
6319
  exports.DEBUG && console.log(e.step, "EIF[]");
6320
6320
  }
6321
- function Do(e) {
6321
+ function Ro(e) {
6322
6322
  var r = e.stack, t = r.pop(), n = r.pop();
6323
6323
  exports.DEBUG && console.log(e.step, "AND[]", t, n), r.push(t && n ? 1 : 0);
6324
6324
  }
6325
- function Ao(e) {
6325
+ function Do(e) {
6326
6326
  var r = e.stack, t = r.pop(), n = r.pop();
6327
6327
  exports.DEBUG && console.log(e.step, "OR[]", t, n), r.push(t || n ? 1 : 0);
6328
6328
  }
6329
- function Bo(e) {
6329
+ function Ao(e) {
6330
6330
  var r = e.stack, t = r.pop();
6331
6331
  exports.DEBUG && console.log(e.step, "NOT[]", t), r.push(t ? 0 : 1);
6332
6332
  }
@@ -6343,43 +6343,43 @@ function xr(e, r) {
6343
6343
  }
6344
6344
  }
6345
6345
  }
6346
- function Mo(e) {
6346
+ function Bo(e) {
6347
6347
  var r = e.stack, t = r.pop();
6348
6348
  exports.DEBUG && console.log(e.step, "SDB[]", t), e.deltaBase = t;
6349
6349
  }
6350
- function Io(e) {
6350
+ function Mo(e) {
6351
6351
  var r = e.stack, t = r.pop();
6352
6352
  exports.DEBUG && console.log(e.step, "SDS[]", t), e.deltaShift = Math.pow(0.5, t);
6353
6353
  }
6354
- function Po(e) {
6354
+ function Io(e) {
6355
6355
  var r = e.stack, t = r.pop(), n = r.pop();
6356
6356
  exports.DEBUG && console.log(e.step, "ADD[]", t, n), r.push(n + t);
6357
6357
  }
6358
- function Go(e) {
6358
+ function Po(e) {
6359
6359
  var r = e.stack, t = r.pop(), n = r.pop();
6360
6360
  exports.DEBUG && console.log(e.step, "SUB[]", t, n), r.push(n - t);
6361
6361
  }
6362
- function No(e) {
6362
+ function Go(e) {
6363
6363
  var r = e.stack, t = r.pop(), n = r.pop();
6364
6364
  exports.DEBUG && console.log(e.step, "DIV[]", t, n), r.push(n * 64 / t);
6365
6365
  }
6366
- function Ho(e) {
6366
+ function No(e) {
6367
6367
  var r = e.stack, t = r.pop(), n = r.pop();
6368
6368
  exports.DEBUG && console.log(e.step, "MUL[]", t, n), r.push(n * t / 64);
6369
6369
  }
6370
- function Wo(e) {
6370
+ function Ho(e) {
6371
6371
  var r = e.stack, t = r.pop();
6372
6372
  exports.DEBUG && console.log(e.step, "ABS[]", t), r.push(Math.abs(t));
6373
6373
  }
6374
- function zo(e) {
6374
+ function Wo(e) {
6375
6375
  var r = e.stack, t = r.pop();
6376
6376
  exports.DEBUG && console.log(e.step, "NEG[]", t), r.push(-t);
6377
6377
  }
6378
- function _o(e) {
6378
+ function zo(e) {
6379
6379
  var r = e.stack, t = r.pop();
6380
6380
  exports.DEBUG && console.log(e.step, "FLOOR[]", t), r.push(Math.floor(t / 64) * 64);
6381
6381
  }
6382
- function Vo(e) {
6382
+ function _o(e) {
6383
6383
  var r = e.stack, t = r.pop();
6384
6384
  exports.DEBUG && console.log(e.step, "CEILING[]", t), r.push(Math.ceil(t / 64) * 64);
6385
6385
  }
@@ -6387,7 +6387,7 @@ function Je(e, r) {
6387
6387
  var t = r.stack, n = t.pop();
6388
6388
  exports.DEBUG && console.log(r.step, "ROUND[]"), t.push(r.round(n / 64) * 64);
6389
6389
  }
6390
- function qo(e) {
6390
+ function Vo(e) {
6391
6391
  var r = e.stack, t = r.pop(), n = r.pop();
6392
6392
  exports.DEBUG && console.log(e.step, "WCVTF[]", t, n), e.cvt[n] = t * e.ppem / e.font.unitsPerEm;
6393
6393
  }
@@ -6404,7 +6404,7 @@ function br(e, r) {
6404
6404
  }
6405
6405
  }
6406
6406
  }
6407
- function Xo(e) {
6407
+ function qo(e) {
6408
6408
  var r = e.stack.pop();
6409
6409
  exports.DEBUG && console.log(e.step, "SROUND[]", r), e.round = Ln;
6410
6410
  var t;
@@ -6439,7 +6439,7 @@ function Xo(e) {
6439
6439
  }
6440
6440
  r &= 15, r === 0 ? e.srThreshold = 0 : e.srThreshold = (r / 8 - 0.5) * t;
6441
6441
  }
6442
- function Yo(e) {
6442
+ function Xo(e) {
6443
6443
  var r = e.stack.pop();
6444
6444
  exports.DEBUG && console.log(e.step, "S45ROUND[]", r), e.round = Ln;
6445
6445
  var t;
@@ -6474,16 +6474,16 @@ function Yo(e) {
6474
6474
  }
6475
6475
  r &= 15, r === 0 ? e.srThreshold = 0 : e.srThreshold = (r / 8 - 0.5) * t;
6476
6476
  }
6477
+ function Yo(e) {
6478
+ exports.DEBUG && console.log(e.step, "ROFF[]"), e.round = ws;
6479
+ }
6477
6480
  function $o(e) {
6478
- exports.DEBUG && console.log(e.step, "ROFF[]"), e.round = Es;
6481
+ exports.DEBUG && console.log(e.step, "RUTG[]"), e.round = Ls;
6479
6482
  }
6480
6483
  function Zo(e) {
6481
- exports.DEBUG && console.log(e.step, "RUTG[]"), e.round = Rs;
6484
+ exports.DEBUG && console.log(e.step, "RDTG[]"), e.round = Rs;
6482
6485
  }
6483
6486
  function Qo(e) {
6484
- exports.DEBUG && console.log(e.step, "RDTG[]"), e.round = Ds;
6485
- }
6486
- function Ko(e) {
6487
6487
  var r = e.stack.pop();
6488
6488
  exports.DEBUG && console.log(e.step, "SCANCTRL[]", r);
6489
6489
  }
@@ -6493,27 +6493,27 @@ function Lt(e, r) {
6493
6493
  var u, i;
6494
6494
  e ? (u = s.y - o.y, i = o.x - s.x) : (u = o.x - s.x, i = o.y - s.y), r.dpv = Xe(u, i);
6495
6495
  }
6496
- function jo(e) {
6496
+ function Ko(e) {
6497
6497
  var r = e.stack, t = r.pop(), n = 0;
6498
6498
  exports.DEBUG && console.log(e.step, "GETINFO[]", t), t & 1 && (n = 35), t & 32 && (n |= 4096), r.push(n);
6499
6499
  }
6500
- function Jo(e) {
6500
+ function jo(e) {
6501
6501
  var r = e.stack, t = r.pop(), n = r.pop(), a = r.pop();
6502
6502
  exports.DEBUG && console.log(e.step, "ROLL[]"), r.push(n), r.push(t), r.push(a);
6503
6503
  }
6504
- function ei(e) {
6504
+ function Jo(e) {
6505
6505
  var r = e.stack, t = r.pop(), n = r.pop();
6506
6506
  exports.DEBUG && console.log(e.step, "MAX[]", t, n), r.push(Math.max(n, t));
6507
6507
  }
6508
- function ri(e) {
6508
+ function ei(e) {
6509
6509
  var r = e.stack, t = r.pop(), n = r.pop();
6510
6510
  exports.DEBUG && console.log(e.step, "MIN[]", t, n), r.push(Math.min(n, t));
6511
6511
  }
6512
- function ti(e) {
6512
+ function ri(e) {
6513
6513
  var r = e.stack.pop();
6514
6514
  exports.DEBUG && console.log(e.step, "SCANTYPE[]", r);
6515
6515
  }
6516
- function ni(e) {
6516
+ function ti(e) {
6517
6517
  var r = e.stack.pop(), t = e.stack.pop();
6518
6518
  switch (exports.DEBUG && console.log(e.step, "INSTCTRL[]", r, t), r) {
6519
6519
  case 1:
@@ -6578,45 +6578,45 @@ Cn = [
6578
6578
  /* 0x09 */
6579
6579
  bt.bind(void 0, 1),
6580
6580
  /* 0x0A */
6581
- Bs,
6581
+ As,
6582
6582
  /* 0x0B */
6583
- Ms,
6583
+ Bs,
6584
6584
  /* 0x0C */
6585
- Is,
6585
+ Ms,
6586
6586
  /* 0x0D */
6587
- Ps,
6587
+ Is,
6588
6588
  /* 0x0E */
6589
- Gs,
6589
+ Ps,
6590
6590
  /* 0x0F */
6591
- Ns,
6591
+ Gs,
6592
6592
  /* 0x10 */
6593
- Hs,
6593
+ Ns,
6594
6594
  /* 0x11 */
6595
- Ws,
6595
+ Hs,
6596
6596
  /* 0x12 */
6597
- zs,
6597
+ Ws,
6598
6598
  /* 0x13 */
6599
- _s,
6599
+ zs,
6600
6600
  /* 0x14 */
6601
- Vs,
6601
+ _s,
6602
6602
  /* 0x15 */
6603
- qs,
6603
+ Vs,
6604
6604
  /* 0x16 */
6605
- Xs,
6605
+ qs,
6606
6606
  /* 0x17 */
6607
- Ys,
6607
+ Xs,
6608
6608
  /* 0x18 */
6609
- $s,
6609
+ Ys,
6610
6610
  /* 0x19 */
6611
- Zs,
6611
+ $s,
6612
6612
  /* 0x1A */
6613
- Qs,
6613
+ Zs,
6614
6614
  /* 0x1B */
6615
- Ks,
6615
+ Qs,
6616
6616
  /* 0x1C */
6617
- js,
6617
+ Ks,
6618
6618
  /* 0x1D */
6619
- Js,
6619
+ js,
6620
6620
  /* 0x1E */
6621
6621
  void 0,
6622
6622
  // TODO SSWCI
@@ -6624,19 +6624,19 @@ Cn = [
6624
6624
  void 0,
6625
6625
  // TODO SSW
6626
6626
  /* 0x20 */
6627
- eo,
6627
+ Js,
6628
6628
  /* 0x21 */
6629
6629
  yr,
6630
6630
  /* 0x22 */
6631
- ro,
6631
+ eo,
6632
6632
  /* 0x23 */
6633
- to,
6633
+ ro,
6634
6634
  /* 0x24 */
6635
- no,
6635
+ to,
6636
6636
  /* 0x25 */
6637
- oo,
6637
+ so,
6638
6638
  /* 0x26 */
6639
- io,
6639
+ oo,
6640
6640
  /* 0x27 */
6641
6641
  void 0,
6642
6642
  // TODO ALIGNPTS
@@ -6646,11 +6646,11 @@ Cn = [
6646
6646
  void 0,
6647
6647
  // TODO UTP
6648
6648
  /* 0x2A */
6649
- ao,
6649
+ no,
6650
6650
  /* 0x2B */
6651
- so,
6651
+ ao,
6652
6652
  /* 0x2C */
6653
- uo,
6653
+ io,
6654
6654
  /* 0x2D */
6655
6655
  void 0,
6656
6656
  // ENDF (eaten by FDEF)
@@ -6675,33 +6675,33 @@ Cn = [
6675
6675
  /* 0x37 */
6676
6676
  Ut.bind(void 0, 1),
6677
6677
  /* 0x38 */
6678
- lo,
6678
+ uo,
6679
6679
  /* 0x39 */
6680
- fo,
6680
+ lo,
6681
6681
  /* 0x3A */
6682
6682
  Ct.bind(void 0, 0),
6683
6683
  /* 0x3B */
6684
6684
  Ct.bind(void 0, 1),
6685
6685
  /* 0x3C */
6686
- po,
6686
+ fo,
6687
6687
  /* 0x3D */
6688
- co,
6688
+ po,
6689
6689
  /* 0x3E */
6690
6690
  wt.bind(void 0, 0),
6691
6691
  /* 0x3F */
6692
6692
  wt.bind(void 0, 1),
6693
6693
  /* 0x40 */
6694
- ho,
6694
+ co,
6695
6695
  /* 0x41 */
6696
- vo,
6696
+ ho,
6697
6697
  /* 0x42 */
6698
- go,
6698
+ vo,
6699
6699
  /* 0x43 */
6700
- mo,
6700
+ go,
6701
6701
  /* 0x44 */
6702
- yo,
6702
+ mo,
6703
6703
  /* 0x45 */
6704
- xo,
6704
+ yo,
6705
6705
  /* 0x46 */
6706
6706
  Et.bind(void 0, 0),
6707
6707
  /* 0x47 */
@@ -6714,12 +6714,12 @@ Cn = [
6714
6714
  /* 0x4A */
6715
6715
  Ot.bind(void 0, 1),
6716
6716
  /* 0x4B */
6717
- bo,
6717
+ xo,
6718
6718
  /* 0x4C */
6719
6719
  void 0,
6720
6720
  // TODO MPS
6721
6721
  /* 0x4D */
6722
- So,
6722
+ bo,
6723
6723
  /* 0x4E */
6724
6724
  void 0,
6725
6725
  // TODO FLIPOFF
@@ -6727,53 +6727,53 @@ Cn = [
6727
6727
  void 0,
6728
6728
  // TODO DEBUG
6729
6729
  /* 0x50 */
6730
- To,
6730
+ So,
6731
6731
  /* 0x51 */
6732
- ko,
6732
+ To,
6733
6733
  /* 0x52 */
6734
- Fo,
6734
+ ko,
6735
6735
  /* 0x53 */
6736
- Uo,
6736
+ Fo,
6737
6737
  /* 0x54 */
6738
- Co,
6738
+ Uo,
6739
6739
  /* 0x55 */
6740
- wo,
6740
+ Co,
6741
6741
  /* 0x56 */
6742
- Eo,
6742
+ wo,
6743
6743
  /* 0x57 */
6744
- Oo,
6744
+ Eo,
6745
6745
  /* 0x58 */
6746
- Lo,
6746
+ Oo,
6747
6747
  /* 0x59 */
6748
- Ro,
6748
+ Lo,
6749
6749
  /* 0x5A */
6750
- Do,
6750
+ Ro,
6751
6751
  /* 0x5B */
6752
- Ao,
6752
+ Do,
6753
6753
  /* 0x5C */
6754
- Bo,
6754
+ Ao,
6755
6755
  /* 0x5D */
6756
6756
  xr.bind(void 0, 1),
6757
6757
  /* 0x5E */
6758
- Mo,
6758
+ Bo,
6759
6759
  /* 0x5F */
6760
- Io,
6760
+ Mo,
6761
6761
  /* 0x60 */
6762
- Po,
6762
+ Io,
6763
6763
  /* 0x61 */
6764
- Go,
6764
+ Po,
6765
6765
  /* 0x62 */
6766
- No,
6766
+ Go,
6767
6767
  /* 0x63 */
6768
- Ho,
6768
+ No,
6769
6769
  /* 0x64 */
6770
- Wo,
6770
+ Ho,
6771
6771
  /* 0x65 */
6772
- zo,
6772
+ Wo,
6773
6773
  /* 0x66 */
6774
- _o,
6774
+ zo,
6775
6775
  /* 0x67 */
6776
- Vo,
6776
+ _o,
6777
6777
  /* 0x68 */
6778
6778
  Je.bind(void 0, 0),
6779
6779
  /* 0x69 */
@@ -6795,7 +6795,7 @@ Cn = [
6795
6795
  void 0,
6796
6796
  // TODO NROUND[ab]
6797
6797
  /* 0x70 */
6798
- qo,
6798
+ Vo,
6799
6799
  /* 0x71 */
6800
6800
  xr.bind(void 0, 2),
6801
6801
  /* 0x72 */
@@ -6807,9 +6807,9 @@ Cn = [
6807
6807
  /* 0x75 */
6808
6808
  br.bind(void 0, 3),
6809
6809
  /* 0x76 */
6810
- Xo,
6810
+ qo,
6811
6811
  /* 0x77 */
6812
- Yo,
6812
+ Xo,
6813
6813
  /* 0x78 */
6814
6814
  void 0,
6815
6815
  // TODO JROT[]
@@ -6817,13 +6817,13 @@ Cn = [
6817
6817
  void 0,
6818
6818
  // TODO JROF[]
6819
6819
  /* 0x7A */
6820
- $o,
6820
+ Yo,
6821
6821
  /* 0x7B */
6822
6822
  void 0,
6823
6823
  /* 0x7C */
6824
- Zo,
6824
+ $o,
6825
6825
  /* 0x7D */
6826
- Qo,
6826
+ Zo,
6827
6827
  /* 0x7E */
6828
6828
  yr,
6829
6829
  // actually SANGW, supposed to do only a pop though
@@ -6844,26 +6844,26 @@ Cn = [
6844
6844
  /* 0x84 */
6845
6845
  void 0,
6846
6846
  /* 0x85 */
6847
- Ko,
6847
+ Qo,
6848
6848
  /* 0x86 */
6849
6849
  Lt.bind(void 0, 0),
6850
6850
  /* 0x87 */
6851
6851
  Lt.bind(void 0, 1),
6852
6852
  /* 0x88 */
6853
- jo,
6853
+ Ko,
6854
6854
  /* 0x89 */
6855
6855
  void 0,
6856
6856
  // TODO IDEF
6857
6857
  /* 0x8A */
6858
- Jo,
6858
+ jo,
6859
6859
  /* 0x8B */
6860
- ei,
6860
+ Jo,
6861
6861
  /* 0x8C */
6862
- ri,
6862
+ ei,
6863
6863
  /* 0x8D */
6864
- ti,
6864
+ ri,
6865
6865
  /* 0x8E */
6866
- ni,
6866
+ ti,
6867
6867
  /* 0x8F */
6868
6868
  void 0,
6869
6869
  /* 0x90 */
@@ -7097,7 +7097,7 @@ function Re(e) {
7097
7097
  function qr(e, r, t) {
7098
7098
  this.contextName = t, this.startIndex = e, this.endOffset = r;
7099
7099
  }
7100
- function ai(e, r, t) {
7100
+ function ni(e, r, t) {
7101
7101
  this.contextName = e, this.openRange = null, this.ranges = [], this.checkStart = r, this.checkEnd = t;
7102
7102
  }
7103
7103
  function re(e, r) {
@@ -7106,7 +7106,7 @@ function re(e, r) {
7106
7106
  function fr(e) {
7107
7107
  this.eventId = e, this.subscribers = [];
7108
7108
  }
7109
- function si(e) {
7109
+ function ai(e) {
7110
7110
  var r = this, t = [
7111
7111
  "start",
7112
7112
  "end",
@@ -7145,7 +7145,7 @@ function si(e) {
7145
7145
  });
7146
7146
  }
7147
7147
  function N(e) {
7148
- this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], si.call(this, e);
7148
+ this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], ai.call(this, e);
7149
7149
  }
7150
7150
  Re.prototype.setState = function(e, r) {
7151
7151
  return this.state[e] = r, this.activeState = { key: e, value: this.state[e] }, this.activeState;
@@ -7283,7 +7283,7 @@ N.prototype.registerContextChecker = function(e, r, t) {
7283
7283
  return {
7284
7284
  FAIL: "missing context end check."
7285
7285
  };
7286
- var n = new ai(
7286
+ var n = new ni(
7287
7287
  e,
7288
7288
  r,
7289
7289
  t
@@ -7356,7 +7356,7 @@ function Se(e) {
7356
7356
  function rr(e) {
7357
7357
  return /[A-z]/.test(e);
7358
7358
  }
7359
- function oi(e) {
7359
+ function si(e) {
7360
7360
  return /\s/.test(e);
7361
7361
  }
7362
7362
  function J(e) {
@@ -7385,11 +7385,11 @@ function Ye(e, r) {
7385
7385
  }
7386
7386
  return -1;
7387
7387
  }
7388
- function ii(e, r) {
7388
+ function oi(e, r) {
7389
7389
  var t = Ye(e, r.coverage);
7390
7390
  return t === -1 ? null : e + r.deltaGlyphId;
7391
7391
  }
7392
- function ui(e, r) {
7392
+ function ii(e, r) {
7393
7393
  var t = Ye(e, r.coverage);
7394
7394
  return t === -1 ? null : r.substitute[t];
7395
7395
  }
@@ -7402,7 +7402,7 @@ function Sr(e, r) {
7402
7402
  }
7403
7403
  return t.length !== e.length ? -1 : t;
7404
7404
  }
7405
- function li(e, r) {
7405
+ function ui(e, r) {
7406
7406
  var t = r.inputCoverage.length + r.lookaheadCoverage.length + r.backtrackCoverage.length;
7407
7407
  if (e.context.length < t)
7408
7408
  return [];
@@ -7441,7 +7441,7 @@ function li(e, r) {
7441
7441
  }
7442
7442
  return p;
7443
7443
  }
7444
- function fi(e, r) {
7444
+ function li(e, r) {
7445
7445
  var t = e.current, n = Ye(t, r.coverage);
7446
7446
  if (n === -1)
7447
7447
  return null;
@@ -7457,7 +7457,7 @@ function fi(e, r) {
7457
7457
  }
7458
7458
  return null;
7459
7459
  }
7460
- function pi(e, r) {
7460
+ function fi(e, r) {
7461
7461
  var t = Ye(e, r.coverage);
7462
7462
  return t === -1 ? null : r.sequences[t];
7463
7463
  }
@@ -7519,35 +7519,35 @@ J.prototype.getLookupMethod = function(e, r) {
7519
7519
  switch (n) {
7520
7520
  case "11":
7521
7521
  return function(a) {
7522
- return ii.apply(
7522
+ return oi.apply(
7523
7523
  t,
7524
7524
  [a, r]
7525
7525
  );
7526
7526
  };
7527
7527
  case "12":
7528
7528
  return function(a) {
7529
- return ui.apply(
7529
+ return ii.apply(
7530
7530
  t,
7531
7531
  [a, r]
7532
7532
  );
7533
7533
  };
7534
7534
  case "63":
7535
7535
  return function(a) {
7536
- return li.apply(
7536
+ return ui.apply(
7537
7537
  t,
7538
7538
  [a, r]
7539
7539
  );
7540
7540
  };
7541
7541
  case "41":
7542
7542
  return function(a) {
7543
- return fi.apply(
7543
+ return li.apply(
7544
7544
  t,
7545
7545
  [a, r]
7546
7546
  );
7547
7547
  };
7548
7548
  case "21":
7549
7549
  return function(a) {
7550
- return pi.apply(
7550
+ return fi.apply(
7551
7551
  t,
7552
7552
  [a, r]
7553
7553
  );
@@ -7640,7 +7640,7 @@ J.prototype.getFeature = function(r) {
7640
7640
  var t = this.features[r.script];
7641
7641
  return t ? t.tags[r.tag] ? this.features[r.script].tags[r.tag] : null : { FAIL: "No feature for script " + r.script };
7642
7642
  };
7643
- function ci(e) {
7643
+ function pi(e) {
7644
7644
  var r = e.current, t = e.get(-1);
7645
7645
  return (
7646
7646
  // ? arabic first char
@@ -7648,7 +7648,7 @@ function ci(e) {
7648
7648
  !be(t) && be(r)
7649
7649
  );
7650
7650
  }
7651
- function hi(e) {
7651
+ function ci(e) {
7652
7652
  var r = e.get(1);
7653
7653
  return (
7654
7654
  // ? last arabic char
@@ -7656,24 +7656,24 @@ function hi(e) {
7656
7656
  !be(r)
7657
7657
  );
7658
7658
  }
7659
- var vi = {
7660
- startCheck: ci,
7661
- endCheck: hi
7659
+ var hi = {
7660
+ startCheck: pi,
7661
+ endCheck: ci
7662
7662
  };
7663
- function di(e) {
7663
+ function vi(e) {
7664
7664
  var r = e.current, t = e.get(-1);
7665
7665
  return (
7666
7666
  // ? an arabic char preceded with a non arabic char
7667
7667
  (be(r) || Se(r)) && !be(t)
7668
7668
  );
7669
7669
  }
7670
- function gi(e) {
7670
+ function di(e) {
7671
7671
  var r = e.get(1);
7672
7672
  switch (!0) {
7673
7673
  case r === null:
7674
7674
  return !0;
7675
7675
  case (!be(r) && !Se(r)):
7676
- var t = oi(r);
7676
+ var t = si(r);
7677
7677
  if (!t)
7678
7678
  return !0;
7679
7679
  if (t) {
@@ -7690,38 +7690,38 @@ function gi(e) {
7690
7690
  return !1;
7691
7691
  }
7692
7692
  }
7693
- var mi = {
7694
- startCheck: di,
7695
- endCheck: gi
7693
+ var gi = {
7694
+ startCheck: vi,
7695
+ endCheck: di
7696
7696
  };
7697
- function yi(e, r, t) {
7697
+ function mi(e, r, t) {
7698
7698
  r[t].setState(e.tag, e.substitution);
7699
7699
  }
7700
- function xi(e, r, t) {
7700
+ function yi(e, r, t) {
7701
7701
  r[t].setState(e.tag, e.substitution);
7702
7702
  }
7703
- function bi(e, r, t) {
7703
+ function xi(e, r, t) {
7704
7704
  e.substitution.forEach(function(n, a) {
7705
7705
  var s = r[t + a];
7706
7706
  s.setState(e.tag, n);
7707
7707
  });
7708
7708
  }
7709
- function Si(e, r, t) {
7709
+ function bi(e, r, t) {
7710
7710
  var n = r[t];
7711
7711
  n.setState(e.tag, e.substitution.ligGlyph);
7712
7712
  for (var a = e.substitution.components.length, s = 0; s < a; s++)
7713
7713
  n = r[t + s + 1], n.setState("deleted", !0);
7714
7714
  }
7715
7715
  var Rt = {
7716
- 11: yi,
7717
- 12: xi,
7718
- 63: bi,
7719
- 41: Si
7716
+ 11: mi,
7717
+ 12: yi,
7718
+ 63: xi,
7719
+ 41: bi
7720
7720
  };
7721
7721
  function Xr(e, r, t) {
7722
7722
  e instanceof Fe && Rt[e.id] && Rt[e.id](e, r, t);
7723
7723
  }
7724
- function Ti(e) {
7724
+ function Si(e) {
7725
7725
  for (var r = [].concat(e.backtrack), t = r.length - 1; t >= 0; t--) {
7726
7726
  var n = r[t], a = Dn(n), s = Se(n);
7727
7727
  if (!a && !s)
@@ -7731,7 +7731,7 @@ function Ti(e) {
7731
7731
  }
7732
7732
  return !1;
7733
7733
  }
7734
- function ki(e) {
7734
+ function Ti(e) {
7735
7735
  if (Dn(e.current))
7736
7736
  return !1;
7737
7737
  for (var r = 0; r < e.lookahead.length; r++) {
@@ -7741,7 +7741,7 @@ function ki(e) {
7741
7741
  }
7742
7742
  return !1;
7743
7743
  }
7744
- function Fi(e) {
7744
+ function ki(e) {
7745
7745
  var r = this, t = "arab", n = this.featuresTags[t], a = this.tokenizer.getRangeTokens(e);
7746
7746
  if (a.length !== 1) {
7747
7747
  var s = new re(
@@ -7763,7 +7763,7 @@ function Fi(e) {
7763
7763
  if (!Se(u.char)) {
7764
7764
  s.setCurrentIndex(i), o.setCurrentIndex(i);
7765
7765
  var l = 0;
7766
- Ti(o) && (l |= 1), ki(o) && (l |= 2);
7766
+ Si(o) && (l |= 1), Ti(o) && (l |= 2);
7767
7767
  var f;
7768
7768
  switch (l) {
7769
7769
  case 1:
@@ -7798,7 +7798,7 @@ function Dt(e, r) {
7798
7798
  });
7799
7799
  return new re(t, 0);
7800
7800
  }
7801
- function Ui(e) {
7801
+ function Fi(e) {
7802
7802
  var r = this, t = "arab", n = this.tokenizer.getRangeTokens(e), a = Dt(n);
7803
7803
  a.context.forEach(function(s, o) {
7804
7804
  a.setCurrentIndex(o);
@@ -7814,7 +7814,7 @@ function Ui(e) {
7814
7814
  ), a = Dt(n));
7815
7815
  });
7816
7816
  }
7817
- function Ci(e) {
7817
+ function Ui(e) {
7818
7818
  var r = e.current, t = e.get(-1);
7819
7819
  return (
7820
7820
  // ? latin first char
@@ -7822,7 +7822,7 @@ function Ci(e) {
7822
7822
  !rr(t) && rr(r)
7823
7823
  );
7824
7824
  }
7825
- function wi(e) {
7825
+ function Ci(e) {
7826
7826
  var r = e.get(1);
7827
7827
  return (
7828
7828
  // ? last latin char
@@ -7830,9 +7830,9 @@ function wi(e) {
7830
7830
  !rr(r)
7831
7831
  );
7832
7832
  }
7833
- var Ei = {
7834
- startCheck: Ci,
7835
- endCheck: wi
7833
+ var wi = {
7834
+ startCheck: Ui,
7835
+ endCheck: Ci
7836
7836
  };
7837
7837
  function At(e, r) {
7838
7838
  var t = e.map(function(n) {
@@ -7840,7 +7840,7 @@ function At(e, r) {
7840
7840
  });
7841
7841
  return new re(t, 0);
7842
7842
  }
7843
- function Oi(e) {
7843
+ function Ei(e) {
7844
7844
  var r = this, t = "latn", n = this.tokenizer.getRangeTokens(e), a = At(n);
7845
7845
  a.context.forEach(function(s, o) {
7846
7846
  a.setCurrentIndex(o);
@@ -7863,9 +7863,9 @@ ae.prototype.setText = function(e) {
7863
7863
  this.text = e;
7864
7864
  };
7865
7865
  ae.prototype.contextChecks = {
7866
- latinWordCheck: Ei,
7867
- arabicWordCheck: vi,
7868
- arabicSentenceCheck: mi
7866
+ latinWordCheck: wi,
7867
+ arabicWordCheck: hi,
7868
+ arabicSentenceCheck: gi
7869
7869
  };
7870
7870
  function Tr(e) {
7871
7871
  var r = this.contextChecks[e + "Check"];
@@ -7875,10 +7875,10 @@ function Tr(e) {
7875
7875
  r.endCheck
7876
7876
  );
7877
7877
  }
7878
- function Li() {
7878
+ function Oi() {
7879
7879
  return Tr.call(this, "latinWord"), Tr.call(this, "arabicWord"), Tr.call(this, "arabicSentence"), this.tokenizer.tokenize(this.text);
7880
7880
  }
7881
- function Ri() {
7881
+ function Li() {
7882
7882
  var e = this, r = this.tokenizer.getContextRanges("arabicSentence");
7883
7883
  r.forEach(function(t) {
7884
7884
  var n = e.tokenizer.getRangeTokens(t);
@@ -7917,17 +7917,17 @@ function Yr() {
7917
7917
  "glyphIndex modifier is required to apply arabic presentation features."
7918
7918
  );
7919
7919
  }
7920
- function Di() {
7920
+ function Ri() {
7921
7921
  var e = this, r = "arab";
7922
7922
  if (this.featuresTags.hasOwnProperty(r)) {
7923
7923
  Yr.call(this);
7924
7924
  var t = this.tokenizer.getContextRanges("arabicWord");
7925
7925
  t.forEach(function(n) {
7926
- Fi.call(e, n);
7926
+ ki.call(e, n);
7927
7927
  });
7928
7928
  }
7929
7929
  }
7930
- function Ai() {
7930
+ function Di() {
7931
7931
  var e = this, r = "arab";
7932
7932
  if (this.featuresTags.hasOwnProperty(r)) {
7933
7933
  var t = this.featuresTags[r];
@@ -7935,12 +7935,12 @@ function Ai() {
7935
7935
  Yr.call(this);
7936
7936
  var n = this.tokenizer.getContextRanges("arabicWord");
7937
7937
  n.forEach(function(a) {
7938
- Ui.call(e, a);
7938
+ Fi.call(e, a);
7939
7939
  });
7940
7940
  }
7941
7941
  }
7942
7942
  }
7943
- function Bi() {
7943
+ function Ai() {
7944
7944
  var e = this, r = "latn";
7945
7945
  if (this.featuresTags.hasOwnProperty(r)) {
7946
7946
  var t = this.featuresTags[r];
@@ -7948,7 +7948,7 @@ function Bi() {
7948
7948
  Yr.call(this);
7949
7949
  var n = this.tokenizer.getContextRanges("latinWord");
7950
7950
  n.forEach(function(a) {
7951
- Oi.call(e, a);
7951
+ Ei.call(e, a);
7952
7952
  });
7953
7953
  }
7954
7954
  }
@@ -7957,10 +7957,10 @@ ae.prototype.checkContextReady = function(e) {
7957
7957
  return !!this.tokenizer.getContext(e);
7958
7958
  };
7959
7959
  ae.prototype.applyFeaturesToContexts = function() {
7960
- this.checkContextReady("arabicWord") && (Di.call(this), Ai.call(this)), this.checkContextReady("latinWord") && Bi.call(this), this.checkContextReady("arabicSentence") && Ri.call(this);
7960
+ this.checkContextReady("arabicWord") && (Ri.call(this), Di.call(this)), this.checkContextReady("latinWord") && Ai.call(this), this.checkContextReady("arabicSentence") && Li.call(this);
7961
7961
  };
7962
7962
  ae.prototype.processText = function(e) {
7963
- (!this.text || this.text !== e) && (this.setText(e), Li.call(this), this.applyFeaturesToContexts());
7963
+ (!this.text || this.text !== e) && (this.setText(e), Oi.call(this), this.applyFeaturesToContexts());
7964
7964
  };
7965
7965
  ae.prototype.getBidiText = function(e) {
7966
7966
  return this.processText(e), this.tokenizer.getText();
@@ -8129,7 +8129,7 @@ I.prototype.validate = function() {
8129
8129
  t("fontFamily"), t("weightName"), t("manufacturer"), t("copyright"), t("version"), this.unitsPerEm > 0;
8130
8130
  };
8131
8131
  I.prototype.toTables = function() {
8132
- return bs.fontToTable(this);
8132
+ return xs.fontToTable(this);
8133
8133
  };
8134
8134
  I.prototype.toBuffer = function() {
8135
8135
  return console.warn("Font.toBuffer is deprecated. Use Font.toArrayBuffer instead."), this.toArrayBuffer();
@@ -8143,7 +8143,7 @@ I.prototype.download = function(e) {
8143
8143
  var r = this.getEnglishName("fontFamily"), t = this.getEnglishName("fontSubfamily");
8144
8144
  e = e || r.replace(/\s/g, "") + "-" + t + ".otf";
8145
8145
  var n = this.toArrayBuffer();
8146
- if (Ts())
8146
+ if (Ss())
8147
8147
  if (window.URL = window.URL || window.webkitURL, window.URL) {
8148
8148
  var a = new DataView(n), s = new Blob([a], { type: "font/opentype" }), o = document.createElement("a");
8149
8149
  o.href = window.URL.createObjectURL(s), o.download = e;
@@ -8152,7 +8152,7 @@ I.prototype.download = function(e) {
8152
8152
  } else
8153
8153
  console.warn("Font file could not be downloaded. Try using a different browser.");
8154
8154
  else {
8155
- var i = require("fs"), l = ks(n);
8155
+ var i = require("fs"), l = Ts(n);
8156
8156
  i.writeFileSync(e, l);
8157
8157
  }
8158
8158
  };
@@ -8212,7 +8212,7 @@ function An(e, r) {
8212
8212
  }
8213
8213
  return r[n] = e, n;
8214
8214
  }
8215
- function Mi(e, r, t) {
8215
+ function Bi(e, r, t) {
8216
8216
  var n = An(r.name, t);
8217
8217
  return [
8218
8218
  { name: "tag_" + e, type: "TAG", value: r.tag },
@@ -8223,11 +8223,11 @@ function Mi(e, r, t) {
8223
8223
  { name: "nameID_" + e, type: "USHORT", value: n }
8224
8224
  ];
8225
8225
  }
8226
- function Ii(e, r, t) {
8226
+ function Mi(e, r, t) {
8227
8227
  var n = {}, a = new k.Parser(e, r);
8228
8228
  return n.tag = a.parseTag(), n.minValue = a.parseFixed(), n.defaultValue = a.parseFixed(), n.maxValue = a.parseFixed(), a.skip("uShort", 1), n.name = t[a.parseUShort()] || {}, n;
8229
8229
  }
8230
- function Pi(e, r, t, n) {
8230
+ function Ii(e, r, t, n) {
8231
8231
  for (var a = An(r.name, n), s = [
8232
8232
  { name: "nameID_" + e, type: "USHORT", value: a },
8233
8233
  { name: "flags_" + e, type: "USHORT", value: 0 }
@@ -8241,14 +8241,14 @@ function Pi(e, r, t, n) {
8241
8241
  }
8242
8242
  return s;
8243
8243
  }
8244
- function Gi(e, r, t, n) {
8244
+ function Pi(e, r, t, n) {
8245
8245
  var a = {}, s = new k.Parser(e, r);
8246
8246
  a.name = n[s.parseUShort()] || {}, s.skip("uShort", 1), a.coordinates = {};
8247
8247
  for (var o = 0; o < t.length; ++o)
8248
8248
  a.coordinates[t[o].tag] = s.parseFixed();
8249
8249
  return a;
8250
8250
  }
8251
- function Ni(e, r) {
8251
+ function Gi(e, r) {
8252
8252
  var t = new S.Table("fvar", [
8253
8253
  { name: "version", type: "ULONG", value: 65536 },
8254
8254
  { name: "offsetToData", type: "USHORT", value: 0 },
@@ -8260,28 +8260,28 @@ function Ni(e, r) {
8260
8260
  ]);
8261
8261
  t.offsetToData = t.sizeOf();
8262
8262
  for (var n = 0; n < e.axes.length; n++)
8263
- t.fields = t.fields.concat(Mi(n, e.axes[n], r));
8263
+ t.fields = t.fields.concat(Bi(n, e.axes[n], r));
8264
8264
  for (var a = 0; a < e.instances.length; a++)
8265
- t.fields = t.fields.concat(Pi(a, e.instances[a], e.axes, r));
8265
+ t.fields = t.fields.concat(Ii(a, e.instances[a], e.axes, r));
8266
8266
  return t;
8267
8267
  }
8268
- function Hi(e, r, t) {
8268
+ function Ni(e, r, t) {
8269
8269
  var n = new k.Parser(e, r), a = n.parseULong();
8270
8270
  E.argument(a === 65536, "Unsupported fvar table version.");
8271
8271
  var s = n.parseOffset16();
8272
8272
  n.skip("uShort", 1);
8273
8273
  for (var o = n.parseUShort(), u = n.parseUShort(), i = n.parseUShort(), l = n.parseUShort(), f = [], c = 0; c < o; c++)
8274
- f.push(Ii(e, r + s + c * u, t));
8274
+ f.push(Mi(e, r + s + c * u, t));
8275
8275
  for (var p = [], h = r + s + o * u, d = 0; d < i; d++)
8276
- p.push(Gi(e, h + d * l, f, t));
8276
+ p.push(Pi(e, h + d * l, f, t));
8277
8277
  return { axes: f, instances: p };
8278
8278
  }
8279
- var Wi = { make: Ni, parse: Hi }, zi = function() {
8279
+ var Hi = { make: Gi, parse: Ni }, Wi = function() {
8280
8280
  return {
8281
8281
  coverage: this.parsePointer(v.coverage),
8282
8282
  attachPoints: this.parseList(v.pointer(v.uShortList))
8283
8283
  };
8284
- }, _i = function() {
8284
+ }, zi = function() {
8285
8285
  var e = this.parseUShort();
8286
8286
  if (E.argument(
8287
8287
  e === 1 || e === 2 || e === 3,
@@ -8292,17 +8292,17 @@ var Wi = { make: Ni, parse: Hi }, zi = function() {
8292
8292
  return { pointindex: this.parseShort() };
8293
8293
  if (e === 3)
8294
8294
  return { coordinate: this.parseShort() };
8295
+ }, _i = function() {
8296
+ return this.parseList(v.pointer(zi));
8295
8297
  }, Vi = function() {
8296
- return this.parseList(v.pointer(_i));
8297
- }, qi = function() {
8298
8298
  return {
8299
8299
  coverage: this.parsePointer(v.coverage),
8300
- ligGlyphs: this.parseList(v.pointer(Vi))
8300
+ ligGlyphs: this.parseList(v.pointer(_i))
8301
8301
  };
8302
- }, Xi = function() {
8302
+ }, qi = function() {
8303
8303
  return this.parseUShort(), this.parseList(v.pointer(v.coverage));
8304
8304
  };
8305
- function Yi(e, r) {
8305
+ function Xi(e, r) {
8306
8306
  r = r || 0;
8307
8307
  var t = new v(e, r), n = t.parseVersion(1);
8308
8308
  E.argument(
@@ -8312,13 +8312,13 @@ function Yi(e, r) {
8312
8312
  var a = {
8313
8313
  version: n,
8314
8314
  classDef: t.parsePointer(v.classDef),
8315
- attachList: t.parsePointer(zi),
8316
- ligCaretList: t.parsePointer(qi),
8315
+ attachList: t.parsePointer(Wi),
8316
+ ligCaretList: t.parsePointer(Vi),
8317
8317
  markAttachClassDef: t.parsePointer(v.classDef)
8318
8318
  };
8319
- return n >= 1.2 && (a.markGlyphSets = t.parsePointer(Xi)), a;
8319
+ return n >= 1.2 && (a.markGlyphSets = t.parsePointer(qi)), a;
8320
8320
  }
8321
- var $i = { parse: Yi }, te = new Array(10);
8321
+ var Yi = { parse: Xi }, te = new Array(10);
8322
8322
  te[1] = function() {
8323
8323
  var r = this.offset + this.relativeOffset, t = this.parseUShort();
8324
8324
  if (t === 1)
@@ -8396,7 +8396,7 @@ te[8] = function() {
8396
8396
  te[9] = function() {
8397
8397
  return { error: "GPOS Lookup 9 not supported" };
8398
8398
  };
8399
- function Zi(e, r) {
8399
+ function $i(e, r) {
8400
8400
  r = r || 0;
8401
8401
  var t = new v(e, r), n = t.parseVersion(1);
8402
8402
  return E.argument(n === 1 || n === 1.1, "Unsupported GPOS table version " + n), n === 1 ? {
@@ -8412,17 +8412,17 @@ function Zi(e, r) {
8412
8412
  variations: t.parseFeatureVariationsList()
8413
8413
  };
8414
8414
  }
8415
- var Qi = new Array(10);
8416
- function Ki(e) {
8415
+ var Zi = new Array(10);
8416
+ function Qi(e) {
8417
8417
  return new S.Table("GPOS", [
8418
8418
  { name: "version", type: "ULONG", value: 65536 },
8419
8419
  { name: "scripts", type: "TABLE", value: new S.ScriptList(e.scripts) },
8420
8420
  { name: "features", type: "TABLE", value: new S.FeatureList(e.features) },
8421
- { name: "lookups", type: "TABLE", value: new S.LookupList(e.lookups, Qi) }
8421
+ { name: "lookups", type: "TABLE", value: new S.LookupList(e.lookups, Zi) }
8422
8422
  ]);
8423
8423
  }
8424
- var ji = { parse: Zi, make: Ki };
8425
- function Ji(e) {
8424
+ var Ki = { parse: $i, make: Qi };
8425
+ function ji(e) {
8426
8426
  var r = {};
8427
8427
  e.skip("uShort");
8428
8428
  var t = e.parseUShort();
@@ -8435,7 +8435,7 @@ function Ji(e) {
8435
8435
  }
8436
8436
  return r;
8437
8437
  }
8438
- function eu(e) {
8438
+ function Ji(e) {
8439
8439
  var r = {};
8440
8440
  e.skip("uShort");
8441
8441
  var t = e.parseULong();
@@ -8451,24 +8451,24 @@ function eu(e) {
8451
8451
  }
8452
8452
  return r;
8453
8453
  }
8454
- function ru(e, r) {
8454
+ function eu(e, r) {
8455
8455
  var t = new k.Parser(e, r), n = t.parseUShort();
8456
8456
  if (n === 0)
8457
- return Ji(t);
8457
+ return ji(t);
8458
8458
  if (n === 1)
8459
- return eu(t);
8459
+ return Ji(t);
8460
8460
  throw new Error("Unsupported kern table version (" + n + ").");
8461
8461
  }
8462
- var tu = { parse: ru };
8463
- function nu(e, r, t, n) {
8462
+ var ru = { parse: eu };
8463
+ function tu(e, r, t, n) {
8464
8464
  for (var a = new k.Parser(e, r), s = n ? a.parseUShort : a.parseULong, o = [], u = 0; u < t + 1; u += 1) {
8465
8465
  var i = s.call(a);
8466
8466
  n && (i *= 2), o.push(i);
8467
8467
  }
8468
8468
  return o;
8469
8469
  }
8470
- var au = { parse: nu };
8471
- function su(e, r) {
8470
+ var nu = { parse: tu };
8471
+ function au(e, r) {
8472
8472
  var t = require("fs");
8473
8473
  t.readFile(e, function(n, a) {
8474
8474
  if (n)
@@ -8476,7 +8476,7 @@ function su(e, r) {
8476
8476
  r(null, Sn(a));
8477
8477
  });
8478
8478
  }
8479
- function ou(e, r) {
8479
+ function su(e, r) {
8480
8480
  var t = new XMLHttpRequest();
8481
8481
  t.open("get", e, !0), t.responseType = "arraybuffer", t.onload = function() {
8482
8482
  return t.response ? r(null, t.response) : r("Font could not be loaded: " + t.statusText);
@@ -8491,7 +8491,7 @@ function Bt(e, r) {
8491
8491
  }
8492
8492
  return t;
8493
8493
  }
8494
- function iu(e, r) {
8494
+ function ou(e, r) {
8495
8495
  for (var t = [], n = 44, a = 0; a < r; a += 1) {
8496
8496
  var s = k.getTag(e, n), o = k.getULong(e, n + 4), u = k.getULong(e, n + 8), i = k.getULong(e, n + 12), l = void 0;
8497
8497
  u < i ? l = "WOFF" : l = !1, t.push({
@@ -8507,7 +8507,7 @@ function iu(e, r) {
8507
8507
  function W(e, r) {
8508
8508
  if (r.compression === "WOFF") {
8509
8509
  var t = new Uint8Array(e.buffer, r.offset + 2, r.compressedLength - 2), n = new Uint8Array(r.length);
8510
- if (Kn(t, n), n.byteLength !== r.length)
8510
+ if (Qn(t, n), n.byteLength !== r.length)
8511
8511
  throw new Error("Decompression error: " + r.tag + " decompressed length doesn't match recorded length");
8512
8512
  var a = new DataView(n.buffer, 0);
8513
8513
  return { data: a, offset: 0 };
@@ -8529,7 +8529,7 @@ function $r(e, r) {
8529
8529
  a.outlinesFormat = "cff";
8530
8530
  else
8531
8531
  throw new Error("Unsupported OpenType flavor " + i);
8532
- o = k.getUShort(s, 12), u = iu(s, o);
8532
+ o = k.getUShort(s, 12), u = ou(s, o);
8533
8533
  } else
8534
8534
  throw new Error("Unsupported OpenType signature " + i);
8535
8535
  for (var f, c, p, h, d, g, m, x, U, y, L, w, B = 0; B < o; B += 1) {
@@ -8602,7 +8602,7 @@ function $r(e, r) {
8602
8602
  }
8603
8603
  var D = W(s, y);
8604
8604
  if (a.tables.name = gn.parse(D.data, D.offset, n), a.names = a.tables.name, p && U) {
8605
- var R = t === 0, A = W(s, U), H = au.parse(A.data, A.offset, a.numGlyphs, R), Q = W(s, p);
8605
+ var R = t === 0, A = W(s, U), H = nu.parse(A.data, A.offset, a.numGlyphs, R), Q = W(s, p);
8606
8606
  a.glyphs = Un.parse(Q.data, Q.offset, H, a, r);
8607
8607
  } else if (f) {
8608
8608
  var G = W(s, f);
@@ -8610,18 +8610,18 @@ function $r(e, r) {
8610
8610
  } else
8611
8611
  throw new Error("Font doesn't contain TrueType or CFF outlines.");
8612
8612
  var z = W(s, m);
8613
- if (ln.parse(a, z.data, z.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, r), ya(a, r), x) {
8613
+ if (ln.parse(a, z.data, z.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, r), ma(a, r), x) {
8614
8614
  var Y = W(s, x);
8615
- a.kerningPairs = tu.parse(Y.data, Y.offset);
8615
+ a.kerningPairs = ru.parse(Y.data, Y.offset);
8616
8616
  } else
8617
8617
  a.kerningPairs = {};
8618
8618
  if (h) {
8619
8619
  var _ = W(s, h);
8620
- a.tables.gdef = $i.parse(_.data, _.offset);
8620
+ a.tables.gdef = Yi.parse(_.data, _.offset);
8621
8621
  }
8622
8622
  if (d) {
8623
8623
  var P = W(s, d);
8624
- a.tables.gpos = ji.parse(P.data, P.offset), a.position.init();
8624
+ a.tables.gpos = Ki.parse(P.data, P.offset), a.position.init();
8625
8625
  }
8626
8626
  if (g) {
8627
8627
  var V = W(s, g);
@@ -8629,7 +8629,7 @@ function $r(e, r) {
8629
8629
  }
8630
8630
  if (c) {
8631
8631
  var $ = W(s, c);
8632
- a.tables.fvar = Wi.parse($.data, $.offset, a.names);
8632
+ a.tables.fvar = Hi.parse($.data, $.offset, a.names);
8633
8633
  }
8634
8634
  if (L) {
8635
8635
  var M = W(s, L);
@@ -8637,9 +8637,9 @@ function $r(e, r) {
8637
8637
  }
8638
8638
  return a;
8639
8639
  }
8640
- function uu(e, r, t) {
8640
+ function iu(e, r, t) {
8641
8641
  t = t ?? {};
8642
- var n = typeof window > "u", a = n && !t.isUrl ? su : ou;
8642
+ var n = typeof window > "u", a = n && !t.isUrl ? au : su;
8643
8643
  return new Promise(function(s, o) {
8644
8644
  a(e, function(u, i) {
8645
8645
  if (u) {
@@ -8661,11 +8661,11 @@ function uu(e, r, t) {
8661
8661
  });
8662
8662
  });
8663
8663
  }
8664
- function lu(e, r) {
8664
+ function uu(e, r) {
8665
8665
  var t = require("fs"), n = t.readFileSync(e);
8666
8666
  return $r(Sn(n), r);
8667
8667
  }
8668
- var fu = /* @__PURE__ */ Object.freeze({
8668
+ var lu = /* @__PURE__ */ Object.freeze({
8669
8669
  __proto__: null,
8670
8670
  Font: I,
8671
8671
  Glyph: K,
@@ -8673,10 +8673,10 @@ var fu = /* @__PURE__ */ Object.freeze({
8673
8673
  BoundingBox: he,
8674
8674
  _parse: k,
8675
8675
  parse: $r,
8676
- load: uu,
8677
- loadSync: lu
8676
+ load: iu,
8677
+ loadSync: uu
8678
8678
  });
8679
- function pu(e, r) {
8679
+ function fu(e, r) {
8680
8680
  const t = { svgGlyphs: r };
8681
8681
  return new Proxy(e, {
8682
8682
  get(n, a, s) {
@@ -8693,7 +8693,7 @@ function pu(e, r) {
8693
8693
  }
8694
8694
  });
8695
8695
  }
8696
- const Mr = /* @__PURE__ */ new Map(), _u = () => Mr, cu = async (e, r = !1) => {
8696
+ const Mr = /* @__PURE__ */ new Map(), _u = () => Mr, pu = async (e, r = !1) => {
8697
8697
  const t = Mr.get(e);
8698
8698
  if (t) {
8699
8699
  if (r && !t.svgGlyphs) {
@@ -8712,16 +8712,16 @@ const Mr = /* @__PURE__ */ new Map(), _u = () => Mr, cu = async (e, r = !1) => {
8712
8712
  throw new Error(
8713
8713
  `Failed to load font from ${e}: ${n.status} ${n.statusText}`
8714
8714
  );
8715
- const a = await n.arrayBuffer(), s = fu.parse(a);
8715
+ const a = await n.arrayBuffer(), s = lu.parse(a);
8716
8716
  let o;
8717
8717
  if (r) {
8718
8718
  const { extractSVGGlyphs: i } = await import("./index-F17NutRZ.js");
8719
8719
  o = await i(a);
8720
8720
  }
8721
- const u = pu(s, o);
8721
+ const u = fu(s, o);
8722
8722
  return Mr.set(e, u), u;
8723
- }, hu = 0.03125, Bn = 1.1, Mn = 0.2, $e = {
8724
- outlineWidth: hu,
8723
+ }, cu = 0.03125, Bn = 1.1, hu = 0.2, $e = {
8724
+ outlineWidth: cu,
8725
8725
  letterSpacing: 0,
8726
8726
  letterSpacingOutline: 0
8727
8727
  };
@@ -8771,15 +8771,15 @@ const du = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8771
8771
  }
8772
8772
  }
8773
8773
  return l += s * (n * Bn), `M 0 ${l} L ${o} ${l}`;
8774
- }, In = ({
8774
+ }, Mn = ({
8775
8775
  boxDimensions: e,
8776
8776
  baseline: r,
8777
8777
  textHeight: t,
8778
8778
  verticalAlignment: n
8779
8779
  }) => {
8780
- const { width: a, height: s } = e, o = t * Mn, u = t + o, i = n === "top" ? 0 : s / 2 - u / 2, l = r + i, f = l + o;
8780
+ const { width: a, height: s } = e, o = t * hu, u = t + o, i = n === "top" ? 0 : s / 2 - u / 2, l = r + i, f = l + o;
8781
8781
  if (n !== "top" && (f > s || l - t < 0))
8782
- return In({
8782
+ return Mn({
8783
8783
  boxDimensions: e,
8784
8784
  baseline: r,
8785
8785
  textHeight: t,
@@ -8839,9 +8839,9 @@ const du = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8839
8839
  height: h,
8840
8840
  baseline: d
8841
8841
  };
8842
- }, Zr = window.DOMParser, Su = globalThis.DOMMatrix, Pn = typeof window < "u" ? new URL(window.location.href) : null;
8843
- Pn?.searchParams.get("mode");
8844
- Pn?.searchParams.has("rasterlayplan");
8842
+ }, Zr = window.DOMParser, Su = globalThis.DOMMatrix, In = typeof window < "u" ? new URL(window.location.href) : null;
8843
+ In?.searchParams.get("mode");
8844
+ In?.searchParams.has("rasterlayplan");
8845
8845
  typeof navigator < "u" && navigator.vendor && navigator.vendor.indexOf("Apple") > -1;
8846
8846
  const Tu = {
8847
8847
  aliceblue: "#f0f8ff",
@@ -9013,7 +9013,7 @@ const Tu = {
9013
9013
  Math.round((i + o) * 255),
9014
9014
  Math.round((l + o) * 255)
9015
9015
  ];
9016
- }, Uu = (e) => /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.test(e), Gn = (e) => {
9016
+ }, Uu = (e) => /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.test(e), Pn = (e) => {
9017
9017
  const r = e.trim().toLowerCase();
9018
9018
  if (r.startsWith("#") || /^[0-9a-f]{3}([0-9a-f]{3})?$/.test(r))
9019
9019
  return Uu(r) ? ku(r) : void 0;
@@ -9071,7 +9071,7 @@ const Tu = {
9071
9071
  return r === "none" || !r ? !1 : r;
9072
9072
  }, Ur = (e) => {
9073
9073
  if (!(e === "none" || e === "transparent" || e.startsWith("url(")))
9074
- return Gn(e);
9074
+ return Pn(e);
9075
9075
  }, Ou = (e) => {
9076
9076
  const r = wu(e).reduce(
9077
9077
  (t, n) => {
@@ -9097,11 +9097,11 @@ const Tu = {
9097
9097
  const r = new Zr().parseFromString(e, "image/svg+xml").querySelector("svg");
9098
9098
  return r ? Ou(r) : [];
9099
9099
  };
9100
- function Nn(e) {
9100
+ function Gn(e) {
9101
9101
  const r = e.trim(), t = r.startsWith("<svg") || r.startsWith("<?xml"), n = t ? r : `<svg>${r}</svg>`;
9102
9102
  return { doc: new Zr().parseFromString(n, "image/svg+xml"), wasWrapped: !t };
9103
9103
  }
9104
- function Hn(e, r) {
9104
+ function Nn(e, r) {
9105
9105
  const t = e.querySelector("svg");
9106
9106
  return t ? r ? t.innerHTML : t.outerHTML : "";
9107
9107
  }
@@ -9124,7 +9124,7 @@ function Du(e) {
9124
9124
  }
9125
9125
  const Au = ["fill", "stroke", "clip-path", "mask", "filter"];
9126
9126
  function Bu(e, r) {
9127
- const { doc: t, wasWrapped: n } = Nn(e), a = /* @__PURE__ */ new Map();
9127
+ const { doc: t, wasWrapped: n } = Gn(e), a = /* @__PURE__ */ new Map();
9128
9128
  for (const s of t.querySelectorAll("[id]")) {
9129
9129
  const o = s.getAttribute("id");
9130
9130
  if (!o) continue;
@@ -9152,16 +9152,16 @@ function Bu(e, r) {
9152
9152
  l && s.setAttribute(o, `#${l}`);
9153
9153
  }
9154
9154
  }
9155
- return Hn(t, n);
9155
+ return Nn(t, n);
9156
9156
  }
9157
9157
  const Mu = ["fill", "stroke", "stop-color"], Iu = ["path", "rect", "circle", "ellipse", "polygon", "polyline", "text"];
9158
9158
  function Pu(e, r) {
9159
- const { doc: t, wasWrapped: n } = Nn(e);
9159
+ const { doc: t, wasWrapped: n } = Gn(e);
9160
9160
  for (const s of Mu)
9161
9161
  for (const o of t.querySelectorAll(`[${s}]`)) {
9162
9162
  const u = o.getAttribute(s);
9163
9163
  if (!u || !Ru(u)) continue;
9164
- const i = Gn(u), l = i ? r[i] : void 0;
9164
+ const i = Pn(u), l = i ? r[i] : void 0;
9165
9165
  l && o.setAttribute(s, l.hex);
9166
9166
  }
9167
9167
  const a = r["#000000"];
@@ -9170,7 +9170,7 @@ function Pu(e, r) {
9170
9170
  for (const o of t.querySelectorAll(s))
9171
9171
  o.setAttribute("fill", a.hex);
9172
9172
  }
9173
- return Hn(t, n);
9173
+ return Nn(t, n);
9174
9174
  }
9175
9175
  const Gu = (e = [1, 0, 0, 1, 0, 0]) => {
9176
9176
  const r = `matrix(${e.join(",")})`, t = new Su(r);
@@ -9190,7 +9190,7 @@ const It = (e, r, t) => e / t * r, Hu = ({
9190
9190
  horizontalAlignment: s = "centre",
9191
9191
  colourMap: o
9192
9192
  }) => {
9193
- const { outlineWidth: u, letterSpacing: i, letterSpacingOutline: l } = a, f = new _n(r), c = u ? n * u * 2 : 0, p = f.getTotalLength(), h = e.getPaths(t, 0, 0, n, { drawSVG: !1 }), g = e.getPath(t, 0, 0, n, { drawSVG: !1 }).getBoundingBox(), m = g.x1 - c / 2, U = g.x2 + c / 2 - m, y = u > 0 ? l : i;
9193
+ const { outlineWidth: u, letterSpacing: i, letterSpacingOutline: l } = a, f = new zn(r), c = u ? n * u * 2 : 0, p = f.getTotalLength(), h = e.getPaths(t, 0, 0, n, { drawSVG: !1 }), g = e.getPath(t, 0, 0, n, { drawSVG: !1 }).getBoundingBox(), m = g.x1 - c / 2, U = g.x2 + c / 2 - m, y = u > 0 ? l : i;
9194
9194
  let L = y ? y * n : 0;
9195
9195
  s === "distributed" && (L = t.length === 1 ? 0 : (p - U) / (t.length - 1));
9196
9196
  const w = L * (t.length - 1), B = U + w;
@@ -9217,10 +9217,10 @@ const It = (e, r, t) => e / t * r, Hu = ({
9217
9217
  new fe(A.x1, 0),
9218
9218
  M,
9219
9219
  Be
9220
- ), Ce = De - Me.X, Wn = pr - Me.Y;
9220
+ ), Ce = De - Me.X, Hn = pr - Me.Y;
9221
9221
  let se = Gu();
9222
- se = se.translate(Ce, Wn), M && (se = se.translate(A.x1 + Ae / 2, 0), se = se.rotate(M), se = se.translate(-A.x1 - Ae / 2, 0));
9223
- const zn = se.toString();
9222
+ se = se.translate(Ce, Hn), M && (se = se.translate(A.x1 + Ae / 2, 0), se = se.rotate(M), se = se.translate(-A.x1 - Ae / 2, 0));
9223
+ const Wn = se.toString();
9224
9224
  let ve = R.toPathData(2);
9225
9225
  ve.length && !ve.endsWith("Z") && (ve += "Z", ve = ve.replace(/M/g, "ZM"), ve = ve.substring(1));
9226
9226
  let cr;
@@ -9245,7 +9245,7 @@ const It = (e, r, t) => e / t * r, Hu = ({
9245
9245
  attributes: {
9246
9246
  d: ve,
9247
9247
  "data-character": Nu(t[D]),
9248
- transform: zn
9248
+ transform: Wn
9249
9249
  },
9250
9250
  glyphData: {
9251
9251
  index: H.index,
@@ -9332,10 +9332,10 @@ const It = (e, r, t) => e / t * r, Hu = ({
9332
9332
  gu(U.path), A = U.path;
9333
9333
  break;
9334
9334
  case "curved":
9335
- A = In({
9335
+ A = Mn({
9336
9336
  boxDimensions: s,
9337
9337
  baseline: L[R].baseline,
9338
- textHeight: L[R].height * (1 + Mn),
9338
+ textHeight: L[R].height,
9339
9339
  verticalAlignment: u
9340
9340
  });
9341
9341
  break;
@@ -9370,7 +9370,7 @@ const It = (e, r, t) => e / t * r, Hu = ({
9370
9370
  strokeColour: c
9371
9371
  });
9372
9372
  }, qu = async (e) => {
9373
- const { fontUrl: r, fontSizeFallback: t, ...n } = e, a = !!n.colourMap, s = await cu(r, a);
9373
+ const { fontUrl: r, fontSizeFallback: t, ...n } = e, a = !!n.colourMap, s = await pu(r, a);
9374
9374
  try {
9375
9375
  return Nt({ ...n, font: s });
9376
9376
  } catch (o) {
@@ -9380,17 +9380,17 @@ const It = (e, r, t) => e / t * r, Hu = ({
9380
9380
  }
9381
9381
  };
9382
9382
  export {
9383
- hu as DEFAULT_OUTLINE_FACTOR,
9383
+ cu as DEFAULT_OUTLINE_FACTOR,
9384
9384
  $e as DEFAULT_SPACING,
9385
9385
  Bn as LINE_HEIGHT,
9386
- In as generateCurvedBaseline,
9386
+ Mn as generateCurvedBaseline,
9387
9387
  mu as generateFlatBaseline,
9388
9388
  _u as getFontCache,
9389
9389
  Vu as getFontColours,
9390
9390
  xu as getFontSizeFromPhysicalSize,
9391
9391
  qu as getRenderedText,
9392
9392
  bu as getTextMetricsAtFontSize,
9393
- cu as loadOpentypeFont,
9393
+ pu as loadOpentypeFont,
9394
9394
  du as normaliseBaselineOption,
9395
9395
  Nt as renderText,
9396
9396
  gu as validateCustomBaselinePath