@unmade/text-renderer 0.1.11 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- import { svgPathProperties as zn } from "svg-path-properties";
1
+ import { svgPathProperties as Vn } from "svg-path-properties";
2
2
  String.prototype.codePointAt || (function() {
3
3
  var e = (function() {
4
4
  try {
@@ -25,14 +25,14 @@ String.prototype.codePointAt || (function() {
25
25
  writable: !0
26
26
  }) : String.prototype.codePointAt = r;
27
27
  })();
28
- var Pr = 0, Ht = -3;
28
+ var Pr = 0, Wt = -3;
29
29
  function Ne() {
30
30
  this.table = new Uint16Array(16), this.trans = new Uint16Array(288);
31
31
  }
32
- function _n(e, r) {
32
+ function qn(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), Vn = new Uint8Array([
35
+ var zt = new Ne(), _t = new Ne(), Gr = new Uint8Array(30), Nr = new Uint16Array(30), Vt = new Uint8Array(30), qt = new Uint16Array(30), Xn = new Uint8Array([
36
36
  16,
37
37
  17,
38
38
  18,
@@ -53,7 +53,7 @@ var Wt = new Ne(), zt = new Ne(), Gr = new Uint8Array(30), Nr = new Uint16Array(
53
53
  1,
54
54
  15
55
55
  ]), Qr = new Ne(), oe = new Uint8Array(320);
56
- function qt(e, r, t, n) {
56
+ function Xt(e, r, t, n) {
57
57
  var a, s;
58
58
  for (a = 0; a < t; ++a)
59
59
  e[a] = 0;
@@ -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 qn(e, r) {
65
+ function Yn(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 Xn(e) {
94
+ function $n(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 Yn(e, r, t) {
116
+ function Zn(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[Vn[o]] = l;
122
+ oe[Xn[o]] = l;
123
123
  }
124
124
  for (vr(Qr, oe, 0, 19), u = 0; u < n + a; ) {
125
125
  var f = Cr(e, Qr);
@@ -153,47 +153,47 @@ function jr(e, r, t) {
153
153
  e.dest[e.destLen++] = n;
154
154
  else {
155
155
  var a, s, o, u;
156
- for (n -= 257, a = ie(e, Gr[n], Nr[n]), s = Cr(e, t), o = e.destLen - ie(e, _t[s], Vt[s]), u = o; u < o + a; ++u)
156
+ for (n -= 257, a = ie(e, Gr[n], Nr[n]), s = Cr(e, t), o = e.destLen - ie(e, Vt[s], qt[s]), u = o; u < o + a; ++u)
157
157
  e.dest[e.destLen++] = e.dest[u];
158
158
  }
159
159
  }
160
160
  }
161
- function $n(e) {
161
+ function Qn(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))
165
- return Ht;
165
+ return Wt;
166
166
  for (e.sourceIndex += 4, n = r; n; --n)
167
167
  e.dest[e.destLen++] = e.source[e.sourceIndex++];
168
168
  return e.bitcount = 0, Pr;
169
169
  }
170
- function Zn(e, r) {
171
- var t = new _n(e, r), n, a, s;
170
+ function Kn(e, r) {
171
+ var t = new qn(e, r), n, a, s;
172
172
  do {
173
- switch (n = Xn(t), a = ie(t, 2, 0), a) {
173
+ switch (n = $n(t), a = ie(t, 2, 0), a) {
174
174
  case 0:
175
- s = $n(t);
175
+ s = Qn(t);
176
176
  break;
177
177
  case 1:
178
- s = jr(t, Wt, zt);
178
+ s = jr(t, zt, _t);
179
179
  break;
180
180
  case 2:
181
- Yn(t, t.ltree, t.dtree), s = jr(t, t.ltree, t.dtree);
181
+ Zn(t, t.ltree, t.dtree), s = jr(t, t.ltree, t.dtree);
182
182
  break;
183
183
  default:
184
- s = Ht;
184
+ s = Wt;
185
185
  }
186
186
  if (s !== Pr)
187
187
  throw new Error("Data error");
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
- qn(Wt, zt);
192
- qt(Gr, Nr, 4, 3);
193
- qt(_t, Vt, 2, 1);
191
+ Yn(zt, _t);
192
+ Xt(Gr, Nr, 4, 3);
193
+ Xt(Vt, qt, 2, 1);
194
194
  Gr[28] = 0;
195
195
  Nr[28] = 258;
196
- var Qn = Zn;
196
+ var jn = Kn;
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
  }
@@ -348,13 +348,13 @@ X.prototype.toDOMElement = function(e) {
348
348
  var r = this.toPathData(e), t = document.createElementNS("http://www.w3.org/2000/svg", "path");
349
349
  return t.setAttribute("d", r), t;
350
350
  };
351
- function Xt(e) {
351
+ function Yt(e) {
352
352
  throw new Error(e);
353
353
  }
354
354
  function Jr(e, r) {
355
- e || Xt(r);
355
+ e || Yt(r);
356
356
  }
357
- var E = { fail: Xt, argument: Jr, assert: Jr }, et = 32768, rt = 2147483648, Oe = {}, b = {}, O = {};
357
+ var E = { fail: Yt, argument: Jr, assert: Jr }, et = 32768, rt = 2147483648, Oe = {}, b = {}, O = {};
358
358
  function ne(e) {
359
359
  return function() {
360
360
  return e;
@@ -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, Kn = function(e) {
535
+ var Ze = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), Qe, Jn = 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, Kn =
554
554
  }
555
555
  };
556
556
  b.MACSTRING = function(e, r) {
557
- var t = Kn(r);
557
+ var t = Jn(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 ea(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 Jn(e, r, t) {
580
+ function ra(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 Jn(e, r, t) {
589
589
  t.push(e[u] + 256 & 255);
590
590
  return s;
591
591
  }
592
- function ea(e, r, t) {
592
+ function ta(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 ea(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 = Jn(e, r, t) : r = ea(e, r, t);
609
+ n === 0 ? r = ea(e, r, t) : n >= -128 && n <= 127 ? r = ra(e, r, t) : r = ta(e, r, t);
610
610
  }
611
611
  return t;
612
612
  };
@@ -719,7 +719,7 @@ b.LITERAL = function(e) {
719
719
  O.LITERAL = function(e) {
720
720
  return e.length;
721
721
  };
722
- function Z(e, r, t) {
722
+ function Q(e, r, t) {
723
723
  if (r.length && (r[0].name !== "coverageFormat" || r[0].value === 1))
724
724
  for (var n = 0; n < r.length; n += 1) {
725
725
  var a = r[n];
@@ -731,10 +731,10 @@ function Z(e, r, t) {
731
731
  this[u] !== void 0 && (this[u] = i);
732
732
  }
733
733
  }
734
- Z.prototype.encode = function() {
734
+ Q.prototype.encode = function() {
735
735
  return b.TABLE(this);
736
736
  };
737
- Z.prototype.sizeOf = function() {
737
+ Q.prototype.sizeOf = function() {
738
738
  return O.TABLE(this);
739
739
  };
740
740
  function He(e, r, t) {
@@ -760,11 +760,11 @@ function We(e, r, t) {
760
760
  return a;
761
761
  }
762
762
  function tr(e) {
763
- e.format === 1 ? Z.call(
763
+ e.format === 1 ? Q.call(
764
764
  this,
765
765
  "coverageTable",
766
766
  [{ name: "coverageFormat", type: "USHORT", value: 1 }].concat(He("glyph", e.glyphs))
767
- ) : e.format === 2 ? Z.call(
767
+ ) : e.format === 2 ? Q.call(
768
768
  this,
769
769
  "coverageTable",
770
770
  [{ name: "coverageFormat", type: "USHORT", value: 2 }].concat(We("rangeRecord", e.ranges, function(r) {
@@ -776,18 +776,18 @@ function tr(e) {
776
776
  }))
777
777
  ) : E.assert(!1, "Coverage format must be 1 or 2.");
778
778
  }
779
- tr.prototype = Object.create(Z.prototype);
779
+ tr.prototype = Object.create(Q.prototype);
780
780
  tr.prototype.constructor = tr;
781
781
  function nr(e) {
782
- Z.call(
782
+ Q.call(
783
783
  this,
784
784
  "scriptListTable",
785
785
  We("scriptRecord", e, function(r, t) {
786
786
  var n = r.script, a = n.defaultLangSys;
787
787
  return E.assert(!!a, "Unable to write GSUB: script " + r.tag + " has no default language system."), [
788
788
  { name: "scriptTag" + t, type: "TAG", value: r.tag },
789
- { name: "script" + t, type: "TABLE", value: new Z("scriptTable", [
790
- { name: "defaultLangSys", type: "TABLE", value: new Z("defaultLangSys", [
789
+ { name: "script" + t, type: "TABLE", value: new Q("scriptTable", [
790
+ { name: "defaultLangSys", type: "TABLE", value: new Q("defaultLangSys", [
791
791
  { name: "lookupOrder", type: "USHORT", value: 0 },
792
792
  { name: "reqFeatureIndex", type: "USHORT", value: a.reqFeatureIndex }
793
793
  ].concat(He("featureIndex", a.featureIndexes))) }
@@ -795,7 +795,7 @@ function nr(e) {
795
795
  var u = s.langSys;
796
796
  return [
797
797
  { name: "langSysTag" + o, type: "TAG", value: s.tag },
798
- { name: "langSys" + o, type: "TABLE", value: new Z("langSys", [
798
+ { name: "langSys" + o, type: "TABLE", value: new Q("langSys", [
799
799
  { name: "lookupOrder", type: "USHORT", value: 0 },
800
800
  { name: "reqFeatureIndex", type: "USHORT", value: u.reqFeatureIndex }
801
801
  ].concat(He("featureIndex", u.featureIndexes))) }
@@ -805,39 +805,39 @@ function nr(e) {
805
805
  })
806
806
  );
807
807
  }
808
- nr.prototype = Object.create(Z.prototype);
808
+ nr.prototype = Object.create(Q.prototype);
809
809
  nr.prototype.constructor = nr;
810
810
  function ar(e) {
811
- Z.call(
811
+ Q.call(
812
812
  this,
813
813
  "featureListTable",
814
814
  We("featureRecord", e, function(r, t) {
815
815
  var n = r.feature;
816
816
  return [
817
817
  { name: "featureTag" + t, type: "TAG", value: r.tag },
818
- { name: "feature" + t, type: "TABLE", value: new Z("featureTable", [
818
+ { name: "feature" + t, type: "TABLE", value: new Q("featureTable", [
819
819
  { name: "featureParams", type: "USHORT", value: n.featureParams }
820
820
  ].concat(He("lookupListIndex", n.lookupListIndexes))) }
821
821
  ];
822
822
  })
823
823
  );
824
824
  }
825
- ar.prototype = Object.create(Z.prototype);
825
+ ar.prototype = Object.create(Q.prototype);
826
826
  ar.prototype.constructor = ar;
827
827
  function sr(e, r) {
828
- Z.call(this, "lookupListTable", Or("lookup", e, function(t) {
828
+ Q.call(this, "lookupListTable", Or("lookup", e, function(t) {
829
829
  var n = r[t.lookupType];
830
- return E.assert(!!n, "Unable to write GSUB lookup type " + t.lookupType + " tables."), new Z("lookupTable", [
830
+ return E.assert(!!n, "Unable to write GSUB lookup type " + t.lookupType + " tables."), new Q("lookupTable", [
831
831
  { name: "lookupType", type: "USHORT", value: t.lookupType },
832
832
  { name: "lookupFlag", type: "USHORT", value: t.lookupFlag }
833
833
  ].concat(Or("subtable", t.subtables, n)));
834
834
  }));
835
835
  }
836
- sr.prototype = Object.create(Z.prototype);
836
+ sr.prototype = Object.create(Q.prototype);
837
837
  sr.prototype.constructor = sr;
838
838
  var S = {
839
- Table: Z,
840
- Record: Z,
839
+ Table: Q,
840
+ Record: Q,
841
841
  Coverage: tr,
842
842
  ScriptList: nr,
843
843
  FeatureList: ar,
@@ -852,37 +852,37 @@ function tt(e, r) {
852
852
  function or(e, r) {
853
853
  return e.getUint16(r, !1);
854
854
  }
855
- function ra(e, r) {
855
+ function na(e, r) {
856
856
  return e.getInt16(r, !1);
857
857
  }
858
858
  function Hr(e, r) {
859
859
  return e.getUint32(r, !1);
860
860
  }
861
- function Yt(e, r) {
861
+ function $t(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 ta(e, r) {
865
+ function aa(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 na(e, r, t) {
870
+ function sa(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 aa(e, r, t) {
875
+ function oa(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 sa(e) {
880
+ function ia(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 oa = {
885
+ var ua = {
886
886
  byte: 1,
887
887
  uShort: 2,
888
888
  short: 2,
@@ -924,7 +924,7 @@ v.prototype.parseULong = function() {
924
924
  };
925
925
  v.prototype.parseOffset32 = v.prototype.parseULong;
926
926
  v.prototype.parseFixed = function() {
927
- var e = Yt(this.data, this.offset + this.relativeOffset);
927
+ var e = $t(this.data, this.offset + this.relativeOffset);
928
928
  return this.relativeOffset += 4, e;
929
929
  };
930
930
  v.prototype.parseString = function(e) {
@@ -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 += oa[e] * r;
949
+ r === void 0 && (r = 1), this.relativeOffset += ua[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: ra,
1187
+ getShort: na,
1188
1188
  getULong: Hr,
1189
- getFixed: Yt,
1190
- getTag: ta,
1191
- getOffset: na,
1192
- getBytes: aa,
1193
- bytesToString: sa,
1189
+ getFixed: $t,
1190
+ getTag: aa,
1191
+ getOffset: sa,
1192
+ getBytes: oa,
1193
+ bytesToString: ia,
1194
1194
  Parser: v
1195
1195
  };
1196
- function ia(e, r) {
1196
+ function la(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 ia(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 ua(e, r, t, n, a) {
1204
+ function fa(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 ua(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 la(e, r) {
1212
+ function pa(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 la(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
- ia(t, u);
1226
+ la(t, u);
1227
1227
  else if (t.format === 4)
1228
- ua(t, u, e, r, n);
1228
+ fa(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 fa(e, r, t) {
1233
+ function ca(e, r, t) {
1234
1234
  e.segments.push({
1235
1235
  end: r,
1236
1236
  start: r,
@@ -1239,7 +1239,7 @@ function fa(e, r, t) {
1239
1239
  glyphIndex: t
1240
1240
  });
1241
1241
  }
1242
- function pa(e) {
1242
+ function ha(e) {
1243
1243
  e.segments.push({
1244
1244
  end: 65535,
1245
1245
  start: 65535,
@@ -1247,7 +1247,7 @@ function pa(e) {
1247
1247
  offset: 0
1248
1248
  });
1249
1249
  }
1250
- function ca(e) {
1250
+ function va(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 ca(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
- fa(s, o.unicodes[u], t);
1286
+ ca(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
- pa(s);
1291
+ ha(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 ca(e) {
1309
1309
  }
1310
1310
  return s;
1311
1311
  }
1312
- var $t = { parse: la, make: ca }, er = [
1312
+ var Zt = { parse: pa, make: va }, er = [
1313
1313
  ".notdef",
1314
1314
  "space",
1315
1315
  "exclam",
@@ -1701,7 +1701,7 @@ var $t = { parse: la, make: ca }, er = [
1701
1701
  "Regular",
1702
1702
  "Roman",
1703
1703
  "Semibold"
1704
- ], ha = [
1704
+ ], da = [
1705
1705
  "",
1706
1706
  "",
1707
1707
  "",
@@ -1954,7 +1954,7 @@ var $t = { parse: la, make: ca }, er = [
1954
1954
  "oslash",
1955
1955
  "oe",
1956
1956
  "germandbls"
1957
- ], va = [
1957
+ ], ga = [
1958
1958
  "",
1959
1959
  "",
1960
1960
  "",
@@ -2470,10 +2470,10 @@ var $t = { parse: la, make: ca }, er = [
2470
2470
  "ccaron",
2471
2471
  "dcroat"
2472
2472
  ];
2473
- function Zt(e) {
2473
+ function Qt(e) {
2474
2474
  this.font = e;
2475
2475
  }
2476
- Zt.prototype.charToGlyphIndex = function(e) {
2476
+ Qt.prototype.charToGlyphIndex = function(e) {
2477
2477
  var r = e.codePointAt(0), t = this.font.glyphs;
2478
2478
  if (t) {
2479
2479
  for (var n = 0; n < t.length; n += 1)
@@ -2483,10 +2483,10 @@ Zt.prototype.charToGlyphIndex = function(e) {
2483
2483
  }
2484
2484
  return null;
2485
2485
  };
2486
- function Qt(e) {
2486
+ function Kt(e) {
2487
2487
  this.cmap = e;
2488
2488
  }
2489
- Qt.prototype.charToGlyphIndex = function(e) {
2489
+ Kt.prototype.charToGlyphIndex = function(e) {
2490
2490
  return this.cmap.glyphIndexMap[e.codePointAt(0)] || 0;
2491
2491
  };
2492
2492
  function ir(e, r) {
@@ -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 da(e) {
2528
+ function ma(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 da(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 ga(e) {
2536
+ function ya(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 ga(e) {
2542
2542
  } : e._IndexToUnicodeMap[s].unicodes.push(parseInt(a));
2543
2543
  }
2544
2544
  }
2545
- function ma(e, r) {
2546
- r.lowMemory ? ga(e) : da(e);
2545
+ function xa(e, r) {
2546
+ r.lowMemory ? ya(e) : ma(e);
2547
2547
  }
2548
- function ya(e, r, t, n, a) {
2548
+ function ba(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: ya };
2552
- function xa(e, r) {
2551
+ var Te = { line: ba };
2552
+ function Sa(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", xa(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", Sa(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 ba(e, r) {
2687
+ function Ta(e, r) {
2688
2688
  return new K({ index: r, font: e });
2689
2689
  }
2690
- function Sa(e, r, t, n, a, s) {
2690
+ function ka(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 Sa(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 Ta(e, r, t, n) {
2700
+ function Fa(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,15 +2706,15 @@ function Ta(e, r, t, n) {
2706
2706
  }, a;
2707
2707
  };
2708
2708
  }
2709
- var le = { GlyphSet: zr, glyphLoader: ba, ttfGlyphLoader: Sa, cffGlyphLoader: Ta };
2710
- function Kt(e, r) {
2709
+ var le = { GlyphSet: zr, glyphLoader: Ta, ttfGlyphLoader: ka, cffGlyphLoader: Fa };
2710
+ function jt(e, r) {
2711
2711
  if (e === r)
2712
2712
  return !0;
2713
2713
  if (Array.isArray(e) && Array.isArray(r)) {
2714
2714
  if (e.length !== r.length)
2715
2715
  return !1;
2716
2716
  for (var t = 0; t < e.length; t += 1)
2717
- if (!Kt(e[t], r[t]))
2717
+ if (!jt(e[t], r[t]))
2718
2718
  return !1;
2719
2719
  return !0;
2720
2720
  } else
@@ -2740,7 +2740,7 @@ function ye(e, r, t) {
2740
2740
  }
2741
2741
  return { objects: a, startOffset: r, endOffset: u };
2742
2742
  }
2743
- function ka(e, r) {
2743
+ function Ua(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 ka(e, r) {
2752
2752
  s = r + 2;
2753
2753
  return { offsets: t, startOffset: r, endOffset: s };
2754
2754
  }
2755
- function Fa(e, r, t, n, a) {
2755
+ function Ca(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 Fa(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 Ua(e) {
2764
+ function wa(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 Ua(e) {
2770
2770
  }
2771
2771
  return parseFloat(r);
2772
2772
  }
2773
- function Ca(e, r) {
2773
+ function Ea(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 Ua(e);
2780
+ return wa(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 Ca(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 wa(e) {
2789
+ function Oa(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]))
@@ -2795,19 +2795,19 @@ function wa(e) {
2795
2795
  }
2796
2796
  return r;
2797
2797
  }
2798
- function jt(e, r, t) {
2798
+ function Jt(e, r, t) {
2799
2799
  r = r !== void 0 ? r : 0;
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(Ca(n, o));
2803
+ o <= 21 ? (o === 12 && (o = 1200 + n.parseByte()), a.push([o, s]), s = []) : s.push(Ea(n, o));
2804
2804
  }
2805
- return wa(a);
2805
+ return Oa(a);
2806
2806
  }
2807
2807
  function Ge(e, r) {
2808
2808
  return r <= 390 ? r = er[r] : r = e[r - 391], r;
2809
2809
  }
2810
- function Jt(e, r, t) {
2810
+ function en(e, r, t) {
2811
2811
  for (var n = {}, a, s = 0; s < r.length; s += 1) {
2812
2812
  var o = r[s];
2813
2813
  if (Array.isArray(o.type)) {
@@ -2821,11 +2821,11 @@ function Jt(e, r, t) {
2821
2821
  }
2822
2822
  return n;
2823
2823
  }
2824
- function Ea(e, r) {
2824
+ function La(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
  }
2828
- var en = [
2828
+ var rn = [
2829
2829
  { name: "version", op: 0, type: "SID" },
2830
2830
  { name: "notice", op: 1, type: "SID" },
2831
2831
  { name: "copyright", op: 1200, type: "SID" },
@@ -2861,26 +2861,26 @@ var en = [
2861
2861
  { name: "fdArray", op: 1236, type: "offset" },
2862
2862
  { name: "fdSelect", op: 1237, type: "offset" },
2863
2863
  { name: "fontName", op: 1238, type: "SID" }
2864
- ], rn = [
2864
+ ], tn = [
2865
2865
  { name: "subrs", op: 19, type: "offset", value: 0 },
2866
2866
  { name: "defaultWidthX", op: 20, type: "number", value: 0 },
2867
2867
  { name: "nominalWidthX", op: 21, type: "number", value: 0 }
2868
2868
  ];
2869
- function Oa(e, r) {
2870
- var t = jt(e, 0, e.byteLength);
2871
- return Jt(t, en, r);
2869
+ function Ra(e, r) {
2870
+ var t = Jt(e, 0, e.byteLength);
2871
+ return en(t, rn, r);
2872
2872
  }
2873
- function tn(e, r, t, n) {
2874
- var a = jt(e, r, t);
2875
- return Jt(a, rn, n);
2873
+ function nn(e, r, t, n) {
2874
+ var a = Jt(e, r, t);
2875
+ return en(a, tn, 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 = Oa(o, n);
2879
+ var o = new DataView(new Uint8Array(t[s]).buffer), u = Ra(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) {
2883
- var f = tn(e, l + r, i, n);
2883
+ var f = nn(e, l + r, i, n);
2884
2884
  if (u._defaultWidthX = f.defaultWidthX, u._nominalWidthX = f.nominalWidthX, f.subrs !== 0) {
2885
2885
  var c = l + f.subrs, p = ye(e, c + r);
2886
2886
  u._subrs = p.objects, u._subrsBias = Lr(u._subrs);
@@ -2891,7 +2891,7 @@ function at(e, r, t, n) {
2891
2891
  }
2892
2892
  return a;
2893
2893
  }
2894
- function La(e, r, t, n) {
2894
+ function Da(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 La(e, r, t, n) {
2914
2914
  throw new Error("Unknown charset format " + i);
2915
2915
  return u;
2916
2916
  }
2917
- function Ra(e, r, t) {
2917
+ function Aa(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)
@@ -2937,22 +2937,22 @@ function st(e, r, t) {
2937
2937
  } else
2938
2938
  d = e.tables.cff.topDict._subrs, g = e.tables.cff.topDict._subrsBias, m = e.tables.cff.topDict._defaultWidthX, x = e.tables.cff.topDict._nominalWidthX;
2939
2939
  var L = m;
2940
- function w(F, D) {
2941
- c && u.closePath(), u.moveTo(F, D), c = !0;
2940
+ function w(F, R) {
2941
+ c && u.closePath(), u.moveTo(F, R), c = !0;
2942
2942
  }
2943
- function B() {
2943
+ function M() {
2944
2944
  var F;
2945
2945
  F = i.length % 2 !== 0, F && !f && (L = i.shift() + x), l += i.length >> 1, i.length = 0, f = !0;
2946
2946
  }
2947
2947
  function C(F) {
2948
- for (var D, R, A, H, Q, G, z, Y, _, P, V, $, M = 0; M < F.length; ) {
2949
- var q = F[M];
2950
- switch (M += 1, q) {
2948
+ for (var R, A, D, H, Z, G, z, Y, _, P, V, $, B = 0; B < F.length; ) {
2949
+ var q = F[B];
2950
+ switch (B += 1, q) {
2951
2951
  case 1:
2952
- B();
2952
+ M();
2953
2953
  break;
2954
2954
  case 3:
2955
- B();
2955
+ M();
2956
2956
  break;
2957
2957
  case 4:
2958
2958
  i.length > 1 && !f && (L = i.shift() + x, f = !0), h += i.pop(), w(p, h);
@@ -2974,12 +2974,12 @@ function st(e, r, t) {
2974
2974
  n = p + i.shift(), a = h + i.shift(), s = n + i.shift(), o = a + i.shift(), p = s + i.shift(), h = o + i.shift(), u.curveTo(n, a, s, o, p, h);
2975
2975
  break;
2976
2976
  case 10:
2977
- Q = i.pop() + g, G = d[Q], G && C(G);
2977
+ Z = i.pop() + g, G = d[Z], G && C(G);
2978
2978
  break;
2979
2979
  case 11:
2980
2980
  return;
2981
2981
  case 12:
2982
- switch (q = F[M], M += 1, q) {
2982
+ switch (q = F[B], B += 1, q) {
2983
2983
  case 35:
2984
2984
  n = p + i.shift(), a = h + i.shift(), s = n + i.shift(), o = a + i.shift(), z = s + i.shift(), Y = o + i.shift(), _ = z + i.shift(), P = Y + i.shift(), V = _ + i.shift(), $ = P + i.shift(), p = V + i.shift(), h = $ + i.shift(), i.shift(), u.curveTo(n, a, s, o, z, Y), u.curveTo(_, P, V, $, p, h);
2985
2985
  break;
@@ -3000,12 +3000,12 @@ function st(e, r, t) {
3000
3000
  i.length > 0 && !f && (L = i.shift() + x, f = !0), c && (u.closePath(), c = !1);
3001
3001
  break;
3002
3002
  case 18:
3003
- B();
3003
+ M();
3004
3004
  break;
3005
3005
  case 19:
3006
3006
  // hintmask
3007
3007
  case 20:
3008
- B(), M += l + 7 >> 3;
3008
+ M(), B += l + 7 >> 3;
3009
3009
  break;
3010
3010
  case 21:
3011
3011
  i.length > 2 && !f && (L = i.shift() + x, f = !0), h += i.pop(), p += i.pop(), w(p, h);
@@ -3014,7 +3014,7 @@ function st(e, r, t) {
3014
3014
  i.length > 1 && !f && (L = i.shift() + x, f = !0), p += i.pop(), w(p, h);
3015
3015
  break;
3016
3016
  case 23:
3017
- B();
3017
+ M();
3018
3018
  break;
3019
3019
  case 24:
3020
3020
  for (; i.length > 2; )
@@ -3035,10 +3035,10 @@ function st(e, r, t) {
3035
3035
  n = p + i.shift(), a = h, s = n + i.shift(), o = a + i.shift(), p = s + i.shift(), h = o, u.curveTo(n, a, s, o, p, h);
3036
3036
  break;
3037
3037
  case 28:
3038
- D = F[M], R = F[M + 1], i.push((D << 24 | R << 16) >> 16), M += 2;
3038
+ R = F[B], A = F[B + 1], i.push((R << 24 | A << 16) >> 16), B += 2;
3039
3039
  break;
3040
3040
  case 29:
3041
- Q = i.pop() + e.gsubrsBias, G = e.gsubrs[Q], G && C(G);
3041
+ Z = i.pop() + e.gsubrsBias, G = e.gsubrs[Z], G && C(G);
3042
3042
  break;
3043
3043
  case 30:
3044
3044
  for (; i.length > 0 && (n = p, a = h + i.shift(), s = n + i.shift(), o = a + i.shift(), p = s + i.shift(), h = o + (i.length === 1 ? i.shift() : 0), u.curveTo(n, a, s, o, p, h), i.length !== 0); )
@@ -3049,13 +3049,13 @@ function st(e, r, t) {
3049
3049
  n = p, a = h + i.shift(), s = n + i.shift(), o = a + i.shift(), p = s + i.shift(), h = o + (i.length === 1 ? i.shift() : 0), u.curveTo(n, a, s, o, p, h);
3050
3050
  break;
3051
3051
  default:
3052
- q < 32 ? console.log("Glyph " + r.index + ": unknown operator " + q) : q < 247 ? i.push(q - 139) : q < 251 ? (D = F[M], M += 1, i.push((q - 247) * 256 + D + 108)) : q < 255 ? (D = F[M], M += 1, i.push(-(q - 251) * 256 - D - 108)) : (D = F[M], R = F[M + 1], A = F[M + 2], H = F[M + 3], M += 4, i.push((D << 24 | R << 16 | A << 8 | H) / 65536));
3052
+ q < 32 ? console.log("Glyph " + r.index + ": unknown operator " + q) : q < 247 ? i.push(q - 139) : q < 251 ? (R = F[B], B += 1, i.push((q - 247) * 256 + R + 108)) : q < 255 ? (R = F[B], B += 1, i.push(-(q - 251) * 256 - R - 108)) : (R = F[B], A = F[B + 1], D = F[B + 2], H = F[B + 3], B += 4, i.push((R << 24 | A << 16 | D << 8 | H) / 65536));
3053
3053
  }
3054
3054
  }
3055
3055
  }
3056
3056
  return C(t), r.advanceWidth = L, u;
3057
3057
  }
3058
- function Da(e, r, t, n) {
3058
+ function Ma(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 Da(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 Aa(e, r, t, n) {
3085
+ function Ba(e, r, t, n) {
3086
3086
  t.tables.cff = {};
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);
3087
+ var a = La(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,33 +3096,33 @@ function Aa(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 = Da(e, p, t.numGlyphs, d.length);
3099
+ f._fdArray = d, p += r, f._fdSelect = Ma(e, p, t.numGlyphs, d.length);
3100
3100
  }
3101
- var g = r + f.private[1], m = tn(e, g, f.private[0], u.objects);
3101
+ var g = r + f.private[1], m = nn(e, g, f.private[0], u.objects);
3102
3102
  if (t.defaultWidthX = m.defaultWidthX, t.nominalWidthX = m.nominalWidthX, m.subrs !== 0) {
3103
3103
  var x = g + m.subrs, U = ye(e, x);
3104
3104
  t.subrs = U.objects, t.subrsBias = Lr(t.subrs);
3105
3105
  } else
3106
3106
  t.subrs = [], t.subrsBias = 0;
3107
3107
  var y;
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)
3108
+ n.lowMemory ? (y = Ua(e, r + f.charStrings), t.nGlyphs = y.offsets.length) : (y = ye(e, r + f.charStrings), t.nGlyphs = y.objects.length);
3109
+ var L = Da(e, r + f.charset, t.nGlyphs, u.objects);
3110
+ if (f.encoding === 0 ? t.cffEncoding = new ir(da, L) : f.encoding === 1 ? t.cffEncoding = new ir(ga, L) : t.cffEncoding = Aa(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 = Fa(C, y.offsets, e, r + f.charStrings);
3112
+ var F = Ca(C, y.offsets, e, r + f.charStrings);
3113
3113
  t.glyphs.push(C, le.cffGlyphLoader(t, C, st, F));
3114
3114
  };
3115
3115
  else
3116
3116
  for (var w = 0; w < t.nGlyphs; w += 1) {
3117
- var B = y.objects[w];
3118
- t.glyphs.push(w, le.cffGlyphLoader(t, w, st, B));
3117
+ var M = y.objects[w];
3118
+ t.glyphs.push(w, le.cffGlyphLoader(t, w, st, M));
3119
3119
  }
3120
3120
  }
3121
- function nn(e, r) {
3121
+ function an(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 Ba() {
3125
+ function Ia() {
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 Ba() {
3130
3130
  { name: "major", type: "Card8", value: 1 }
3131
3131
  ]);
3132
3132
  }
3133
- function Ma(e) {
3133
+ function Pa(e) {
3134
3134
  var r = new S.Record("Name INDEX", [
3135
3135
  { name: "names", type: "INDEX", value: [] }
3136
3136
  ]);
@@ -3139,10 +3139,10 @@ function Ma(e) {
3139
3139
  r.names.push({ name: "name_" + t, type: "NAME", value: e[t] });
3140
3140
  return r;
3141
3141
  }
3142
- function an(e, r, t) {
3142
+ function sn(e, r, t) {
3143
3143
  for (var n = {}, a = 0; a < e.length; a += 1) {
3144
3144
  var s = e[a], o = r[s.name];
3145
- o !== void 0 && !Kt(o, s.value) && (s.type === "SID" && (o = nn(o, t)), n[s.op] = { name: s.name, type: s.type, value: o });
3145
+ o !== void 0 && !jt(o, s.value) && (s.type === "SID" && (o = an(o, t)), n[s.op] = { name: s.name, type: s.type, value: o });
3146
3146
  }
3147
3147
  return n;
3148
3148
  }
@@ -3150,7 +3150,7 @@ function ot(e, r) {
3150
3150
  var t = new S.Record("Top DICT", [
3151
3151
  { name: "dict", type: "DICT", value: {} }
3152
3152
  ]);
3153
- return t.dict = an(en, e, r), t;
3153
+ return t.dict = sn(rn, e, r), t;
3154
3154
  }
3155
3155
  function it(e) {
3156
3156
  var r = new S.Record("Top DICT INDEX", [
@@ -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 Ia(e) {
3161
+ function Ga(e) {
3162
3162
  var r = new S.Record("String INDEX", [
3163
3163
  { name: "strings", type: "INDEX", value: [] }
3164
3164
  ]);
@@ -3167,21 +3167,21 @@ function Ia(e) {
3167
3167
  r.strings.push({ name: "string_" + t, type: "STRING", value: e[t] });
3168
3168
  return r;
3169
3169
  }
3170
- function Pa() {
3170
+ function Na() {
3171
3171
  return new S.Record("Global Subr INDEX", [
3172
3172
  { name: "subrs", type: "INDEX", value: [] }
3173
3173
  ]);
3174
3174
  }
3175
- function Ga(e, r) {
3175
+ function Ha(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) {
3179
- var a = e[n], s = nn(a, r);
3179
+ var a = e[n], s = an(a, r);
3180
3180
  t.fields.push({ name: "glyph_" + n, type: "SID", value: s });
3181
3181
  }
3182
3182
  return t;
3183
3183
  }
3184
- function Na(e) {
3184
+ function Wa(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 Na(e) {
3209
3209
  }
3210
3210
  return r.push({ name: "endchar", type: "OP", value: 14 }), r;
3211
3211
  }
3212
- function Ha(e) {
3212
+ function za(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 = Na(n);
3216
+ var n = e.get(t), a = Wa(n);
3217
3217
  r.charStrings.push({ name: n.name, type: "CHARSTRING", value: a });
3218
3218
  }
3219
3219
  return r;
3220
3220
  }
3221
- function Wa(e, r) {
3221
+ function _a(e, r) {
3222
3222
  var t = new S.Record("Private DICT", [
3223
3223
  { name: "dict", type: "DICT", value: {} }
3224
3224
  ]);
3225
- return t.dict = an(rn, e, r), t;
3225
+ return t.dict = sn(tn, e, r), t;
3226
3226
  }
3227
- function za(e, r) {
3227
+ function Va(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 za(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 = Ba(), t.nameIndex = Ma([r.postScriptName]);
3251
+ t.header = Ia(), t.nameIndex = Pa([r.postScriptName]);
3252
3252
  var f = ot(a, 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);
3253
+ t.topDictIndex = it(f), t.globalSubrIndex = Na(), t.charsets = Ha(o, l), t.charStringsIndex = za(e), t.privateDict = _a(s, l), t.stringIndex = Ga(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: Aa, make: za };
3258
- function _a(e, r) {
3257
+ var on = { parse: Ba, make: Va };
3258
+ function qa(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 Va(e) {
3262
+ function Xa(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 Va(e) {
3281
3281
  { name: "glyphDataFormat", type: "SHORT", value: 0 }
3282
3282
  ], e);
3283
3283
  }
3284
- var on = { parse: _a, make: Va };
3285
- function qa(e, r) {
3284
+ var un = { parse: qa, make: Xa };
3285
+ function Ya(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 Xa(e) {
3289
+ function $a(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 Xa(e) {
3307
3307
  { name: "numberOfHMetrics", type: "USHORT", value: 0 }
3308
3308
  ], e);
3309
3309
  }
3310
- var un = { parse: qa, make: Xa };
3311
- function Ya(e, r, t, n, a) {
3310
+ var ln = { parse: Ya, make: $a };
3311
+ function Za(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 $a(e, r, t, n, a) {
3318
+ function Qa(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 $a(e, r, t, n, a) {
3323
3323
  leftSideBearing: o
3324
3324
  };
3325
3325
  }
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);
3326
+ function Ka(e, r, t, n, a, s, o) {
3327
+ o.lowMemory ? Qa(e, r, t, n, a) : Za(r, t, n, a, s);
3328
3328
  }
3329
- function Qa(e) {
3329
+ function ja(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: Za, make: Qa };
3337
- function Ka(e) {
3336
+ var fn = { parse: Ka, make: ja };
3337
+ function Ja(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 Ka(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 es(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: Ka, parse: ja };
3359
- function Ja(e, r) {
3358
+ var pn = { make: Ja, parse: es };
3359
+ function rs(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 es(e) {
3363
+ function ts(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: Ja, make: es }, cn = [
3369
+ var cn = { parse: rs, make: ts }, hn = [
3370
3370
  "copyright",
3371
3371
  // 0
3372
3372
  "fontFamily",
@@ -3413,7 +3413,7 @@ var pn = { parse: Ja, make: es }, cn = [
3413
3413
  // 21
3414
3414
  "wwsSubfamily"
3415
3415
  // 22
3416
- ], hn = {
3416
+ ], vn = {
3417
3417
  0: "en",
3418
3418
  1: "fr",
3419
3419
  2: "de",
@@ -3533,7 +3533,7 @@ var pn = { parse: Ja, make: es }, cn = [
3533
3533
  149: "kl",
3534
3534
  150: "az",
3535
3535
  151: "nn"
3536
- }, rs = {
3536
+ }, ns = {
3537
3537
  0: 0,
3538
3538
  // langEnglish → smRoman
3539
3539
  1: 0,
@@ -3772,7 +3772,7 @@ var pn = { parse: Ja, make: es }, cn = [
3772
3772
  // langAzerbaijanRoman → smRoman
3773
3773
  151: 0
3774
3774
  // langNynorsk → smRoman
3775
- }, vn = {
3775
+ }, dn = {
3776
3776
  1078: "af",
3777
3777
  1052: "sq",
3778
3778
  1156: "gsw",
@@ -3986,7 +3986,7 @@ var pn = { parse: Ja, make: es }, cn = [
3986
3986
  1144: "ii",
3987
3987
  1130: "yo"
3988
3988
  };
3989
- function ts(e, r, t) {
3989
+ function as(e, r, t) {
3990
3990
  switch (e) {
3991
3991
  case 0:
3992
3992
  if (r === 65535)
@@ -3995,12 +3995,12 @@ function ts(e, r, t) {
3995
3995
  return t[r];
3996
3996
  break;
3997
3997
  case 1:
3998
- return hn[r];
3999
- case 3:
4000
3998
  return vn[r];
3999
+ case 3:
4000
+ return dn[r];
4001
4001
  }
4002
4002
  }
4003
- var Rr = "utf-16", ns = {
4003
+ var Rr = "utf-16", ss = {
4004
4004
  0: "macintosh",
4005
4005
  // smRoman
4006
4006
  1: "x-mac-japanese",
@@ -4059,7 +4059,7 @@ var Rr = "utf-16", ns = {
4059
4059
  // smVietnamese
4060
4060
  31: "x-mac-extarabic"
4061
4061
  // smExtArabic
4062
- }, as = {
4062
+ }, os = {
4063
4063
  15: "x-mac-icelandic",
4064
4064
  // langIcelandic
4065
4065
  17: "x-mac-turkish",
@@ -4091,21 +4091,21 @@ var Rr = "utf-16", ns = {
4091
4091
  146: "x-mac-gaelic"
4092
4092
  // langIrishGaelicScript
4093
4093
  };
4094
- function dn(e, r, t) {
4094
+ function gn(e, r, t) {
4095
4095
  switch (e) {
4096
4096
  case 0:
4097
4097
  return Rr;
4098
4098
  case 1:
4099
- return as[t] || ns[r];
4099
+ return os[t] || ss[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 ss(e, r, t) {
4106
+ function is(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 = ts(l, c, t), x = dn(l, f, c);
4108
+ var l = a.parseUShort(), f = a.parseUShort(), c = a.parseUShort(), p = a.parseUShort(), h = hn[p] || p, d = a.parseUShort(), g = a.parseUShort(), m = as(l, c, t), x = gn(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 os(e, r) {
4135
+ function us(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 os(e, r) {
4145
4145
  return -1;
4146
4146
  }
4147
4147
  function lt(e, r) {
4148
- var t = os(e, r);
4148
+ var t = us(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,19 +4153,19 @@ function lt(e, r) {
4153
4153
  }
4154
4154
  return t;
4155
4155
  }
4156
- function is(e, r) {
4157
- var t, n = [], a = {}, s = dr(cn);
4156
+ function ls(e, r) {
4157
+ var t, n = [], a = {}, s = dr(hn);
4158
4158
  for (var o in e) {
4159
4159
  var u = s[o];
4160
4160
  if (u === void 0 && (u = o), t = parseInt(u), isNaN(t))
4161
4161
  throw new Error('Name table entry "' + o + '" does not exist, see nameTableNames for complete list.');
4162
4162
  a[t] = e[o], n.push(t);
4163
4163
  }
4164
- for (var i = dr(hn), l = dr(vn), f = [], c = [], p = 0; p < n.length; p++) {
4164
+ for (var i = dr(vn), l = dr(dn), f = [], c = [], p = 0; p < n.length; p++) {
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 = rs[x], y = dn(m, U, x), L = b.MACSTRING(g, y);
4168
+ var g = h[d], m = 1, x = i[d], U = ns[x], y = gn(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(
@@ -4176,13 +4176,13 @@ function is(e, r) {
4176
4176
  L.length,
4177
4177
  w
4178
4178
  ));
4179
- var B = l[d];
4180
- if (B !== void 0) {
4179
+ var M = l[d];
4180
+ if (M !== void 0) {
4181
4181
  var C = b.UTF16(g), F = lt(C, c);
4182
4182
  f.push(ut(
4183
4183
  3,
4184
4184
  1,
4185
- B,
4185
+ M,
4186
4186
  t,
4187
4187
  C.length,
4188
4188
  F
@@ -4190,18 +4190,18 @@ function is(e, r) {
4190
4190
  }
4191
4191
  }
4192
4192
  }
4193
- f.sort(function(A, H) {
4194
- return A.platformID - H.platformID || A.encodingID - H.encodingID || A.languageID - H.languageID || A.nameID - H.nameID;
4193
+ f.sort(function(D, H) {
4194
+ return D.platformID - H.platformID || D.encodingID - H.encodingID || D.languageID - H.languageID || D.nameID - H.nameID;
4195
4195
  });
4196
- for (var D = new S.Table("name", [
4196
+ for (var R = new S.Table("name", [
4197
4197
  { name: "format", type: "USHORT", value: 0 },
4198
4198
  { name: "count", type: "USHORT", value: f.length },
4199
4199
  { name: "stringOffset", type: "USHORT", value: 6 + f.length * 12 }
4200
- ]), R = 0; R < f.length; R++)
4201
- D.fields.push({ name: "record_" + R, type: "RECORD", value: f[R] });
4202
- return D.fields.push({ name: "strings", type: "LITERAL", value: c }), D;
4200
+ ]), A = 0; A < f.length; A++)
4201
+ R.fields.push({ name: "record_" + A, type: "RECORD", value: f[A] });
4202
+ return R.fields.push({ name: "strings", type: "LITERAL", value: c }), R;
4203
4203
  }
4204
- var gn = { parse: ss, make: is }, Dr = [
4204
+ var mn = { parse: is, make: ls }, Dr = [
4205
4205
  { begin: 0, end: 127 },
4206
4206
  // Basic Latin
4207
4207
  { begin: 128, end: 255 },
@@ -4449,7 +4449,7 @@ var gn = { parse: ss, make: is }, Dr = [
4449
4449
  { begin: 127024, end: 127135 }
4450
4450
  // Domino Tiles
4451
4451
  ];
4452
- function us(e) {
4452
+ function fs(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 us(e) {
4457
4457
  }
4458
4458
  return -1;
4459
4459
  }
4460
- function ls(e, r) {
4460
+ function ps(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 fs(e) {
4467
+ function cs(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 fs(e) {
4514
4514
  { name: "usMaxContext", type: "USHORT", value: 0 }
4515
4515
  ], e);
4516
4516
  }
4517
- var Ar = { parse: ls, make: fs, unicodeRanges: Dr, getUnicodeRange: us };
4518
- function ps(e, r) {
4517
+ var Ar = { parse: ps, make: cs, unicodeRanges: Dr, getUnicodeRange: fs };
4518
+ function hs(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 ps(e, r) {
4540
4540
  }
4541
4541
  return t;
4542
4542
  }
4543
- function cs() {
4543
+ function vs() {
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 cs() {
4553
4553
  { name: "maxMemType1", type: "ULONG", value: 0 }
4554
4554
  ]);
4555
4555
  }
4556
- var mn = { parse: ps, make: cs }, ee = new Array(9);
4556
+ var yn = { parse: hs, make: vs }, 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 hs(e, r) {
4704
+ function ds(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 vs(e) {
4794
+ function gs(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 vs(e) {
4799
4799
  { name: "lookups", type: "TABLE", value: new S.LookupList(e.lookups, Le) }
4800
4800
  ]);
4801
4801
  }
4802
- var yn = { parse: hs, make: vs };
4803
- function ds(e, r) {
4802
+ var xn = { parse: ds, make: gs };
4803
+ function ms(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 ds(e, r) {
4809
4809
  }
4810
4810
  return s;
4811
4811
  }
4812
- function gs(e) {
4812
+ function ys(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 gs(e) {
4822
4822
  }
4823
4823
  return a.fields.push({ name: "stringPool", type: "CHARARRAY", value: t }), a;
4824
4824
  }
4825
- var xn = { parse: ds, make: gs };
4825
+ var bn = { parse: ms, make: ys };
4826
4826
  function ft(e) {
4827
4827
  return Math.log(e) / Math.log(2) | 0;
4828
4828
  }
@@ -4841,7 +4841,7 @@ function pt(e, r, t, n) {
4841
4841
  { name: "length", type: "ULONG", value: n !== void 0 ? n : 0 }
4842
4842
  ]);
4843
4843
  }
4844
- function bn(e) {
4844
+ function Sn(e) {
4845
4845
  var r = new S.Table("sfnt", [
4846
4846
  { name: "version", type: "TAG", value: "OTTO" },
4847
4847
  { name: "numTables", type: "USHORT", value: 0 },
@@ -4875,12 +4875,12 @@ function ct(e, r, t) {
4875
4875
  }
4876
4876
  return t;
4877
4877
  }
4878
- function ms(e) {
4878
+ function xs(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 ys(e) {
4883
+ function bs(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,13 +4908,13 @@ function ys(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: ms(s),
4911
+ advanceWidthAvg: xs(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)
4915
4915
  };
4916
4916
  y.ascender = e.ascender, y.descender = e.descender;
4917
- var L = on.make({
4917
+ var L = un.make({
4918
4918
  flags: 3,
4919
4919
  // 00000011 (baseline for font at y=0; left sidebearing point at x=0)
4920
4920
  unitsPerEm: e.unitsPerEm,
@@ -4924,7 +4924,7 @@ function ys(e) {
4924
4924
  yMax: y.yMax,
4925
4925
  lowestRecPPEM: 3,
4926
4926
  createdTimestamp: e.createdTimestamp
4927
- }), w = un.make({
4927
+ }), w = ln.make({
4928
4928
  ascender: y.ascender,
4929
4929
  descender: y.descender,
4930
4930
  advanceWidthMax: y.advanceWidthMax,
@@ -4932,7 +4932,7 @@ function ys(e) {
4932
4932
  minRightSideBearing: y.minRightSideBearing,
4933
4933
  xMaxExtent: y.maxLeftSideBearing + (y.xMax - y.xMin),
4934
4934
  numberOfHMetrics: e.glyphs.length
4935
- }), B = pn.make(e.glyphs.length), C = Ar.make(Object.assign({
4935
+ }), M = cn.make(e.glyphs.length), C = Ar.make(Object.assign({
4936
4936
  xAvgCharWidth: Math.round(y.advanceWidthAvg),
4937
4937
  usFirstCharIndex: i,
4938
4938
  usLastCharIndex: l,
@@ -4957,32 +4957,32 @@ function ys(e) {
4957
4957
  // Use space as the default character, if available.
4958
4958
  usBreakChar: e.hasChar(" ") ? 32 : 0
4959
4959
  // Use space as the break character, if available.
4960
- }, e.tables.os2)), F = ln.make(e.glyphs), D = $t.make(e.glyphs), R = e.getEnglishName("fontFamily"), A = e.getEnglishName("fontSubfamily"), H = R + " " + A, Q = e.getEnglishName("postScriptName");
4961
- Q || (Q = R.replace(/\s/g, "") + "-" + A);
4960
+ }, e.tables.os2)), F = fn.make(e.glyphs), R = Zt.make(e.glyphs), A = e.getEnglishName("fontFamily"), D = e.getEnglishName("fontSubfamily"), H = A + " " + D, Z = e.getEnglishName("postScriptName");
4961
+ Z || (Z = A.replace(/\s/g, "") + "-" + D);
4962
4962
  var G = {};
4963
4963
  for (var z in e.names)
4964
4964
  G[z] = e.names[z];
4965
- G.uniqueID || (G.uniqueID = { en: e.getEnglishName("manufacturer") + ":" + H }), G.postScriptName || (G.postScriptName = { en: Q }), G.preferredFamily || (G.preferredFamily = e.names.fontFamily), G.preferredSubfamily || (G.preferredSubfamily = e.names.fontSubfamily);
4966
- var Y = [], _ = gn.make(G, Y), P = Y.length > 0 ? fn.make(Y) : void 0, V = mn.make(), $ = sn.make(e.glyphs, {
4965
+ G.uniqueID || (G.uniqueID = { en: e.getEnglishName("manufacturer") + ":" + H }), G.postScriptName || (G.postScriptName = { en: Z }), G.preferredFamily || (G.preferredFamily = e.names.fontFamily), G.preferredSubfamily || (G.preferredSubfamily = e.names.fontSubfamily);
4966
+ var Y = [], _ = mn.make(G, Y), P = Y.length > 0 ? pn.make(Y) : void 0, V = yn.make(), $ = on.make(e.glyphs, {
4967
4967
  version: e.getEnglishName("version"),
4968
4968
  fullName: H,
4969
- familyName: R,
4970
- weightName: A,
4971
- postScriptName: Q,
4969
+ familyName: A,
4970
+ weightName: D,
4971
+ postScriptName: Z,
4972
4972
  unitsPerEm: e.unitsPerEm,
4973
4973
  fontBBox: [0, y.yMin, y.ascender, y.advanceWidthMax]
4974
- }), M = e.metas && Object.keys(e.metas).length > 0 ? xn.make(e.metas) : void 0, q = [L, w, B, C, _, D, V, $, F];
4975
- P && q.push(P), e.tables.gsub && q.push(yn.make(e.tables.gsub)), M && q.push(M);
4976
- for (var De = bn(q), pr = De.encode(), Ae = _r(pr), Be = De.fields, Me = !1, Ce = 0; Ce < Be.length; Ce += 1)
4977
- if (Be[Ce].name === "head table") {
4978
- Be[Ce].value.checkSumAdjustment = 2981146554 - Ae, Me = !0;
4974
+ }), B = e.metas && Object.keys(e.metas).length > 0 ? bn.make(e.metas) : void 0, q = [L, w, M, C, _, R, V, $, F];
4975
+ P && q.push(P), e.tables.gsub && q.push(xn.make(e.tables.gsub)), B && q.push(B);
4976
+ for (var De = Sn(q), pr = De.encode(), Ae = _r(pr), Me = De.fields, Be = !1, Ce = 0; Ce < Me.length; Ce += 1)
4977
+ if (Me[Ce].name === "head table") {
4978
+ Me[Ce].value.checkSumAdjustment = 2981146554 - Ae, Be = !0;
4979
4979
  break;
4980
4980
  }
4981
- if (!Me)
4981
+ if (!Be)
4982
4982
  throw new Error("Could not find head table with checkSum to adjust.");
4983
4983
  return De;
4984
4984
  }
4985
- var xs = { make: bn, fontToTable: ys, computeCheckSum: _r };
4985
+ var Ss = { make: Sn, fontToTable: bs, 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 bs(e, r) {
5268
+ function Ts(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 (bs(f[c].components, u))
5398
+ if (Ts(f[c].components, u))
5399
5399
  return;
5400
5400
  f.push(i);
5401
5401
  } else
@@ -5433,15 +5433,15 @@ 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 Ss() {
5436
+ function ks() {
5437
5437
  return typeof window < "u";
5438
5438
  }
5439
- function Sn(e) {
5439
+ function Tn(e) {
5440
5440
  for (var r = new ArrayBuffer(e.length), t = new Uint8Array(r), n = 0; n < e.length; ++n)
5441
5441
  t[n] = e[n];
5442
5442
  return r;
5443
5443
  }
5444
- function Ts(e) {
5444
+ function Fs(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;
@@ -5454,7 +5454,7 @@ function dt(e, r, t, n, a) {
5454
5454
  var s;
5455
5455
  return (r & n) > 0 ? (s = e.parseByte(), (r & a) === 0 && (s = -s), s = t + s) : (r & a) > 0 ? s = t : s = t + e.parseShort(), s;
5456
5456
  }
5457
- function Tn(e, r, t) {
5457
+ function kn(e, r, t) {
5458
5458
  var n = new k.Parser(r, t);
5459
5459
  e.numberOfContours = n.parseShort(), e._xMin = n.parseShort(), e._yMin = n.parseShort(), e._xMax = n.parseShort(), e._yMax = n.parseShort();
5460
5460
  var a, s;
@@ -5502,7 +5502,7 @@ function Tn(e, r, t) {
5502
5502
  }
5503
5503
  if (a & 256) {
5504
5504
  e.instructionLength = n.parseUShort(), e.instructions = [];
5505
- for (var B = 0; B < e.instructionLength; B += 1)
5505
+ for (var M = 0; M < e.instructionLength; M += 1)
5506
5506
  e.instructions.push(n.parseByte());
5507
5507
  }
5508
5508
  }
@@ -5519,18 +5519,18 @@ function mr(e, r) {
5519
5519
  }
5520
5520
  return t;
5521
5521
  }
5522
- function ks(e) {
5522
+ function Us(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 = []);
5526
5526
  }
5527
5527
  return E.argument(t.length === 0, "There are still points left in the current contour."), r;
5528
5528
  }
5529
- function kn(e) {
5529
+ function Fn(e) {
5530
5530
  var r = new X();
5531
5531
  if (!e)
5532
5532
  return r;
5533
- for (var t = ks(e), n = 0; n < t.length; ++n) {
5533
+ for (var t = Us(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);
@@ -5551,7 +5551,7 @@ function kn(e) {
5551
5551
  }
5552
5552
  return r;
5553
5553
  }
5554
- function Fn(e, r) {
5554
+ function Un(e, r) {
5555
5555
  if (r.isComposite)
5556
5556
  for (var t = 0; t < r.components.length; t += 1) {
5557
5557
  var n = r.components[t], a = e.get(n.glyphIndex);
@@ -5575,50 +5575,50 @@ function Fn(e, r) {
5575
5575
  r.points = r.points.concat(s);
5576
5576
  }
5577
5577
  }
5578
- return kn(r.points);
5578
+ return Fn(r.points);
5579
5579
  }
5580
- function Fs(e, r, t, n) {
5580
+ function Cs(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
- o !== u ? a.push(s, le.ttfGlyphLoader(n, s, Tn, e, r + o, Fn)) : a.push(s, le.glyphLoader(n, s));
5583
+ o !== u ? a.push(s, le.ttfGlyphLoader(n, s, kn, e, r + o, Un)) : a.push(s, le.glyphLoader(n, s));
5584
5584
  }
5585
5585
  return a;
5586
5586
  }
5587
- function Us(e, r, t, n) {
5587
+ function ws(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
- o !== u ? a.push(s, le.ttfGlyphLoader(n, s, Tn, e, r + o, Fn)) : a.push(s, le.glyphLoader(n, s));
5591
+ o !== u ? a.push(s, le.ttfGlyphLoader(n, s, kn, e, r + o, Un)) : a.push(s, le.glyphLoader(n, s));
5592
5592
  }, a;
5593
5593
  }
5594
- function Cs(e, r, t, n, a) {
5595
- return a.lowMemory ? Us(e, r, t, n) : Fs(e, r, t, n);
5594
+ function Es(e, r, t, n, a) {
5595
+ return a.lowMemory ? ws(e, r, t, n) : Cs(e, r, t, n);
5596
5596
  }
5597
- var Un = { getPath: kn, parse: Cs }, Cn, Ue, wn, Br;
5598
- function En(e) {
5597
+ var Cn = { getPath: Fn, parse: Es }, wn, Ue, En, Mr;
5598
+ function On(e) {
5599
5599
  this.font = e, this.getCommands = function(r) {
5600
- return Un.getPath(r).commands;
5600
+ return Cn.getPath(r).commands;
5601
5601
  }, this._fpgmState = this._prepState = void 0, this._errorState = 0;
5602
5602
  }
5603
- function ws(e) {
5603
+ function Os(e) {
5604
5604
  return e;
5605
5605
  }
5606
- function On(e) {
5606
+ function Ln(e) {
5607
5607
  return Math.sign(e) * Math.round(Math.abs(e));
5608
5608
  }
5609
- function Es(e) {
5609
+ function Ls(e) {
5610
5610
  return Math.sign(e) * Math.round(Math.abs(e * 2)) / 2;
5611
5611
  }
5612
- function Os(e) {
5612
+ function Rs(e) {
5613
5613
  return Math.sign(e) * (Math.round(Math.abs(e) + 0.5) - 0.5);
5614
5614
  }
5615
- function Ls(e) {
5615
+ function Ds(e) {
5616
5616
  return Math.sign(e) * Math.ceil(Math.abs(e));
5617
5617
  }
5618
- function Rs(e) {
5618
+ function As(e) {
5619
5619
  return Math.sign(e) * Math.floor(Math.abs(e));
5620
5620
  }
5621
- var Ln = function(e) {
5621
+ var Rn = function(e) {
5622
5622
  var r = this.srPeriod, t = this.srPhase, n = this.srThreshold, a = 1;
5623
5623
  return e < 0 && (e = -e, a = -1), e += n - t, e = Math.trunc(e / r) * r, e += t, e < 0 ? t * a : e * a;
5624
5624
  }, ue = {
@@ -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)), Ds = {
5794
+ var ze = Object.freeze(new ce(0, 0)), Ms = {
5795
5795
  cvCutIn: 17 / 16,
5796
5796
  // control value cut in
5797
5797
  deltaBase: 9,
@@ -5808,10 +5808,10 @@ function xe(e, r) {
5808
5808
  this.zp0 = this.zp1 = this.zp2 = 1, this.rp0 = this.rp1 = this.rp2 = 0;
5809
5809
  /* fall through */
5810
5810
  case "prep":
5811
- this.fv = this.pv = this.dpv = ue, this.round = On;
5811
+ this.fv = this.pv = this.dpv = ue, this.round = Ln;
5812
5812
  }
5813
5813
  }
5814
- En.prototype.exec = function(e, r) {
5814
+ On.prototype.exec = function(e, r) {
5815
5815
  if (typeof r != "number")
5816
5816
  throw new Error("Point size is not a number!");
5817
5817
  if (!(this._errorState > 2)) {
@@ -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 = Ds, 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 = Ms, 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) {
@@ -5843,23 +5843,23 @@ En.prototype.exec = function(e, r) {
5843
5843
  }
5844
5844
  if (!(this._errorState > 1))
5845
5845
  try {
5846
- return wn(e, n);
5846
+ return En(e, n);
5847
5847
  } catch (l) {
5848
5848
  this._errorState < 1 && (console.log("Hinting error:" + l), console.log("Note: further hinting errors are silenced")), this._errorState = 1;
5849
5849
  return;
5850
5850
  }
5851
5851
  }
5852
5852
  };
5853
- wn = function(e, r) {
5853
+ En = function(e, r) {
5854
5854
  var t = r.ppem / r.font.unitsPerEm, n = t, a = e.components, s, o, u;
5855
5855
  if (xe.prototype = r, !a)
5856
- u = new xe("glyf", e.instructions), exports.DEBUG && (console.log("---EXEC GLYPH---"), u.step = -1), Br(e, u, t, n), o = u.gZone;
5856
+ u = new xe("glyf", e.instructions), exports.DEBUG && (console.log("---EXEC GLYPH---"), u.step = -1), Mr(e, u, t, n), o = u.gZone;
5857
5857
  else {
5858
5858
  var i = r.font;
5859
5859
  o = [], s = [];
5860
5860
  for (var l = 0; l < a.length; l++) {
5861
5861
  var f = a[l], c = i.glyphs.get(f.glyphIndex);
5862
- u = new xe("glyf", c.instructions), exports.DEBUG && (console.log("---EXEC COMP " + l + "---"), u.step = -1), Br(c, u, t, n);
5862
+ u = new xe("glyf", c.instructions), exports.DEBUG && (console.log("---EXEC COMP " + l + "---"), u.step = -1), Mr(c, u, t, n);
5863
5863
  for (var p = Math.round(f.dx * t), h = Math.round(f.dy * n), d = u.gZone, g = u.contours, m = 0; m < d.length; m++) {
5864
5864
  var x = d[m];
5865
5865
  x.xTouched = x.yTouched = !1, x.xo = x.x = x.x + p, x.yo = x.y = x.y + h;
@@ -5876,7 +5876,7 @@ wn = function(e, r) {
5876
5876
  }
5877
5877
  return o;
5878
5878
  };
5879
- Br = function(e, r, t, n) {
5879
+ Mr = function(e, r, t, n) {
5880
5880
  for (var a = e.points || [], s = a.length, o = r.gZone = r.z0 = r.z1 = r.z2 = [], u = r.contours = [], i, l = 0; l < s; l++)
5881
5881
  i = a[l], o[l] = new ce(
5882
5882
  i.x * t,
@@ -5907,7 +5907,7 @@ Ue = function(e) {
5907
5907
  if (r) {
5908
5908
  var t = r.length, n;
5909
5909
  for (e.ip = 0; e.ip < t; e.ip++) {
5910
- if (exports.DEBUG && e.step++, n = Cn[r[e.ip]], !n)
5910
+ if (exports.DEBUG && e.step++, n = wn[r[e.ip]], !n)
5911
5911
  throw new Error(
5912
5912
  "unknown instruction: 0x" + Number(r[e.ip]).toString(16)
5913
5913
  );
@@ -5919,7 +5919,7 @@ function lr(e) {
5919
5919
  for (var r = e.tZone = new Array(e.gZone.length), t = 0; t < r.length; t++)
5920
5920
  r[t] = new ce(0, 0);
5921
5921
  }
5922
- function Rn(e, r) {
5922
+ function Dn(e, r) {
5923
5923
  var t = e.prog, n = e.ip, a = 1, s;
5924
5924
  do
5925
5925
  if (s = t[++n], s === 88)
@@ -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 As(e) {
5963
+ function Bs(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 Bs(e) {
5967
+ function Is(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 Ms(e) {
5971
+ function Ps(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 Is(e) {
5975
+ function Gs(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 Ps(e) {
5979
+ function Ns(e) {
5980
5980
  e.fv = e.pv, exports.DEBUG && console.log(e.step, "SFVTPV[]");
5981
5981
  }
5982
- function Gs(e) {
5982
+ function Hs(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
- 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
- h.x = (C * (U - L) - F * (d - m)) / B, h.y = (C * (y - w) - F * (g - x)) / B;
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, M = (d - m) * (y - w) - (g - x) * (U - L), C = d * x - g * m, F = U * w - y * L;
5986
+ h.x = (C * (U - L) - F * (d - m)) / M, h.y = (C * (y - w) - F * (g - x)) / M;
5987
5987
  }
5988
- function Ns(e) {
5988
+ function Ws(e) {
5989
5989
  e.rp0 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP0[]", e.rp0);
5990
5990
  }
5991
- function Hs(e) {
5991
+ function zs(e) {
5992
5992
  e.rp1 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP1[]", e.rp1);
5993
5993
  }
5994
- function Ws(e) {
5994
+ function _s(e) {
5995
5995
  e.rp2 = e.stack.pop(), exports.DEBUG && console.log(e.step, "SRP2[]", e.rp2);
5996
5996
  }
5997
- function zs(e) {
5997
+ function Vs(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 zs(e) {
6007
6007
  throw new Error("Invalid zone pointer");
6008
6008
  }
6009
6009
  }
6010
- function _s(e) {
6010
+ function qs(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 _s(e) {
6020
6020
  throw new Error("Invalid zone pointer");
6021
6021
  }
6022
6022
  }
6023
- function Vs(e) {
6023
+ function Xs(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 Vs(e) {
6033
6033
  throw new Error("Invalid zone pointer");
6034
6034
  }
6035
6035
  }
6036
- function qs(e) {
6036
+ function Ys(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 qs(e) {
6046
6046
  throw new Error("Invalid zone pointer");
6047
6047
  }
6048
6048
  }
6049
- function Xs(e) {
6049
+ function $s(e) {
6050
6050
  e.loop = e.stack.pop(), exports.DEBUG && console.log(e.step, "SLOOP[]", e.loop);
6051
6051
  }
6052
- function Ys(e) {
6053
- exports.DEBUG && console.log(e.step, "RTG[]"), e.round = On;
6052
+ function Zs(e) {
6053
+ exports.DEBUG && console.log(e.step, "RTG[]"), e.round = Ln;
6054
6054
  }
6055
- function $s(e) {
6056
- exports.DEBUG && console.log(e.step, "RTHG[]"), e.round = Os;
6055
+ function Qs(e) {
6056
+ exports.DEBUG && console.log(e.step, "RTHG[]"), e.round = Rs;
6057
6057
  }
6058
- function Zs(e) {
6058
+ function Ks(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 Qs(e) {
6063
- exports.DEBUG && console.log(e.step, "ELSE[]"), Rn(e, !1);
6062
+ function js(e) {
6063
+ exports.DEBUG && console.log(e.step, "ELSE[]"), Dn(e, !1);
6064
6064
  }
6065
- function Ks(e) {
6065
+ function Js(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 eo(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 Js(e) {
6073
+ function ro(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 eo(e) {
6080
+ function to(e) {
6081
6081
  exports.DEBUG && console.log(e.step, "CLEAR[]"), e.stack.length = 0;
6082
6082
  }
6083
- function ro(e) {
6083
+ function no(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 to(e) {
6087
+ function ao(e) {
6088
6088
  var r = e.stack;
6089
6089
  exports.DEBUG && console.log(e.step, "DEPTH[]"), r.push(r.length);
6090
6090
  }
6091
- function no(e) {
6091
+ function so(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 no(e) {
6101
6101
  );
6102
6102
  e.ip = a, e.prog = s;
6103
6103
  }
6104
- function ao(e) {
6104
+ function oo(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 so(e) {
6110
+ function io(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 oo(e) {
6114
+ function uo(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 io(e) {
6118
+ function lo(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 uo(e) {
6174
+ function fo(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 uo(e) {
6183
6183
  }
6184
6184
  e.loop = 1;
6185
6185
  }
6186
- function lo(e) {
6186
+ function po(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 fo(e) {
6204
+ function co(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 fo(e) {
6212
6212
  }
6213
6213
  e.loop = 1;
6214
6214
  }
6215
- function po(e) {
6216
- exports.DEBUG && console.log(e.step, "RTDG[]"), e.round = Es;
6215
+ function ho(e) {
6216
+ exports.DEBUG && console.log(e.step, "RTDG[]"), e.round = Ls;
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 co(e) {
6232
+ function vo(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 ho(e) {
6239
+ function go(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 ho(e) {
6245
6245
  }
6246
6246
  e.ip = r;
6247
6247
  }
6248
- function vo(e) {
6248
+ function mo(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 go(e) {
6254
+ function yo(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 mo(e) {
6260
+ function xo(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 yo(e) {
6264
+ function bo(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 xo(e) {
6276
+ function So(e) {
6277
6277
  exports.DEBUG && console.log(e.step, "MPPEM[]"), e.stack.push(e.ppem);
6278
6278
  }
6279
- function bo(e) {
6279
+ function To(e) {
6280
6280
  exports.DEBUG && console.log(e.step, "FLIPON[]"), e.autoFlip = !0;
6281
6281
  }
6282
- function So(e) {
6282
+ function ko(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 To(e) {
6286
+ function Fo(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 ko(e) {
6290
+ function Uo(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 Fo(e) {
6294
+ function Co(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 Uo(e) {
6298
+ function wo(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 Co(e) {
6302
+ function Eo(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 wo(e) {
6306
+ function Oo(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 Eo(e) {
6310
+ function Lo(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 Oo(e) {
6314
+ function Ro(e) {
6315
6315
  var r = e.stack.pop();
6316
- exports.DEBUG && console.log(e.step, "IF[]", r), r || (Rn(e, !0), exports.DEBUG && console.log(e.step, "EIF[]"));
6316
+ exports.DEBUG && console.log(e.step, "IF[]", r), r || (Dn(e, !0), exports.DEBUG && console.log(e.step, "EIF[]"));
6317
6317
  }
6318
- function Lo(e) {
6318
+ function Do(e) {
6319
6319
  exports.DEBUG && console.log(e.step, "EIF[]");
6320
6320
  }
6321
- function Ro(e) {
6321
+ function Ao(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 Do(e) {
6325
+ function Mo(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 Ao(e) {
6329
+ function Bo(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 Bo(e) {
6346
+ function Io(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 Mo(e) {
6350
+ function Po(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 Io(e) {
6354
+ function Go(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 Po(e) {
6358
+ function No(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 Go(e) {
6362
+ function Ho(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 No(e) {
6366
+ function Wo(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 Ho(e) {
6370
+ function zo(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 Wo(e) {
6374
+ function _o(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 zo(e) {
6378
+ function Vo(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 _o(e) {
6382
+ function qo(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 Vo(e) {
6390
+ function Xo(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,9 +6404,9 @@ function br(e, r) {
6404
6404
  }
6405
6405
  }
6406
6406
  }
6407
- function qo(e) {
6407
+ function Yo(e) {
6408
6408
  var r = e.stack.pop();
6409
- exports.DEBUG && console.log(e.step, "SROUND[]", r), e.round = Ln;
6409
+ exports.DEBUG && console.log(e.step, "SROUND[]", r), e.round = Rn;
6410
6410
  var t;
6411
6411
  switch (r & 192) {
6412
6412
  case 0:
@@ -6439,9 +6439,9 @@ function qo(e) {
6439
6439
  }
6440
6440
  r &= 15, r === 0 ? e.srThreshold = 0 : e.srThreshold = (r / 8 - 0.5) * t;
6441
6441
  }
6442
- function Xo(e) {
6442
+ function $o(e) {
6443
6443
  var r = e.stack.pop();
6444
- exports.DEBUG && console.log(e.step, "S45ROUND[]", r), e.round = Ln;
6444
+ exports.DEBUG && console.log(e.step, "S45ROUND[]", r), e.round = Rn;
6445
6445
  var t;
6446
6446
  switch (r & 192) {
6447
6447
  case 0:
@@ -6474,16 +6474,16 @@ function Xo(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
- }
6480
- function $o(e) {
6481
- exports.DEBUG && console.log(e.step, "RUTG[]"), e.round = Ls;
6482
- }
6483
6477
  function Zo(e) {
6484
- exports.DEBUG && console.log(e.step, "RDTG[]"), e.round = Rs;
6478
+ exports.DEBUG && console.log(e.step, "ROFF[]"), e.round = Os;
6485
6479
  }
6486
6480
  function Qo(e) {
6481
+ exports.DEBUG && console.log(e.step, "RUTG[]"), e.round = Ds;
6482
+ }
6483
+ function Ko(e) {
6484
+ exports.DEBUG && console.log(e.step, "RDTG[]"), e.round = As;
6485
+ }
6486
+ function jo(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 Ko(e) {
6496
+ function Jo(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 ei(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 Jo(e) {
6504
+ function ri(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 ei(e) {
6508
+ function ti(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 ri(e) {
6512
+ function ni(e) {
6513
6513
  var r = e.stack.pop();
6514
6514
  exports.DEBUG && console.log(e.step, "SCANTYPE[]", r);
6515
6515
  }
6516
- function ti(e) {
6516
+ function ai(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:
@@ -6556,7 +6556,7 @@ function T(e, r, t, n, a, s) {
6556
6556
  ")"
6557
6557
  ), s.rp1 = s.rp0, s.rp2 = i, r && (s.rp0 = i);
6558
6558
  }
6559
- Cn = [
6559
+ wn = [
6560
6560
  /* 0x00 */
6561
6561
  gt.bind(void 0, pe),
6562
6562
  /* 0x01 */
@@ -6578,45 +6578,45 @@ Cn = [
6578
6578
  /* 0x09 */
6579
6579
  bt.bind(void 0, 1),
6580
6580
  /* 0x0A */
6581
- As,
6582
- /* 0x0B */
6583
6581
  Bs,
6582
+ /* 0x0B */
6583
+ Is,
6584
6584
  /* 0x0C */
6585
- Ms,
6585
+ Ps,
6586
6586
  /* 0x0D */
6587
- Is,
6587
+ Gs,
6588
6588
  /* 0x0E */
6589
- Ps,
6589
+ Ns,
6590
6590
  /* 0x0F */
6591
- Gs,
6591
+ Hs,
6592
6592
  /* 0x10 */
6593
- Ns,
6593
+ Ws,
6594
6594
  /* 0x11 */
6595
- Hs,
6595
+ zs,
6596
6596
  /* 0x12 */
6597
- Ws,
6597
+ _s,
6598
6598
  /* 0x13 */
6599
- zs,
6599
+ Vs,
6600
6600
  /* 0x14 */
6601
- _s,
6601
+ qs,
6602
6602
  /* 0x15 */
6603
- Vs,
6603
+ Xs,
6604
6604
  /* 0x16 */
6605
- qs,
6605
+ Ys,
6606
6606
  /* 0x17 */
6607
- Xs,
6607
+ $s,
6608
6608
  /* 0x18 */
6609
- Ys,
6609
+ Zs,
6610
6610
  /* 0x19 */
6611
- $s,
6611
+ Qs,
6612
6612
  /* 0x1A */
6613
- Zs,
6613
+ Ks,
6614
6614
  /* 0x1B */
6615
- Qs,
6615
+ js,
6616
6616
  /* 0x1C */
6617
- Ks,
6617
+ Js,
6618
6618
  /* 0x1D */
6619
- js,
6619
+ eo,
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
- Js,
6627
+ ro,
6628
6628
  /* 0x21 */
6629
6629
  yr,
6630
6630
  /* 0x22 */
6631
- eo,
6631
+ to,
6632
6632
  /* 0x23 */
6633
- ro,
6633
+ no,
6634
6634
  /* 0x24 */
6635
- to,
6635
+ ao,
6636
6636
  /* 0x25 */
6637
- so,
6637
+ io,
6638
6638
  /* 0x26 */
6639
- oo,
6639
+ uo,
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
- no,
6649
+ so,
6650
6650
  /* 0x2B */
6651
- ao,
6651
+ oo,
6652
6652
  /* 0x2C */
6653
- io,
6653
+ lo,
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
- uo,
6678
+ fo,
6679
6679
  /* 0x39 */
6680
- lo,
6680
+ po,
6681
6681
  /* 0x3A */
6682
6682
  Ct.bind(void 0, 0),
6683
6683
  /* 0x3B */
6684
6684
  Ct.bind(void 0, 1),
6685
6685
  /* 0x3C */
6686
- fo,
6686
+ co,
6687
6687
  /* 0x3D */
6688
- po,
6688
+ ho,
6689
6689
  /* 0x3E */
6690
6690
  wt.bind(void 0, 0),
6691
6691
  /* 0x3F */
6692
6692
  wt.bind(void 0, 1),
6693
6693
  /* 0x40 */
6694
- co,
6694
+ vo,
6695
6695
  /* 0x41 */
6696
- ho,
6696
+ go,
6697
6697
  /* 0x42 */
6698
- vo,
6698
+ mo,
6699
6699
  /* 0x43 */
6700
- go,
6700
+ yo,
6701
6701
  /* 0x44 */
6702
- mo,
6702
+ xo,
6703
6703
  /* 0x45 */
6704
- yo,
6704
+ bo,
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
- xo,
6717
+ So,
6718
6718
  /* 0x4C */
6719
6719
  void 0,
6720
6720
  // TODO MPS
6721
6721
  /* 0x4D */
6722
- bo,
6722
+ To,
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
- So,
6730
+ ko,
6731
6731
  /* 0x51 */
6732
- To,
6732
+ Fo,
6733
6733
  /* 0x52 */
6734
- ko,
6734
+ Uo,
6735
6735
  /* 0x53 */
6736
- Fo,
6736
+ Co,
6737
6737
  /* 0x54 */
6738
- Uo,
6738
+ wo,
6739
6739
  /* 0x55 */
6740
- Co,
6740
+ Eo,
6741
6741
  /* 0x56 */
6742
- wo,
6742
+ Oo,
6743
6743
  /* 0x57 */
6744
- Eo,
6744
+ Lo,
6745
6745
  /* 0x58 */
6746
- Oo,
6746
+ Ro,
6747
6747
  /* 0x59 */
6748
- Lo,
6748
+ Do,
6749
6749
  /* 0x5A */
6750
- Ro,
6750
+ Ao,
6751
6751
  /* 0x5B */
6752
- Do,
6752
+ Mo,
6753
6753
  /* 0x5C */
6754
- Ao,
6754
+ Bo,
6755
6755
  /* 0x5D */
6756
6756
  xr.bind(void 0, 1),
6757
6757
  /* 0x5E */
6758
- Bo,
6758
+ Io,
6759
6759
  /* 0x5F */
6760
- Mo,
6760
+ Po,
6761
6761
  /* 0x60 */
6762
- Io,
6762
+ Go,
6763
6763
  /* 0x61 */
6764
- Po,
6764
+ No,
6765
6765
  /* 0x62 */
6766
- Go,
6766
+ Ho,
6767
6767
  /* 0x63 */
6768
- No,
6768
+ Wo,
6769
6769
  /* 0x64 */
6770
- Ho,
6770
+ zo,
6771
6771
  /* 0x65 */
6772
- Wo,
6772
+ _o,
6773
6773
  /* 0x66 */
6774
- zo,
6774
+ Vo,
6775
6775
  /* 0x67 */
6776
- _o,
6776
+ qo,
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
- Vo,
6798
+ Xo,
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
- qo,
6810
+ Yo,
6811
6811
  /* 0x77 */
6812
- Xo,
6812
+ $o,
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
- Yo,
6820
+ Zo,
6821
6821
  /* 0x7B */
6822
6822
  void 0,
6823
6823
  /* 0x7C */
6824
- $o,
6824
+ Qo,
6825
6825
  /* 0x7D */
6826
- Zo,
6826
+ Ko,
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
- Qo,
6847
+ jo,
6848
6848
  /* 0x86 */
6849
6849
  Lt.bind(void 0, 0),
6850
6850
  /* 0x87 */
6851
6851
  Lt.bind(void 0, 1),
6852
6852
  /* 0x88 */
6853
- Ko,
6853
+ Jo,
6854
6854
  /* 0x89 */
6855
6855
  void 0,
6856
6856
  // TODO IDEF
6857
6857
  /* 0x8A */
6858
- jo,
6858
+ ei,
6859
6859
  /* 0x8B */
6860
- Jo,
6860
+ ri,
6861
6861
  /* 0x8C */
6862
- ei,
6862
+ ti,
6863
6863
  /* 0x8D */
6864
- ri,
6864
+ ni,
6865
6865
  /* 0x8E */
6866
- ti,
6866
+ ai,
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 ni(e, r, t) {
7100
+ function si(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 ai(e) {
7109
+ function oi(e) {
7110
7110
  var r = this, t = [
7111
7111
  "start",
7112
7112
  "end",
@@ -7145,7 +7145,7 @@ function ai(e) {
7145
7145
  });
7146
7146
  }
7147
7147
  function N(e) {
7148
- this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], ai.call(this, e);
7148
+ this.tokens = [], this.registeredContexts = {}, this.contextCheckers = [], this.events = {}, this.registeredModifiers = [], oi.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 ni(
7286
+ var n = new si(
7287
7287
  e,
7288
7288
  r,
7289
7289
  t
@@ -7347,7 +7347,7 @@ N.prototype.tokenize = function(e) {
7347
7347
  function be(e) {
7348
7348
  return /[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(e);
7349
7349
  }
7350
- function Dn(e) {
7350
+ function An(e) {
7351
7351
  return /[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(e);
7352
7352
  }
7353
7353
  function Se(e) {
@@ -7356,7 +7356,7 @@ function Se(e) {
7356
7356
  function rr(e) {
7357
7357
  return /[A-z]/.test(e);
7358
7358
  }
7359
- function si(e) {
7359
+ function ii(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 oi(e, r) {
7388
+ function ui(e, r) {
7389
7389
  var t = Ye(e, r.coverage);
7390
7390
  return t === -1 ? null : e + r.deltaGlyphId;
7391
7391
  }
7392
- function ii(e, r) {
7392
+ function li(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 ui(e, r) {
7405
+ function fi(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 [];
@@ -7435,13 +7435,13 @@ function ui(e, r) {
7435
7435
  var U = m.subtables[x], y = this.getLookupMethod(m, U), L = this.getSubstitutionType(m, U);
7436
7436
  if (L === "12")
7437
7437
  for (var w = 0; w < n.length; w++) {
7438
- var B = e.get(w), C = y(B);
7438
+ var M = e.get(w), C = y(M);
7439
7439
  C && p.push(C);
7440
7440
  }
7441
7441
  }
7442
7442
  return p;
7443
7443
  }
7444
- function li(e, r) {
7444
+ function pi(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 li(e, r) {
7457
7457
  }
7458
7458
  return null;
7459
7459
  }
7460
- function fi(e, r) {
7460
+ function ci(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 oi.apply(
7522
+ return ui.apply(
7523
7523
  t,
7524
7524
  [a, r]
7525
7525
  );
7526
7526
  };
7527
7527
  case "12":
7528
7528
  return function(a) {
7529
- return ii.apply(
7529
+ return li.apply(
7530
7530
  t,
7531
7531
  [a, r]
7532
7532
  );
7533
7533
  };
7534
7534
  case "63":
7535
7535
  return function(a) {
7536
- return ui.apply(
7536
+ return fi.apply(
7537
7537
  t,
7538
7538
  [a, r]
7539
7539
  );
7540
7540
  };
7541
7541
  case "41":
7542
7542
  return function(a) {
7543
- return li.apply(
7543
+ return pi.apply(
7544
7544
  t,
7545
7545
  [a, r]
7546
7546
  );
7547
7547
  };
7548
7548
  case "21":
7549
7549
  return function(a) {
7550
- return fi.apply(
7550
+ return ci.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 pi(e) {
7643
+ function hi(e) {
7644
7644
  var r = e.current, t = e.get(-1);
7645
7645
  return (
7646
7646
  // ? arabic first char
@@ -7648,7 +7648,7 @@ function pi(e) {
7648
7648
  !be(t) && be(r)
7649
7649
  );
7650
7650
  }
7651
- function ci(e) {
7651
+ function vi(e) {
7652
7652
  var r = e.get(1);
7653
7653
  return (
7654
7654
  // ? last arabic char
@@ -7656,24 +7656,24 @@ function ci(e) {
7656
7656
  !be(r)
7657
7657
  );
7658
7658
  }
7659
- var hi = {
7660
- startCheck: pi,
7661
- endCheck: ci
7659
+ var di = {
7660
+ startCheck: hi,
7661
+ endCheck: vi
7662
7662
  };
7663
- function vi(e) {
7663
+ function gi(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 di(e) {
7670
+ function mi(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 = si(r);
7676
+ var t = ii(r);
7677
7677
  if (!t)
7678
7678
  return !0;
7679
7679
  if (t) {
@@ -7690,40 +7690,40 @@ function di(e) {
7690
7690
  return !1;
7691
7691
  }
7692
7692
  }
7693
- var gi = {
7694
- startCheck: vi,
7695
- endCheck: di
7693
+ var yi = {
7694
+ startCheck: gi,
7695
+ endCheck: mi
7696
7696
  };
7697
- function mi(e, r, t) {
7697
+ function xi(e, r, t) {
7698
7698
  r[t].setState(e.tag, e.substitution);
7699
7699
  }
7700
- function yi(e, r, t) {
7700
+ function bi(e, r, t) {
7701
7701
  r[t].setState(e.tag, e.substitution);
7702
7702
  }
7703
- function xi(e, r, t) {
7703
+ function Si(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 bi(e, r, t) {
7709
+ function Ti(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: mi,
7717
- 12: yi,
7718
- 63: xi,
7719
- 41: bi
7716
+ 11: xi,
7717
+ 12: bi,
7718
+ 63: Si,
7719
+ 41: Ti
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 Si(e) {
7724
+ function ki(e) {
7725
7725
  for (var r = [].concat(e.backtrack), t = r.length - 1; t >= 0; t--) {
7726
- var n = r[t], a = Dn(n), s = Se(n);
7726
+ var n = r[t], a = An(n), s = Se(n);
7727
7727
  if (!a && !s)
7728
7728
  return !0;
7729
7729
  if (a)
@@ -7731,8 +7731,8 @@ function Si(e) {
7731
7731
  }
7732
7732
  return !1;
7733
7733
  }
7734
- function Ti(e) {
7735
- if (Dn(e.current))
7734
+ function Fi(e) {
7735
+ if (An(e.current))
7736
7736
  return !1;
7737
7737
  for (var r = 0; r < e.lookahead.length; r++) {
7738
7738
  var t = e.lookahead[r], n = Se(t);
@@ -7741,7 +7741,7 @@ function Ti(e) {
7741
7741
  }
7742
7742
  return !1;
7743
7743
  }
7744
- function ki(e) {
7744
+ function Ui(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 ki(e) {
7763
7763
  if (!Se(u.char)) {
7764
7764
  s.setCurrentIndex(i), o.setCurrentIndex(i);
7765
7765
  var l = 0;
7766
- Si(o) && (l |= 1), Ti(o) && (l |= 2);
7766
+ ki(o) && (l |= 1), Fi(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 Fi(e) {
7801
+ function Ci(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 Fi(e) {
7814
7814
  ), a = Dt(n));
7815
7815
  });
7816
7816
  }
7817
- function Ui(e) {
7817
+ function wi(e) {
7818
7818
  var r = e.current, t = e.get(-1);
7819
7819
  return (
7820
7820
  // ? latin first char
@@ -7822,7 +7822,7 @@ function Ui(e) {
7822
7822
  !rr(t) && rr(r)
7823
7823
  );
7824
7824
  }
7825
- function Ci(e) {
7825
+ function Ei(e) {
7826
7826
  var r = e.get(1);
7827
7827
  return (
7828
7828
  // ? last latin char
@@ -7830,9 +7830,9 @@ function Ci(e) {
7830
7830
  !rr(r)
7831
7831
  );
7832
7832
  }
7833
- var wi = {
7834
- startCheck: Ui,
7835
- endCheck: Ci
7833
+ var Oi = {
7834
+ startCheck: wi,
7835
+ endCheck: Ei
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 Ei(e) {
7843
+ function Li(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: wi,
7867
- arabicWordCheck: hi,
7868
- arabicSentenceCheck: gi
7866
+ latinWordCheck: Oi,
7867
+ arabicWordCheck: di,
7868
+ arabicSentenceCheck: yi
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 Oi() {
7878
+ function Ri() {
7879
7879
  return Tr.call(this, "latinWord"), Tr.call(this, "arabicWord"), Tr.call(this, "arabicSentence"), this.tokenizer.tokenize(this.text);
7880
7880
  }
7881
- function Li() {
7881
+ function Di() {
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 Ri() {
7920
+ function Ai() {
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
- ki.call(e, n);
7926
+ Ui.call(e, n);
7927
7927
  });
7928
7928
  }
7929
7929
  }
7930
- function Di() {
7930
+ function Mi() {
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 Di() {
7935
7935
  Yr.call(this);
7936
7936
  var n = this.tokenizer.getContextRanges("arabicWord");
7937
7937
  n.forEach(function(a) {
7938
- Fi.call(e, a);
7938
+ Ci.call(e, a);
7939
7939
  });
7940
7940
  }
7941
7941
  }
7942
7942
  }
7943
- function Ai() {
7943
+ function Bi() {
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 Ai() {
7948
7948
  Yr.call(this);
7949
7949
  var n = this.tokenizer.getContextRanges("latinWord");
7950
7950
  n.forEach(function(a) {
7951
- Ei.call(e, a);
7951
+ Li.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") && (Ri.call(this), Di.call(this)), this.checkContextReady("latinWord") && Ai.call(this), this.checkContextReady("arabicSentence") && Li.call(this);
7960
+ this.checkContextReady("arabicWord") && (Ai.call(this), Mi.call(this)), this.checkContextReady("latinWord") && Bi.call(this), this.checkContextReady("arabicSentence") && Di.call(this);
7961
7961
  };
7962
7962
  ae.prototype.processText = function(e) {
7963
- (!this.text || this.text !== e) && (this.setText(e), Oi.call(this), this.applyFeaturesToContexts());
7963
+ (!this.text || this.text !== e) && (this.setText(e), Ri.call(this), this.applyFeaturesToContexts());
7964
7964
  };
7965
7965
  ae.prototype.getBidiText = function(e) {
7966
7966
  return this.processText(e), this.tokenizer.getText();
@@ -7999,12 +7999,12 @@ function I(e) {
7999
7999
  usWidthClass: e.widthClass || this.usWidthClasses.MEDIUM,
8000
8000
  fsSelection: e.fsSelection || this.fsSelectionValues.REGULAR
8001
8001
  }, e.tables.os2)
8002
- })), this.supported = !0, this.glyphs = new le.GlyphSet(this, e.glyphs || []), this.encoding = new Zt(this), this.position = new Ve(this), this.substitution = new j(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
8002
+ })), this.supported = !0, this.glyphs = new le.GlyphSet(this, e.glyphs || []), this.encoding = new Qt(this), this.position = new Ve(this), this.substitution = new j(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
8003
8003
  get: function() {
8004
8004
  if (this._hinting)
8005
8005
  return this._hinting;
8006
8006
  if (this.outlinesFormat === "truetype")
8007
- return this._hinting = new En(this);
8007
+ return this._hinting = new On(this);
8008
8008
  }
8009
8009
  });
8010
8010
  }
@@ -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 xs.fontToTable(this);
8132
+ return Ss.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 (Ss())
8146
+ if (ks())
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 = Ts(n);
8155
+ var i = require("fs"), l = Fs(n);
8156
8156
  i.writeFileSync(e, l);
8157
8157
  }
8158
8158
  };
@@ -8200,7 +8200,7 @@ I.prototype.usWeightClasses = {
8200
8200
  EXTRA_BOLD: 800,
8201
8201
  BLACK: 900
8202
8202
  };
8203
- function An(e, r) {
8203
+ function Mn(e, r) {
8204
8204
  var t = JSON.stringify(e), n = 256;
8205
8205
  for (var a in r) {
8206
8206
  var s = parseInt(a);
@@ -8212,8 +8212,8 @@ function An(e, r) {
8212
8212
  }
8213
8213
  return r[n] = e, n;
8214
8214
  }
8215
- function Bi(e, r, t) {
8216
- var n = An(r.name, t);
8215
+ function Ii(e, r, t) {
8216
+ var n = Mn(r.name, t);
8217
8217
  return [
8218
8218
  { name: "tag_" + e, type: "TAG", value: r.tag },
8219
8219
  { name: "minValue_" + e, type: "FIXED", value: r.minValue << 16 },
@@ -8223,12 +8223,12 @@ function Bi(e, r, t) {
8223
8223
  { name: "nameID_" + e, type: "USHORT", value: n }
8224
8224
  ];
8225
8225
  }
8226
- function Mi(e, r, t) {
8226
+ function Pi(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 Ii(e, r, t, n) {
8231
- for (var a = An(r.name, n), s = [
8230
+ function Gi(e, r, t, n) {
8231
+ for (var a = Mn(r.name, n), s = [
8232
8232
  { name: "nameID_" + e, type: "USHORT", value: a },
8233
8233
  { name: "flags_" + e, type: "USHORT", value: 0 }
8234
8234
  ], o = 0; o < t.length; ++o) {
@@ -8241,14 +8241,14 @@ function Ii(e, r, t, n) {
8241
8241
  }
8242
8242
  return s;
8243
8243
  }
8244
- function Pi(e, r, t, n) {
8244
+ function Ni(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 Gi(e, r) {
8251
+ function Hi(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 Gi(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(Bi(n, e.axes[n], r));
8263
+ t.fields = t.fields.concat(Ii(n, e.axes[n], r));
8264
8264
  for (var a = 0; a < e.instances.length; a++)
8265
- t.fields = t.fields.concat(Ii(a, e.instances[a], e.axes, r));
8265
+ t.fields = t.fields.concat(Gi(a, e.instances[a], e.axes, r));
8266
8266
  return t;
8267
8267
  }
8268
- function Ni(e, r, t) {
8268
+ function Wi(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(Mi(e, r + s + c * u, t));
8274
+ f.push(Pi(e, r + s + c * u, t));
8275
8275
  for (var p = [], h = r + s + o * u, d = 0; d < i; d++)
8276
- p.push(Pi(e, h + d * l, f, t));
8276
+ p.push(Ni(e, h + d * l, f, t));
8277
8277
  return { axes: f, instances: p };
8278
8278
  }
8279
- var Hi = { make: Gi, parse: Ni }, Wi = function() {
8279
+ var zi = { make: Hi, parse: Wi }, _i = function() {
8280
8280
  return {
8281
8281
  coverage: this.parsePointer(v.coverage),
8282
8282
  attachPoints: this.parseList(v.pointer(v.uShortList))
8283
8283
  };
8284
- }, zi = function() {
8284
+ }, Vi = 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 Hi = { make: Gi, parse: Ni }, Wi = 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));
8297
- }, Vi = function() {
8295
+ }, qi = function() {
8296
+ return this.parseList(v.pointer(Vi));
8297
+ }, Xi = function() {
8298
8298
  return {
8299
8299
  coverage: this.parsePointer(v.coverage),
8300
- ligGlyphs: this.parseList(v.pointer(_i))
8300
+ ligGlyphs: this.parseList(v.pointer(qi))
8301
8301
  };
8302
- }, qi = function() {
8302
+ }, Yi = function() {
8303
8303
  return this.parseUShort(), this.parseList(v.pointer(v.coverage));
8304
8304
  };
8305
- function Xi(e, r) {
8305
+ function $i(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 Xi(e, r) {
8312
8312
  var a = {
8313
8313
  version: n,
8314
8314
  classDef: t.parsePointer(v.classDef),
8315
- attachList: t.parsePointer(Wi),
8316
- ligCaretList: t.parsePointer(Vi),
8315
+ attachList: t.parsePointer(_i),
8316
+ ligCaretList: t.parsePointer(Xi),
8317
8317
  markAttachClassDef: t.parsePointer(v.classDef)
8318
8318
  };
8319
- return n >= 1.2 && (a.markGlyphSets = t.parsePointer(qi)), a;
8319
+ return n >= 1.2 && (a.markGlyphSets = t.parsePointer(Yi)), a;
8320
8320
  }
8321
- var Yi = { parse: Xi }, te = new Array(10);
8321
+ var Zi = { parse: $i }, 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 $i(e, r) {
8399
+ function Qi(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 $i(e, r) {
8412
8412
  variations: t.parseFeatureVariationsList()
8413
8413
  };
8414
8414
  }
8415
- var Zi = new Array(10);
8416
- function Qi(e) {
8415
+ var Ki = new Array(10);
8416
+ function ji(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, Zi) }
8421
+ { name: "lookups", type: "TABLE", value: new S.LookupList(e.lookups, Ki) }
8422
8422
  ]);
8423
8423
  }
8424
- var Ki = { parse: $i, make: Qi };
8425
- function ji(e) {
8424
+ var Ji = { parse: Qi, make: ji };
8425
+ function eu(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 Ji(e) {
8438
+ function ru(e) {
8439
8439
  var r = {};
8440
8440
  e.skip("uShort");
8441
8441
  var t = e.parseULong();
@@ -8451,32 +8451,32 @@ function Ji(e) {
8451
8451
  }
8452
8452
  return r;
8453
8453
  }
8454
- function eu(e, r) {
8454
+ function tu(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 eu(t);
8458
8458
  if (n === 1)
8459
- return Ji(t);
8459
+ return ru(t);
8460
8460
  throw new Error("Unsupported kern table version (" + n + ").");
8461
8461
  }
8462
- var ru = { parse: eu };
8463
- function tu(e, r, t, n) {
8462
+ var nu = { parse: tu };
8463
+ function au(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 nu = { parse: tu };
8471
- function au(e, r) {
8470
+ var su = { parse: au };
8471
+ function ou(e, r) {
8472
8472
  var t = require("fs");
8473
8473
  t.readFile(e, function(n, a) {
8474
8474
  if (n)
8475
8475
  return r(n.message);
8476
- r(null, Sn(a));
8476
+ r(null, Tn(a));
8477
8477
  });
8478
8478
  }
8479
- function su(e, r) {
8479
+ function iu(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);
@@ -8484,14 +8484,14 @@ function su(e, r) {
8484
8484
  r("Font could not be loaded");
8485
8485
  }, t.send();
8486
8486
  }
8487
- function Bt(e, r) {
8487
+ function Mt(e, r) {
8488
8488
  for (var t = [], n = 12, a = 0; a < r; a += 1) {
8489
8489
  var s = k.getTag(e, n), o = k.getULong(e, n + 4), u = k.getULong(e, n + 8), i = k.getULong(e, n + 12);
8490
8490
  t.push({ tag: s, checksum: o, offset: u, length: i, compression: !1 }), n += 16;
8491
8491
  }
8492
8492
  return t;
8493
8493
  }
8494
- function ou(e, r) {
8494
+ function uu(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 ou(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 (Qn(t, n), n.byteLength !== r.length)
8510
+ if (jn(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 };
@@ -8518,9 +8518,9 @@ function $r(e, r) {
8518
8518
  r = r ?? {};
8519
8519
  var t, n, a = new I({ empty: !0 }), s = new DataView(e, 0), o, u = [], i = k.getTag(s, 0);
8520
8520
  if (i === "\0\0\0" || i === "true" || i === "typ1")
8521
- a.outlinesFormat = "truetype", o = k.getUShort(s, 4), u = Bt(s, o);
8521
+ a.outlinesFormat = "truetype", o = k.getUShort(s, 4), u = Mt(s, o);
8522
8522
  else if (i === "OTTO")
8523
- a.outlinesFormat = "cff", o = k.getUShort(s, 4), u = Bt(s, o);
8523
+ a.outlinesFormat = "cff", o = k.getUShort(s, 4), u = Mt(s, o);
8524
8524
  else if (i === "wOFF") {
8525
8525
  var l = k.getTag(s, 4);
8526
8526
  if (l === "\0\0\0")
@@ -8529,14 +8529,14 @@ 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 = ou(s, o);
8532
+ o = k.getUShort(s, 12), u = uu(s, o);
8533
8533
  } else
8534
8534
  throw new Error("Unsupported OpenType signature " + i);
8535
- for (var f, c, p, h, d, g, m, x, U, y, L, w, B = 0; B < o; B += 1) {
8536
- var C = u[B], F = void 0;
8535
+ for (var f, c, p, h, d, g, m, x, U, y, L, w, M = 0; M < o; M += 1) {
8536
+ var C = u[M], F = void 0;
8537
8537
  switch (C.tag) {
8538
8538
  case "cmap":
8539
- F = W(s, C), a.tables.cmap = $t.parse(F.data, F.offset), a.encoding = new Qt(a.tables.cmap);
8539
+ F = W(s, C), a.tables.cmap = Zt.parse(F.data, F.offset), a.encoding = new Kt(a.tables.cmap);
8540
8540
  break;
8541
8541
  case "cvt ":
8542
8542
  F = W(s, C), w = new k.Parser(F.data, F.offset), a.tables.cvt = w.parseShortList(C.length / 2);
@@ -8548,19 +8548,19 @@ function $r(e, r) {
8548
8548
  F = W(s, C), w = new k.Parser(F.data, F.offset), a.tables.fpgm = w.parseByteList(C.length);
8549
8549
  break;
8550
8550
  case "head":
8551
- F = W(s, C), a.tables.head = on.parse(F.data, F.offset), a.unitsPerEm = a.tables.head.unitsPerEm, t = a.tables.head.indexToLocFormat;
8551
+ F = W(s, C), a.tables.head = un.parse(F.data, F.offset), a.unitsPerEm = a.tables.head.unitsPerEm, t = a.tables.head.indexToLocFormat;
8552
8552
  break;
8553
8553
  case "hhea":
8554
- F = W(s, C), a.tables.hhea = un.parse(F.data, F.offset), a.ascender = a.tables.hhea.ascender, a.descender = a.tables.hhea.descender, a.numberOfHMetrics = a.tables.hhea.numberOfHMetrics;
8554
+ F = W(s, C), a.tables.hhea = ln.parse(F.data, F.offset), a.ascender = a.tables.hhea.ascender, a.descender = a.tables.hhea.descender, a.numberOfHMetrics = a.tables.hhea.numberOfHMetrics;
8555
8555
  break;
8556
8556
  case "hmtx":
8557
8557
  m = C;
8558
8558
  break;
8559
8559
  case "ltag":
8560
- F = W(s, C), n = fn.parse(F.data, F.offset);
8560
+ F = W(s, C), n = pn.parse(F.data, F.offset);
8561
8561
  break;
8562
8562
  case "maxp":
8563
- F = W(s, C), a.tables.maxp = pn.parse(F.data, F.offset), a.numGlyphs = a.tables.maxp.numGlyphs;
8563
+ F = W(s, C), a.tables.maxp = cn.parse(F.data, F.offset), a.numGlyphs = a.tables.maxp.numGlyphs;
8564
8564
  break;
8565
8565
  case "name":
8566
8566
  y = C;
@@ -8569,7 +8569,7 @@ function $r(e, r) {
8569
8569
  F = W(s, C), a.tables.os2 = Ar.parse(F.data, F.offset);
8570
8570
  break;
8571
8571
  case "post":
8572
- F = W(s, C), a.tables.post = mn.parse(F.data, F.offset), a.glyphNames = new Wr(a.tables.post);
8572
+ F = W(s, C), a.tables.post = yn.parse(F.data, F.offset), a.glyphNames = new Wr(a.tables.post);
8573
8573
  break;
8574
8574
  case "prep":
8575
8575
  F = W(s, C), w = new k.Parser(F.data, F.offset), a.tables.prep = w.parseByteList(C.length);
@@ -8600,46 +8600,46 @@ function $r(e, r) {
8600
8600
  break;
8601
8601
  }
8602
8602
  }
8603
- var D = W(s, y);
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 = nu.parse(A.data, A.offset, a.numGlyphs, R), Q = W(s, p);
8606
- a.glyphs = Un.parse(Q.data, Q.offset, H, a, r);
8603
+ var R = W(s, y);
8604
+ if (a.tables.name = mn.parse(R.data, R.offset, n), a.names = a.tables.name, p && U) {
8605
+ var A = t === 0, D = W(s, U), H = su.parse(D.data, D.offset, a.numGlyphs, A), Z = W(s, p);
8606
+ a.glyphs = Cn.parse(Z.data, Z.offset, H, a, r);
8607
8607
  } else if (f) {
8608
8608
  var G = W(s, f);
8609
- sn.parse(G.data, G.offset, a, r);
8609
+ on.parse(G.data, G.offset, a, 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), ma(a, r), x) {
8613
+ if (fn.parse(a, z.data, z.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, r), xa(a, r), x) {
8614
8614
  var Y = W(s, x);
8615
- a.kerningPairs = ru.parse(Y.data, Y.offset);
8615
+ a.kerningPairs = nu.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 = Yi.parse(_.data, _.offset);
8620
+ a.tables.gdef = Zi.parse(_.data, _.offset);
8621
8621
  }
8622
8622
  if (d) {
8623
8623
  var P = W(s, d);
8624
- a.tables.gpos = Ki.parse(P.data, P.offset), a.position.init();
8624
+ a.tables.gpos = Ji.parse(P.data, P.offset), a.position.init();
8625
8625
  }
8626
8626
  if (g) {
8627
8627
  var V = W(s, g);
8628
- a.tables.gsub = yn.parse(V.data, V.offset);
8628
+ a.tables.gsub = xn.parse(V.data, V.offset);
8629
8629
  }
8630
8630
  if (c) {
8631
8631
  var $ = W(s, c);
8632
- a.tables.fvar = Hi.parse($.data, $.offset, a.names);
8632
+ a.tables.fvar = zi.parse($.data, $.offset, a.names);
8633
8633
  }
8634
8634
  if (L) {
8635
- var M = W(s, L);
8636
- a.tables.meta = xn.parse(M.data, M.offset), a.metas = a.tables.meta;
8635
+ var B = W(s, L);
8636
+ a.tables.meta = bn.parse(B.data, B.offset), a.metas = a.tables.meta;
8637
8637
  }
8638
8638
  return a;
8639
8639
  }
8640
- function iu(e, r, t) {
8640
+ function lu(e, r, t) {
8641
8641
  t = t ?? {};
8642
- var n = typeof window > "u", a = n && !t.isUrl ? au : su;
8642
+ var n = typeof window > "u", a = n && !t.isUrl ? ou : iu;
8643
8643
  return new Promise(function(s, o) {
8644
8644
  a(e, function(u, i) {
8645
8645
  if (u) {
@@ -8661,11 +8661,11 @@ function iu(e, r, t) {
8661
8661
  });
8662
8662
  });
8663
8663
  }
8664
- function uu(e, r) {
8664
+ function fu(e, r) {
8665
8665
  var t = require("fs"), n = t.readFileSync(e);
8666
- return $r(Sn(n), r);
8666
+ return $r(Tn(n), r);
8667
8667
  }
8668
- var lu = /* @__PURE__ */ Object.freeze({
8668
+ var pu = /* @__PURE__ */ Object.freeze({
8669
8669
  __proto__: null,
8670
8670
  Font: I,
8671
8671
  Glyph: K,
@@ -8673,10 +8673,10 @@ var lu = /* @__PURE__ */ Object.freeze({
8673
8673
  BoundingBox: he,
8674
8674
  _parse: k,
8675
8675
  parse: $r,
8676
- load: iu,
8677
- loadSync: uu
8676
+ load: lu,
8677
+ loadSync: fu
8678
8678
  });
8679
- function fu(e, r) {
8679
+ function cu(e, r) {
8680
8680
  const t = { svgGlyphs: r };
8681
8681
  return new Proxy(e, {
8682
8682
  get(n, a, s) {
@@ -8693,8 +8693,8 @@ function fu(e, r) {
8693
8693
  }
8694
8694
  });
8695
8695
  }
8696
- const Mr = /* @__PURE__ */ new Map(), _u = () => Mr, pu = async (e, r = !1) => {
8697
- const t = Mr.get(e);
8696
+ const Br = /* @__PURE__ */ new Map(), _u = () => Br, hu = async (e, r = !1) => {
8697
+ const t = Br.get(e);
8698
8698
  if (t) {
8699
8699
  if (r && !t.svgGlyphs) {
8700
8700
  const i = await fetch(e);
@@ -8712,16 +8712,16 @@ const Mr = /* @__PURE__ */ new Map(), _u = () => Mr, pu = 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 = lu.parse(a);
8715
+ const a = await n.arrayBuffer(), s = pu.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 = fu(s, o);
8722
- return Mr.set(e, u), u;
8723
- }, cu = 0.03125, Bn = 1.1, hu = 0.2, $e = {
8724
- outlineWidth: cu,
8721
+ const u = cu(s, o);
8722
+ return Br.set(e, u), u;
8723
+ }, vu = 0.03125, Bn = 1.1, du = 0.2, $e = {
8724
+ outlineWidth: vu,
8725
8725
  letterSpacing: 0,
8726
8726
  letterSpacingOutline: 0
8727
8727
  };
@@ -8739,18 +8739,18 @@ class fe {
8739
8739
  return `${this.x} ${this.y}`;
8740
8740
  }
8741
8741
  }
8742
- function vu(e, r, t = new fe(0, 0)) {
8742
+ function gu(e, r, t = new fe(0, 0)) {
8743
8743
  const n = e.X - t.X, a = e.Y - t.Y, s = r / 180 * Math.PI, o = Math.cos(s), u = Math.sin(s), i = n * o - a * u, l = n * u + a * o;
8744
8744
  return new fe(i + t.X, l + t.Y);
8745
8745
  }
8746
- const du = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curved" ? { type: "curved" } : e, gu = (e) => {
8746
+ const mu = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curved" ? { type: "curved" } : e, yu = (e) => {
8747
8747
  if (!e || !e.trim())
8748
8748
  throw new Error("Custom baseline path must be a non-empty SVG path string");
8749
8749
  if (!e.trim().startsWith("M"))
8750
8750
  throw new Error(
8751
8751
  "Custom baseline path must start with an M (moveto) command"
8752
8752
  );
8753
- }, mu = ({
8753
+ }, xu = ({
8754
8754
  boxDimensions: e,
8755
8755
  totalTextHeight: r,
8756
8756
  baseline: t,
@@ -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
- }, Mn = ({
8774
+ }, In = ({
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 * hu, 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 * du, 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 Mn({
8782
+ return In({
8783
8783
  boxDimensions: e,
8784
8784
  baseline: r,
8785
8785
  textHeight: t,
@@ -8793,7 +8793,7 @@ const du = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8793
8793
  r + i
8794
8794
  ), U = `M ${p.toSVGString()}`, y = `Q ${m.toSVGString()} ${h.toSVGString()}`, L = `Q ${x.toSVGString()} ${d.toSVGString()}`;
8795
8795
  return `${U} ${y} ${L}`;
8796
- }, yu = (e) => {
8796
+ }, Pn = (e) => {
8797
8797
  const r = ["I", "l", "1"];
8798
8798
  for (const t of r) {
8799
8799
  const n = e.charToGlyph(t);
@@ -8803,7 +8803,7 @@ const du = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8803
8803
  return console.error(
8804
8804
  'No standard character found for fixed height calculation. Using "I" as default.'
8805
8805
  ), "I";
8806
- }, kr = 100, xu = ({
8806
+ }, kr = 100, bu = ({
8807
8807
  font: e,
8808
8808
  boxDimensions: r,
8809
8809
  physicalSize: t,
@@ -8814,7 +8814,7 @@ const du = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8814
8814
  throw new Error(
8815
8815
  `Mismatched units between physicalFontSize (${a[1]}) and boxDimensions (${r.physicalUnits})`
8816
8816
  );
8817
- const { outlineWidth: s } = n, o = yu(e), i = e.getPath(
8817
+ const { outlineWidth: s } = n, o = Pn(e), i = e.getPath(
8818
8818
  o,
8819
8819
  0,
8820
8820
  0,
@@ -8827,7 +8827,7 @@ const du = (e) => e === void 0 || e === "flat" ? { type: "flat" } : e === "curve
8827
8827
  }
8828
8828
  const c = l / r.height * r.physicalHeight, p = a[0] / c;
8829
8829
  return kr * p;
8830
- }, bu = ({
8830
+ }, Bt = ({
8831
8831
  font: e,
8832
8832
  text: r,
8833
8833
  fontSize: 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, In = typeof window < "u" ? new URL(window.location.href) : null;
8843
- In?.searchParams.get("mode");
8844
- In?.searchParams.has("rasterlayplan");
8842
+ }, Zr = window.DOMParser, Su = globalThis.DOMMatrix, Gn = typeof window < "u" ? new URL(window.location.href) : null;
8843
+ Gn?.searchParams.get("mode");
8844
+ Gn?.searchParams.has("rasterlayplan");
8845
8845
  typeof navigator < "u" && navigator.vendor && navigator.vendor.indexOf("Apple") > -1;
8846
8846
  const Tu = {
8847
8847
  aliceblue: "#f0f8ff",
@@ -8998,7 +8998,7 @@ const Tu = {
8998
8998
  }, Fr = (e) => {
8999
8999
  const r = typeof e == "string" ? Number.parseInt(e, 10) : e;
9000
9000
  return Math.max(0, Math.min(255, Math.round(r))).toString(16).padStart(2, "0");
9001
- }, Mt = (...e) => {
9001
+ }, It = (...e) => {
9002
9002
  const [r, t, n] = Array.isArray(e[0]) ? e[0] : e;
9003
9003
  return `#${Fr(r)}${Fr(t)}${Fr(n)}`;
9004
9004
  }, Fu = (e, r, t) => {
@@ -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), Pn = (e) => {
9016
+ }, Uu = (e) => /^#?([0-9a-f]{3}|[0-9a-f]{6})$/i.test(e), Nn = (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;
@@ -9021,7 +9021,7 @@ const Tu = {
9021
9021
  const n = r.match(
9022
9022
  /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*[\d.]+\s*)?\)/
9023
9023
  );
9024
- return n ? Mt(
9024
+ return n ? It(
9025
9025
  Number.parseInt(n[1], 10),
9026
9026
  Number.parseInt(n[2], 10),
9027
9027
  Number.parseInt(n[3], 10)
@@ -9033,7 +9033,7 @@ const Tu = {
9033
9033
  );
9034
9034
  if (!n) return;
9035
9035
  const a = Number.parseInt(n[1], 10), s = Number.parseFloat(n[2]) / 100, o = Number.parseFloat(n[3]) / 100, [u, i, l] = Fu(a, s, o);
9036
- return Mt(u, i, l);
9036
+ return It(u, i, l);
9037
9037
  }
9038
9038
  const t = Tu[r];
9039
9039
  if (t) return t;
@@ -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 Pn(e);
9074
+ return Nn(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 Gn(e) {
9100
+ function Hn(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 Nn(e, r) {
9104
+ function Wn(e, r) {
9105
9105
  const t = e.querySelector("svg");
9106
9106
  return t ? r ? t.innerHTML : t.outerHTML : "";
9107
9107
  }
@@ -9123,8 +9123,8 @@ function Du(e) {
9123
9123
  return t ? t.innerHTML.trim() : "";
9124
9124
  }
9125
9125
  const Au = ["fill", "stroke", "clip-path", "mask", "filter"];
9126
- function Bu(e, r) {
9127
- const { doc: t, wasWrapped: n } = Gn(e), a = /* @__PURE__ */ new Map();
9126
+ function Mu(e, r) {
9127
+ const { doc: t, wasWrapped: n } = Hn(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 Nn(t, n);
9155
+ return Wn(t, n);
9156
9156
  }
9157
- const Mu = ["fill", "stroke", "stop-color"], Iu = ["path", "rect", "circle", "ellipse", "polygon", "polyline", "text"];
9157
+ const Bu = ["fill", "stroke", "stop-color"], Iu = ["path", "rect", "circle", "ellipse", "polygon", "polyline", "text"];
9158
9158
  function Pu(e, r) {
9159
- const { doc: t, wasWrapped: n } = Gn(e);
9160
- for (const s of Mu)
9159
+ const { doc: t, wasWrapped: n } = Hn(e);
9160
+ for (const s of Bu)
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 = Pn(u), l = i ? r[i] : void 0;
9164
+ const i = Nn(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 Nn(t, n);
9173
+ return Wn(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);
@@ -9181,7 +9181,7 @@ const Gu = (e = [1, 0, 0, 1, 0, 0]) => {
9181
9181
  function Nu(e) {
9182
9182
  return e.replace(/&/g, "&amp;").replace(/"/g, "&quot;").replace(/'/g, "&apos;").replace(/</g, "&lt;").replace(/>/g, "&gt;");
9183
9183
  }
9184
- const It = (e, r, t) => e / t * r, Hu = ({
9184
+ const Pt = (e, r, t) => e / t * r, Hu = ({
9185
9185
  font: e,
9186
9186
  baselinePath: r,
9187
9187
  text: t,
@@ -9190,75 +9190,75 @@ 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 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;
9193
+ const { outlineWidth: u, letterSpacing: i, letterSpacingOutline: l } = a, f = new Vn(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
- const w = L * (t.length - 1), B = U + w;
9196
+ const w = L * (t.length - 1), M = U + w;
9197
9197
  let C = 0 - m;
9198
- s === "centre" ? C = (p - B) / 2 - m : s === "right" && (C = p - U - m - w);
9198
+ s === "centre" ? C = (p - M) / 2 - m : s === "right" && (C = p - U - m - w);
9199
9199
  const F = [];
9200
- for (let D = 0; D < h.length; D++) {
9201
- const R = h[D], A = R.getBoundingBox(), H = e.charToGlyph(t[D]), { advanceWidth: Q } = H;
9202
- if (!Q)
9200
+ for (let R = 0; R < h.length; R++) {
9201
+ const A = h[R], D = A.getBoundingBox(), H = e.charToGlyph(t[R]), { advanceWidth: Z } = H;
9202
+ if (!Z)
9203
9203
  throw new Error(
9204
- `No advance width for character: ${t[D]} in font ${e.names.fontFamily}`
9204
+ `No advance width for character: ${t[R]} in font ${e.names.fontFamily}`
9205
9205
  );
9206
- const { x1: G, x2: z } = H.getBoundingBox(), Y = It(
9207
- Q,
9206
+ const { x1: G, x2: z } = H.getBoundingBox(), Y = Pt(
9207
+ Z,
9208
9208
  n,
9209
9209
  e.unitsPerEm
9210
- ), _ = It(z - G, n, e.unitsPerEm);
9211
- let P = C + A.x1;
9212
- if (D > 0 && (P += L * D), P + _ > p)
9210
+ ), _ = Pt(z - G, n, e.unitsPerEm);
9211
+ let P = C + D.x1;
9212
+ if (R > 0 && (P += L * R), P + _ > p)
9213
9213
  throw new Error(
9214
- `TOO_WIDE: character "${t[D]}" at index ${D} exceeds baseline path length (${Math.round(P + _)} > ${Math.round(p)})`
9214
+ `TOO_WIDE: character "${t[R]}" at index ${R} exceeds baseline path length (${Math.round(P + _)} > ${Math.round(p)})`
9215
9215
  );
9216
- const V = P + Y / 2, $ = f.getTangentAtLength(V), M = Math.atan2($.y, $.x) * 180 / Math.PI, q = f.getPointAtLength(P), De = q.x, pr = q.y, Ae = A.x2 - A.x1, Be = new fe(A.x1 + Ae / 2, 0), Me = vu(
9217
- new fe(A.x1, 0),
9218
- M,
9219
- Be
9220
- ), Ce = De - Me.X, Hn = pr - Me.Y;
9216
+ const V = P + Y / 2, $ = f.getTangentAtLength(V), B = Math.atan2($.y, $.x) * 180 / Math.PI, q = f.getPointAtLength(P), De = q.x, pr = q.y, Ae = D.x2 - D.x1, Me = new fe(D.x1 + Ae / 2, 0), Be = gu(
9217
+ new fe(D.x1, 0),
9218
+ B,
9219
+ Me
9220
+ ), Ce = De - Be.X, zn = pr - Be.Y;
9221
9221
  let se = Gu();
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
- let ve = R.toPathData(2);
9222
+ se = se.translate(Ce, zn), B && (se = se.translate(D.x1 + Ae / 2, 0), se = se.rotate(B), se = se.translate(-D.x1 - Ae / 2, 0));
9223
+ const _n = se.toString();
9224
+ let ve = A.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;
9227
9227
  if (e.svgGlyphs) {
9228
9228
  const hr = e.svgGlyphs.get(H.index);
9229
9229
  if (hr) {
9230
9230
  let Ie = Du(hr.svg);
9231
- Ie = Bu(Ie, `g${H.index}-${D}`), o && (Ie = Pu(Ie, o)), cr = {
9231
+ Ie = Mu(Ie, `g${H.index}-${R}`), o && (Ie = Pu(Ie, o)), cr = {
9232
9232
  content: Ie,
9233
9233
  viewBox: hr.viewbox,
9234
- x: A.x1,
9235
- y: A.y1,
9236
- width: A.x2 - A.x1,
9237
- height: A.y2 - A.y1,
9234
+ x: D.x1,
9235
+ y: D.y1,
9236
+ width: D.x2 - D.x1,
9237
+ height: D.y2 - D.y1,
9238
9238
  glyphIndex: H.index
9239
9239
  };
9240
9240
  }
9241
9241
  }
9242
9242
  F.push({
9243
- path: R,
9243
+ path: A,
9244
9244
  matrix: se,
9245
9245
  attributes: {
9246
9246
  d: ve,
9247
- "data-character": Nu(t[D]),
9248
- transform: Wn
9247
+ "data-character": Nu(t[R]),
9248
+ transform: _n
9249
9249
  },
9250
9250
  glyphData: {
9251
9251
  index: H.index,
9252
- bbox: A
9252
+ bbox: D
9253
9253
  },
9254
9254
  ...cr ? { svgGlyph: cr } : {}
9255
9255
  });
9256
9256
  }
9257
9257
  return F;
9258
- }, Pt = { hex: "#FFFFFF" }, Ir = (e, r) => {
9258
+ }, Gt = { hex: "#FFFFFF" }, Ir = (e, r) => {
9259
9259
  const t = `data-${e}-colour-url`, n = [`${e}="${r.hex}"`];
9260
9260
  return r.reference && n.push(`${t}="${r.reference}"`), n.join(" ");
9261
- }, Gt = (e, r) => {
9261
+ }, Nt = (e, r) => {
9262
9262
  const { attributes: t, svgGlyph: n } = e;
9263
9263
  return n ? `<g transform="${t.transform}" data-character="${t["data-character"]}"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="${n.viewBox}" width="${n.width}" height="${n.height}" x="${n.x}" y="${n.y}" data-glyph-index="${n.glyphIndex}">${n.content}</svg></g>` : `<path d="${t.d}" ${Ir("fill", r)} transform="${t.transform}" data-character="${t["data-character"]}"/>`;
9264
9264
  }, Wu = ({
@@ -9266,8 +9266,8 @@ const It = (e, r, t) => e / t * r, Hu = ({
9266
9266
  paths: r,
9267
9267
  spacing: t = $e,
9268
9268
  fontSize: n = 0,
9269
- fillColour: a = Pt,
9270
- strokeColour: s = Pt
9269
+ fillColour: a = Gt,
9270
+ strokeColour: s = Gt
9271
9271
  }) => {
9272
9272
  const { width: o, height: u } = e, { outlineWidth: i } = t, l = i > 0 && n > 0;
9273
9273
  let f;
@@ -9275,18 +9275,18 @@ const It = (e, r, t) => e / t * r, Hu = ({
9275
9275
  const p = n * i * 2, h = r.filter((g) => !g.svgGlyph).map(
9276
9276
  ({ attributes: g }) => `<path d="${g.d}" ${Ir("fill", s)} ${Ir("stroke", s)} stroke-width="${p}" stroke-linejoin="round" transform="${g.transform}" data-character="${g["data-character"]}"/>`
9277
9277
  ).join(`
9278
- `), d = r.map((g) => Gt(g, a)).join(`
9278
+ `), d = r.map((g) => Nt(g, a)).join(`
9279
9279
  `);
9280
9280
  f = `${h}
9281
9281
  ${d}`;
9282
9282
  } else
9283
- f = r.map((p) => Gt(p, a)).join(`
9283
+ f = r.map((p) => Nt(p, a)).join(`
9284
9284
  `);
9285
9285
  const c = f ? `
9286
9286
  ${f}
9287
9287
  ` : "";
9288
9288
  return `<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${u}" viewBox="0 0 ${o} ${u}">${c}</svg>`;
9289
- }, Nt = (e) => {
9289
+ }, Ht = (e) => {
9290
9290
  const {
9291
9291
  text: r,
9292
9292
  font: t,
@@ -9313,85 +9313,92 @@ const It = (e, r, t) => e / t * r, Hu = ({
9313
9313
  throw new Error(
9314
9314
  `physicalSize height must be positive (got ${n[0]})`
9315
9315
  );
9316
- const x = a ?? xu({
9316
+ const x = a ?? bu({
9317
9317
  font: t,
9318
9318
  boxDimensions: s,
9319
9319
  physicalSize: n,
9320
9320
  spacing: o
9321
- }), U = du(i);
9321
+ }), U = mu(i);
9322
9322
  let y = r.split(`
9323
- `).filter((R) => R.length > 0);
9323
+ `).filter((A) => A.length > 0);
9324
9324
  y.length || (y = [""]), (U.type === "curved" || U.type === "custom") && (y = [y.join("")]);
9325
9325
  const L = y.map(
9326
- (R) => bu({ font: t, text: R, fontSize: x, spacing: o })
9327
- ), w = Math.max(...L.map((R) => R.baseline)), B = Math.max(...L.map((R) => R.height - R.baseline)), C = w + B, F = y.length === 1 ? C : C + C * (y.length - 1) * Bn, D = [];
9328
- for (let R = 0; R < y.length; R++) {
9329
- let A;
9326
+ (A) => Bt({ font: t, text: A, fontSize: x, spacing: o })
9327
+ ), w = Math.max(...L.map((A) => A.baseline)), M = Math.max(...L.map((A) => A.height - A.baseline)), C = w + M, F = y.length === 1 ? C : C + C * (y.length - 1) * Bn, R = [];
9328
+ for (let A = 0; A < y.length; A++) {
9329
+ let D;
9330
9330
  switch (U.type) {
9331
9331
  case "custom":
9332
- gu(U.path), A = U.path;
9332
+ yu(U.path), D = U.path;
9333
9333
  break;
9334
- case "curved":
9335
- A = Mn({
9334
+ case "curved": {
9335
+ const Z = Bt({
9336
+ font: t,
9337
+ text: Pn(t),
9338
+ fontSize: x,
9339
+ spacing: o
9340
+ });
9341
+ D = In({
9336
9342
  boxDimensions: s,
9337
- baseline: L[R].baseline,
9338
- textHeight: L[R].height,
9343
+ baseline: Z.baseline,
9344
+ textHeight: Z.height,
9339
9345
  verticalAlignment: u
9340
9346
  });
9341
9347
  break;
9348
+ }
9342
9349
  case "flat":
9343
- A = mu({
9350
+ D = xu({
9344
9351
  boxDimensions: s,
9345
9352
  totalTextHeight: F,
9346
9353
  baseline: w,
9347
9354
  lineHeight: C,
9348
9355
  verticalAlignment: u,
9349
- lineNumber: R
9356
+ lineNumber: A
9350
9357
  });
9351
9358
  break;
9352
9359
  }
9353
9360
  const H = Hu({
9354
9361
  font: t,
9355
- baselinePath: A,
9356
- text: y[R],
9362
+ baselinePath: D,
9363
+ text: y[A],
9357
9364
  fontSize: x,
9358
9365
  spacing: o,
9359
9366
  horizontalAlignment: l,
9360
9367
  colourMap: p
9361
9368
  });
9362
- D.push(...H);
9369
+ R.push(...H);
9363
9370
  }
9364
9371
  return Wu({
9365
9372
  boxDimensions: s,
9366
- paths: D,
9373
+ paths: R,
9367
9374
  spacing: o,
9368
9375
  fontSize: x,
9369
9376
  fillColour: f,
9370
9377
  strokeColour: c
9371
9378
  });
9372
9379
  }, qu = async (e) => {
9373
- const { fontUrl: r, fontSizeFallback: t, ...n } = e, a = !!n.colourMap, s = await pu(r, a);
9380
+ const { fontUrl: r, fontSizeFallback: t, ...n } = e, a = !!n.colourMap, s = await hu(r, a);
9374
9381
  try {
9375
- return Nt({ ...n, font: s });
9382
+ return Ht({ ...n, font: s });
9376
9383
  } catch (o) {
9377
9384
  if (t != null && o instanceof Error && o.message.startsWith("TOO_WIDE"))
9378
- return Nt({ ...n, font: s, fontSize: t });
9385
+ return Ht({ ...n, font: s, fontSize: t });
9379
9386
  throw o;
9380
9387
  }
9381
9388
  };
9382
9389
  export {
9383
- cu as DEFAULT_OUTLINE_FACTOR,
9390
+ vu as DEFAULT_OUTLINE_FACTOR,
9384
9391
  $e as DEFAULT_SPACING,
9385
9392
  Bn as LINE_HEIGHT,
9386
- Mn as generateCurvedBaseline,
9387
- mu as generateFlatBaseline,
9393
+ In as generateCurvedBaseline,
9394
+ xu as generateFlatBaseline,
9388
9395
  _u as getFontCache,
9389
9396
  Vu as getFontColours,
9390
- xu as getFontSizeFromPhysicalSize,
9397
+ bu as getFontSizeFromPhysicalSize,
9391
9398
  qu as getRenderedText,
9392
- bu as getTextMetricsAtFontSize,
9393
- pu as loadOpentypeFont,
9394
- du as normaliseBaselineOption,
9395
- Nt as renderText,
9396
- gu as validateCustomBaselinePath
9399
+ Bt as getTextMetricsAtFontSize,
9400
+ hu as loadOpentypeFont,
9401
+ mu as normaliseBaselineOption,
9402
+ Ht as renderText,
9403
+ yu as validateCustomBaselinePath
9397
9404
  };