Spaces:
Sleeping
Sleeping
File size: 60,211 Bytes
9d1374f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 1871 1872 1873 1874 1875 1876 1877 1878 1879 1880 1881 1882 1883 1884 1885 1886 1887 1888 1889 1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 1922 1923 1924 1925 1926 1927 1928 1929 1930 1931 1932 1933 1934 1935 1936 1937 1938 1939 1940 1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 1962 1963 1964 1965 1966 1967 1968 1969 1970 1971 1972 1973 1974 1975 1976 1977 1978 1979 1980 1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 | #! /usr/bin/perl
# Creates the FontForge files needed to create the
# KaTeX fonts from the TeX source files, constructing some
# glyphs from two or more parts, when needed.
#
# Usage: ./makeFF
require "custom.cfg.pl";
#########################################################################
$map{cmr10} = {
"Main-Regular" => [
[0,1] => 0x393, # \Gamma, \Delta
2 => 0x398, # \Theta
3 => 0x39B, # \Lambda
4 => 0x39E, # \Xi
5 => 0x3A0, # \Pi
6 => 0x3A3, # \Sigma
[7,8] => 0x3A5, # \Upsilon, \Phi
[9,0xA] => 0x3A8, # \Psi, \Omega
0x10 => 0x131, # \i
0x11 => 0x237, # \j
0x12 => 0x2CB, # \grave
0x13 => 0x2CA, # \acute
0x14 => 0x2C7, # \check
0x15 => 0x2D8, # \breve
0x16 => 0x2C9, # \bar
0x17 => [0xB0,-125,0], # \degree
0x17 => 0x02DA, # \r, ring above
0x18 => 0xB8, # \c, cedilla
[0x21,0x2F] => 0x21, # !, ", #, $, %, &, ', (, ), *, +, comma, -, ., /
0x22 => 0x201D, # "
0x27 => 0x2019, # '
[0x30,0x39] => 0x30, # 0-9
[0x3A,0x3B] => 0x3A, # :, ;
0x3D => 0x3D, # =
[0x3F,0x40] => 0x3F, # ?, @
[0x41,0x5A] => 0x41, # A-Z
0x5B => 0x5B, # [
0x5C => 0x201C, # ``
[0x5D,0x5E] => 0x5D, # ], ^
0x5E => 0x2C6, # \hat
0x5F => 0x2D9, # \dot
0x60 => 0x2018, # `
[0x61,0x7A] => 0x61, # a-z
[0x7B,0x7C] => 0x2013, # \endash, \emdash
0x7B => [0x5F,0,-310], # underline
0x7D => 0x2DD, # double acute
0x7E => [0x7E,0,-350], # ~
0x7E => 0x2DC, # \tilde
0x7F => 0xA8, # \ddot
0x19 => 0xDF, # sharp S
0x1A => 0xE6, # ae ligature
0x1B => 0x153, # oe ligature
0x1C => 0xF8, # o with slash
0x1D => 0xC6, # AE ligature
0x1E => 0x152, # OE ligature
0x1F => 0xD8, # O with slash
],
};
$map{cmmi10} = {
"Math-Italic" => [
[0,1] => 0x393, # \Gamma, \Delta
2 => 0x398, # \Theta
3 => 0x39B, # \Lambda
4 => 0x39E, # \Xi
5 => 0x3A0, # \Pi
6 => 0x3A3, # \Sigma
[7,8] => 0x3A5, # \Upsilon, \Phi
[9,0xA] => 0x3A8, # \Psi, \Omega
[0xB,0xE] => 0x3B1, # \alpha, \beta, \gamma, \delta
0xF => 0x3F5, # \elpsilon
[0x10,0x18] => 0x3B6, # \zeta, \eta, \theta, \iota, \kappa, \lambda, \mu, \nu, \xi
[0x19,0x1A] => 0x3C0, # \pi, \rho
[0x1B,0x1D] => 0x3C3, # \sigma, \tau, \upsilon
0x1E => 0x3D5, # \phi
[0x1F,0x21] => 0x3C7, # \chi, \psi, \omega
0x22 => 0x3B5, # \varepsilon
0x23 => 0x3D1, # \vartheta
0x24 => 0x3D6, # \varpi
0x25 => 0x3F1, # \varrho
0x26 => 0x3C2, # \varsigma
0x27 => 0x3C6, # \varphi
[0x41,0x5A] => 0x41, # A-Z
[0x61,0x7A] => 0x61, # a - z
[0x30,0x39] => 0x30, # Oldstyle 0-9
0x6F => 0x3BF, # omicron
0x7B => 0xE131, # \imath (These differ from \i and \j, so use PUA character)
0x7C => 0xE237, # \jmath
],
"Main-Regular" => [
0x28 => 0x21BC, # \leftharpoonup
0x29 => 0x21BD, # \leftharpoondown
0x2A => 0x21C0, # \rightharpoonup
0x2B => 0x21C1, # \rightharpoondown
0x2E => 0x25B9, # \triangleright
0x2F => 0x25C3, # \triangleleft
0x3A => 0x2E, # .
0x3B => 0x2C, # ,
0x3C => 0x3C, # <
0x3D => 0x2215, # /
0x3E => 0x3E, # >
0x3F => 0x22C6, # \star
0x40 => 0x2202, # \partial
[0x5B,0x5D] => 0x266D, # \flat, \natural, \sharp
0x5E => 0x2323, # \smile
0x5F => 0x2322, # \frown
0x60 => 0x2113, # \ell
0x7D => 0x2118, # \wp
0x7E => [0x20D7,-653,0],# \vec
],
};
$map{cmsy10} = {
"Main-Regular" => [
[0,1] => 0x2212, # -
1 => 0x22C5, # \cdot
2 => 0xD7, # \times
3 => 0x2217, # \ast
4 => 0xF7, # \div
5 => 0x22C4, # \diamond
6 => 0xB1, # \pm
7 => 0x2213, # \mp
[8,0xC] => 0x2295, # \oplus, \ominus, \otimes, \oslash, \odot
0xD => 0x25EF, # \bigcirc
[0xE,0xF] => 0x2218, # \circ, \bullet
0x10 => 0x224D, # \asymp
0x11 => 0x2261, # \equiv
[0x12,0x13] => 0x2286, # \subseteq, \supseteq
[0x14,0x15] => 0x2264, # \leq, \geq
[0x16,0x17] => 0x2AAF, # \preceq, \succeq
0x18 => 0x223C, # \sim
0x19 => 0x2248, # \approx
[0x1A,0x1B] => 0x2282, # \subset, \supset
[0x1C,0x1D] => 0x226A, # \ll, \gg
[0x1E,0x1F] => 0x227A, # \prec, \succ
0x20 => 0x2190, # \leftarrow
0x21 => 0x2192, # \rightarrow
0x22 => 0x2191, # \uparrow
0x23 => 0x2193, # \downarrow
0x24 => 0x2194, # \leftrightarrow
0x25 => 0x2197, # \nearrow
0x26 => 0x2198, # \searrow
0x27 => 0x2243, # \simeq
0x28 => 0x21D0, # \Leftarrow
0x29 => 0x21D2, # \Rightarrow
0x2A => 0x21D1, # \Uparrow
0x2B => 0x21D3, # \Downarrow
0x2C => 0x21D4, # \Leftrightarrow
0x2D => 0x2196, # \nwarrow
0x2E => 0x2199, # \swarrow
0x2F => 0x221D, # \propto
0x30 => 0x2032, # \prime
0x31 => 0x221E, # \infty
0x32 => 0x2208, # \in
0x33 => 0x220B, # \ni
0x34 => 0x25B3, # \bigtriangleup and \triangle
0x35 => 0x25BD, # \bigtriangledown
0x36 => 0xE020, # \not (U+0338 COMBINING LONG SOLIDUS OVERLAY would
# be most natural, but we don't use a negative
# leading space, so use PUA character)
0x38 => 0x2200, # \forall
0x39 => 0x2203, # \exists
0x3A => 0xAC, # \neg
0x3B => 0x2205, # \emptyset
0x3C => 0x211C, # \Re
0x3D => 0x2111, # \Im
0x3E => 0x22A4, # \top
0x3F => 0x22A5, # \bot
0x40 => 0x2135, # \aleph
0x5B => 0x222A, # \cup
0x5C => 0x2229, # \cap
0x5D => 0x228E, # \uplus
[0x5E,0x5F] => 0x2227, # \wedge, \vee
[0x60,0x61] => 0x22A2, # \vdash, \dashv
[0x62,0x63] => 0x230A, # \lfloor, \rfloor
[0x64,0x65] => 0x2308, # \lceil, \rceil
0x66 => 0x7B, # {
0x67 => 0x7D, # }
[0x68,0x69] => 0x27E8, # \langle, \rangle
0x6A => 0x7C, # |
0x6A => 0x2223, # \vert
0x6B => 0x2225, # \Vert
0x6C => 0x2195, # \updownarrow
0x6D => 0x21D5, # \Updownarrow
0x6E => 0x5C, # \backslash
0x6E => 0x2216, # \setminus
0x6F => 0x2240, # \wr
0x70 => [0x221A,0,760], # \surd ### adjust position so font doesn't have a large depth
0x71 => 0x2A3F, # \amalg
0x72 => 0x2207, # \nabla
0x73 => 0x222B, # \int
0x74 => 0x2294, # \sqcup
0x75 => 0x2293, # \sqcap
[0x76,0x77] => 0x2291, # \sqsubseteq, \sqsupseteq
0x78 => 0xA7, # \S
[0x79,0x7A] => 0x2020, # \dagger, \ddagger
0x7B => 0xB6, # \P
0x7C => 0x2663, # \clubsuit
0x7D => 0x2662, # \diamondsuit
0x7E => 0x2661, # \heartsuit
0x7F => 0x2660, # \spadesuit
],
"Caligraphic" => [
[0x41,0x5A] => 0x41, # A-Z
],
};
$map{cmex10} = {
"Size1" => [
0 => [0x28,0,810], # (
1 => [0x29,0,810], # )
2 => [0x5B,0,810], # [
3 => [0x5D,0,810], # ]
4 => [0x230A,0,810], # \lfloor
5 => [0x230B,0,810], # \rfloor
6 => [0x2308,0,810], # \lceil
7 => [0x2309,0,810], # \rceil
8 => [0x7B,0,810], # {
9 => [0x7D,0,810], # }
0xA => [0x27E8,0,810], # \langle
0xB => [0x27E9,0,810], # \rangle
0xC => [0x2223,0,606], # \vert
0xD => [0x2225,0,606], # \Vert
0xE => [0x2F,0,810], # /
0xF => [0x5C,0,810], # \
0x46 => [0x2A06,0,750], # \bigsqcup
0x48 => [0x222E,0,805], # \oint
0x4A => [0x2A00,0,750], # \bigodot
0x4C => [0x2A01,0,750], # \bigoplus
0x4E => [0x2A02,0,750], # \bigotimes
0x50 => [0x2211,0,750], # \sum
0x51 => [0x220F,0,750], # \prod
0x52 => [0x222B,0,805], # \int
0x53 => [0x22C3,0,750], # \bigcup
0x54 => [0x22C2,0,750], # \bigcap
0x55 => [0x2A04,0,750], # \biguplus
0x56 => [0x22C0,0,750], # \bigwedge
0x57 => [0x22C1,0,750], # \bigvee
0x60 => [0x2210,0,750], # \coprod
0x62 => 0x2C6, # \widehat
0x62 => [0x302,-556,0], # \widehat (combining)
0x65 => 0x2DC, # \widetilde
0x65 => [0x303,-556,0], # \widetilde (combining)
0x70 => [0x221A,0,810], # surd
0x3F => [0x23D0,0,601], # arrow extension
0x77 => [0x2016,0,601], # Arrow extension (non-standard)
0x78 => [0x2191,0,600], # uparrow top
0x79 => [0x2193,0,600], # downarrow bottom
0x7E => [0x21D1,0,600], # Uparrow top
0x7F => [0x21D3,0,600], # Downarrow bottom
],
"Size2" => [
0x10 => [0x28,0,1110], # (
0x11 => [0x29,0,1110], # )
0x2E => [0x2F,0,1110], # /
0x2F => [0x5C,0,1110], # \
0x44 => [0x27E8,0,1110],# \langle
0x45 => [0x27E9,0,1110],# \rangle
0x47 => [0x2A06,0,950], # \bigsqcup
0x49 => [0x222E,0,1360],# \oint
0x4B => [0x2A00,0,950], # \bigodot
0x4D => [0x2A01,0,950], # \bigoplus
0x4F => [0x2A02,0,950], # \bigotimes
0x58 => [0x2211,0,950], # \sum
0x59 => [0x220F,0,950], # \prod
0x5A => [0x222B,0,1360],# \int
0x5B => [0x22C3,0,950], # \bigcup
0x5C => [0x22C2,0,950], # \bigcap
0x5D => [0x2A04,0,950], # \biguplus
0x5E => [0x22C0,0,950], # \bigwedge
0x5F => [0x22C1,0,950], # \bigvee
0x61 => [0x2210,0,950], # \coprod
0x63 => 0x2C6, # \widehat
0x63 => [0x302,-1000,0],# \widehat (combining)
0x66 => 0x2DC, # \widetilde
0x66 => [0x303,-1000,0],# \widetilde (combining)
0x68 => [0x5B,0,1110], # [
0x69 => [0x5D,0,1110], # ]
0x6A => [0x230A,0,1110],# \lfloor
0x6B => [0x230B,0,1110],# \rfloor
0x6C => [0x2308,0,1110],# \lceil
0x6D => [0x2309,0,1110],# \rceil
0x6E => [0x7B,0,1110], # {
0x6F => [0x7D,0,1110], # }
0x71 => [0x221A,0,1110],# surd
],
"Size3" => [
0x12 => [0x28,0,1410], # (
0x13 => [0x29,0,1410], # )
0x14 => [0x5B,0,1410], # [
0x15 => [0x5D,0,1410], # ]
0x16 => [0x230A,0,1410],# \lfloor
0x17 => [0x230B,0,1410],# \rfloor
0x18 => [0x2308,0,1410],# \lceil
0x19 => [0x2309,0,1410],# \rceil
0x1A => [0x7B,0,1410], # {
0x1B => [0x7D,0,1410], # }
0x1C => [0x27E8,0,1410],# \langle
0x1D => [0x27E9,0,1410],# \rangle
0x1E => [0x2F,0,1410], # /
0x1F => [0x5C,0,1410], # \
0x64 => 0x2C6, # \widehat
0x64 => [0x302,-1444,0],# \widehat (combining)
0x67 => 0x2DC, # \widetilde
0x67 => [0x303,-1444,0],# \widetilde (combining)
0x72 => [0x221A,0,1410],# surd
],
"Size4" => [
0x20 => [0x28,0,1710], # (
0x21 => [0x29,0,1710], # )
0x22 => [0x5B,0,1710], # [
0x23 => [0x5D,0,1710], # ]
0x24 => [0x230A,0,1710],# \lfloor
0x25 => [0x230B,0,1710],# \rfloor
0x26 => [0x2308,0,1710],# \lceil
0x27 => [0x2309,0,1710],# \rceil
0x28 => [0x7B,0,1710], # {
0x29 => [0x7D,0,1710], # }
0x2A => [0x27E8,0,1710],# \langle
0x2B => [0x27E9,0,1710],# \rangle
0x2C => [0x2F,0,1710], # /
0x2D => [0x5C,0,1710], # \
0x73 => [0x221A,0,1710],# surd
0x30 => [0x239B,0,1115],# left paren upper hook
0x31 => [0x239E,0,1115],# right paren upper hook
0x32 => [0x23A1,0,1115],# left square bracket upper corner
0x33 => [0x23A4,0,1115],# right square bracket upper corner
0x34 => [0x23A3,0,1115],# left square bracket lower corner
0x35 => [0x23A6,0,1115],# right square bracket lower hook
0x36 => [0x23A2,0,601], # left square bracket extension
0x37 => [0x23A5,0,601], # right square bracket extension
0x38 => [0x23A7,0,900], # left curly brace upper hook
0x39 => [0x23AB,0,900], # right curly brace upper hook
0x3A => 0x23A9, # left curly brace lower hook
0x3B => 0x23AD, # right curly brace lower hook
0x3C => [0x23A8,0,1150],# left curly brace middle
0x3D => [0x23AC,0,1150],# right curly brace middle
0x3E => [0x23AA,0,300], # curly brace extension
0x40 => [0x239D,0,1115],# left paren lower hook
0x41 => [0x23A0,0,1115],# right paren lower hook
0x42 => [0x239C,0,600], # left paren extension
0x43 => [0x239F,0,600], # right paren extension
0x74 => [0x23B7,0,915], # radical bottom
0x75 => [0xE000,0,605], # radical extension (PUA)
0x76 => [0xE001,0,565], # radical top (PUA)
[0x7A,0x7D] => 0xE150, # \braceld, \bracerd, \bracelu, \braceru (PUA)
],
"Main-Regular" => [
0x38 => [0x23B0,0,900], # left curly brace upper hook, for lgroup, lmoustache
0x39 => [0x23B1,0,900], # right curly brace upper hook, for rgroup, rmoustache
0x3A => 0x23A9, # left curly brace lower hook, for lgroup, rmoustache
0x3B => 0x23AD, # right curly brace lower hook, for rgroup, lmoustache
],
};
$map{cmti10} = {
"Main-Italic" => [
[0,1] => 0x393, # \Gamma, \Delta
2 => 0x398, # \Theta
3 => 0x39B, # \Lambda
4 => 0x39E, # \Xi
5 => 0x3A0, # \Pi
6 => 0x3A3, # \Sigma
[7,8] => 0x3A5, # \Upsilon, \Phi
[9,0xA] => 0x3A8, # \Psi, \Omega
0x10 => 0x131, # \i
0x11 => 0x237, # \j
0x12 => 0x2CB, # \grave
0x13 => 0x2CA, # \acute
0x14 => 0x2C7, # \check
0x15 => 0x2D8, # \breve
0x16 => 0x2C9, # \bar
0x17 => [0xB0,-160,0], # \degree
0x17 => 0x02DA, # \r, ring above
0x18 => 0xB8, # \c, cedilla
[0x21,0x23] => 0x21, # !, ", #,
0x22 => 0x201D, # "
[0x25,0x2F] => 0x25, # %, &, ', (, ), *, +, comma, -, ., /
0x27 => 0x2019, # '
[0x30,0x39] => 0x30, # 0-9
[0x3A,0x3B] => 0x3A, # :, ;
0x3D => 0x3D, # =
[0x3F,0x40] => 0x3F, # ?, @
[0x41,0x5A] => 0x41, # A-Z
0x5B => 0x5B, # [
0x5C => 0x201C, # ``
[0x5D,0x5E] => 0x5D, # ], ^
0x5E => 0x2C6, # \hat
0x5F => 0x2D9, # \dot
0x60 => 0x2018, # `
[0x61,0x7A] => 0x61, # a-z
[0x7B,0x7C] => 0x2013, # \endash, \emdash
0x7B => [0x5F,0,-310], # underline
0x7D => 0x2DD, # double acute
0x7E => [0x7E,0,-350], # ~
0x7E => 0x2DC, # \tilde
0x7F => 0xA8, # \ddot
0x19 => 0xDF, # sharp S
0x1A => 0xE6, # ae ligature
0x1B => 0x153, # oe ligature
0x1C => 0xF8, # o with slash
0x1D => 0xC6, # AE ligature
0x1E => 0x152, # OE ligature
0x1F => 0xD8, # O with slash
],
"Main-Regular" => [
0x24 => 0xA3, # pound sign
],
};
$map{cmbx10} = {
"Main-Bold" => [
[0,1] => 0x393, # \Gamma, \Delta
2 => 0x398, # \Theta
3 => 0x39B, # \Lambda
4 => 0x39E, # \Xi
5 => 0x3A0, # \Pi
6 => 0x3A3, # \Sigma
[7,8] => 0x3A5, # \Upsilon, \Phi
[9,0xA] => 0x3A8, # \Psi, \Omega
0x10 => 0x131, # \i
0x11 => 0x237, # \j
0x12 => 0x2CB, # \grave
0x13 => 0x2CA, # \acute
0x14 => 0x2C7, # \check
0x15 => 0x2D8, # \breve
0x16 => 0x2C9, # \bar
0x17 => [0xB0,-147,0], # \degree
0x17 => 0x02DA, # \r, ring above
0x18 => 0xB8, # \c, cedilla
[0x21,0x2F] => 0x21, # !, ", #, $, %, &, ', (, ), *, +, comma, -, ., /
0x22 => 0x201D, # "
0x27 => 0x2019, # '
[0x30,0x39] => 0x30, # 0-9
[0x3A,0x3B] => 0x3A, # :, ;
0x3D => 0x3D, # =
[0x3F,0x40] => 0x3F, # ?, @
[0x41,0x5A] => 0x41, # A-Z
0x5B => 0x5B, # [
0x5C => 0x201C, # ``
[0x5D,0x5E] => 0x5D, # ], ^
0x5E => 0x2C6, # \hat
0x5F => 0x2D9, # \dot
0x60 => 0x2018, # `
[0x61,0x7A] => 0x61, # a-z
[0x7B,0x7C] => 0x2013, # \endash, \emdash
0x7B => [0x5F,0,-310], # underline
0x7D => 0x2DD, # double acute
0x7E => [0x7E,0,-350], # ~
0x7E => 0x2DC, # \tilde
0x7F => 0xA8, # \ddot
0x19 => 0xDF, # sharp S
0x1A => 0xE6, # ae ligature
0x1B => 0x153, # oe ligature
0x1C => 0xF8, # o with slash
0x1D => 0xC6, # AE ligature
0x1E => 0x152, # OE ligature
0x1F => 0xD8, # O with slash
],
};
$map{cmbxti10} = {
"Main-BoldItalic" => [
[0,1] => 0x393, # \Gamma, \Delta
2 => 0x398, # \Theta
3 => 0x39B, # \Lambda
4 => 0x39E, # \Xi
5 => 0x3A0, # \Pi
6 => 0x3A3, # \Sigma
[7,8] => 0x3A5, # \Upsilon, \Phi
[9,0xA] => 0x3A8, # \Psi, \Omega
0x10 => 0x131, # \i
0x11 => 0x237, # \j
0x12 => 0x2CB, # \grave
0x13 => 0x2CA, # \acute
0x14 => 0x2C7, # \check
0x15 => 0x2D8, # \breve
0x16 => 0x2C9, # \bar
0x17 => [0xB0,-160,0], # \degree
0x17 => 0x02DA, # \r, ring above
0x18 => 0xB8, # \c, cedilla
[0x21,0x23] => 0x21, # !, ", #,
0x22 => 0x201D, # "
[0x25,0x2F] => 0x25, # %, &, ', (, ), *, +, comma, -, ., /
0x27 => 0x2019, # '
[0x30,0x39] => 0x30, # 0-9
[0x3A,0x3B] => 0x3A, # :, ;
0x3D => 0x3D, # =
[0x3F,0x40] => 0x3F, # ?, @
[0x41,0x5A] => 0x41, # A-Z
0x5B => 0x5B, # [
0x5C => 0x201C, # ``
[0x5D,0x5E] => 0x5D, # ], ^
0x5E => 0x2C6, # \hat
0x5F => 0x2D9, # \dot
0x60 => 0x2018, # `
[0x61,0x7A] => 0x61, # a-z
[0x7B,0x7C] => 0x2013, # \endash, \emdash
0x7B => [0x5F,0,-310], # underline
0x7D => 0x2DD, # double acute
0x7E => [0x7E,0,-350], # ~
0x7E => 0x2DC, # \tilde
0x7F => 0xA8, # \ddot
0x19 => 0xDF, # sharp S
0x1A => 0xE6, # ae ligature
0x1B => 0x153, # oe ligature
0x1C => 0xF8, # o with slash
0x1D => 0xC6, # AE ligature
0x1E => 0x152, # OE ligature
0x1F => 0xD8, # O with slash
],
"Main-Bold" => [
0x24 => 0xA3, # pound sign
],
};
$map{cmmib10} = {
"Math-BoldItalic" => [
[0,1] => 0x393, # \Gamma, \Delta
2 => 0x398, # \Theta
3 => 0x39B, # \Lambda
4 => 0x39E, # \Xi
5 => 0x3A0, # \Pi
6 => 0x3A3, # \Sigma
[7,8] => 0x3A5, # \Upsilon, \Phi
[9,0xA] => 0x3A8, # \Psi, \Omega
[0xB,0xE] => 0x3B1, # \alpha, \beta, \gamma, \delta
0xF => 0x3F5, # \elpsilon
[0x10,0x18] => 0x3B6, # \zeta, \eta, \theta, \iota, \kappa, \lambda, \mu, \nu, \xi
[0x19,0x1A] => 0x3C0, # \pi, \rho
[0x1B,0x1D] => 0x3C3, # \sigma, \tau, \upsilon
0x1E => 0x3D5, # \phi
[0x1F,0x21] => 0x3C7, # \chi, \psi, \omega
0x22 => 0x3B5, # \varepsilon
0x23 => 0x3D1, # \vartheta
0x24 => 0x3D6, # \varpi
0x25 => 0x3F1, # \varrho
0x26 => 0x3C2, # \varsigma
0x27 => 0x3C6, # \varphi
[0x30,0x39] => 0x30, # Oldstyle 0-9
[0x41,0x5A] => 0x41, # A-Z
[0x61,0x7A] => 0x61, # a - z
0x6F => 0x3BF, # omicron
0x7B => 0xE131, # \imath (PUA)
0x7C => 0xE237, # \jmath (PUA)
],
"Main-Bold" => [
0x28 => 0x21BC, # \leftharpoonup
0x29 => 0x21BD, # \leftharpoondown
0x2A => 0x21C0, # \rightharpoonup
0x2B => 0x21C1, # \rightharpoondown
0x2E => 0x25B9, # \triangleright
0x2F => 0x25C3, # \triangleleft
0x3A => 0x2E, # .
0x3B => 0x2C, # ,
0x3C => 0x3C, # <
0x3D => 0x2215, # /
0x3E => 0x3E, # >
0x3F => 0x22C6, # \star
0x40 => 0x2202, # \partial
[0x5B,0x5D] => 0x266D, # \flat, \natural, \sharp
0x5E => 0x2323, # \smile
0x5F => 0x2322, # \frown
0x60 => 0x2113, # \ell
0x68 => 0x210F, # \hbar (bar added below)
0x7D => 0x2118, # \wp
0x7E => [0x20D7,-729,0],# \vec
],
};
$map{cmbsy10} = {
"Main-Bold" => [
[0,1] => 0x2212, # -
1 => 0x22C5, # \cdot
2 => 0xD7, # \times
3 => 0x2217, # \ast
4 => 0xF7, # \div
5 => 0x22C4, # \diamond
6 => 0xB1, # \pm
7 => 0x2213, # \mp
[8,0xC] => 0x2295, # \oplus, \ominus, \otimes, \oslash, \odot
0xD => 0x25EF, # \bigcirc
[0xE,0xF] => 0x2218, # \circ, \bullet
0x10 => 0x224D, # \asymp
0x11 => 0x2261, # \equiv
[0x12,0x13] => 0x2286, # \subseteq, \supseteq
[0x14,0x15] => 0x2264, # \leq, \geq
[0x16,0x17] => 0x2AAF, # \preceq, \succeq
0x18 => 0x223C, # \sim
0x19 => 0x2248, # \approx
[0x1A,0x1B] => 0x2282, # \subset, \supset
[0x1C,0x1D] => 0x226A, # \ll, \gg
[0x1E,0x1F] => 0x227A, # \prec, \succ
0x20 => 0x2190, # \leftarrow
0x21 => 0x2192, # \rightarrow
0x22 => 0x2191, # \uparrow
0x23 => 0x2193, # \downarrow
0x24 => 0x2194, # \leftrightarrow
0x25 => 0x2197, # \nearrow
0x26 => 0x2198, # \searrow
0x27 => 0x2243, # \simeq
0x28 => 0x21D0, # \Leftarrow
0x29 => 0x21D2, # \Rightarrow
0x2A => 0x21D1, # \Uparrow
0x2B => 0x21D3, # \Downarrow
0x2C => 0x21D4, # \Leftrightarrow
0x2D => 0x2196, # \nwarrow
0x2E => 0x2199, # \swarrow
0x2F => 0x221D, # \propto
0x30 => 0x2032, # \prime
0x31 => 0x221E, # \infty
0x32 => 0x2208, # \in
0x33 => 0x220B, # \ni
0x34 => 0x25B3, # \bigtriangleup and \triangle
0x35 => 0x25BD, # \bigtriangledown
0x36 => 0xE020, # \not
0x38 => 0x2200, # \forall
0x39 => 0x2203, # \exists
0x3A => 0xAC, # \neg
0x3B => 0x2205, # \emptyset
0x3C => 0x211C, # \Re
0x3D => 0x2111, # \Im
0x3E => 0x22A4, # \top
0x3F => 0x22A5, # \bot
0x40 => 0x2135, # \aleph
0x5B => 0x222A, # \cup
0x5C => 0x2229, # \cap
0x5D => 0x228E, # \uplus
[0x5E,0x5F] => 0x2227, # \wedge, \vee
[0x60,0x61] => 0x22A2, # \vdash, \dashv
[0x62,0x63] => 0x230A, # \lfloor, \rfloor
[0x64,0x65] => 0x2308, # \lceil, \rceil
0x66 => 0x7B, # {
0x67 => 0x7D, # }
[0x68,0x69] => 0x27E8, # \langle, \rangle
0x6A => 0x7C, # |
0x6A => 0x2223, # \vert
0x6B => 0x2225, # \Vert
0x6C => 0x2195, # \updownarrow
0x6D => 0x21D5, # \Updownarrow
0x6E => 0x5C, # \backslash
0x6E => 0x2216, # \setminus
0x6F => 0x2240, # \wr
0x70 => [0x221A,0,760], # \surd ### adjust position so font doesn't have a large depth
0x71 => 0x2A3F, # \amalg
0x72 => 0x2207, # \nabla
0x73 => 0x222B, # \int
0x74 => 0x2294, # \sqcup
0x75 => 0x2293, # \sqcap
[0x76,0x77] => 0x2291, # \sqsubseteq, \sqsupseteq
[0x79,0x7A] => 0x2020, # \dagger, \ddagger
0x7C => 0x2663, # \clubsuit
0x7D => 0x2662, # \diamondsuit
0x7E => 0x2661, # \heartsuit
0x7F => 0x2660, # \spadesuit
],
"Caligraphic-Bold" => [
[0x41,0x5A] => 0x41, # A-Z
],
};
$map{msam10} = {
"Main-Regular" => [
0x5C => 0x2220, # \angle
],
"Main-Bold" => [
0x5C => 0x2220, # \angle (emboldened below)
],
"AMS" => [
0x00 => 0x22A1, # \boxdot
0x01 => 0x229E, # \boxplus
0x02 => 0x22A0, # \boxtimes
0x03 => 0x25A1, # \square
0x04 => 0x25A0, # \blacksquare
0x05 => 0x22C5, # \centerdot
0x06 => 0x25CA, # \lozenge
0x07 => 0x29EB, # \blacklozenge
0x08 => 0x21BB, # \circlearrowright
0x09 => 0x21BA, # \circlearrowleft
0x0A => 0x21CC, # \rightleftharpoons
0x0B => 0x21CB, # \leftrightharpoons
0x0C => 0x229F, # \boxminus
0x0D => 0x22A9, # \Vdash
0x0E => 0x22AA, # \Vvdash
0x0F => 0x22A8, # \vDash
0x10 => 0x21A0, # \twoheadrightarrow
0x11 => 0x219E, # \twoheadleftarrow
0x12 => 0x21C7, # \leftleftarrows
0x13 => 0x21C9, # \rightrightarrows
0x14 => 0x21C8, # \upuparrows
0x15 => 0x21CA, # \downdownarrows
0x16 => 0x21BE, # \upharpoonright
0x17 => 0x21C2, # \downharpoonright
0x18 => 0x21BF, # \upharpoonleft
0x19 => 0x21C3, # \downharpoonleft
0x1A => 0x21A3, # \rightarrowtail
0x1B => 0x21A2, # \leftarrowtail
0x1C => 0x21C6, # \leftrightarrows
0x1D => 0x21C4, # \rightleftarrows
0x1E => 0x21B0, # \Lsh
0x1F => 0x21B1, # \Rsh
0x20 => 0x21DD, # \rightsquigarrow
0x21 => 0x21AD, # \leftrightsquigarrow
0x22 => 0x21AB, # \looparrowleft
0x23 => 0x21AC, # \looparrowright
0x24 => 0x2257, # \circeq
0x25 => 0x227F, # \succsim
0x26 => 0x2273, # \gtrsim
0x27 => 0x2A86, # \gtrapprox
0x28 => 0x22B8, # \multimap
0x29 => 0x2234, # \therefore
0x2A => 0x2235, # \because
0x2B => 0x2251, # \doteqdot
0x2C => 0x225C, # \triangleq
0x2D => 0x227E, # \precsim
0x2E => 0x2272, # \lesssim
0x2F => 0x2A85, # \lessapprox
0x30 => 0x2A95, # \eqslantless
0x31 => 0x2A96, # \eqslantgtr
0x32 => 0x22DE, # \curlyeqprec
0x33 => 0x22DF, # \curlyeqsucc
0x34 => 0x227C, # \preccurlyeq
0x35 => 0x2266, # \leqq
0x36 => 0x2A7D, # \leqslant
0x37 => 0x2276, # \lessgtr
0x38 => 0x2035, # \backprime
0x39 => 0x2212, # dahsed arrow extension
0x3A => 0x2253, # \risingdotseq
0x3B => 0x2252, # \fallingdotseq
0x3C => 0x227D, # \succcurlyeq
0x3D => 0x2267, # \geqq
0x3E => 0x2A7E, # \geqslant
0x3F => 0x2277, # \gtrless
0x40 => 0x228F, # \sqsubset
0x41 => 0x2290, # \sqsupset
0x42 => 0x22B3, # \vartriangleright
0x43 => 0x22B2, # \vartriangleleft
0x44 => 0x22B5, # \trianglerighteq
0x45 => 0x22B4, # \trianglelefteq
0x46 => 0x2605, # \bigstar
0x47 => 0x226C, # \between
0x48 => 0x25BC, # \blacktriangledown
0x49 => 0x25B6, # \blacktriangleright
0x4A => 0x25C0, # \blacktriangleleft
0x4B => 0x2192, # rightarrow
0x4C => 0x2190, # leftarrow
0x4D => 0x25B3, # \vartriangle
0x4E => 0x25B2, # \blacktriangle
0x4F => 0x25BD, # \triangledown
0x50 => 0x2256, # \eqcirc
0x51 => 0x22DA, # \lesseqgtr
0x52 => 0x22DB, # \gtreqless
0x53 => 0x2A8B, # \lesseqqgtr
0x54 => 0x2A8C, # \gtreqqless
0x55 => 0x00A5, # yen
0x56 => 0x21DB, # \Rrightarrow
0x57 => 0x21DA, # \Lleftarrow
0x58 => 0x2713, # checkmark
0x59 => 0x22BB, # \veebar
0x5A => 0x22BC, # \barwedge
0x5B => 0x2A5E, # \doublebarwedge
0x5C => 0x2220, # \angle
0x5D => 0x2221, # \measuredangle
0x5E => 0x2222, # \sphericalangle
0x5F => 0x221D, # \varpropto
0x60 => 0x2323, # \smallsmile
0x61 => 0x2322, # \smallfrown
0x62 => 0x22D0, # \Subset
0x63 => 0x22D1, # \Supset
0x64 => 0x22D3, # \Cup
0x65 => 0x22D2, # \Cap
0x66 => 0x22CF, # \curlywedge
0x67 => 0x22CE, # \curlyvee
0x68 => 0x22CB, # \leftthreetimes
0x69 => 0x22CC, # \rightthreetimes
0x6A => 0x2AC5, # \subseteqq
0x6B => 0x2AC6, # \supseteqq
0x6C => 0x224F, # \bumpeq
0x6D => 0x224E, # \Bumpeq
0x6E => 0x22D8, # \lll
0x6F => 0x22D9, # \ggg
0x70 => 0x250C, # \ulcorner
0x71 => 0x2510, # \urcorner
0x72 => 0x00AE, # registered sign
0x73 => 0x24C8, # \circledS
0x74 => 0x22D4, # \pitchfork
0x75 => 0x2214, # \dotplus
0x76 => 0x223D, # \backsim
0x77 => 0x22CD, # \backsimeq
0x78 => 0x2514, # \llcorner
0x79 => 0x2518, # \lrcorner
0x7A => 0x2720, # maltese cross
0x7B => 0x2201, # \complement
0x7C => 0x22BA, # \intercal
0x7D => 0x229A, # \circledcirc
0x7E => 0x229B, # \circledast
0x7F => 0x229D, # \circleddash
],
};
$map{msbm10} = {
"Size4" => [
0x5B => 0x2C6, # \widehat
0x5B => [0x302,-1889,0],# \widehat (combining)
0x5D => 0x2DC, # \widetilde
0x5D => [0x303,-1889,0],# \widetilde (combining)
],
"Main-Regular" => [
0x7E => 0x210F, # \hbar
],
"Main-Italic" => [
0x7D => 0x210F, # \hbar (with slant)
],
"AMS" => [
0x00 => 0xE00C, # \lvertneqq
0x01 => 0xE00D, # \gvertneqq
0x02 => 0x2270, # \nleq
0x03 => 0x2271, # \ngeq
0x04 => 0x226E, # \nless
0x05 => 0x226F, # \ngtr
0x06 => 0x2280, # \nprec
0x07 => 0x2281, # \nsucc
0x08 => 0x2268, # \lneqq
0x09 => 0x2269, # \gneqq
0x0A => 0xE010, # \nleqslant
0x0B => 0xE00F, # \ngeqslant
0x0C => 0x2A87, # \lneq
0x0D => 0x2A88, # \gneq
0x0E => 0x22E0, # \npreceq
0x0F => 0x22E1, # \nsucceq
0x10 => 0x22E8, # \precnsim
0x11 => 0x22E9, # \succnsim
0x12 => 0x22E6, # \lnsim
0x13 => 0x22E7, # \gnsim
0x14 => 0xE011, # \nleqq
0x15 => 0xE00E, # \ngeqq
0x16 => 0x2AB5, # \precneqq
0x17 => 0x2AB6, # \succneqq
0x18 => 0x2AB9, # \precnapprox
0x19 => 0x2ABA, # \succnapprox
0x1A => 0x2A89, # \lnapprox
0x1B => 0x2A8A, # \gnapprox
0x1C => 0x2241, # \nsim
0x1D => 0x2246, # \ncong
0x1E => 0x2571, # \diagup
0x1F => 0x2572, # \diagdown
0x20 => 0xE01A, # \varsubsetneq
0x21 => 0xE01B, # \varsupsetneq
0x22 => 0xE016, # \nsubseteqq
0x23 => 0xE018, # \nsupseteqq
0x24 => 0x2ACB, # \subsetneqq
0x25 => 0x2ACC, # \supsetneqq
0x26 => 0xE017, # \varsubsetneqq
0x27 => 0xE019, # \varsupsetneqq
0x28 => 0x228A, # \subsetneq
0x29 => 0x228B, # \supsetneq
0x2A => 0x2288, # \nsubseteq
0x2B => 0x2289, # \nsupseteq
0x2C => 0x2226, # \nparallel
0x2D => 0x2224, # \nmid
0x2E => 0xE006, # \nshortmid
0x2F => 0xE007, # \nshortparallel
0x30 => 0x22AC, # \nvdash
0x31 => 0x22AE, # \nVdash
0x32 => 0x22AD, # \nvDash
0x33 => 0x22AF, # \nVDash
0x34 => 0x22ED, # \ntrianglerighteq
0x35 => 0x22EC, # \ntrianglelefteq
0x36 => 0x22EA, # \ntriangleleft
0x37 => 0x22EB, # \ntriangleright
0x38 => 0x219A, # \nleftarrow
0x39 => 0x219B, # \nrightarrow
0x3A => 0x21CD, # \nLeftarrow
0x3B => 0x21CF, # \nRightarrow
0x3C => 0x21CE, # \nLeftrightarrow
0x3D => 0x21AE, # \nleftrightarrow
0x3E => 0x22C7, # \divideontimes
0x3F => 0x2205, # \varnothing
0x40 => 0x2204, # \nexists
[0x41,0x5A] => 0x41, # A-Z
0x5C => 0x2C6, # \widehat
0x5C => [0x302,-2333,0],# \widehat (combining)
0x5E => 0x2DC, # \widetilde
0x5E => [0x303,-2333,0],# \widetilde (combining)
0x60 => 0x2132, # \Finv
0x61 => 0x2141, # \Game
0x66 => 0x2127, # \mho
0x67 => 0x00F0, # \eth
0x68 => 0x2242, # minus-tilde
0x69 => 0x2136, # \beth
0x6A => 0x2137, # \gimel
0x6B => 0x2138, # \daleth
0x6C => 0x22D6, # \lessdot
0x6D => 0x22D7, # \gtrdot
0x6E => 0x22C9, # \ltimes
0x6F => 0x22CA, # \rtimes
0x70 => 0x2223, # \shortmid
0x71 => 0x2225, # \shortparallel
0x72 => 0x2216, # \smallsetminus
0x73 => 0x223C, # \thicksim
0x74 => 0x2248, # \thickapprox
0x75 => 0x224A, # \approxeq
0x76 => 0x2AB8, # \succapprox
0x77 => 0x2AB7, # \precapprox
0x78 => 0x21B6, # \curvearrowleft
0x79 => 0x21B7, # \curvearrowright
0x7A => 0x03DD, # \digamma
0x7B => 0x03F0, # \varkappa
0x7A => 0xE008, # \digamma (non-standard, for IE)
0x7B => 0xE009, # \varkappa (non-standard, for IE)
0x7C => 0x006B, # \Bbbk
0x7D => 0x210F, # \hslash
0x7E => 0x0127, # \hbar
0x7F => 0x220D, # \backepsilon
],
};
$map{cmss10} = {
"SansSerif-Regular" => [
[0,1] => 0x393, # \Gamma, \Delta
2 => 0x398, # \Theta
3 => 0x39B, # \Lambda
4 => 0x39E, # \Xi
5 => 0x3A0, # \Pi
6 => 0x3A3, # \Sigma
[7,8] => 0x3A5, # \Upsilon, \Phi
[9,0xA] => 0x3A8, # \Psi, \Omega
0x10 => 0x131, # \i
0x11 => 0x237, # \j
0x12 => 0x2CB, # \grave
0x13 => 0x2CA, # \acute
0x14 => 0x2C7, # \check
0x15 => 0x2D8, # \breve
0x16 => 0x2C9, # \bar
0x17 => [0xB0,-142,0], # \degree
0x17 => 0x02DA, # \r, ring above
0x18 => 0xB8, # \c, cedilla
[0x21,0x2F] => 0x21, # !, ", #, $, %, &, ', (, ), *, +, comma, -, ., /
0x22 => 0x201D, # "
0x27 => 0x2019, # '
[0x30,0x39] => 0x30, # 0-9
[0x3A,0x3B] => 0x3A, # :, ;
0x3D => 0x3D, # =
[0x3F,0x40] => 0x3F, # ?, @
[0x41,0x5A] => 0x41, # A-Z
0x5B => 0x5B, # [
0x5C => 0x201C, # ``
[0x5D,0x5E] => 0x5D, # ], ^
0x5E => 0x2C6, # \hat
0x5F => 0x2D9, # \dot
0x60 => 0x2018, # `
[0x61,0x7A] => 0x61, # a-z
[0x7B,0x7C] => 0x2013, # \endash, \emdash
0x7B => [0x5F,0,-350], # underline
0x7D => 0x2DD, # double acute
0x7E => [0x7E,0,-350], # ~
0x7E => 0x2DC, # \tilde
0x7F => 0xA8, # \ddot
],
};
$map{cmssi10} = {
"SansSerif-Italic" => [
[0,1] => 0x393, # \Gamma, \Delta
2 => 0x398, # \Theta
3 => 0x39B, # \Lambda
4 => 0x39E, # \Xi
5 => 0x3A0, # \Pi
6 => 0x3A3, # \Sigma
[7,8] => 0x3A5, # \Upsilon, \Phi
[9,0xA] => 0x3A8, # \Psi, \Omega
0x10 => 0x131, # \i
0x11 => 0x237, # \j
0x12 => 0x2CB, # \grave
0x13 => 0x2CA, # \acute
0x14 => 0x2C7, # \check
0x15 => 0x2D8, # \breve
0x16 => 0x2C9, # \bar
0x17 => [0xB0,-113,0], # \degree
0x17 => 0x02DA, # \r, ring above
0x18 => 0xB8, # \c, cedilla
[0x21,0x2F] => 0x21, # !, ", #, $, %, &, ', (, ), *, +, comma, -, ., /
0x22 => 0x201D, # "
0x27 => 0x2019, # '
[0x30,0x39] => 0x30, # 0-9
[0x3A,0x3B] => 0x3A, # :, ;
0x3D => 0x3D, # =
[0x3F,0x40] => 0x3F, # ?, @
[0x41,0x5A] => 0x41, # A-Z
0x5B => 0x5B, # [
0x5C => 0x201C, # ``
[0x5D,0x5E] => 0x5D, # ], ^
0x5E => 0x2C6, # \hat
0x5F => 0x2D9, # \dot
0x60 => 0x2018, # `
[0x61,0x7A] => 0x61, # a-z
[0x7B,0x7C] => 0x2013, # \endash, \emdash
0x7B => [0x5F,0,-350], # underline
0x7D => 0x2DD, # double acute
0x7E => [0x7E,0,-350], # ~
0x7E => 0x2DC, # \tilde
0x7F => 0xA8, # \ddot
],
};
$map{cmssbx10} = {
"SansSerif-Bold" => [
[0,1] => 0x393, # \Gamma, \Delta
2 => 0x398, # \Theta
3 => 0x39B, # \Lambda
4 => 0x39E, # \Xi
5 => 0x3A0, # \Pi
6 => 0x3A3, # \Sigma
[7,8] => 0x3A5, # \Upsilon, \Phi
[9,0xA] => 0x3A8, # \Psi, \Omega
0x10 => 0x131, # \i
0x11 => 0x237, # \j
0x13 => 0xB4, # \acute
0x14 => 0x2C7, # \check
0x15 => 0x2D8, # \breve
0x16 => 0x2C9, # \bar
0x17 => [0xB0,-58,0], # \degree
0x17 => 0x02DA, # \r, ring above
0x18 => 0xB8, # \c, cedilla
[0x21,0x2F] => 0x21, # !, ", #, $, %, &, ', (, ), *, +, comma, -, ., /
0x22 => 0x201D, # "
0x27 => 0x2019, # '
[0x30,0x39] => 0x30, # 0-9
[0x3A,0x3B] => 0x3A, # :, ;
0x3D => 0x3D, # =
[0x3F,0x40] => 0x3F, # ?, @
[0x41,0x5A] => 0x41, # A-Z
0x5B => 0x5B, # [
0x5C => 0x201C, # ``
[0x5D,0x5E] => 0x5D, # ], ^
0x5E => 0x2C6, # \hat
0x5F => 0x2D9, # \dot
0x60 => 0x2018, # `
[0x61,0x7A] => 0x61, # a-z
[0x7B,0x7C] => 0x2013, # \endash, \emdash
0x7B => [0x5F,0,-350], # underline
0x7D => 0x2DD, # double acute
0x7E => [0x7E,0,-350], # ~
0x7E => 0x2DC, # \tilde
0x7F => 0xA8, # \ddot
],
};
$map{eufm10} = {
"Fraktur-Regular" => [
[0,7] => 0xE300, # variants
0x12 => 0x2018, # left quote
0x13 => 0x2019, # right quote
0x21 => 0x21, # !
[0x26,0x2F] => 0x26, # &, ', (, ), *, +, comma, -, ., /
[0x30,0x39] => 0x30, # 0-9
[0x3A,0x3B] => 0x3A, # :, ;
0x3D => 0x3D, # =
0x3F => 0x3F, # ?
[0x41,0x5A] => 0x41, # A-Z
0x5B => 0x5B, # [
[0x5D,0x5E] => 0x5D, # ], ^
[0x61,0x7A] => 0x61, # a-z
0x7D => 0x22, # "
],
};
$map{eufb10} = {
"Fraktur-Bold" => [
[1,5] => 0xE301, # variants
[8,9] => 0xE308, # variants
0x12 => 0x2018, # left quote
0x13 => 0x2019, # right quote
0x21 => 0x21, # !
[0x26,0x2F] => 0x26, # &, ', (, ), *, +, comma, -, ., /
[0x30,0x39] => 0x30, # 0-9
[0x3A,0x3B] => 0x3A, # :, ;
0x3D => 0x3D, # =
0x3F => 0x3F, # ?
[0x41,0x5A] => 0x41, # A-Z
0x5B => 0x5B, # [
[0x5D,0x5E] => 0x5D, # ], ^
[0x61,0x7A] => 0x61, # a-z
0x7D => 0x22, # "
],
};
$map{rsfs10} = {
"Script-Regular" => [
[0x41,0x5A] => 0x41, # A-Z
]
};
#$map{eusm10} = {
# "Script-Regular" => [
# 0x3C => 0x211C, # \Re
# 0x3D => 0x2111, # \Im
# 0x40 => 0x2135, # \aleph
# [0x41,0x5A] => 0x41, # A-Z
# 0x66 => 0x7B, # {
# 0x67 => 0x7D, # }
# 0x78 => 0xA7, # \S
# ],
#};
#$map{eusb10} = {
# "Script-Bold" => [
# 0x3C => 0x211C, # \Re
# 0x3D => 0x2111, # \Im
# 0x40 => 0x2135, # \aleph
# [0x41,0x5A] => 0x41, # A-Z
# 0x66 => 0x7B, # {
# 0x67 => 0x7D, # }
# 0x78 => 0xA7, # \S
# ],
#};
$map{cmtt10} = {
"Typewriter" => [
[0,1] => 0x393, # \Gamma, \Delta
2 => 0x398, # \Theta
3 => 0x39B, # \Lambda
4 => 0x39E, # \Xi
5 => 0x3A0, # \Pi
6 => 0x3A3, # \Sigma
[7,8] => 0x3A5, # \Upsilon, \Phi
[9,0xA] => 0x3A8, # \Psi, \Omega
0xD => 0x2032, # '
0x10 => 0x131, # \i
0x11 => 0x237, # \j
0x12 => 0x2CB, # \grave
0x13 => 0x2CA, # \acute
0x14 => 0x2C7, # \check
0x15 => 0x2D8, # \breve
0x16 => 0x2C9, # \bar
0x17 => 0xB0, # \degree
0x17 => 0x02DA, # \r, ring above
0x18 => 0xB8, # \c, cedilla
0x20 => 0x2423, # graphic representation of space
[0x21,0x7F] => 0x21,
0x60 => 0x2018, # left quote
0x27 => 0x2019, # right quote
0x5E => 0x2C6, # \hat
0x5F => 0x2D9, # \dot
0x7D => 0x2DD, # double acute
0x7E => [0x7E,0,-350], # ~
0x7E => 0x2DC, # \tilde
0x7F => 0xA8, # \ddot
]
};
#########################################################################
$extra{'Main-Regular'} = {
cdots => [
'Select(0u22C5)','Copy()',
'Select(0u22EF)','Paste()',
'PasteWithOffset(447,0)',
'PasteWithOffset(894,0)',
'SetRBearing(894,1)',
],
ldots => [
'Select(0u2E)','Copy()',
'Select(0u2026)','Paste()',
'PasteWithOffset(447,0)',
'PasteWithOffset(894,0)',
'SetRBearing(894,1)',
],
vdots => [
'Select(0u2E)','Copy()',
'Select(0u22EE)','Clear()',
'PasteWithOffset(0,-30)',
'PasteWithOffset(0,380)',
'PasteWithOffset(0,780)',
'SetRBearing(-722,1)',
],
ddots => [
'Select(0u2E)','Copy()',
'Select(0u22F1)','Clear()',
'PasteWithOffset(55,700)',
'PasteWithOffset(502,400)',
'PasteWithOffset(949,100)',
'SetRBearing(282,1)',
],
spaceEn => [
'Select(0u2002)',
'SetRBearing(500)',
],
spaceEm => [
'Select(0u2003)',
'SetRBearing(999)',
],
space3 => [
'Select(0u2004)',
'SetRBearing(333)',
],
space4 => [
'Select(0u2005)',
'SetRBearing(250)',
],
space6 => [
'Select(0u2006)',
'SetRBearing(167)',
],
thinspace => [
'Select(0u2009)',
'SetRBearing(167)',
],
hairspace => [
'Select(0u200A)',
'SetRBearing(83)',
],
cong => [
'Select(0u223C)','Copy()',
'Select(0u2245)','Clear()',
'PasteWithOffset(0,222)',
'Select(0u3D)','Copy()',
'Select(0u2245)',
'PasteWithOffset(0,-111)',
'SetWidth(778)',
],
bowtie => [
'Select(0u25B9)','Copy()',
'Select(0u22C8)','Paste()',
'Select(0u25C3)','Copy()',
'Select(0u22C8)',
'PasteWithOffset(400,0)',
'SetRBearing(400,1)',
'RemoveOverlap()',
],
models => [
'Select(0u2223)','Copy()',
'Select(0u22A8)','Paste()',
'Select(0u3D)','Copy()',
'Select(0u22A8)',
'PasteWithOffset(89,0)',
'SetRBearing(589,1)',
'RemoveOverlap()',
],
doteq => [
'Select(0u3D)','Copy()',
'Select(0u2250)','Paste()',
'Select(0u2E)','Copy()',
'Select(0u2250)',
'PasteWithOffset(251,550)',
],
not => [
'Select(0uE020)',
'SetRBearing(778,1)',
],
#notin => [
# 'Select(0u2208)','Copy()',
# 'Select(0u2209)','Paste()',
# 'Select(0u338)','Copy()',
# 'Select(0u2209)',
# 'PasteWithOffset(-55,0)',
# 'RemoveOverlap()',
#],
#noteq => [
# 'Select(0u3D)','Copy()',
# 'Select(0u2260)','Paste()',
# 'Select(0u338)','Copy()',
# 'Select(0u2260)',
# 'PasteWithOffset(0,0)',
# 'RemoveOverlap()',
#],
longleftarrow => [
'Select(0u2190)','Copy()',
'Select(0u27F5)','Paste()',
'Select(0u2212)','Copy()',
'Select(0u27F5)',
'PasteWithOffset(831,0)',
'SetRBearing(609,1)',
'RemoveOverlap()','Simplify()',
],
Longleftarrow => [
'Select(0u21D0)','Copy()',
'Select(0u27F8)','Paste()',
'Select(0u3D)','Copy()',
'Select(0u27F8)',
'PasteWithOffset(831,0)',
'SetRBearing(609,1)',
'RemoveOverlap()','Simplify()',
],
longrightarrow => [
'Select(0u2212)','Copy()',
'Select(0u27F6)','Paste()',
'Select(0u2192)','Copy()',
'Select(0u27F6)',
'PasteWithOffset(609,0)',
'SetRBearing(860,1)',
'RemoveOverlap()','Simplify()',
],
Longrightarrow => [
'Select(0u3D)','Copy()',
'Select(0u27F9)','Paste()',
'Select(0u21D2)','Copy()',
'Select(0u27F9)',
'PasteWithOffset(638,0)',
'SetRBearing(860,1)',
'RemoveOverlap()','Simplify()',
],
leftrightarrow => [
'Select(0u2190)','Copy()',
'Select(0u27F7)','Paste()',
'Select(0u2192)','Copy()',
'Select(0u27F7)',
'PasteWithOffset(859,0)',
'SetRBearing(859,1)',
'RemoveOverlap()','Simplify()',
],
Leftrightarrow => [
'Select(0u21D0)','Copy()',
'Select(0u27FA)','Paste()',
'Select(0u21D2)','Copy()',
'Select(0u27FA)',
'PasteWithOffset(858,0)',
'SetRBearing(858,1)',
'RemoveOverlap()','Simplify()',
],
mapsto => [
'Select(0u2192)','Copy()',
'Select(0u21A6)','Paste()',
'Generate("otf/KaTeX_Main-Regular.otf")',
'Open("pfa/cmsy10.pfa")',
'Select(0x37)','Copy()',
'Open("otf/KaTeX_Main-Regular.otf")',
'Select(0u21A6)',
'PasteWithOffset(0,0)',
'RemoveOverlap()','Simplify()',
],
xlongmapsto => [
'Select(0u27F6)','Copy()',
'Select(0u27FC)','Paste()',
'Generate("otf/KaTeX_Main-Regular.otf")',
'Open("pfa/cmsy10.pfa")',
'Select(0x37)','Copy()',
'Open("otf/KaTeX_Main-Regular.otf")',
'Select(0u27FC)',
'PasteWithOffset(0,0)',
'RemoveOverlap()','Simplify()',
],
hookleftarrow => [
'Select(0u2190)','Copy()',
'Select(0u21A9)','Paste()',
'Generate("otf/KaTeX_Main-Regular.otf")',
'Open("pfa/cmmi10.pfa")',
'Select(0x2D)','Copy()',
'Open("otf/KaTeX_Main-Regular.otf")',
'Select(0u21A9)',
'PasteWithOffset(848,0)',
'SetRBearing(126,1)',
'RemoveOverlap()','Simplify()',
],
hookrightarrow => [
'Generate("otf/KaTeX_Main-Regular.otf")',
'Open("pfa/cmmi10.pfa")',
'Select(0x2C)','Copy()',
'Open("otf/KaTeX_Main-Regular.otf")',
'Select(0u21AA)','Paste()',
'Select(0u2192)','Copy()',
'Select(0u21AA)',
'PasteWithOffset(126,0)',
'SetRBearing(848,1)',
'RemoveOverlap()','Simplify()',
],
rightleftharpoons => [
'Select(0u21BD)','Copy()',
'Select(0u21CC)','Paste()',
'Select(0u21C0)','Copy()',
'Select(0u21CC)',
'PasteWithOffset(0,160)',
'RemoveOverlap()','Simplify()',
],
lgroup => [
'Select(0u23B0)','Copy()',
'Select(0u27EE)','Paste()',
'Select(0u23A9)','Copy()',
'Select(0u27EE)',
'PasteWithOffset(0,0)',
'Scale(55,0,0)','RoundToInt()','Move(-38,250)',
'RemoveOverlap()','Simplify()',
'SetRBearing(-38,1)',
],
rgroup => [
'Select(0u23B1)','Copy()',
'Select(0u27EF)','Paste()',
'Select(0u23AD)','Copy()',
'Select(0u27EF)',
'PasteWithOffset(1,0)',
'Scale(55,0,0)','RoundToInt()','Move(-38,250)',
'RemoveOverlap()','Simplify()',
'SetRBearing(-38,1)',
],
lmoustache => [
'Select(0u23AD)','Copy()',
'Select(0u23B0)',
'PasteWithOffset(0,0)',
'Scale(55,0,0)','RoundToInt()','Move(-38,250)',
'RemoveOverlap()','Simplify()',
'SetRBearing(-38,1)',
],
rmoustache => [
'Select(0u23A9)','Copy()',
'Select(0u23B1)',
'PasteWithOffset(0,0)',
'Scale(55,0,0)','RoundToInt()','Move(-38,250)',
'RemoveOverlap()','Simplify()',
'SetRBearing(-38,1)',
],
diacriticals => [
'Select(0uB0)', 'SetRBearing(-125,1)', # \degree
'Select(0u20D7)','SetRBearing(153,1)', # \vec
],
};
$extra{'Main-Bold'} = {
cdots => [
'Select(0u22C5)','Copy()',
'Select(0u22EF)','Paste()',
'PasteWithOffset(488,0)',
'PasteWithOffset(976,0)',
'SetRBearing(976,1)',
],
ldots => [
'Select(0u2E)','Copy()',
'Select(0u2026)','Paste()',
'PasteWithOffset(488,0)',
'PasteWithOffset(976,0)',
'SetRBearing(976,1)',
],
vdots => [
'Select(0u2E)','Copy()',
'Select(0u22EE)','Clear()',
'PasteWithOffset(0,-30)',
'PasteWithOffset(0,380)',
'PasteWithOffset(0,780)',
'SetRBearing(-681,1)',
],
ddots => [
'Select(0u2E)','Copy()',
'Select(0u22F1)','Clear()',
'PasteWithOffset(55,700)',
'PasteWithOffset(502,400)',
'PasteWithOffset(949,100)',
'SetRBearing(323,1)',
],
spaceEn => [
'Select(0u2002)',
'SetRBearing(500)',
],
spaceEm => [
'Select(0u2003)',
'SetRBearing(999)',
],
space3 => [
'Select(0u2004)',
'SetRBearing(333)',
],
space4 => [
'Select(0u2005)',
'SetRBearing(250)',
],
space6 => [
'Select(0u2006)',
'SetRBearing(167)',
],
thinspace => [
'Select(0u2009)',
'SetRBearing(167)',
],
hairspace => [
'Select(0u200A)',
'SetRBearing(83)',
],
cong => [
'Select(0u223C)','Copy()',
'Select(0u2245)','Clear()',
'PasteWithOffset(0,247)',
'Select(0u3D)','Copy()',
'Select(0u2245)',
'PasteWithOffset(0,-136)',
'SetWidth(894)',
],
bowtie => [
'Select(0u25B9)','Copy()',
'Select(0u22C8)','Paste()',
'Select(0u25C3)','Copy()',
'Select(0u22C8)',
'PasteWithOffset(425,0)',
'SetRBearing(425,1)',
'RemoveOverlap()',
],
models => [
'Select(0u2223)','Copy()',
'Select(0u22A8)','Paste()',
'Select(0u3D)','Copy()',
'Select(0u22A8)',
'PasteWithOffset(89,0)',
'SetRBearing(655,1)',
'RemoveOverlap()',
],
doteq => [
'Select(0u3D)','Copy()',
'Select(0u2250)','Paste()',
'Select(0u2E)','Copy()',
'Select(0u2250)',
'PasteWithOffset(288,550)',
],
not => [
'Select(0uE020)',
'SetRBearing(894,1)',
],
# notin => [
# 'Select(0u2208)','Copy()',
# 'Select(0u2209)','Paste()',
# 'Select(0u338)','Copy()',
# 'Select(0u2209)',
# 'PasteWithOffset(-63,0)',
# 'PasteWithOffset(831,0)',
# 'RemoveOverlap()',
# ],
# noteq => [
# 'Select(0u3D)','Copy()',
# 'Select(0u2260)','Paste()',
# 'Select(0u338)','Copy()',
# 'Select(0u2260)',
# 'PasteWithOffset(0,0)',
# 'PasteWithOffset(894,0)',
# 'RemoveOverlap()',
# ],
longleftarrow => [
'Select(0u2190)','Copy()',
'Select(0u27F5)','Paste()',
'Select(0u2212)','Copy()',
'Select(0u27F5)',
'PasteWithOffset(944,0)',
'SetRBearing(655,1)',
'RemoveOverlap()','Simplify()',
],
Longleftarrow => [
'Select(0u21D0)','Copy()',
'Select(0u27F8)','Paste()',
'Select(0u3D)','Copy()',
'Select(0u27F8)',
'PasteWithOffset(975,0)',
'SetRBearing(718,1)',
'RemoveOverlap()','Simplify()',
],
longrightarrow => [
'Select(0u2212)','Copy()',
'Select(0u27F6)','Paste()',
'Select(0u2192)','Copy()',
'Select(0u27F6)',
'PasteWithOffset(688,0)',
'SetRBearing(939,1)',
'RemoveOverlap()','Simplify()',
],
Longrightarrow => [
'Select(0u3D)','Copy()',
'Select(0u27F9)','Paste()',
'Select(0u21D2)','Copy()',
'Select(0u27F9)',
'PasteWithOffset(720,0)',
'SetRBearing(976,1)',
'RemoveOverlap()','Simplify()',
],
leftrightarrow => [
'Select(0u2190)','Copy()',
'Select(0u27F7)','Paste()',
'Select(0u2192)','Copy()',
'Select(0u27F7)',
'PasteWithOffset(976,0)',
'SetRBearing(976,1)',
'RemoveOverlap()','Simplify()',
],
Leftrightarrow => [
'Select(0u21D0)','Copy()',
'Select(0u27FA)','Paste()',
'Select(0u21D2)','Copy()',
'Select(0u27FA)',
'PasteWithOffset(976,0)',
'SetRBearing(976,1)',
'RemoveOverlap()','Simplify()',
],
mapsto => [
'Select(0u2192)','Copy()',
'Select(0u21A6)','Paste()',
'Generate("otf/KaTeX_Main-Bold.otf")',
'Open("pfa/cmbsy10.pfa")',
'Select(0x37)','Copy()',
'Open("otf/KaTeX_Main-Bold.otf")',
'Select(0u21A6)',
'PasteWithOffset(0,0)',
'RemoveOverlap()','Simplify()',
],
xlongmapsto => [
'Select(0u27F6)','Copy()',
'Select(0u27FC)','Paste()',
'Generate("otf/KaTeX_Main-Bold.otf")',
'Open("pfa/cmbsy10.pfa")',
'Select(0x37)','Copy()',
'Open("otf/KaTeX_Main-Bold.otf")',
'Select(0u27FC)',
'PasteWithOffset(0,0)',
'RemoveOverlap()','Simplify()',
],
hookleftarrow => [
'Select(0u2190)','Copy()',
'Select(0u21A9)','Paste()',
'Generate("otf/KaTeX_Main-Bold.otf")',
'Open("pfa/cmmib10.pfa")',
'Select(0x2D)','Copy()',
'Open("otf/KaTeX_Main-Bold.otf")',
'Select(0u21A9)',
'PasteWithOffset(965,0)',
'SetRBearing(132,1)',
'RemoveOverlap()','Simplify()',
],
hookrightarrow => [
'Generate("otf/KaTeX_Main-Bold.otf")',
'Open("pfa/cmmib10.pfa")',
'Select(0x2C)','Copy()',
'Open("otf/KaTeX_Main-Bold.otf")',
'Select(0u21AA)','Paste()',
'Select(0u2192)','Copy()',
'Select(0u21AA)',
'PasteWithOffset(132,0)',
'SetRBearing(963,1)',
'RemoveOverlap()','Simplify()',
],
rightleftharpoons => [
'Select(0u21BD)','Copy()',
'Select(0u21CC)','Paste()',
'Select(0u21C0)','Copy()',
'Select(0u21CC)',
'PasteWithOffset(0,200)',
'RemoveOverlap()','Simplify()',
],
hbar => [
'Select(0u2C9)','Copy()',
'Select(0u210F)','PasteWithOffset(0,0)',
'RemoveOverlap()','Simplify()',
],
angle => [
'Select(0u2220)','Copy()',
'PasteWithOffset(0,10)',
'PasteWithOffset(0,20)',
'RemoveOverlap()','Simplify()',
'PasteWithOffset(10,0)',
'RemoveOverlap()','Simplify()',
],
diacriticals => [
'Select(0uB0)', 'SetRBearing(-147,1)', # \degree
'Select(0u20D7)','SetRBearing(154,1)', # \vec
],
};
$extra{'Main-Italic'} = {
diacriticals => [
'Select(0uB0)', 'SetRBearing(-160,1)', # \degree
],
};
$extra{'Size1'} = {
iint => [
'Select(0u222B)', 'Copy()',
'Select(0u222C)', 'Paste()',
'PasteWithOffset(347,0)',
'SetRBearing(347,1)',
],
iiint => [
'Select(0u222B)', 'Copy()',
'Select(0u222D)', 'Paste()',
'PasteWithOffset(347,0)',
'PasteWithOffset(694,0)',
'SetRBearing(694,1)',
],
};
$extra{'Size2'} = {
iint => [
'Select(0u222B)', 'Copy()',
'Select(0u222C)', 'Paste()',
'PasteWithOffset(528,0)',
'SetRBearing(528,1)',
],
iiint => [
'Select(0u222B)', 'Copy()',
'Select(0u222D)', 'Paste()',
'PasteWithOffset(528,0)',
'PasteWithOffset(1036,0)',
'SetRBearing(1036,1)',
],
};
$extra{'Size4'} = {
braceext => [
'Open("lib/Extra.otf")',
'Select(0u5F)','Copy()',
'Open("otf/KaTeX_Size4-Regular.otf")',
'Select(0uE154)','Paste()',
],
};
$extra{"AMS"} = {
dashleftarrow => [
'Select(0u2190)', 'Copy()',
'Select(0u21E0)', 'Paste()',
'Select(0u2212)','Copy()',
'Select(0u21E0)',
'PasteWithOffset(417,0)',
'PasteWithOffset(834,0)',
'SetRBearing(834,1)',
],
dashrightarrow => [
'Select(0u2212)', 'Copy()',
'Select(0u21E2)', 'Paste()',
'PasteWithOffset(417,0)',
'Select(0u2192)','Copy()',
'Select(0u21E2)','PasteWithOffset(834,0)',
'SetRBearing(834,1)',
],
};
$extra{'Typewriter'} = {
space => [
'Select(0u20)','Clear()',
'SetRBearing(525)',
],
spaceNB => [
'Select(0uA0)','Clear()',
'SetRBearing(525)',
],
};
$extra{"SansSerif-Regular"} = {
diacriticals => [
'Select(0uB0)', 'SetRBearing(-142,1)', # \degree
],
};
$extra{"SansSerif-Italic"} = {
diacriticals => [
'Select(0uB0)', 'SetRBearing(-113,1)', # \degree
],
};
$extra{"SansSerif-Bold"} = {
diacriticals => [
'Select(0uB0)', 'SetRBearing(-58,1)', # \degree
],
};
#########################################################################
foreach $cmfont (sort (keys %map)) {
print "Reading $cmfont...\n";
foreach $mjfont (keys %{$map{$cmfont}}) {
$fontname = "KaTeX_$mjfont";
$style = $fontname; $style =~ s/.*?(-|$)//; $style = "Regular" unless $style;
$normal = "Normal"; $normal = "Bold" if style =~ m/Bold/;
$family = $fontname; $family =~ s/-.*//;
$fontname = "$family-$style";
$STYLE = $style; $STYLE = "Bold Italic" if $STYLE eq "BoldItalic";
$otf = "otf/$fontname.otf";
unless (defined($script{$mjfont})) {
open(SPACE,"lib/Space.ttx"); $lines = join("",<SPACE>); close(SPACE);
$lines =~ s/\*NAME\*/$family/g; $lines =~ s/\*WEIGHT\*/$style/g;
$lines =~ s/\*WEIGHT_S\*/$STYLE/g; $lines =~ s/\*NORMAL\*/$normal/g;
if ($style eq "Regular") {$lines =~ s/\* WEIGHT\*//g} else {$lines =~ s/\* WEIGHT\*/ $STYLE/g}
open(SPACE,">Space.ttx"); print SPACE $lines; close(SPACE);
`$TTX -f Space.ttx; mv Space.otf '$otf'`; unlink("Space.ttx");
$script{$mjfont} = [
'Open("'.$otf.'")',
'SetPanose([0,0,'.($style eq 'Bold' ? '8' : '0').',0,0,0,0,0,0,0])',
'SetOS2Value("Weight",'.($style =~ m/Bold/ ? 700 : 400).')',
'SetGasp(8,2,16,1,65535,3)',
'Reencode("unicode")',
'Generate("'.$otf.'")',
];
}
$script = $script{$mjfont};
@remap = @{$map{$cmfont}{$mjfont}};
while (defined($item = shift(@remap))) {
$remap = shift(@remap);
if ($cmfont =~ /^eu/) {
push(@$script,'Open("pfa/'.$cmfont.'.pfb")');
} else {
push(@$script,'Open("pfa/'.$cmfont.'.pfa")');
}
if (ref($item) eq "ARRAY") {
push(@$script,'Select('.sprintf("%d,%d",@$item).')');
} else {
push(@$script,'Select('.$item.')');
}
push(@$script,"Copy()",'Open("'.$otf.'")');
if (ref($item) eq "ARRAY") {
push(@$script,
'Select('.sprintf("0u%04x,0u%04x",$remap,$remap+($item->[1]-$item->[0])).')',
'Paste()',
);
} elsif (ref($remap) eq "ARRAY") {
push(@$script,
'Select('.sprintf("0u%04x",$remap->[0]).')',
'Paste()',
'Move('.$remap->[1].','.$remap->[2].')',
);
} else {
push(@$script,'Select('.sprintf("0u%04x",$remap).')','Paste()');
}
push(@$script,'Generate("'.$otf.'")');
}
}
}
print "\n";
#
# Add extra characters by hand
#
foreach $font (keys %extra) {
foreach $char (sort(keys %{$extra{$font}})) {
push(@{$script{$font}},join(";\n",@{$extra{$font}{$char}}),"");
}
}
# Cleanup temporary glyphs
push(@{$script{'Main-Regular'}},
'Select(0u23A9)',
'Clear()',
'Select(0u23AD)',
'Clear()',
);
#
# Write all scripts
#
foreach $font (sort keys %script) {
$family = $font; $family .= "-Regular" unless $family =~ m/-/;
print "KaTeX_$font\n";
open(SCRIPT,">","ff/KaTeX_$family.ff");
print SCRIPT join(";\n",@{$script{$font}},"",
'SelectAll()','RoundToInt()',
'Simplify()','AddExtrema()','Simplify()',
'ClearHints()','AutoHint()','RoundToInt()',
'Generate("otf/KaTeX_'.$family.'.otf")',
'SelectAll()','AutoInstr()',
'Generate("ttf/KaTeX_'.$family.'.ttf")'),"\n";
close(SCRIPT);
}
1;
|