@mlightcad/mtext-renderer 0.2.4 → 0.2.5

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
@@ -630,20 +630,20 @@ function Ba(t, e, r) {
630
630
  `)
631
631
  u = 0, o -= s;
632
632
  else {
633
- const p = Pa(c, a, u, o, r);
633
+ const p = Ia(c, a, u, o, r);
634
634
  u += p.offsetX, i.push(p.path);
635
635
  }
636
636
  }
637
637
  return i;
638
638
  }
639
- function Pa(t, e, r, n, a) {
639
+ function Ia(t, e, r, n, a) {
640
640
  const s = a.glyphs[t] || a.glyphs["?"];
641
641
  if (!s) {
642
642
  console.error('THREE.Font: character "' + t + '" does not exists in font family ' + a.familyName + ".");
643
643
  return;
644
644
  }
645
645
  const i = new va();
646
- let u, o, l, c, p, h, f, v;
646
+ let u, o, l, c, p, h, f, d;
647
647
  if (s.o) {
648
648
  const g = s._cachedOutline || (s._cachedOutline = s.o.split(" "));
649
649
  for (let y = 0, m = g.length; y < m; )
@@ -658,13 +658,13 @@ function Pa(t, e, r, n, a) {
658
658
  l = g[y++] * e + r, c = g[y++] * e + n, p = g[y++] * e + r, h = g[y++] * e + n, i.quadraticCurveTo(p, h, l, c);
659
659
  break;
660
660
  case "b":
661
- l = g[y++] * e + r, c = g[y++] * e + n, p = g[y++] * e + r, h = g[y++] * e + n, f = g[y++] * e + r, v = g[y++] * e + n, i.bezierCurveTo(p, h, f, v, l, c);
661
+ l = g[y++] * e + r, c = g[y++] * e + n, p = g[y++] * e + r, h = g[y++] * e + n, f = g[y++] * e + r, d = g[y++] * e + n, i.bezierCurveTo(p, h, f, d, l, c);
662
662
  break;
663
663
  }
664
664
  }
665
665
  return { offsetX: s.ha * e, path: i };
666
666
  }
667
- class Ia extends ga {
667
+ class Pa extends ga {
668
668
  constructor(e, r = {}) {
669
669
  const n = r.font;
670
670
  if (n === void 0)
@@ -686,7 +686,7 @@ class xr extends gn {
686
686
  * @returns A THREE.js BufferGeometry representing the text shape
687
687
  */
688
688
  toGeometry() {
689
- return new Ia(this.char, {
689
+ return new Pa(this.char, {
690
690
  font: this.font.font,
691
691
  depth: 0,
692
692
  size: this.fontSize,
@@ -925,19 +925,19 @@ Fe.prototype.addBezier = function(t, e, r, n, a, s, i, u) {
925
925
  var o = [t, e], l = [r, n], c = [a, s], p = [i, u];
926
926
  this.addPoint(t, e), this.addPoint(i, u);
927
927
  for (var h = 0; h <= 1; h++) {
928
- var f = 6 * o[h] - 12 * l[h] + 6 * c[h], v = -3 * o[h] + 9 * l[h] - 9 * c[h] + 3 * p[h], g = 3 * l[h] - 3 * o[h];
929
- if (v === 0) {
928
+ var f = 6 * o[h] - 12 * l[h] + 6 * c[h], d = -3 * o[h] + 9 * l[h] - 9 * c[h] + 3 * p[h], g = 3 * l[h] - 3 * o[h];
929
+ if (d === 0) {
930
930
  if (f === 0)
931
931
  continue;
932
932
  var y = -g / f;
933
933
  0 < y && y < 1 && (h === 0 && this.addX(Re(o[h], l[h], c[h], p[h], y)), h === 1 && this.addY(Re(o[h], l[h], c[h], p[h], y)));
934
934
  continue;
935
935
  }
936
- var m = Math.pow(f, 2) - 4 * g * v;
936
+ var m = Math.pow(f, 2) - 4 * g * d;
937
937
  if (!(m < 0)) {
938
- var S = (-f + Math.sqrt(m)) / (2 * v);
938
+ var S = (-f + Math.sqrt(m)) / (2 * d);
939
939
  0 < S && S < 1 && (h === 0 && this.addX(Re(o[h], l[h], c[h], p[h], S)), h === 1 && this.addY(Re(o[h], l[h], c[h], p[h], S)));
940
- var x = (-f - Math.sqrt(m)) / (2 * v);
940
+ var x = (-f - Math.sqrt(m)) / (2 * d);
941
941
  0 < x && x < 1 && (h === 0 && this.addX(Re(o[h], l[h], c[h], p[h], x)), h === 1 && this.addY(Re(o[h], l[h], c[h], p[h], x)));
942
942
  }
943
943
  }
@@ -1063,7 +1063,7 @@ function Cn(t) {
1063
1063
  function Tr(t, e) {
1064
1064
  t || Cn(e);
1065
1065
  }
1066
- var E = { fail: Cn, argument: Tr, assert: Tr }, Fr = 32768, wr = 2147483648, Pe = {}, b = {}, U = {};
1066
+ var E = { fail: Cn, argument: Tr, assert: Tr }, Fr = 32768, wr = 2147483648, Ie = {}, b = {}, U = {};
1067
1067
  function ue(t) {
1068
1068
  return function() {
1069
1069
  return t;
@@ -1169,12 +1169,12 @@ b.NAME = b.CHARARRAY;
1169
1169
  U.NAME = U.CHARARRAY;
1170
1170
  b.STRING = b.CHARARRAY;
1171
1171
  U.STRING = U.CHARARRAY;
1172
- Pe.UTF8 = function(t, e, r) {
1172
+ Ie.UTF8 = function(t, e, r) {
1173
1173
  for (var n = [], a = r, s = 0; s < a; s++, e += 1)
1174
1174
  n[s] = t.getUint8(e);
1175
1175
  return String.fromCharCode.apply(null, n);
1176
1176
  };
1177
- Pe.UTF16 = function(t, e, r) {
1177
+ Ie.UTF16 = function(t, e, r) {
1178
1178
  for (var n = [], a = r / 2, s = 0; s < a; s++, e += 2)
1179
1179
  n[s] = t.getUint16(e);
1180
1180
  return String.fromCharCode.apply(null, n);
@@ -1231,7 +1231,7 @@ var Vt = {
1231
1231
  "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔÒÚÛÙˆ˜¯˘˙˚¸˝˛ˇ"
1232
1232
  )
1233
1233
  };
1234
- Pe.MACSTRING = function(t, e, r, n) {
1234
+ Ie.MACSTRING = function(t, e, r, n) {
1235
1235
  var a = Vt[n];
1236
1236
  if (a !== void 0) {
1237
1237
  for (var s = "", i = 0; i < r; i++) {
@@ -1600,98 +1600,98 @@ var ts = {
1600
1600
  longDateTime: 8,
1601
1601
  tag: 4
1602
1602
  };
1603
- function d(t, e) {
1603
+ function v(t, e) {
1604
1604
  this.data = t, this.offset = e, this.relativeOffset = 0;
1605
1605
  }
1606
- d.prototype.parseByte = function() {
1606
+ v.prototype.parseByte = function() {
1607
1607
  var t = this.data.getUint8(this.offset + this.relativeOffset);
1608
1608
  return this.relativeOffset += 1, t;
1609
1609
  };
1610
- d.prototype.parseChar = function() {
1610
+ v.prototype.parseChar = function() {
1611
1611
  var t = this.data.getInt8(this.offset + this.relativeOffset);
1612
1612
  return this.relativeOffset += 1, t;
1613
1613
  };
1614
- d.prototype.parseCard8 = d.prototype.parseByte;
1615
- d.prototype.parseUShort = function() {
1614
+ v.prototype.parseCard8 = v.prototype.parseByte;
1615
+ v.prototype.parseUShort = function() {
1616
1616
  var t = this.data.getUint16(this.offset + this.relativeOffset);
1617
1617
  return this.relativeOffset += 2, t;
1618
1618
  };
1619
- d.prototype.parseCard16 = d.prototype.parseUShort;
1620
- d.prototype.parseSID = d.prototype.parseUShort;
1621
- d.prototype.parseOffset16 = d.prototype.parseUShort;
1622
- d.prototype.parseShort = function() {
1619
+ v.prototype.parseCard16 = v.prototype.parseUShort;
1620
+ v.prototype.parseSID = v.prototype.parseUShort;
1621
+ v.prototype.parseOffset16 = v.prototype.parseUShort;
1622
+ v.prototype.parseShort = function() {
1623
1623
  var t = this.data.getInt16(this.offset + this.relativeOffset);
1624
1624
  return this.relativeOffset += 2, t;
1625
1625
  };
1626
- d.prototype.parseF2Dot14 = function() {
1626
+ v.prototype.parseF2Dot14 = function() {
1627
1627
  var t = this.data.getInt16(this.offset + this.relativeOffset) / 16384;
1628
1628
  return this.relativeOffset += 2, t;
1629
1629
  };
1630
- d.prototype.parseULong = function() {
1630
+ v.prototype.parseULong = function() {
1631
1631
  var t = tr(this.data, this.offset + this.relativeOffset);
1632
1632
  return this.relativeOffset += 4, t;
1633
1633
  };
1634
- d.prototype.parseOffset32 = d.prototype.parseULong;
1635
- d.prototype.parseFixed = function() {
1634
+ v.prototype.parseOffset32 = v.prototype.parseULong;
1635
+ v.prototype.parseFixed = function() {
1636
1636
  var t = En(this.data, this.offset + this.relativeOffset);
1637
1637
  return this.relativeOffset += 4, t;
1638
1638
  };
1639
- d.prototype.parseString = function(t) {
1639
+ v.prototype.parseString = function(t) {
1640
1640
  var e = this.data, r = this.offset + this.relativeOffset, n = "";
1641
1641
  this.relativeOffset += t;
1642
1642
  for (var a = 0; a < t; a++)
1643
1643
  n += String.fromCharCode(e.getUint8(r + a));
1644
1644
  return n;
1645
1645
  };
1646
- d.prototype.parseTag = function() {
1646
+ v.prototype.parseTag = function() {
1647
1647
  return this.parseString(4);
1648
1648
  };
1649
- d.prototype.parseLongDateTime = function() {
1649
+ v.prototype.parseLongDateTime = function() {
1650
1650
  var t = tr(this.data, this.offset + this.relativeOffset + 4);
1651
1651
  return t -= 2082844800, this.relativeOffset += 8, t;
1652
1652
  };
1653
- d.prototype.parseVersion = function(t) {
1653
+ v.prototype.parseVersion = function(t) {
1654
1654
  var e = ft(this.data, this.offset + this.relativeOffset), r = ft(this.data, this.offset + this.relativeOffset + 2);
1655
1655
  return this.relativeOffset += 4, t === void 0 && (t = 4096), e + r / t / 10;
1656
1656
  };
1657
- d.prototype.skip = function(t, e) {
1657
+ v.prototype.skip = function(t, e) {
1658
1658
  e === void 0 && (e = 1), this.relativeOffset += ts[t] * e;
1659
1659
  };
1660
- d.prototype.parseULongList = function(t) {
1660
+ v.prototype.parseULongList = function(t) {
1661
1661
  t === void 0 && (t = this.parseULong());
1662
1662
  for (var e = new Array(t), r = this.data, n = this.offset + this.relativeOffset, a = 0; a < t; a++)
1663
1663
  e[a] = r.getUint32(n), n += 4;
1664
1664
  return this.relativeOffset += t * 4, e;
1665
1665
  };
1666
- d.prototype.parseOffset16List = d.prototype.parseUShortList = function(t) {
1666
+ v.prototype.parseOffset16List = v.prototype.parseUShortList = function(t) {
1667
1667
  t === void 0 && (t = this.parseUShort());
1668
1668
  for (var e = new Array(t), r = this.data, n = this.offset + this.relativeOffset, a = 0; a < t; a++)
1669
1669
  e[a] = r.getUint16(n), n += 2;
1670
1670
  return this.relativeOffset += t * 2, e;
1671
1671
  };
1672
- d.prototype.parseShortList = function(t) {
1672
+ v.prototype.parseShortList = function(t) {
1673
1673
  for (var e = new Array(t), r = this.data, n = this.offset + this.relativeOffset, a = 0; a < t; a++)
1674
1674
  e[a] = r.getInt16(n), n += 2;
1675
1675
  return this.relativeOffset += t * 2, e;
1676
1676
  };
1677
- d.prototype.parseByteList = function(t) {
1677
+ v.prototype.parseByteList = function(t) {
1678
1678
  for (var e = new Array(t), r = this.data, n = this.offset + this.relativeOffset, a = 0; a < t; a++)
1679
1679
  e[a] = r.getUint8(n++);
1680
1680
  return this.relativeOffset += t, e;
1681
1681
  };
1682
- d.prototype.parseList = function(t, e) {
1682
+ v.prototype.parseList = function(t, e) {
1683
1683
  e || (e = t, t = this.parseUShort());
1684
1684
  for (var r = new Array(t), n = 0; n < t; n++)
1685
1685
  r[n] = e.call(this);
1686
1686
  return r;
1687
1687
  };
1688
- d.prototype.parseList32 = function(t, e) {
1688
+ v.prototype.parseList32 = function(t, e) {
1689
1689
  e || (e = t, t = this.parseULong());
1690
1690
  for (var r = new Array(t), n = 0; n < t; n++)
1691
1691
  r[n] = e.call(this);
1692
1692
  return r;
1693
1693
  };
1694
- d.prototype.parseRecordList = function(t, e) {
1694
+ v.prototype.parseRecordList = function(t, e) {
1695
1695
  e || (e = t, t = this.parseUShort());
1696
1696
  for (var r = new Array(t), n = Object.keys(e), a = 0; a < t; a++) {
1697
1697
  for (var s = {}, i = 0; i < n.length; i++) {
@@ -1702,7 +1702,7 @@ d.prototype.parseRecordList = function(t, e) {
1702
1702
  }
1703
1703
  return r;
1704
1704
  };
1705
- d.prototype.parseRecordList32 = function(t, e) {
1705
+ v.prototype.parseRecordList32 = function(t, e) {
1706
1706
  e || (e = t, t = this.parseULong());
1707
1707
  for (var r = new Array(t), n = Object.keys(e), a = 0; a < t; a++) {
1708
1708
  for (var s = {}, i = 0; i < n.length; i++) {
@@ -1713,7 +1713,7 @@ d.prototype.parseRecordList32 = function(t, e) {
1713
1713
  }
1714
1714
  return r;
1715
1715
  };
1716
- d.prototype.parseStruct = function(t) {
1716
+ v.prototype.parseStruct = function(t) {
1717
1717
  if (typeof t == "function")
1718
1718
  return t.call(this);
1719
1719
  for (var e = Object.keys(t), r = {}, n = 0; n < e.length; n++) {
@@ -1722,28 +1722,28 @@ d.prototype.parseStruct = function(t) {
1722
1722
  }
1723
1723
  return r;
1724
1724
  };
1725
- d.prototype.parseValueRecord = function(t) {
1725
+ v.prototype.parseValueRecord = function(t) {
1726
1726
  if (t === void 0 && (t = this.parseUShort()), t !== 0) {
1727
1727
  var e = {};
1728
1728
  return t & 1 && (e.xPlacement = this.parseShort()), t & 2 && (e.yPlacement = this.parseShort()), t & 4 && (e.xAdvance = this.parseShort()), t & 8 && (e.yAdvance = this.parseShort()), t & 16 && (e.xPlaDevice = void 0, this.parseShort()), t & 32 && (e.yPlaDevice = void 0, this.parseShort()), t & 64 && (e.xAdvDevice = void 0, this.parseShort()), t & 128 && (e.yAdvDevice = void 0, this.parseShort()), e;
1729
1729
  }
1730
1730
  };
1731
- d.prototype.parseValueRecordList = function() {
1731
+ v.prototype.parseValueRecordList = function() {
1732
1732
  for (var t = this.parseUShort(), e = this.parseUShort(), r = new Array(e), n = 0; n < e; n++)
1733
1733
  r[n] = this.parseValueRecord(t);
1734
1734
  return r;
1735
1735
  };
1736
- d.prototype.parsePointer = function(t) {
1736
+ v.prototype.parsePointer = function(t) {
1737
1737
  var e = this.parseOffset16();
1738
1738
  if (e > 0)
1739
- return new d(this.data, this.offset + e).parseStruct(t);
1739
+ return new v(this.data, this.offset + e).parseStruct(t);
1740
1740
  };
1741
- d.prototype.parsePointer32 = function(t) {
1741
+ v.prototype.parsePointer32 = function(t) {
1742
1742
  var e = this.parseOffset32();
1743
1743
  if (e > 0)
1744
- return new d(this.data, this.offset + e).parseStruct(t);
1744
+ return new v(this.data, this.offset + e).parseStruct(t);
1745
1745
  };
1746
- d.prototype.parseListOfLists = function(t) {
1746
+ v.prototype.parseListOfLists = function(t) {
1747
1747
  for (var e = this.parseOffset16List(), r = e.length, n = this.relativeOffset, a = new Array(r), s = 0; s < r; s++) {
1748
1748
  var i = e[s];
1749
1749
  if (i === 0) {
@@ -1759,7 +1759,7 @@ d.prototype.parseListOfLists = function(t) {
1759
1759
  }
1760
1760
  return this.relativeOffset = n, a;
1761
1761
  };
1762
- d.prototype.parseCoverage = function() {
1762
+ v.prototype.parseCoverage = function() {
1763
1763
  var t = this.offset + this.relativeOffset, e = this.parseUShort(), r = this.parseUShort();
1764
1764
  if (e === 1)
1765
1765
  return {
@@ -1780,7 +1780,7 @@ d.prototype.parseCoverage = function() {
1780
1780
  }
1781
1781
  throw new Error("0x" + t.toString(16) + ": Coverage format must be 1 or 2.");
1782
1782
  };
1783
- d.prototype.parseClassDef = function() {
1783
+ v.prototype.parseClassDef = function() {
1784
1784
  var t = this.offset + this.relativeOffset, e = this.parseUShort();
1785
1785
  if (e === 1)
1786
1786
  return {
@@ -1792,98 +1792,98 @@ d.prototype.parseClassDef = function() {
1792
1792
  return {
1793
1793
  format: 2,
1794
1794
  ranges: this.parseRecordList({
1795
- start: d.uShort,
1796
- end: d.uShort,
1797
- classId: d.uShort
1795
+ start: v.uShort,
1796
+ end: v.uShort,
1797
+ classId: v.uShort
1798
1798
  })
1799
1799
  };
1800
1800
  throw new Error("0x" + t.toString(16) + ": ClassDef format must be 1 or 2.");
1801
1801
  };
1802
- d.list = function(t, e) {
1802
+ v.list = function(t, e) {
1803
1803
  return function() {
1804
1804
  return this.parseList(t, e);
1805
1805
  };
1806
1806
  };
1807
- d.list32 = function(t, e) {
1807
+ v.list32 = function(t, e) {
1808
1808
  return function() {
1809
1809
  return this.parseList32(t, e);
1810
1810
  };
1811
1811
  };
1812
- d.recordList = function(t, e) {
1812
+ v.recordList = function(t, e) {
1813
1813
  return function() {
1814
1814
  return this.parseRecordList(t, e);
1815
1815
  };
1816
1816
  };
1817
- d.recordList32 = function(t, e) {
1817
+ v.recordList32 = function(t, e) {
1818
1818
  return function() {
1819
1819
  return this.parseRecordList32(t, e);
1820
1820
  };
1821
1821
  };
1822
- d.pointer = function(t) {
1822
+ v.pointer = function(t) {
1823
1823
  return function() {
1824
1824
  return this.parsePointer(t);
1825
1825
  };
1826
1826
  };
1827
- d.pointer32 = function(t) {
1827
+ v.pointer32 = function(t) {
1828
1828
  return function() {
1829
1829
  return this.parsePointer32(t);
1830
1830
  };
1831
1831
  };
1832
- d.tag = d.prototype.parseTag;
1833
- d.byte = d.prototype.parseByte;
1834
- d.uShort = d.offset16 = d.prototype.parseUShort;
1835
- d.uShortList = d.prototype.parseUShortList;
1836
- d.uLong = d.offset32 = d.prototype.parseULong;
1837
- d.uLongList = d.prototype.parseULongList;
1838
- d.struct = d.prototype.parseStruct;
1839
- d.coverage = d.prototype.parseCoverage;
1840
- d.classDef = d.prototype.parseClassDef;
1832
+ v.tag = v.prototype.parseTag;
1833
+ v.byte = v.prototype.parseByte;
1834
+ v.uShort = v.offset16 = v.prototype.parseUShort;
1835
+ v.uShortList = v.prototype.parseUShortList;
1836
+ v.uLong = v.offset32 = v.prototype.parseULong;
1837
+ v.uLongList = v.prototype.parseULongList;
1838
+ v.struct = v.prototype.parseStruct;
1839
+ v.coverage = v.prototype.parseCoverage;
1840
+ v.classDef = v.prototype.parseClassDef;
1841
1841
  var Er = {
1842
- reserved: d.uShort,
1843
- reqFeatureIndex: d.uShort,
1844
- featureIndexes: d.uShortList
1845
- };
1846
- d.prototype.parseScriptList = function() {
1847
- return this.parsePointer(d.recordList({
1848
- tag: d.tag,
1849
- script: d.pointer({
1850
- defaultLangSys: d.pointer(Er),
1851
- langSysRecords: d.recordList({
1852
- tag: d.tag,
1853
- langSys: d.pointer(Er)
1842
+ reserved: v.uShort,
1843
+ reqFeatureIndex: v.uShort,
1844
+ featureIndexes: v.uShortList
1845
+ };
1846
+ v.prototype.parseScriptList = function() {
1847
+ return this.parsePointer(v.recordList({
1848
+ tag: v.tag,
1849
+ script: v.pointer({
1850
+ defaultLangSys: v.pointer(Er),
1851
+ langSysRecords: v.recordList({
1852
+ tag: v.tag,
1853
+ langSys: v.pointer(Er)
1854
1854
  })
1855
1855
  })
1856
1856
  })) || [];
1857
1857
  };
1858
- d.prototype.parseFeatureList = function() {
1859
- return this.parsePointer(d.recordList({
1860
- tag: d.tag,
1861
- feature: d.pointer({
1862
- featureParams: d.offset16,
1863
- lookupListIndexes: d.uShortList
1858
+ v.prototype.parseFeatureList = function() {
1859
+ return this.parsePointer(v.recordList({
1860
+ tag: v.tag,
1861
+ feature: v.pointer({
1862
+ featureParams: v.offset16,
1863
+ lookupListIndexes: v.uShortList
1864
1864
  })
1865
1865
  })) || [];
1866
1866
  };
1867
- d.prototype.parseLookupList = function(t) {
1868
- return this.parsePointer(d.list(d.pointer(function() {
1867
+ v.prototype.parseLookupList = function(t) {
1868
+ return this.parsePointer(v.list(v.pointer(function() {
1869
1869
  var e = this.parseUShort();
1870
1870
  E.argument(1 <= e && e <= 9, "GPOS/GSUB lookup type " + e + " unknown.");
1871
1871
  var r = this.parseUShort(), n = r & 16;
1872
1872
  return {
1873
1873
  lookupType: e,
1874
1874
  lookupFlag: r,
1875
- subtables: this.parseList(d.pointer(t[e])),
1875
+ subtables: this.parseList(v.pointer(t[e])),
1876
1876
  markFilteringSet: n ? this.parseUShort() : void 0
1877
1877
  };
1878
1878
  }))) || [];
1879
1879
  };
1880
- d.prototype.parseFeatureVariationsList = function() {
1880
+ v.prototype.parseFeatureVariationsList = function() {
1881
1881
  return this.parsePointer32(function() {
1882
1882
  var t = this.parseUShort(), e = this.parseUShort();
1883
1883
  E.argument(t === 1 && e < 1, "GPOS/GSUB feature variations table unknown.");
1884
1884
  var r = this.parseRecordList32({
1885
- conditionSetOffset: d.offset32,
1886
- featureTableSubstitutionOffset: d.offset32
1885
+ conditionSetOffset: v.offset32,
1886
+ featureTableSubstitutionOffset: v.offset32
1887
1887
  });
1888
1888
  return r;
1889
1889
  }) || [];
@@ -1900,7 +1900,7 @@ var F = {
1900
1900
  getOffset: Ja,
1901
1901
  getBytes: $a,
1902
1902
  bytesToString: es,
1903
- Parser: d
1903
+ Parser: v
1904
1904
  };
1905
1905
  function rs(t, e) {
1906
1906
  e.parseUShort(), t.length = e.parseULong(), t.language = e.parseULong();
@@ -1915,8 +1915,8 @@ function ns(t, e, r, n, a) {
1915
1915
  var s;
1916
1916
  t.segCount = s = e.parseUShort() >> 1, e.skip("uShort", 3), t.glyphIndexMap = {};
1917
1917
  for (var i = new F.Parser(r, n + a + 14), u = new F.Parser(r, n + a + 16 + s * 2), o = new F.Parser(r, n + a + 16 + s * 4), l = new F.Parser(r, n + a + 16 + s * 6), c = n + a + 16 + s * 8, p = 0; p < s - 1; p += 1)
1918
- for (var h = void 0, f = i.parseUShort(), v = u.parseUShort(), g = o.parseShort(), y = l.parseUShort(), m = v; m <= f; m += 1)
1919
- y !== 0 ? (c = l.offset + l.relativeOffset - 2, c += y, c += (m - v) * 2, h = F.getUShort(r, c), h !== 0 && (h = h + g & 65535)) : h = m + g & 65535, t.glyphIndexMap[m] = h;
1918
+ for (var h = void 0, f = i.parseUShort(), d = u.parseUShort(), g = o.parseShort(), y = l.parseUShort(), m = d; m <= f; m += 1)
1919
+ y !== 0 ? (c = l.offset + l.relativeOffset - 2, c += y, c += (m - d) * 2, h = F.getUShort(r, c), h !== 0 && (h = h + g & 65535)) : h = m + g & 65535, t.glyphIndexMap[m] = h;
1920
1920
  }
1921
1921
  function as(t, e) {
1922
1922
  var r = {};
@@ -1998,14 +1998,14 @@ function os(t) {
1998
1998
  });
1999
1999
  }
2000
2000
  is(s);
2001
- var o = s.segments.length, l = 0, c = [], p = [], h = [], f = [], v = [], g = [];
2001
+ var o = s.segments.length, l = 0, c = [], p = [], h = [], f = [], d = [], g = [];
2002
2002
  for (r = 0; r < o; r += 1) {
2003
2003
  var y = s.segments[r];
2004
- y.end <= 65535 && y.start <= 65535 ? (c = c.concat({ name: "end_" + r, type: "USHORT", value: y.end }), p = p.concat({ name: "start_" + r, type: "USHORT", value: y.start }), h = h.concat({ name: "idDelta_" + r, type: "SHORT", value: y.delta }), f = f.concat({ name: "idRangeOffset_" + r, type: "USHORT", value: y.offset }), y.glyphId !== void 0 && (v = v.concat({ name: "glyph_" + r, type: "USHORT", value: y.glyphId }))) : l += 1, !e && y.glyphIndex !== void 0 && (g = g.concat({ name: "cmap12Start_" + r, type: "ULONG", value: y.start }), g = g.concat({ name: "cmap12End_" + r, type: "ULONG", value: y.end }), g = g.concat({ name: "cmap12Glyph_" + r, type: "ULONG", value: y.glyphIndex }));
2004
+ y.end <= 65535 && y.start <= 65535 ? (c = c.concat({ name: "end_" + r, type: "USHORT", value: y.end }), p = p.concat({ name: "start_" + r, type: "USHORT", value: y.start }), h = h.concat({ name: "idDelta_" + r, type: "SHORT", value: y.delta }), f = f.concat({ name: "idRangeOffset_" + r, type: "USHORT", value: y.offset }), y.glyphId !== void 0 && (d = d.concat({ name: "glyph_" + r, type: "USHORT", value: y.glyphId }))) : l += 1, !e && y.glyphIndex !== void 0 && (g = g.concat({ name: "cmap12Start_" + r, type: "ULONG", value: y.start }), g = g.concat({ name: "cmap12End_" + r, type: "ULONG", value: y.end }), g = g.concat({ name: "cmap12Glyph_" + r, type: "ULONG", value: y.glyphIndex }));
2005
2005
  }
2006
- if (s.segCountX2 = (o - l) * 2, s.searchRange = Math.pow(2, Math.floor(Math.log(o - l) / Math.log(2))) * 2, s.entrySelector = Math.log(s.searchRange / 2) / Math.log(2), s.rangeShift = s.segCountX2 - s.searchRange, s.fields = s.fields.concat(c), s.fields.push({ name: "reservedPad", type: "USHORT", value: 0 }), s.fields = s.fields.concat(p), s.fields = s.fields.concat(h), s.fields = s.fields.concat(f), s.fields = s.fields.concat(v), s.cmap4Length = 14 + // Subtable header
2006
+ if (s.segCountX2 = (o - l) * 2, s.searchRange = Math.pow(2, Math.floor(Math.log(o - l) / Math.log(2))) * 2, s.entrySelector = Math.log(s.searchRange / 2) / Math.log(2), s.rangeShift = s.segCountX2 - s.searchRange, s.fields = s.fields.concat(c), s.fields.push({ name: "reservedPad", type: "USHORT", value: 0 }), s.fields = s.fields.concat(p), s.fields = s.fields.concat(h), s.fields = s.fields.concat(f), s.fields = s.fields.concat(d), s.cmap4Length = 14 + // Subtable header
2007
2007
  c.length * 2 + 2 + // reservedPad
2008
- p.length * 2 + h.length * 2 + f.length * 2 + v.length * 2, !e) {
2008
+ p.length * 2 + h.length * 2 + f.length * 2 + d.length * 2, !e) {
2009
2009
  var m = 16 + // Subtable header
2010
2010
  g.length * 4;
2011
2011
  s.cmap12Offset = 12 + 2 * 2 + 4 + s.cmap4Length, s.fields = s.fields.concat([
@@ -3339,10 +3339,10 @@ ae.prototype.draw = function(t, e, r, n, a) {
3339
3339
  this.getPath(e, r, n, a).draw(t);
3340
3340
  };
3341
3341
  ae.prototype.drawPoints = function(t, e, r, n) {
3342
- function a(p, h, f, v) {
3342
+ function a(p, h, f, d) {
3343
3343
  t.beginPath();
3344
3344
  for (var g = 0; g < p.length; g += 1)
3345
- t.moveTo(h + p[g].x * v, f + p[g].y * v), t.arc(h + p[g].x * v, f + p[g].y * v, 2, 0, Math.PI * 2, !1);
3345
+ t.moveTo(h + p[g].x * d, f + p[g].y * d), t.arc(h + p[g].x * d, f + p[g].y * d, 2, 0, Math.PI * 2, !1);
3346
3346
  t.closePath(), t.fill();
3347
3347
  }
3348
3348
  e = e !== void 0 ? e : 0, r = r !== void 0 ? r : 0, n = n !== void 0 ? n : 24;
@@ -3579,7 +3579,7 @@ function Fs(t, e) {
3579
3579
  var r = An(t, 0, t.byteLength);
3580
3580
  return Dn(r, Mn, e);
3581
3581
  }
3582
- function Pn(t, e, r, n) {
3582
+ function In(t, e, r, n) {
3583
3583
  var a = An(t, e, r);
3584
3584
  return Dn(a, Bn, n);
3585
3585
  }
@@ -3589,7 +3589,7 @@ function Or(t, e, r, n) {
3589
3589
  u._subrs = [], u._subrsBias = 0, u._defaultWidthX = 0, u._nominalWidthX = 0;
3590
3590
  var o = u.private[0], l = u.private[1];
3591
3591
  if (o !== 0 && l !== 0) {
3592
- var c = Pn(t, l + e, o, n);
3592
+ var c = In(t, l + e, o, n);
3593
3593
  if (u._defaultWidthX = c.defaultWidthX, u._nominalWidthX = c.nominalWidthX, c.subrs !== 0) {
3594
3594
  var p = l + c.subrs, h = xe(t, p + e);
3595
3595
  u._subrs = h.objects, u._subrsBias = Yt(u._subrs);
@@ -3639,12 +3639,12 @@ function Cs(t, e, r) {
3639
3639
  return new pt(a, r);
3640
3640
  }
3641
3641
  function Ur(t, e, r) {
3642
- var n, a, s, i, u = new _(), o = [], l = 0, c = !1, p = !1, h = 0, f = 0, v, g, y, m;
3642
+ var n, a, s, i, u = new _(), o = [], l = 0, c = !1, p = !1, h = 0, f = 0, d, g, y, m;
3643
3643
  if (t.isCIDFont) {
3644
3644
  var S = t.tables.cff.topDict._fdSelect[e.index], x = t.tables.cff.topDict._fdArray[S];
3645
- v = x._subrs, g = x._subrsBias, y = x._defaultWidthX, m = x._nominalWidthX;
3645
+ d = x._subrs, g = x._subrsBias, y = x._defaultWidthX, m = x._nominalWidthX;
3646
3646
  } else
3647
- v = t.tables.cff.topDict._subrs, g = t.tables.cff.topDict._subrsBias, y = t.tables.cff.topDict._defaultWidthX, m = t.tables.cff.topDict._nominalWidthX;
3647
+ d = t.tables.cff.topDict._subrs, g = t.tables.cff.topDict._subrsBias, y = t.tables.cff.topDict._defaultWidthX, m = t.tables.cff.topDict._nominalWidthX;
3648
3648
  var O = y;
3649
3649
  function w(C, N) {
3650
3650
  p && u.closePath(), u.moveTo(C, N), p = !0;
@@ -3683,7 +3683,7 @@ function Ur(t, e, r) {
3683
3683
  n = h + o.shift(), a = f + o.shift(), s = n + o.shift(), i = a + o.shift(), h = s + o.shift(), f = i + o.shift(), u.curveTo(n, a, s, i, h, f);
3684
3684
  break;
3685
3685
  case 10:
3686
- ne = o.pop() + g, G = v[ne], G && L(G);
3686
+ ne = o.pop() + g, G = d[ne], G && L(G);
3687
3687
  break;
3688
3688
  case 11:
3689
3689
  return;
@@ -3803,10 +3803,10 @@ function Os(t, e, r, n) {
3803
3803
  if (p === 0 || h === 0)
3804
3804
  throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
3805
3805
  p += e;
3806
- var f = xe(t, p), v = Or(t, e, f.objects, u.objects);
3807
- c._fdArray = v, h += e, c._fdSelect = Es(t, h, r.numGlyphs, v.length);
3806
+ var f = xe(t, p), d = Or(t, e, f.objects, u.objects);
3807
+ c._fdArray = d, h += e, c._fdSelect = Es(t, h, r.numGlyphs, d.length);
3808
3808
  }
3809
- var g = e + c.private[1], y = Pn(t, g, c.private[0], u.objects);
3809
+ var g = e + c.private[1], y = In(t, g, c.private[0], u.objects);
3810
3810
  if (r.defaultWidthX = y.defaultWidthX, r.nominalWidthX = y.nominalWidthX, y.subrs !== 0) {
3811
3811
  var m = g + y.subrs, S = xe(t, m);
3812
3812
  r.subrs = S.objects, r.subrsBias = Yt(r.subrs);
@@ -3826,7 +3826,7 @@ function Os(t, e, r, n) {
3826
3826
  r.glyphs.push(w, de.cffGlyphLoader(r, w, Ur, D));
3827
3827
  }
3828
3828
  }
3829
- function In(t, e) {
3829
+ function Pn(t, e) {
3830
3830
  var r, n = it.indexOf(t);
3831
3831
  return n >= 0 && (r = n), n = e.indexOf(t), n >= 0 ? r = n + it.length : (r = it.length + e.length, e.push(t)), r;
3832
3832
  }
@@ -3850,7 +3850,7 @@ function Ls(t) {
3850
3850
  function Gn(t, e, r) {
3851
3851
  for (var n = {}, a = 0; a < t.length; a += 1) {
3852
3852
  var s = t[a], i = e[s.name];
3853
- i !== void 0 && !Rn(i, s.value) && (s.type === "SID" && (i = In(i, r)), n[s.op] = { name: s.name, type: s.type, value: i });
3853
+ i !== void 0 && !Rn(i, s.value) && (s.type === "SID" && (i = Pn(i, r)), n[s.op] = { name: s.name, type: s.type, value: i });
3854
3854
  }
3855
3855
  return n;
3856
3856
  }
@@ -3884,7 +3884,7 @@ function Ds(t, e) {
3884
3884
  for (var r = new k.Record("Charsets", [
3885
3885
  { name: "format", type: "Card8", value: 0 }
3886
3886
  ]), n = 0; n < t.length; n += 1) {
3887
- var a = t[n], s = In(a, e);
3887
+ var a = t[n], s = Pn(a, e);
3888
3888
  r.fields.push({ name: "glyph_" + n, type: "SID", value: s });
3889
3889
  }
3890
3890
  return r;
@@ -3911,8 +3911,8 @@ function Ms(t) {
3911
3911
  else if (o.type === "L")
3912
3912
  i = Math.round(o.x - n), u = Math.round(o.y - a), e.push({ name: "dx", type: "NUMBER", value: i }), e.push({ name: "dy", type: "NUMBER", value: u }), e.push({ name: "rlineto", type: "OP", value: 5 }), n = Math.round(o.x), a = Math.round(o.y);
3913
3913
  else if (o.type === "C") {
3914
- var p = Math.round(o.x1 - n), h = Math.round(o.y1 - a), f = Math.round(o.x2 - o.x1), v = Math.round(o.y2 - o.y1);
3915
- i = Math.round(o.x - o.x2), u = Math.round(o.y - o.y2), e.push({ name: "dx1", type: "NUMBER", value: p }), e.push({ name: "dy1", type: "NUMBER", value: h }), e.push({ name: "dx2", type: "NUMBER", value: f }), e.push({ name: "dy2", type: "NUMBER", value: v }), e.push({ name: "dx", type: "NUMBER", value: i }), e.push({ name: "dy", type: "NUMBER", value: u }), e.push({ name: "rrcurveto", type: "OP", value: 8 }), n = Math.round(o.x), a = Math.round(o.y);
3914
+ var p = Math.round(o.x1 - n), h = Math.round(o.y1 - a), f = Math.round(o.x2 - o.x1), d = Math.round(o.y2 - o.y1);
3915
+ i = Math.round(o.x - o.x2), u = Math.round(o.y - o.y2), e.push({ name: "dx1", type: "NUMBER", value: p }), e.push({ name: "dy1", type: "NUMBER", value: h }), e.push({ name: "dx2", type: "NUMBER", value: f }), e.push({ name: "dy2", type: "NUMBER", value: d }), e.push({ name: "dx", type: "NUMBER", value: i }), e.push({ name: "dy", type: "NUMBER", value: u }), e.push({ name: "rrcurveto", type: "OP", value: 8 }), n = Math.round(o.x), a = Math.round(o.y);
3916
3916
  }
3917
3917
  }
3918
3918
  return e.push({ name: "endchar", type: "OP", value: 14 }), e;
@@ -3926,13 +3926,13 @@ function Bs(t) {
3926
3926
  }
3927
3927
  return e;
3928
3928
  }
3929
- function Ps(t, e) {
3929
+ function Is(t, e) {
3930
3930
  var r = new k.Record("Private DICT", [
3931
3931
  { name: "dict", type: "DICT", value: {} }
3932
3932
  ]);
3933
3933
  return r.dict = Gn(Bn, t, e), r;
3934
3934
  }
3935
- function Is(t, e) {
3935
+ function Ps(t, e) {
3936
3936
  for (var r = new k.Table("CFF ", [
3937
3937
  { name: "header", type: "RECORD" },
3938
3938
  { name: "nameIndex", type: "RECORD" },
@@ -3958,11 +3958,11 @@ function Is(t, e) {
3958
3958
  var l = [];
3959
3959
  r.header = Us(), r.nameIndex = Ls([e.postScriptName]);
3960
3960
  var c = Lr(a, l);
3961
- r.topDictIndex = Rr(c), r.globalSubrIndex = As(), r.charsets = Ds(i, l), r.charStringsIndex = Bs(t), r.privateDict = Ps(s, l), r.stringIndex = Rs(l);
3961
+ r.topDictIndex = Rr(c), r.globalSubrIndex = As(), r.charsets = Ds(i, l), r.charStringsIndex = Bs(t), r.privateDict = Is(s, l), r.stringIndex = Rs(l);
3962
3962
  var p = r.header.sizeOf() + r.nameIndex.sizeOf() + r.topDictIndex.sizeOf() + r.stringIndex.sizeOf() + r.globalSubrIndex.sizeOf();
3963
3963
  return a.charset = p, a.encoding = 0, a.charStrings = a.charset + r.charsets.sizeOf(), a.private[1] = a.charStrings + r.charStringsIndex.sizeOf(), c = Lr(a, l), r.topDictIndex = Rr(c), r;
3964
3964
  }
3965
- var Nn = { parse: Os, make: Is };
3965
+ var Nn = { parse: Os, make: Ps };
3966
3966
  function Gs(t, e) {
3967
3967
  var r = {}, n = new F.Parser(t, e);
3968
3968
  return r.version = n.parseVersion(), r.fontRevision = Math.round(n.parseFixed() * 1e3) / 1e3, r.checkSumAdjustment = n.parseULong(), r.magicNumber = n.parseULong(), E.argument(r.magicNumber === 1594834165, "Font header has wrong magic number."), r.flags = n.parseUShort(), r.unitsPerEm = n.parseUShort(), r.created = n.parseLongDateTime(), r.modified = n.parseLongDateTime(), r.xMin = n.parseShort(), r.yMin = n.parseShort(), r.xMax = n.parseShort(), r.yMax = n.parseShort(), r.macStyle = n.parseUShort(), r.lowestRecPPEM = n.parseUShort(), r.fontDirectionHint = n.parseShort(), r.indexToLocFormat = n.parseShort(), r.glyphDataFormat = n.parseShort(), r;
@@ -4813,10 +4813,10 @@ function Zn(t, e, r) {
4813
4813
  }
4814
4814
  function ei(t, e, r) {
4815
4815
  for (var n = {}, a = new F.Parser(t, e), s = a.parseUShort(), i = a.parseUShort(), u = a.offset + a.parseUShort(), o = 0; o < i; o++) {
4816
- var l = a.parseUShort(), c = a.parseUShort(), p = a.parseUShort(), h = a.parseUShort(), f = qn[h] || h, v = a.parseUShort(), g = a.parseUShort(), y = Qs(l, p, r), m = Zn(l, c, p);
4816
+ var l = a.parseUShort(), c = a.parseUShort(), p = a.parseUShort(), h = a.parseUShort(), f = qn[h] || h, d = a.parseUShort(), g = a.parseUShort(), y = Qs(l, p, r), m = Zn(l, c, p);
4817
4817
  if (m !== void 0 && y !== void 0) {
4818
4818
  var S = void 0;
4819
- if (m === Zt ? S = Pe.UTF16(t, u + g, v) : S = Pe.MACSTRING(t, u + g, v, m), S) {
4819
+ if (m === Zt ? S = Ie.UTF16(t, u + g, d) : S = Ie.MACSTRING(t, u + g, d, m), S) {
4820
4820
  var x = n[f];
4821
4821
  x === void 0 && (x = n[f] = {}), x[y] = S;
4822
4822
  }
@@ -4872,9 +4872,9 @@ function ri(t, e) {
4872
4872
  for (var o = Ft(Xn), l = Ft(Yn), c = [], p = [], h = 0; h < n.length; h++) {
4873
4873
  r = n[h];
4874
4874
  var f = a[r];
4875
- for (var v in f) {
4876
- var g = f[v], y = 1, m = o[v], S = Ks[m], x = Zn(y, S, m), O = b.MACSTRING(g, x);
4877
- O === void 0 && (y = 0, m = e.indexOf(v), m < 0 && (m = e.length, e.push(v)), S = 4, O = b.UTF16(g));
4875
+ for (var d in f) {
4876
+ var g = f[d], y = 1, m = o[d], S = Ks[m], x = Zn(y, S, m), O = b.MACSTRING(g, x);
4877
+ O === void 0 && (y = 0, m = e.indexOf(d), m < 0 && (m = e.length, e.push(d)), S = 4, O = b.UTF16(g));
4878
4878
  var w = Dr(O, p);
4879
4879
  c.push(Ar(
4880
4880
  y,
@@ -4884,7 +4884,7 @@ function ri(t, e) {
4884
4884
  O.length,
4885
4885
  w
4886
4886
  ));
4887
- var D = l[v];
4887
+ var D = l[d];
4888
4888
  if (D !== void 0) {
4889
4889
  var L = b.UTF16(g), C = Dr(L, p);
4890
4890
  c.push(Ar(
@@ -5267,13 +5267,13 @@ se[1] = function() {
5267
5267
  if (r === 1)
5268
5268
  return {
5269
5269
  substFormat: 1,
5270
- coverage: this.parsePointer(d.coverage),
5270
+ coverage: this.parsePointer(v.coverage),
5271
5271
  deltaGlyphId: this.parseUShort()
5272
5272
  };
5273
5273
  if (r === 2)
5274
5274
  return {
5275
5275
  substFormat: 2,
5276
- coverage: this.parsePointer(d.coverage),
5276
+ coverage: this.parsePointer(v.coverage),
5277
5277
  substitute: this.parseOffset16List()
5278
5278
  };
5279
5279
  E.assert(!1, "0x" + e.toString(16) + ": lookup type 1 format must be 1 or 2.");
@@ -5282,7 +5282,7 @@ se[2] = function() {
5282
5282
  var e = this.parseUShort();
5283
5283
  return E.argument(e === 1, "GSUB Multiple Substitution Subtable identifier-format must be 1"), {
5284
5284
  substFormat: e,
5285
- coverage: this.parsePointer(d.coverage),
5285
+ coverage: this.parsePointer(v.coverage),
5286
5286
  sequences: this.parseListOfLists()
5287
5287
  };
5288
5288
  };
@@ -5290,7 +5290,7 @@ se[3] = function() {
5290
5290
  var e = this.parseUShort();
5291
5291
  return E.argument(e === 1, "GSUB Alternate Substitution Subtable identifier-format must be 1"), {
5292
5292
  substFormat: e,
5293
- coverage: this.parsePointer(d.coverage),
5293
+ coverage: this.parsePointer(v.coverage),
5294
5294
  alternateSets: this.parseListOfLists()
5295
5295
  };
5296
5296
  };
@@ -5298,7 +5298,7 @@ se[4] = function() {
5298
5298
  var e = this.parseUShort();
5299
5299
  return E.argument(e === 1, "GSUB ligature table identifier-format must be 1"), {
5300
5300
  substFormat: e,
5301
- coverage: this.parsePointer(d.coverage),
5301
+ coverage: this.parsePointer(v.coverage),
5302
5302
  ligatureSets: this.parseListOfLists(function() {
5303
5303
  return {
5304
5304
  ligGlyph: this.parseUShort(),
@@ -5308,15 +5308,15 @@ se[4] = function() {
5308
5308
  };
5309
5309
  };
5310
5310
  var Be = {
5311
- sequenceIndex: d.uShort,
5312
- lookupListIndex: d.uShort
5311
+ sequenceIndex: v.uShort,
5312
+ lookupListIndex: v.uShort
5313
5313
  };
5314
5314
  se[5] = function() {
5315
5315
  var e = this.offset + this.relativeOffset, r = this.parseUShort();
5316
5316
  if (r === 1)
5317
5317
  return {
5318
5318
  substFormat: r,
5319
- coverage: this.parsePointer(d.coverage),
5319
+ coverage: this.parsePointer(v.coverage),
5320
5320
  ruleSets: this.parseListOfLists(function() {
5321
5321
  var s = this.parseUShort(), i = this.parseUShort();
5322
5322
  return {
@@ -5328,8 +5328,8 @@ se[5] = function() {
5328
5328
  if (r === 2)
5329
5329
  return {
5330
5330
  substFormat: r,
5331
- coverage: this.parsePointer(d.coverage),
5332
- classDef: this.parsePointer(d.classDef),
5331
+ coverage: this.parsePointer(v.coverage),
5332
+ classDef: this.parsePointer(v.classDef),
5333
5333
  classSets: this.parseListOfLists(function() {
5334
5334
  var s = this.parseUShort(), i = this.parseUShort();
5335
5335
  return {
@@ -5342,7 +5342,7 @@ se[5] = function() {
5342
5342
  var n = this.parseUShort(), a = this.parseUShort();
5343
5343
  return {
5344
5344
  substFormat: r,
5345
- coverages: this.parseList(n, d.pointer(d.coverage)),
5345
+ coverages: this.parseList(n, v.pointer(v.coverage)),
5346
5346
  lookupRecords: this.parseRecordList(a, Be)
5347
5347
  };
5348
5348
  }
@@ -5353,7 +5353,7 @@ se[6] = function() {
5353
5353
  if (r === 1)
5354
5354
  return {
5355
5355
  substFormat: 1,
5356
- coverage: this.parsePointer(d.coverage),
5356
+ coverage: this.parsePointer(v.coverage),
5357
5357
  chainRuleSets: this.parseListOfLists(function() {
5358
5358
  return {
5359
5359
  backtrack: this.parseUShortList(),
@@ -5366,10 +5366,10 @@ se[6] = function() {
5366
5366
  if (r === 2)
5367
5367
  return {
5368
5368
  substFormat: 2,
5369
- coverage: this.parsePointer(d.coverage),
5370
- backtrackClassDef: this.parsePointer(d.classDef),
5371
- inputClassDef: this.parsePointer(d.classDef),
5372
- lookaheadClassDef: this.parsePointer(d.classDef),
5369
+ coverage: this.parsePointer(v.coverage),
5370
+ backtrackClassDef: this.parsePointer(v.classDef),
5371
+ inputClassDef: this.parsePointer(v.classDef),
5372
+ lookaheadClassDef: this.parsePointer(v.classDef),
5373
5373
  chainClassSet: this.parseListOfLists(function() {
5374
5374
  return {
5375
5375
  backtrack: this.parseUShortList(),
@@ -5382,9 +5382,9 @@ se[6] = function() {
5382
5382
  if (r === 3)
5383
5383
  return {
5384
5384
  substFormat: 3,
5385
- backtrackCoverage: this.parseList(d.pointer(d.coverage)),
5386
- inputCoverage: this.parseList(d.pointer(d.coverage)),
5387
- lookaheadCoverage: this.parseList(d.pointer(d.coverage)),
5385
+ backtrackCoverage: this.parseList(v.pointer(v.coverage)),
5386
+ inputCoverage: this.parseList(v.pointer(v.coverage)),
5387
+ lookaheadCoverage: this.parseList(v.pointer(v.coverage)),
5388
5388
  lookupRecords: this.parseRecordList(Be)
5389
5389
  };
5390
5390
  E.assert(!1, "0x" + e.toString(16) + ": lookup type 6 format must be 1, 2 or 3.");
@@ -5392,7 +5392,7 @@ se[6] = function() {
5392
5392
  se[7] = function() {
5393
5393
  var e = this.parseUShort();
5394
5394
  E.argument(e === 1, "GSUB Extension Substitution subtable identifier-format must be 1");
5395
- var r = this.parseUShort(), n = new d(this.data, this.offset + this.parseULong());
5395
+ var r = this.parseUShort(), n = new v(this.data, this.offset + this.parseULong());
5396
5396
  return {
5397
5397
  substFormat: 1,
5398
5398
  lookupType: r,
@@ -5403,15 +5403,15 @@ se[8] = function() {
5403
5403
  var e = this.parseUShort();
5404
5404
  return E.argument(e === 1, "GSUB Reverse Chaining Contextual Single Substitution Subtable identifier-format must be 1"), {
5405
5405
  substFormat: e,
5406
- coverage: this.parsePointer(d.coverage),
5407
- backtrackCoverage: this.parseList(d.pointer(d.coverage)),
5408
- lookaheadCoverage: this.parseList(d.pointer(d.coverage)),
5406
+ coverage: this.parsePointer(v.coverage),
5407
+ backtrackCoverage: this.parseList(v.pointer(v.coverage)),
5408
+ lookaheadCoverage: this.parseList(v.pointer(v.coverage)),
5409
5409
  substitutes: this.parseUShortList()
5410
5410
  };
5411
5411
  };
5412
5412
  function ui(t, e) {
5413
5413
  e = e || 0;
5414
- var r = new d(t, e), n = r.parseVersion(1);
5414
+ var r = new v(t, e), n = r.parseVersion(1);
5415
5415
  return E.argument(n === 1 || n === 1.1, "Unsupported GSUB table version."), n === 1 ? {
5416
5416
  version: n,
5417
5417
  scripts: r.parseScriptList(),
@@ -5425,8 +5425,8 @@ function ui(t, e) {
5425
5425
  variations: r.parseFeatureVariationsList()
5426
5426
  };
5427
5427
  }
5428
- var Ie = new Array(9);
5429
- Ie[1] = function(e) {
5428
+ var Pe = new Array(9);
5429
+ Pe[1] = function(e) {
5430
5430
  return e.substFormat === 1 ? new k.Table("substitutionTable", [
5431
5431
  { name: "substFormat", type: "USHORT", value: 1 },
5432
5432
  { name: "coverage", type: "TABLE", value: new k.Coverage(e.coverage) },
@@ -5436,7 +5436,7 @@ Ie[1] = function(e) {
5436
5436
  { name: "coverage", type: "TABLE", value: new k.Coverage(e.coverage) }
5437
5437
  ].concat(k.ushortList("substitute", e.substitute)));
5438
5438
  };
5439
- Ie[2] = function(e) {
5439
+ Pe[2] = function(e) {
5440
5440
  return E.assert(e.substFormat === 1, "Lookup type 2 substFormat must be 1."), new k.Table("substitutionTable", [
5441
5441
  { name: "substFormat", type: "USHORT", value: 1 },
5442
5442
  { name: "coverage", type: "TABLE", value: new k.Coverage(e.coverage) }
@@ -5444,7 +5444,7 @@ Ie[2] = function(e) {
5444
5444
  return new k.Table("sequenceSetTable", k.ushortList("sequence", r));
5445
5445
  })));
5446
5446
  };
5447
- Ie[3] = function(e) {
5447
+ Pe[3] = function(e) {
5448
5448
  return E.assert(e.substFormat === 1, "Lookup type 3 substFormat must be 1."), new k.Table("substitutionTable", [
5449
5449
  { name: "substFormat", type: "USHORT", value: 1 },
5450
5450
  { name: "coverage", type: "TABLE", value: new k.Coverage(e.coverage) }
@@ -5452,7 +5452,7 @@ Ie[3] = function(e) {
5452
5452
  return new k.Table("alternateSetTable", k.ushortList("alternate", r));
5453
5453
  })));
5454
5454
  };
5455
- Ie[4] = function(e) {
5455
+ Pe[4] = function(e) {
5456
5456
  return E.assert(e.substFormat === 1, "Lookup type 4 substFormat must be 1."), new k.Table("substitutionTable", [
5457
5457
  { name: "substFormat", type: "USHORT", value: 1 },
5458
5458
  { name: "coverage", type: "TABLE", value: new k.Coverage(e.coverage) }
@@ -5465,7 +5465,7 @@ Ie[4] = function(e) {
5465
5465
  }));
5466
5466
  })));
5467
5467
  };
5468
- Ie[6] = function(e) {
5468
+ Pe[6] = function(e) {
5469
5469
  if (e.substFormat === 1) {
5470
5470
  var r = new k.Table("chainContextTable", [
5471
5471
  { name: "substFormat", type: "USHORT", value: e.substFormat },
@@ -5504,7 +5504,7 @@ function li(t) {
5504
5504
  { name: "version", type: "ULONG", value: 65536 },
5505
5505
  { name: "scripts", type: "TABLE", value: new k.ScriptList(t.scripts) },
5506
5506
  { name: "features", type: "TABLE", value: new k.FeatureList(t.features) },
5507
- { name: "lookups", type: "TABLE", value: new k.LookupList(t.lookups, Ie) }
5507
+ { name: "lookups", type: "TABLE", value: new k.LookupList(t.lookups, Pe) }
5508
5508
  ]);
5509
5509
  }
5510
5510
  var Qn = { parse: ui, make: li };
@@ -5512,7 +5512,7 @@ function ci(t, e) {
5512
5512
  var r = new F.Parser(t, e), n = r.parseULong();
5513
5513
  E.argument(n === 1, "Unsupported META table version."), r.parseULong(), r.parseULong();
5514
5514
  for (var a = r.parseULong(), s = {}, i = 0; i < a; i++) {
5515
- var u = r.parseTag(), o = r.parseULong(), l = r.parseULong(), c = Pe.UTF8(t, e + o, l);
5515
+ var u = r.parseTag(), o = r.parseULong(), l = r.parseULong(), c = Ie.UTF8(t, e + o, l);
5516
5516
  s[u] = c;
5517
5517
  }
5518
5518
  return s;
@@ -5573,7 +5573,7 @@ function $n(t) {
5573
5573
  return c.value.tag > p.value.tag ? 1 : -1;
5574
5574
  }), e.fields = e.fields.concat(n), e.fields = e.fields.concat(a), e;
5575
5575
  }
5576
- function Pr(t, e, r) {
5576
+ function Ir(t, e, r) {
5577
5577
  for (var n = 0; n < e.length; n += 1) {
5578
5578
  var a = t.charToGlyphIndex(e[n]);
5579
5579
  if (a > 0) {
@@ -5589,10 +5589,10 @@ function fi(t) {
5589
5589
  return e / t.length;
5590
5590
  }
5591
5591
  function pi(t) {
5592
- for (var e = [], r = [], n = [], a = [], s = [], i = [], u = [], o, l = 0, c = 0, p = 0, h = 0, f = 0, v = 0; v < t.glyphs.length; v += 1) {
5593
- var g = t.glyphs.get(v), y = g.unicode | 0;
5592
+ for (var e = [], r = [], n = [], a = [], s = [], i = [], u = [], o, l = 0, c = 0, p = 0, h = 0, f = 0, d = 0; d < t.glyphs.length; d += 1) {
5593
+ var g = t.glyphs.get(d), y = g.unicode | 0;
5594
5594
  if (isNaN(g.advanceWidth))
5595
- throw new Error("Glyph " + g.name + " (" + v + "): advanceWidth is not a number.");
5595
+ throw new Error("Glyph " + g.name + " (" + d + "): advanceWidth is not a number.");
5596
5596
  (o > y || o === void 0) && y > 0 && (o = y), l < y && (l = y);
5597
5597
  var m = Kt.getUnicodeRange(y);
5598
5598
  if (m < 32)
@@ -5659,8 +5659,8 @@ function pi(t) {
5659
5659
  usWinDescent: Math.abs(x.yMin),
5660
5660
  ulCodePageRange1: 1,
5661
5661
  // FIXME: hard-code Latin 1 support for now
5662
- sxHeight: Pr(t, "xyvw", { yMax: Math.round(x.ascender / 2) }).yMax,
5663
- sCapHeight: Pr(t, "HIKLEFJMNTZBDPRAGOQSUVWXY", x).yMax,
5662
+ sxHeight: Ir(t, "xyvw", { yMax: Math.round(x.ascender / 2) }).yMax,
5663
+ sCapHeight: Ir(t, "HIKLEFJMNTZBDPRAGOQSUVWXY", x).yMax,
5664
5664
  usDefaultChar: t.hasChar(" ") ? 32 : 0,
5665
5665
  // Use space as the default character, if available.
5666
5666
  usBreakChar: t.hasChar(" ") ? 32 : 0
@@ -5700,7 +5700,7 @@ function wt(t, e) {
5700
5700
  }
5701
5701
  return -r - 1;
5702
5702
  }
5703
- function Ir(t, e) {
5703
+ function Pr(t, e) {
5704
5704
  for (var r = 0, n = t.length - 1; r <= n; ) {
5705
5705
  var a = r + n >>> 1, s = t[a];
5706
5706
  if (s === e)
@@ -5744,7 +5744,7 @@ je.prototype = {
5744
5744
  * @param {number} value
5745
5745
  * @return {number}
5746
5746
  */
5747
- binSearch: Ir,
5747
+ binSearch: Pr,
5748
5748
  /**
5749
5749
  * Get or create the Layout table (GSUB, GPOS etc).
5750
5750
  * @param {boolean} create - Whether to create a new one.
@@ -5913,7 +5913,7 @@ je.prototype = {
5913
5913
  getCoverageIndex: function(t, e) {
5914
5914
  switch (t.format) {
5915
5915
  case 1:
5916
- var r = Ir(t.glyphs, e);
5916
+ var r = Pr(t.glyphs, e);
5917
5917
  return r >= 0 ? r : -1;
5918
5918
  case 2:
5919
5919
  var n = Gr(t.ranges, e);
@@ -6045,8 +6045,8 @@ ee.prototype.getLigatures = function(t, e, r) {
6045
6045
  for (var n = [], a = this.getLookupTables(e, r, t, 4), s = 0; s < a.length; s++)
6046
6046
  for (var i = a[s].subtables, u = 0; u < i.length; u++)
6047
6047
  for (var o = i[u], l = this.expandCoverage(o.coverage), c = o.ligatureSets, p = 0; p < l.length; p++)
6048
- for (var h = l[p], f = c[p], v = 0; v < f.length; v++) {
6049
- var g = f[v];
6048
+ for (var h = l[p], f = c[p], d = 0; d < f.length; d++) {
6049
+ var g = f[d];
6050
6050
  n.push({
6051
6051
  sub: [h].concat(g.components),
6052
6052
  by: g.ligGlyph
@@ -6173,14 +6173,14 @@ function ea(t, e, r) {
6173
6173
  for (var p = n.parseByte(), h = 0; h < p; h += 1)
6174
6174
  a.push(s), c += 1;
6175
6175
  if (E.argument(a.length === l, "Bad flags."), i.length > 0) {
6176
- var f = [], v;
6176
+ var f = [], d;
6177
6177
  if (l > 0) {
6178
6178
  for (var g = 0; g < l; g += 1)
6179
- s = a[g], v = {}, v.onCurve = !!(s & 1), v.lastPointOfContour = i.indexOf(g) >= 0, f.push(v);
6179
+ s = a[g], d = {}, d.onCurve = !!(s & 1), d.lastPointOfContour = i.indexOf(g) >= 0, f.push(d);
6180
6180
  for (var y = 0, m = 0; m < l; m += 1)
6181
- s = a[m], v = f[m], v.x = Nr(n, s, y, 2, 16), y = v.x;
6181
+ s = a[m], d = f[m], d.x = Nr(n, s, y, 2, 16), y = d.x;
6182
6182
  for (var S = 0, x = 0; x < l; x += 1)
6183
- s = a[x], v = f[x], v.y = Nr(n, s, S, 4, 32), S = v.y;
6183
+ s = a[x], d = f[x], d.y = Nr(n, s, S, 4, 32), S = d.y;
6184
6184
  }
6185
6185
  t.points = f;
6186
6186
  } else
@@ -6561,12 +6561,12 @@ sa = function(t, e) {
6561
6561
  for (var l = 0; l < a.length; l++) {
6562
6562
  var c = a[l], p = o.glyphs.get(c.glyphIndex);
6563
6563
  u = new be("glyf", p.instructions), exports.DEBUG && (console.log("---EXEC COMP " + l + "---"), u.step = -1), Qt(p, u, r, n);
6564
- for (var h = Math.round(c.dx * r), f = Math.round(c.dy * n), v = u.gZone, g = u.contours, y = 0; y < v.length; y++) {
6565
- var m = v[y];
6564
+ for (var h = Math.round(c.dx * r), f = Math.round(c.dy * n), d = u.gZone, g = u.contours, y = 0; y < d.length; y++) {
6565
+ var m = d[y];
6566
6566
  m.xTouched = m.yTouched = !1, m.xo = m.x = m.x + h, m.yo = m.y = m.y + f;
6567
6567
  }
6568
6568
  var S = i.length;
6569
- i.push.apply(i, v);
6569
+ i.push.apply(i, d);
6570
6570
  for (var x = 0; x < g.length; x++)
6571
6571
  s.push(g[x] + S);
6572
6572
  }
@@ -6598,8 +6598,8 @@ Qt = function(t, e, r, n) {
6598
6598
  new ge(Math.round(t.advanceWidth * r), 0)
6599
6599
  ), Le(e), i.length -= 2, exports.DEBUG) {
6600
6600
  console.log("FINISHED GLYPH", e.stack);
6601
- for (var v = 0; v < s; v++)
6602
- console.log(v, i[v].x, i[v].y);
6601
+ for (var d = 0; d < s; d++)
6602
+ console.log(d, i[d].x, i[d].y);
6603
6603
  }
6604
6604
  }
6605
6605
  };
@@ -6683,8 +6683,8 @@ function Ai(t) {
6683
6683
  function Di(t) {
6684
6684
  var e = t.stack, r = e.pop(), n = e.pop(), a = e.pop(), s = e.pop(), i = e.pop(), u = t.z0, o = t.z1, l = u[r], c = u[n], p = o[a], h = o[s], f = t.z2[i];
6685
6685
  exports.DEBUG && console.log("ISECT[], ", r, n, a, s, i);
6686
- var v = l.x, g = l.y, y = c.x, m = c.y, S = p.x, x = p.y, O = h.x, w = h.y, D = (v - y) * (x - w) - (g - m) * (S - O), L = v * m - g * y, C = S * w - x * O;
6687
- f.x = (L * (S - O) - C * (v - y)) / D, f.y = (L * (x - w) - C * (g - m)) / D;
6686
+ var d = l.x, g = l.y, y = c.x, m = c.y, S = p.x, x = p.y, O = h.x, w = h.y, D = (d - y) * (x - w) - (g - m) * (S - O), L = d * m - g * y, C = S * w - x * O;
6687
+ f.x = (L * (S - O) - C * (d - y)) / D, f.y = (L * (x - w) - C * (g - m)) / D;
6688
6688
  }
6689
6689
  function Mi(t) {
6690
6690
  t.rp0 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP0[]", t.rp0);
@@ -6692,10 +6692,10 @@ function Mi(t) {
6692
6692
  function Bi(t) {
6693
6693
  t.rp1 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP1[]", t.rp1);
6694
6694
  }
6695
- function Pi(t) {
6695
+ function Ii(t) {
6696
6696
  t.rp2 = t.stack.pop(), exports.DEBUG && console.log(t.step, "SRP2[]", t.rp2);
6697
6697
  }
6698
- function Ii(t) {
6698
+ function Pi(t) {
6699
6699
  var e = t.stack.pop();
6700
6700
  switch (exports.DEBUG && console.log(t.step, "SZP0[]", e), t.zp0 = e, e) {
6701
6701
  case 0:
@@ -7037,10 +7037,10 @@ function Ot(t, e) {
7037
7037
  for (var c = 0; c < n; c++) {
7038
7038
  var p = r.pop(), h = r.pop(), f = u + ((h & 240) >> 4);
7039
7039
  if (f === i) {
7040
- var v = (h & 15) - 8;
7041
- v >= 0 && v++, exports.DEBUG && console.log(e.step, "DELTAPFIX", p, "by", v * o);
7040
+ var d = (h & 15) - 8;
7041
+ d >= 0 && d++, exports.DEBUG && console.log(e.step, "DELTAPFIX", p, "by", d * o);
7042
7042
  var g = l[p];
7043
- a.setRelative(g, g, v * o, s);
7043
+ a.setRelative(g, g, d * o, s);
7044
7044
  }
7045
7045
  }
7046
7046
  }
@@ -7072,11 +7072,11 @@ function Bo(t) {
7072
7072
  var e = t.stack, r = e.pop();
7073
7073
  exports.DEBUG && console.log(t.step, "ABS[]", r), e.push(Math.abs(r));
7074
7074
  }
7075
- function Po(t) {
7075
+ function Io(t) {
7076
7076
  var e = t.stack, r = e.pop();
7077
7077
  exports.DEBUG && console.log(t.step, "NEG[]", r), e.push(-r);
7078
7078
  }
7079
- function Io(t) {
7079
+ function Po(t) {
7080
7080
  var e = t.stack, r = e.pop();
7081
7081
  exports.DEBUG && console.log(t.step, "FLOOR[]", r), e.push(Math.floor(r / 64) * 64);
7082
7082
  }
@@ -7244,8 +7244,8 @@ function me(t, e) {
7244
7244
  e.ip = r;
7245
7245
  }
7246
7246
  function T(t, e, r, n, a, s) {
7247
- var i = s.stack, u = t && i.pop(), o = i.pop(), l = s.rp0, c = s.z0[l], p = s.z1[o], h = s.minDis, f = s.fv, v = s.dpv, g, y, m, S;
7248
- y = g = v.distance(p, c, !0, !0), m = y >= 0 ? 1 : -1, y = Math.abs(y), t && (S = s.cvt[u], n && Math.abs(y - S) < s.cvCutIn && (y = S)), r && y < h && (y = h), n && (y = s.round(y)), f.setRelative(p, c, m * y, v), f.touch(p), exports.DEBUG && console.log(
7247
+ var i = s.stack, u = t && i.pop(), o = i.pop(), l = s.rp0, c = s.z0[l], p = s.z1[o], h = s.minDis, f = s.fv, d = s.dpv, g, y, m, S;
7248
+ y = g = d.distance(p, c, !0, !0), m = y >= 0 ? 1 : -1, y = Math.abs(y), t && (S = s.cvt[u], n && Math.abs(y - S) < s.cvCutIn && (y = S)), r && y < h && (y = h), n && (y = s.round(y)), f.setRelative(p, c, m * y, d), f.touch(p), exports.DEBUG && console.log(
7249
7249
  s.step,
7250
7250
  (t ? "MIRP[" : "MDRP[") + (e ? "M" : "m") + (r ? ">" : "_") + (n ? "R" : "_") + (a === 0 ? "Gr" : a === 1 ? "Bl" : a === 2 ? "Wh" : "") + "]",
7251
7251
  t ? u + "(" + s.cvt[u] + "," + S + ")" : "",
@@ -7295,9 +7295,9 @@ aa = [
7295
7295
  /* 0x11 */
7296
7296
  Bi,
7297
7297
  /* 0x12 */
7298
- Pi,
7299
- /* 0x13 */
7300
7298
  Ii,
7299
+ /* 0x13 */
7300
+ Pi,
7301
7301
  /* 0x14 */
7302
7302
  Gi,
7303
7303
  /* 0x15 */
@@ -7470,9 +7470,9 @@ aa = [
7470
7470
  /* 0x64 */
7471
7471
  Bo,
7472
7472
  /* 0x65 */
7473
- Po,
7474
- /* 0x66 */
7475
7473
  Io,
7474
+ /* 0x66 */
7475
+ Po,
7476
7476
  /* 0x67 */
7477
7477
  Go,
7478
7478
  /* 0x68 */
@@ -8132,7 +8132,7 @@ function nu(t, e) {
8132
8132
  ), p = n.length === e.inputCoverage.length && u.length === e.lookaheadCoverage.length && c.length === e.backtrackCoverage.length, h = [];
8133
8133
  if (p)
8134
8134
  for (var f = 0; f < e.lookupRecords.length; f++)
8135
- for (var v = e.lookupRecords[f], g = v.lookupListIndex, y = this.getLookupByIndex(g), m = 0; m < y.subtables.length; m++) {
8135
+ for (var d = e.lookupRecords[f], g = d.lookupListIndex, y = this.getLookupByIndex(g), m = 0; m < y.subtables.length; m++) {
8136
8136
  var S = y.subtables[m], x = this.getLookupMethod(y, S), O = this.getSubstitutionType(y, S);
8137
8137
  if (O === "12")
8138
8138
  for (var w = 0; w < n.length; w++) {
@@ -8973,16 +8973,16 @@ function Mu(t, e, r) {
8973
8973
  n.skip("uShort", 1);
8974
8974
  for (var i = n.parseUShort(), u = n.parseUShort(), o = n.parseUShort(), l = n.parseUShort(), c = [], p = 0; p < i; p++)
8975
8975
  c.push(Lu(t, e + s + p * u, r));
8976
- for (var h = [], f = e + s + i * u, v = 0; v < o; v++)
8977
- h.push(Au(t, f + v * l, c, r));
8976
+ for (var h = [], f = e + s + i * u, d = 0; d < o; d++)
8977
+ h.push(Au(t, f + d * l, c, r));
8978
8978
  return { axes: c, instances: h };
8979
8979
  }
8980
- var Bu = { make: Du, parse: Mu }, Pu = function() {
8980
+ var Bu = { make: Du, parse: Mu }, Iu = function() {
8981
8981
  return {
8982
- coverage: this.parsePointer(d.coverage),
8983
- attachPoints: this.parseList(d.pointer(d.uShortList))
8982
+ coverage: this.parsePointer(v.coverage),
8983
+ attachPoints: this.parseList(v.pointer(v.uShortList))
8984
8984
  };
8985
- }, Iu = function() {
8985
+ }, Pu = function() {
8986
8986
  var t = this.parseUShort();
8987
8987
  if (E.argument(
8988
8988
  t === 1 || t === 2 || t === 3,
@@ -8994,28 +8994,28 @@ var Bu = { make: Du, parse: Mu }, Pu = function() {
8994
8994
  if (t === 3)
8995
8995
  return { coordinate: this.parseShort() };
8996
8996
  }, Gu = function() {
8997
- return this.parseList(d.pointer(Iu));
8997
+ return this.parseList(v.pointer(Pu));
8998
8998
  }, Nu = function() {
8999
8999
  return {
9000
- coverage: this.parsePointer(d.coverage),
9001
- ligGlyphs: this.parseList(d.pointer(Gu))
9000
+ coverage: this.parsePointer(v.coverage),
9001
+ ligGlyphs: this.parseList(v.pointer(Gu))
9002
9002
  };
9003
9003
  }, _u = function() {
9004
- return this.parseUShort(), this.parseList(d.pointer(d.coverage));
9004
+ return this.parseUShort(), this.parseList(v.pointer(v.coverage));
9005
9005
  };
9006
9006
  function Hu(t, e) {
9007
9007
  e = e || 0;
9008
- var r = new d(t, e), n = r.parseVersion(1);
9008
+ var r = new v(t, e), n = r.parseVersion(1);
9009
9009
  E.argument(
9010
9010
  n === 1 || n === 1.2 || n === 1.3,
9011
9011
  "Unsupported GDEF table version."
9012
9012
  );
9013
9013
  var a = {
9014
9014
  version: n,
9015
- classDef: r.parsePointer(d.classDef),
9016
- attachList: r.parsePointer(Pu),
9015
+ classDef: r.parsePointer(v.classDef),
9016
+ attachList: r.parsePointer(Iu),
9017
9017
  ligCaretList: r.parsePointer(Nu),
9018
- markAttachClassDef: r.parsePointer(d.classDef)
9018
+ markAttachClassDef: r.parsePointer(v.classDef)
9019
9019
  };
9020
9020
  return n >= 1.2 && (a.markGlyphSets = r.parsePointer(_u)), a;
9021
9021
  }
@@ -9025,13 +9025,13 @@ oe[1] = function() {
9025
9025
  if (r === 1)
9026
9026
  return {
9027
9027
  posFormat: 1,
9028
- coverage: this.parsePointer(d.coverage),
9028
+ coverage: this.parsePointer(v.coverage),
9029
9029
  value: this.parseValueRecord()
9030
9030
  };
9031
9031
  if (r === 2)
9032
9032
  return {
9033
9033
  posFormat: 2,
9034
- coverage: this.parsePointer(d.coverage),
9034
+ coverage: this.parsePointer(v.coverage),
9035
9035
  values: this.parseValueRecordList()
9036
9036
  };
9037
9037
  E.assert(!1, "0x" + e.toString(16) + ": GPOS lookup type 1 format must be 1 or 2.");
@@ -9039,14 +9039,14 @@ oe[1] = function() {
9039
9039
  oe[2] = function() {
9040
9040
  var e = this.offset + this.relativeOffset, r = this.parseUShort();
9041
9041
  E.assert(r === 1 || r === 2, "0x" + e.toString(16) + ": GPOS lookup type 2 format must be 1 or 2.");
9042
- var n = this.parsePointer(d.coverage), a = this.parseUShort(), s = this.parseUShort();
9042
+ var n = this.parsePointer(v.coverage), a = this.parseUShort(), s = this.parseUShort();
9043
9043
  if (r === 1)
9044
9044
  return {
9045
9045
  posFormat: r,
9046
9046
  coverage: n,
9047
9047
  valueFormat1: a,
9048
9048
  valueFormat2: s,
9049
- pairSets: this.parseList(d.pointer(d.list(function() {
9049
+ pairSets: this.parseList(v.pointer(v.list(function() {
9050
9050
  return {
9051
9051
  // pairValueRecord
9052
9052
  secondGlyph: this.parseUShort(),
@@ -9056,7 +9056,7 @@ oe[2] = function() {
9056
9056
  })))
9057
9057
  };
9058
9058
  if (r === 2) {
9059
- var i = this.parsePointer(d.classDef), u = this.parsePointer(d.classDef), o = this.parseUShort(), l = this.parseUShort();
9059
+ var i = this.parsePointer(v.classDef), u = this.parsePointer(v.classDef), o = this.parseUShort(), l = this.parseUShort();
9060
9060
  return {
9061
9061
  // Class Pair Adjustment
9062
9062
  posFormat: r,
@@ -9067,7 +9067,7 @@ oe[2] = function() {
9067
9067
  classDef2: u,
9068
9068
  class1Count: o,
9069
9069
  class2Count: l,
9070
- classRecords: this.parseList(o, d.list(l, function() {
9070
+ classRecords: this.parseList(o, v.list(l, function() {
9071
9071
  return {
9072
9072
  value1: this.parseValueRecord(a),
9073
9073
  value2: this.parseValueRecord(s)
@@ -9099,7 +9099,7 @@ oe[9] = function() {
9099
9099
  };
9100
9100
  function Wu(t, e) {
9101
9101
  e = e || 0;
9102
- var r = new d(t, e), n = r.parseVersion(1);
9102
+ var r = new v(t, e), n = r.parseVersion(1);
9103
9103
  return E.argument(n === 1 || n === 1.1, "Unsupported GPOS table version " + n), n === 1 ? {
9104
9104
  version: n,
9105
9105
  scripts: r.parseScriptList(),
@@ -9189,7 +9189,7 @@ function $u(t, e) {
9189
9189
  }
9190
9190
  return r;
9191
9191
  }
9192
- function P(t, e) {
9192
+ function I(t, e) {
9193
9193
  if (e.compression === "WOFF") {
9194
9194
  var r = new Uint8Array(t.buffer, e.offset + 2, e.compressedLength - 2), n = new Uint8Array(e.length);
9195
9195
  if (qa(r, n), n.byteLength !== e.length)
@@ -9217,47 +9217,47 @@ function el(t, e) {
9217
9217
  i = F.getUShort(s, 12), u = $u(s, i);
9218
9218
  } else
9219
9219
  throw new Error("Unsupported OpenType signature " + o);
9220
- for (var c, p, h, f, v, g, y, m, S, x, O, w, D = 0; D < i; D += 1) {
9220
+ for (var c, p, h, f, d, g, y, m, S, x, O, w, D = 0; D < i; D += 1) {
9221
9221
  var L = u[D], C = void 0;
9222
9222
  switch (L.tag) {
9223
9223
  case "cmap":
9224
- C = P(s, L), a.tables.cmap = On.parse(C.data, C.offset), a.encoding = new Ln(a.tables.cmap);
9224
+ C = I(s, L), a.tables.cmap = On.parse(C.data, C.offset), a.encoding = new Ln(a.tables.cmap);
9225
9225
  break;
9226
9226
  case "cvt ":
9227
- C = P(s, L), w = new F.Parser(C.data, C.offset), a.tables.cvt = w.parseShortList(L.length / 2);
9227
+ C = I(s, L), w = new F.Parser(C.data, C.offset), a.tables.cvt = w.parseShortList(L.length / 2);
9228
9228
  break;
9229
9229
  case "fvar":
9230
9230
  p = L;
9231
9231
  break;
9232
9232
  case "fpgm":
9233
- C = P(s, L), w = new F.Parser(C.data, C.offset), a.tables.fpgm = w.parseByteList(L.length);
9233
+ C = I(s, L), w = new F.Parser(C.data, C.offset), a.tables.fpgm = w.parseByteList(L.length);
9234
9234
  break;
9235
9235
  case "head":
9236
- C = P(s, L), a.tables.head = _n.parse(C.data, C.offset), a.unitsPerEm = a.tables.head.unitsPerEm, r = a.tables.head.indexToLocFormat;
9236
+ C = I(s, L), a.tables.head = _n.parse(C.data, C.offset), a.unitsPerEm = a.tables.head.unitsPerEm, r = a.tables.head.indexToLocFormat;
9237
9237
  break;
9238
9238
  case "hhea":
9239
- C = P(s, L), a.tables.hhea = Hn.parse(C.data, C.offset), a.ascender = a.tables.hhea.ascender, a.descender = a.tables.hhea.descender, a.numberOfHMetrics = a.tables.hhea.numberOfHMetrics;
9239
+ C = I(s, L), a.tables.hhea = Hn.parse(C.data, C.offset), a.ascender = a.tables.hhea.ascender, a.descender = a.tables.hhea.descender, a.numberOfHMetrics = a.tables.hhea.numberOfHMetrics;
9240
9240
  break;
9241
9241
  case "hmtx":
9242
9242
  y = L;
9243
9243
  break;
9244
9244
  case "ltag":
9245
- C = P(s, L), n = Wn.parse(C.data, C.offset);
9245
+ C = I(s, L), n = Wn.parse(C.data, C.offset);
9246
9246
  break;
9247
9247
  case "maxp":
9248
- C = P(s, L), a.tables.maxp = Vn.parse(C.data, C.offset), a.numGlyphs = a.tables.maxp.numGlyphs;
9248
+ C = I(s, L), a.tables.maxp = Vn.parse(C.data, C.offset), a.numGlyphs = a.tables.maxp.numGlyphs;
9249
9249
  break;
9250
9250
  case "name":
9251
9251
  x = L;
9252
9252
  break;
9253
9253
  case "OS/2":
9254
- C = P(s, L), a.tables.os2 = Kt.parse(C.data, C.offset);
9254
+ C = I(s, L), a.tables.os2 = Kt.parse(C.data, C.offset);
9255
9255
  break;
9256
9256
  case "post":
9257
- C = P(s, L), a.tables.post = Kn.parse(C.data, C.offset), a.glyphNames = new rr(a.tables.post);
9257
+ C = I(s, L), a.tables.post = Kn.parse(C.data, C.offset), a.glyphNames = new rr(a.tables.post);
9258
9258
  break;
9259
9259
  case "prep":
9260
- C = P(s, L), w = new F.Parser(C.data, C.offset), a.tables.prep = w.parseByteList(L.length);
9260
+ C = I(s, L), w = new F.Parser(C.data, C.offset), a.tables.prep = w.parseByteList(L.length);
9261
9261
  break;
9262
9262
  case "glyf":
9263
9263
  h = L;
@@ -9275,7 +9275,7 @@ function el(t, e) {
9275
9275
  f = L;
9276
9276
  break;
9277
9277
  case "GPOS":
9278
- v = L;
9278
+ d = L;
9279
9279
  break;
9280
9280
  case "GSUB":
9281
9281
  g = L;
@@ -9285,39 +9285,39 @@ function el(t, e) {
9285
9285
  break;
9286
9286
  }
9287
9287
  }
9288
- var N = P(s, x);
9288
+ var N = I(s, x);
9289
9289
  if (a.tables.name = jn.parse(N.data, N.offset, n), a.names = a.tables.name, h && S) {
9290
- var j = r === 0, K = P(s, S), re = Ju.parse(K.data, K.offset, a.numGlyphs, j), ne = P(s, h);
9290
+ var j = r === 0, K = I(s, S), re = Ju.parse(K.data, K.offset, a.numGlyphs, j), ne = I(s, h);
9291
9291
  a.glyphs = na.parse(ne.data, ne.offset, re, a, e);
9292
9292
  } else if (c) {
9293
- var G = P(s, c);
9293
+ var G = I(s, c);
9294
9294
  Nn.parse(G.data, G.offset, a, e);
9295
9295
  } else
9296
9296
  throw new Error("Font doesn't contain TrueType or CFF outlines.");
9297
- var H = P(s, y);
9297
+ var H = I(s, y);
9298
9298
  if (zn.parse(a, H.data, H.offset, a.numberOfHMetrics, a.numGlyphs, a.glyphs, e), fs(a, e), m) {
9299
- var V = P(s, m);
9299
+ var V = I(s, m);
9300
9300
  a.kerningPairs = Ku.parse(V.data, V.offset);
9301
9301
  } else
9302
9302
  a.kerningPairs = {};
9303
9303
  if (f) {
9304
- var q = P(s, f);
9304
+ var q = I(s, f);
9305
9305
  a.tables.gdef = zu.parse(q.data, q.offset);
9306
9306
  }
9307
- if (v) {
9308
- var X = P(s, v);
9307
+ if (d) {
9308
+ var X = I(s, d);
9309
9309
  a.tables.gpos = Xu.parse(X.data, X.offset), a.position.init();
9310
9310
  }
9311
9311
  if (g) {
9312
- var z = P(s, g);
9312
+ var z = I(s, g);
9313
9313
  a.tables.gsub = Qn.parse(z.data, z.offset);
9314
9314
  }
9315
9315
  if (p) {
9316
- var Z = P(s, p);
9316
+ var Z = I(s, p);
9317
9317
  a.tables.fvar = Bu.parse(Z.data, Z.offset, a.names);
9318
9318
  }
9319
9319
  if (O) {
9320
- var M = P(s, O);
9320
+ var M = I(s, O);
9321
9321
  a.tables.meta = Jn.parse(M.data, M.offset), a.metas = a.tables.meta;
9322
9322
  }
9323
9323
  return a;
@@ -9336,8 +9336,8 @@ function tl(t) {
9336
9336
  x_max: a(h.xMax),
9337
9337
  o: ""
9338
9338
  };
9339
- h.path.commands.forEach(function(v) {
9340
- v.type.toLowerCase() === "c" && (v.type = "b"), f.o += v.type.toLowerCase() + " ", v.x !== void 0 && v.y !== void 0 && (f.o += a(v.x) + " " + a(v.y) + " "), v.x1 !== void 0 && v.y1 !== void 0 && (f.o += a(v.x1) + " " + a(v.y1) + " "), v.x2 !== void 0 && v.y2 !== void 0 && (f.o += a(v.x2) + " " + a(v.y2) + " ");
9339
+ h.path.commands.forEach(function(d) {
9340
+ d.type.toLowerCase() === "c" && (d.type = "b"), f.o += d.type.toLowerCase() + " ", d.x !== void 0 && d.y !== void 0 && (f.o += a(d.x) + " " + a(d.y) + " "), d.x1 !== void 0 && d.y1 !== void 0 && (f.o += a(d.x1) + " " + a(d.y1) + " "), d.x2 !== void 0 && d.y2 !== void 0 && (f.o += a(d.x2) + " " + a(d.y2) + " ");
9341
9341
  }), s[String.fromCodePoint(h.unicode)] = f;
9342
9342
  }
9343
9343
  }
@@ -9789,7 +9789,7 @@ class il {
9789
9789
  }
9790
9790
  }
9791
9791
  }
9792
- class I {
9792
+ class P {
9793
9793
  /**
9794
9794
  * Creates a new Point instance.
9795
9795
  * @param x - The x-coordinate (defaults to 0)
@@ -9827,7 +9827,7 @@ class I {
9827
9827
  * @returns A new Point instance with the same x and y values
9828
9828
  */
9829
9829
  clone() {
9830
- return new I(this.x, this.y);
9830
+ return new P(this.x, this.y);
9831
9831
  }
9832
9832
  /**
9833
9833
  * Adds another point's coordinates to this point.
@@ -9932,18 +9932,18 @@ class Ye {
9932
9932
  }
9933
9933
  const a = 4 * Math.atan(Math.abs(this.bulge));
9934
9934
  this.radius = n / (2 * Math.sin(a / 2));
9935
- const s = this.start.clone().add(r.clone().divide(2)), i = new I(-r.y, r.x);
9935
+ const s = this.start.clone().add(r.clone().divide(2)), i = new P(-r.y, r.x);
9936
9936
  i.normalize(), i.multiply(Math.abs(this.radius * Math.cos(a / 2))), this.center = s.clone(), this.isClockwise ? this.center.subtract(i) : this.center.add(i), this.startAngle = Math.atan2(this.start.y - this.center.y, this.start.x - this.center.x), this.endAngle = Math.atan2(this.end.y - this.center.y, this.end.x - this.center.x), this.isClockwise ? this.endAngle >= this.startAngle && (this.endAngle -= 2 * Math.PI) : this.endAngle <= this.startAngle && (this.endAngle += 2 * Math.PI);
9937
9937
  } else if (e.center && e.radius !== void 0 && e.startOctant !== void 0 && e.octantCount !== void 0 && e.isClockwise !== void 0) {
9938
9938
  this.center = e.center.clone(), this.radius = e.radius, this.isClockwise = e.isClockwise, this.startAngle = e.startOctant * on;
9939
9939
  const r = (e.octantCount === 0 ? 8 : e.octantCount) * on;
9940
9940
  this.endAngle = this.startAngle + (this.isClockwise ? -r : r), this.start = this.center.clone().add(
9941
- new I(
9941
+ new P(
9942
9942
  this.radius * Math.cos(this.startAngle),
9943
9943
  this.radius * Math.sin(this.startAngle)
9944
9944
  )
9945
9945
  ), this.end = this.center.clone().add(
9946
- new I(this.radius * Math.cos(this.endAngle), this.radius * Math.sin(this.endAngle))
9946
+ new P(this.radius * Math.cos(this.endAngle), this.radius * Math.sin(this.endAngle))
9947
9947
  );
9948
9948
  } else
9949
9949
  throw new Error("Invalid arc parameters");
@@ -9960,12 +9960,12 @@ class Ye {
9960
9960
  for (let s = 1; s < a; s++) {
9961
9961
  const i = s / a, u = this.isClockwise ? this.startAngle - i * n : this.startAngle + i * n;
9962
9962
  r.push(
9963
- this.center.clone().add(new I(this.radius * Math.cos(u), this.radius * Math.sin(u)))
9963
+ this.center.clone().add(new P(this.radius * Math.cos(u), this.radius * Math.sin(u)))
9964
9964
  );
9965
9965
  }
9966
9966
  return r.push(
9967
9967
  this.end ? this.end.clone() : this.center.clone().add(
9968
- new I(
9968
+ new P(
9969
9969
  this.radius * Math.cos(this.endAngle),
9970
9970
  this.radius * Math.sin(this.endAngle)
9971
9971
  )
@@ -10011,14 +10011,14 @@ let At = class fa {
10011
10011
  const { strokeWidth: r = "0.5%", strokeColor: n = "black", isAutoFit: a = !1 } = e;
10012
10012
  let s, i;
10013
10013
  if (a) {
10014
- const u = this.bbox, o = 0.2, l = u.maxX - u.minX, c = u.maxY - u.minY, p = u.minX - l * o, h = u.maxX + l * o, f = u.minY - c * o, v = u.maxY + c * o;
10014
+ const u = this.bbox, o = 0.2, l = u.maxX - u.minX, c = u.maxY - u.minY, p = u.minX - l * o, h = u.maxX + l * o, f = u.minY - c * o, d = u.maxY + c * o;
10015
10015
  i = this.polylines.map((g) => {
10016
10016
  let y = "";
10017
10017
  return g.forEach((m, S) => {
10018
10018
  const x = m.x, O = -m.y;
10019
10019
  y += S === 0 ? `M ${x} ${O} ` : `L ${x} ${O} `;
10020
10020
  }), `<path d="${y}" stroke="${n}" stroke-width="${r}" fill="none"/>`;
10021
- }).join(""), s = `${p} ${-v} ${h - p} ${v - f}`;
10021
+ }).join(""), s = `${p} ${-d} ${h - p} ${d - f}`;
10022
10022
  } else
10023
10023
  s = "0 0 20 20", i = this.polylines.map((u) => {
10024
10024
  let o = "";
@@ -10077,7 +10077,7 @@ class ul {
10077
10077
  */
10078
10078
  parseShape(e, r) {
10079
10079
  const n = {
10080
- currentPoint: new I(),
10080
+ currentPoint: new P(),
10081
10081
  polylines: [],
10082
10082
  currentPolyline: [],
10083
10083
  sp: [],
@@ -10163,7 +10163,7 @@ class ul {
10163
10163
  * @returns Returns the vector for the given direction code
10164
10164
  */
10165
10165
  getVectorForDirection(e) {
10166
- const r = new I();
10166
+ const r = new P();
10167
10167
  switch (e) {
10168
10168
  case 0:
10169
10169
  r.x = 1;
@@ -10234,13 +10234,13 @@ class ul {
10234
10234
  }
10235
10235
  handleXYDisplacement(e, r, n) {
10236
10236
  let a = r;
10237
- const s = new I();
10237
+ const s = new P();
10238
10238
  return s.x = Q.byteToSByte(e[++a]), s.y = Q.byteToSByte(e[++a]), n.currentPoint.add(s.multiply(n.scale)), n.isPenDown && n.currentPolyline.push(n.currentPoint.clone()), a;
10239
10239
  }
10240
10240
  handleMultipleXYDisplacements(e, r, n) {
10241
10241
  let a = r;
10242
10242
  for (; ; ) {
10243
- const s = new I();
10243
+ const s = new P();
10244
10244
  if (s.x = Q.byteToSByte(e[++a]), s.y = Q.byteToSByte(e[++a]), s.x === 0 && s.y === 0)
10245
10245
  break;
10246
10246
  n.currentPoint.add(s.multiply(n.scale)), n.isPenDown && n.currentPolyline.push(n.currentPoint.clone());
@@ -10252,10 +10252,10 @@ class ul {
10252
10252
  let s = r;
10253
10253
  const i = e[++s] * n.scale, u = Q.byteToSByte(e[++s]), o = (u & 112) >> 4;
10254
10254
  let l = u & 7;
10255
- const c = u < 0, p = Math.PI / 4 * o, h = n.currentPoint.clone().subtract(new I(Math.cos(p) * i, Math.sin(p) * i)), f = Ye.fromOctant(h, i, o, l, c);
10255
+ const c = u < 0, p = Math.PI / 4 * o, h = n.currentPoint.clone().subtract(new P(Math.cos(p) * i, Math.sin(p) * i)), f = Ye.fromOctant(h, i, o, l, c);
10256
10256
  if (n.isPenDown) {
10257
- const v = f.tessellate();
10258
- n.currentPolyline.pop(), n.currentPolyline.push(...v.slice());
10257
+ const d = f.tessellate();
10258
+ n.currentPolyline.pop(), n.currentPolyline.push(...d.slice());
10259
10259
  }
10260
10260
  return n.currentPoint = (a = f.tessellate().pop()) == null ? void 0 : a.clone(), s;
10261
10261
  }
@@ -10265,33 +10265,33 @@ class ul {
10265
10265
  let h = c & 7;
10266
10266
  h === 0 && (h = 8), i !== 0 && h--;
10267
10267
  const f = Math.PI / 4;
10268
- let v = f * h, g = ol, y = 1;
10269
- c < 0 && (g = -g, v = -v, y = -1);
10270
- let m = f * p, S = m + v;
10268
+ let d = f * h, g = ol, y = 1;
10269
+ c < 0 && (g = -g, d = -d, y = -1);
10270
+ let m = f * p, S = m + d;
10271
10271
  m += f * s / 256 * y, S += f * i / 256 * y;
10272
- const x = n.currentPoint.clone().subtract(new I(l * Math.cos(m), l * Math.sin(m)));
10273
- if (n.currentPoint = x.clone().add(new I(l * Math.cos(S), l * Math.sin(S))), n.isPenDown) {
10272
+ const x = n.currentPoint.clone().subtract(new P(l * Math.cos(m), l * Math.sin(m)));
10273
+ if (n.currentPoint = x.clone().add(new P(l * Math.cos(S), l * Math.sin(S))), n.isPenDown) {
10274
10274
  let O = m;
10275
10275
  const w = [];
10276
10276
  if (w.push(
10277
- x.clone().add(new I(l * Math.cos(O), l * Math.sin(O)))
10277
+ x.clone().add(new P(l * Math.cos(O), l * Math.sin(O)))
10278
10278
  ), g > 0)
10279
10279
  for (; O + g < S; )
10280
10280
  O += g, w.push(
10281
- x.clone().add(new I(l * Math.cos(O), l * Math.sin(O)))
10281
+ x.clone().add(new P(l * Math.cos(O), l * Math.sin(O)))
10282
10282
  );
10283
10283
  else
10284
10284
  for (; O + g > S; )
10285
10285
  O += g, w.push(
10286
- x.clone().add(new I(l * Math.cos(O), l * Math.sin(O)))
10286
+ x.clone().add(new P(l * Math.cos(O), l * Math.sin(O)))
10287
10287
  );
10288
- w.push(x.clone().add(new I(l * Math.cos(S), l * Math.sin(S)))), n.currentPolyline.push(...w);
10288
+ w.push(x.clone().add(new P(l * Math.cos(S), l * Math.sin(S)))), n.currentPolyline.push(...w);
10289
10289
  }
10290
10290
  return a;
10291
10291
  }
10292
10292
  handleBulgeArc(e, r, n) {
10293
10293
  let a = r;
10294
- const s = new I();
10294
+ const s = new P();
10295
10295
  s.x = Q.byteToSByte(e[++a]), s.y = Q.byteToSByte(e[++a]);
10296
10296
  const i = Q.byteToSByte(e[++a]);
10297
10297
  return n.currentPoint = this.handleArcSegment(
@@ -10306,7 +10306,7 @@ class ul {
10306
10306
  handleMultipleBulgeArcs(e, r, n) {
10307
10307
  let a = r;
10308
10308
  for (; ; ) {
10309
- const s = new I();
10309
+ const s = new P();
10310
10310
  if (s.x = Q.byteToSByte(e[++a]), s.y = Q.byteToSByte(e[++a]), s.x === 0 && s.y === 0)
10311
10311
  break;
10312
10312
  const i = Q.byteToSByte(e[++a]);
@@ -10506,7 +10506,7 @@ class ln extends vn {
10506
10506
  a += r, this.addUnsupportedChar(i);
10507
10507
  continue;
10508
10508
  }
10509
- n.push(u.offset(new I(a, 0))), a += u.width;
10509
+ n.push(u.offset(new P(a, 0))), a += u.width;
10510
10510
  }
10511
10511
  return n;
10512
10512
  }
@@ -11737,8 +11737,8 @@ function hn(t, e = !1) {
11737
11737
  const p = [];
11738
11738
  for (let h = 0; h < t.length; ++h) {
11739
11739
  const f = t[h].index;
11740
- for (let v = 0; v < f.count; ++v)
11741
- p.push(f.getX(v) + c);
11740
+ for (let d = 0; d < f.count; ++d)
11741
+ p.push(f.getX(d) + c);
11742
11742
  c += t[h].attributes.position.count;
11743
11743
  }
11744
11744
  o.setIndex(p);
@@ -11757,10 +11757,10 @@ function hn(t, e = !1) {
11757
11757
  const f = [];
11758
11758
  for (let g = 0; g < i[c].length; ++g)
11759
11759
  f.push(i[c][g][h]);
11760
- const v = fn(f);
11761
- if (!v)
11760
+ const d = fn(f);
11761
+ if (!d)
11762
11762
  return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + c + " morphAttribute."), null;
11763
- o.morphAttributes[c].push(v);
11763
+ o.morphAttributes[c].push(d);
11764
11764
  }
11765
11765
  }
11766
11766
  return o;
@@ -11786,9 +11786,9 @@ function fn(t) {
11786
11786
  if (c.isInterleavedBufferAttribute) {
11787
11787
  const p = o / r;
11788
11788
  for (let h = 0, f = c.count; h < f; h++)
11789
- for (let v = 0; v < r; v++) {
11790
- const g = c.getComponent(h, v);
11791
- u.setComponent(h + p, v, g);
11789
+ for (let d = 0; d < r; d++) {
11790
+ const g = c.getComponent(h, d);
11791
+ u.setComponent(h + p, d, g);
11792
11792
  }
11793
11793
  } else
11794
11794
  i.set(c.array, o);
@@ -11806,7 +11806,7 @@ class gl {
11806
11806
  * @param options Input formating options
11807
11807
  */
11808
11808
  constructor(e, r, n, a) {
11809
- this._currentUnderline = !1, this._currentOverline = !1, this._currentStrikeThrough = !1, this._currentObliqueAngle = 0, this._style = e, this._styleManager = r, this._fontManager = n, this._options = a, this._totalHeight = 0, this._hOffset = 0, this._vOffset = 0, this._lineCount = 1, this._currentLineObjects = [], this._currentHorizontalAlignment = a.horizontalAlignment, this._currentFont = this.textStyle.font.toLowerCase(), this._currentWidthFactor = a.widthFactor, this._currentWordSpace = 1, this._currentColor = a.byLayerColor, this._currentFontSizeScaleFactor = 1, this._currentMaxFontSize = 0, this._currentObliqueAngle = e.obliqueAngle || 0, this.initLineParams(), this._currentBlankWidth = this.calculateBlankWidth();
11809
+ this._currentUnderline = !1, this._currentOverline = !1, this._currentStrikeThrough = !1, this._currentObliqueAngle = 0, this._currentItalic = !1, this._currentBold = !1, this._style = e, this._styleManager = r, this._fontManager = n, this._options = a, this._totalHeight = 0, this._hOffset = 0, this._vOffset = 0, this._lineCount = 1, this._currentLineObjects = [], this._currentHorizontalAlignment = a.horizontalAlignment, this._currentFont = this.textStyle.font.toLowerCase(), this._currentWidthFactor = a.widthFactor, this._currentWordSpace = 1, this._currentColor = a.byLayerColor, this._currentFontSizeScaleFactor = 1, this._currentMaxFontSize = 0, this._currentObliqueAngle = e.obliqueAngle || 0, this.initLineParams(), this._currentBlankWidth = this.calculateBlankWidth();
11810
11810
  }
11811
11811
  get fontManager() {
11812
11812
  return this._fontManager;
@@ -11962,7 +11962,7 @@ class gl {
11962
11962
  case "f":
11963
11963
  case "F":
11964
11964
  if (e.changes.fontFace) {
11965
- this.changeFont(e.changes.fontFace.family), this.currentFont && this.currentFont.includes(".shx") && console.log(`Doesn't support custom fonts: ${this.currentFont}`);
11965
+ this.changeFont(e.changes.fontFace.family), this.fontManager.getFontType(this.currentFont) === "mesh" ? (this._currentItalic = e.changes.fontFace.style === "Italic", this._currentBold = (e.changes.fontFace.weight || 400) >= 700, this._currentObliqueAngle = this.textStyle.obliqueAngle || 0) : (this._currentItalic = !1, this._currentBold = !1, e.changes.fontFace.style === "Italic" ? this._currentObliqueAngle = 15 : this._currentObliqueAngle = this.textStyle.obliqueAngle || 0), this.currentFont && this.currentFont.includes(".shx") && console.log(`Doesn't support custom fonts: ${this.currentFont}`);
11966
11966
  break;
11967
11967
  }
11968
11968
  case "c":
@@ -12043,7 +12043,7 @@ class gl {
12043
12043
  const S = this.getCharShape(s[m]);
12044
12044
  S && (f += S.width * this.currentWidthFactor);
12045
12045
  }
12046
- const v = Math.max(h, f), g = (v - h) / 2, y = (v - f) / 2;
12046
+ const d = Math.max(h, f), g = (d - h) / 2, y = (d - f) / 2;
12047
12047
  if (i === "^") {
12048
12048
  if (this._currentFontSizeScaleFactor = p * 0.7, this.calcuateLineParams(), a && !s) {
12049
12049
  const m = [], S = [];
@@ -12074,13 +12074,13 @@ class gl {
12074
12074
  u,
12075
12075
  o - this.currentFontSize * 0.8,
12076
12076
  0,
12077
- u + v,
12077
+ u + d,
12078
12078
  o - this.currentFontSize * 0.8,
12079
12079
  0
12080
12080
  ]);
12081
12081
  w.setAttribute("position", new R.BufferAttribute(D, 3)), w.setIndex(null), n.push(w);
12082
12082
  }
12083
- this._hOffset = u + v;
12083
+ this._hOffset = u + d;
12084
12084
  }
12085
12085
  this._vOffset = o, this._currentWordSpace = l;
12086
12086
  }
@@ -12093,44 +12093,47 @@ class gl {
12093
12093
  this.processBlank();
12094
12094
  return;
12095
12095
  }
12096
- const s = a.toGeometry();
12097
- if (s.scale(this.currentWidthFactor, 1, 1), this.currentObliqueAngle) {
12098
- const h = this.currentObliqueAngle * Math.PI / 180, f = new R.Matrix4();
12099
- f.set(1, Math.tan(h), 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), s.applyMatrix4(f);
12100
- }
12101
- this.hOffset > (this.maxWidth || 1 / 0) && this.startNewLine();
12102
- let i = this.hOffset, u = this.flowDirection == Ze.BOTTOM_TO_TOP ? this.vOffset : this.vOffset - this.currentFontSize, o = a.width * this.currentWidthFactor, l = this.currentFontSize;
12103
- s.translate(i, u, 0), this.currentHorizontalAlignment == fe.DISTRIBUTED ? this._hOffset += a.width * this.currentWidthFactor : this._hOffset += a.width * this.currentWordSpace * this.currentWidthFactor, r.push(s);
12104
- const c = l * 0.05, p = 1e-3;
12096
+ let s = a.toGeometry();
12097
+ s.scale(this.currentWidthFactor, 1, 1);
12098
+ let i = this.currentObliqueAngle;
12099
+ if (this._currentItalic && (i += 15), i) {
12100
+ const d = i * Math.PI / 180, g = new R.Matrix4();
12101
+ g.set(1, Math.tan(d), 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1), s.applyMatrix4(g);
12102
+ }
12103
+ const u = this.fontManager.getFontType(this.currentFont);
12104
+ this._currentBold && u === "mesh" && s.scale(1.06, 1.06, 1), this.hOffset > (this.maxWidth || 1 / 0) && this.startNewLine();
12105
+ let o = this.hOffset, l = this.flowDirection == Ze.BOTTOM_TO_TOP ? this.vOffset : this.vOffset - this.currentFontSize, c = a.width * this.currentWidthFactor, p = this.currentFontSize;
12106
+ s.translate(o, l, 0), this.currentHorizontalAlignment == fe.DISTRIBUTED ? this._hOffset += a.width * this.currentWidthFactor : this._hOffset += a.width * this.currentWordSpace * this.currentWidthFactor, r.push(s);
12107
+ const h = p * 0.05, f = 1e-3;
12105
12108
  if (this._currentUnderline) {
12106
- const h = new R.BufferGeometry(), f = u - c;
12107
- h.setAttribute(
12109
+ const d = new R.BufferGeometry(), g = l - h;
12110
+ d.setAttribute(
12108
12111
  "position",
12109
12112
  new R.BufferAttribute(
12110
- new Float32Array([i, f, p, i + o, f, p]),
12113
+ new Float32Array([o, g, f, o + c, g, f]),
12111
12114
  3
12112
12115
  )
12113
- ), h.setIndex(null), n.push(h);
12116
+ ), d.setIndex(null), n.push(d);
12114
12117
  }
12115
12118
  if (this._currentOverline) {
12116
- const h = new R.BufferGeometry(), f = u + l + c;
12117
- h.setAttribute(
12119
+ const d = new R.BufferGeometry(), g = l + p + h;
12120
+ d.setAttribute(
12118
12121
  "position",
12119
12122
  new R.BufferAttribute(
12120
- new Float32Array([i, f, p, i + o, f, p]),
12123
+ new Float32Array([o, g, f, o + c, g, f]),
12121
12124
  3
12122
12125
  )
12123
- ), h.setIndex(null), n.push(h);
12126
+ ), d.setIndex(null), n.push(d);
12124
12127
  }
12125
12128
  if (this._currentStrikeThrough) {
12126
- const h = new R.BufferGeometry(), f = u + l / 2;
12127
- h.setAttribute(
12129
+ const d = new R.BufferGeometry(), g = l + p / 2;
12130
+ d.setAttribute(
12128
12131
  "position",
12129
12132
  new R.BufferAttribute(
12130
- new Float32Array([i, f, p, i + o, f, p]),
12133
+ new Float32Array([o, g, f, o + c, g, f]),
12131
12134
  3
12132
12135
  )
12133
- ), h.setIndex(null), n.push(h);
12136
+ ), d.setIndex(null), n.push(d);
12134
12137
  }
12135
12138
  }
12136
12139
  processLastLine() {
@@ -12238,7 +12241,7 @@ class gl {
12238
12241
  return n.children.length === 1 ? n.children[0] : n;
12239
12242
  }
12240
12243
  }
12241
- const Mt = /* @__PURE__ */ new R.Vector3(), Ce = /* @__PURE__ */ new R.Vector3(), Bt = /* @__PURE__ */ new R.Vector3(), Pt = /* @__PURE__ */ new R.Quaternion(), It = /* @__PURE__ */ new R.Matrix4(), pn = /* @__PURE__ */ new R.Matrix4(), dn = /* @__PURE__ */ new R.Vector3(1, 0, 0);
12244
+ const Mt = /* @__PURE__ */ new R.Vector3(), Ce = /* @__PURE__ */ new R.Vector3(), Bt = /* @__PURE__ */ new R.Vector3(), It = /* @__PURE__ */ new R.Quaternion(), Pt = /* @__PURE__ */ new R.Matrix4(), pn = /* @__PURE__ */ new R.Matrix4(), dn = /* @__PURE__ */ new R.Vector3(1, 0, 0);
12242
12245
  class Sl extends R.Object3D {
12243
12246
  /**
12244
12247
  * Creates a new instance of MText.
@@ -12319,7 +12322,7 @@ class Sl extends R.Object3D {
12319
12322
  const { object: n, height: a } = this.createMTextGroup(e, r);
12320
12323
  if (!n)
12321
12324
  return;
12322
- n.matrix.decompose(Ce, Pt, Bt), e.position && (Ce.x += e.position.x, Ce.y += e.position.y, n.matrix.compose(Ce, Pt, Bt));
12325
+ n.matrix.decompose(Ce, It, Bt), e.position && (Ce.x += e.position.x, Ce.y += e.position.y, n.matrix.compose(Ce, It, Bt));
12323
12326
  const s = e.width, i = this.calculateAnchorPoint(
12324
12327
  s,
12325
12328
  a,
@@ -12334,9 +12337,9 @@ class Sl extends R.Object3D {
12334
12337
  const l = e.directionVector, c = new R.Vector3(l.x, l.y, l.z), p = c.clone().cross(dn), h = dn.angleTo(c);
12335
12338
  u = p.z > 0 ? -h : h;
12336
12339
  }
12337
- n.matrix.compose(Ce, Pt, Bt);
12340
+ n.matrix.compose(Ce, It, Bt);
12338
12341
  const o = e.position ? Ce.clone().sub(e.position) : Ce;
12339
- return It.makeTranslation(-o.x, -o.y, 0), pn.makeRotationZ(u), n.matrix.multiply(It), n.matrix.multiply(pn), n.matrix.multiply(It.invert()), n.matrix.decompose(n.position, n.quaternion, n.scale), n;
12342
+ return Pt.makeTranslation(-o.x, -o.y, 0), pn.makeRotationZ(u), n.matrix.multiply(Pt), n.matrix.multiply(pn), n.matrix.multiply(Pt.invert()), n.matrix.decompose(n.position, n.quaternion, n.scale), n;
12340
12343
  }
12341
12344
  /**
12342
12345
  * Creates a group of text elements from MText data.
@@ -12371,9 +12374,9 @@ class Sl extends R.Object3D {
12371
12374
  this.styleManager,
12372
12375
  this.fontManager,
12373
12376
  l
12374
- ), v = f.processText(h);
12377
+ ), d = f.processText(h);
12375
12378
  return f.processLastLine(), {
12376
- object: v,
12379
+ object: d,
12377
12380
  height: f.totalHeight
12378
12381
  };
12379
12382
  }