Formatting.
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
diff --git a/include/freetype/internal/ftstream.h b/include/freetype/internal/ftstream.h
index e7a86e2..365f479 100644
--- a/include/freetype/internal/ftstream.h
+++ b/include/freetype/internal/ftstream.h
@@ -1,3 +1,21 @@
+/***************************************************************************/
+/* */
+/* ftstream.h */
+/* */
+/* Stream handling(specification). */
+/* */
+/* Copyright 1996-2000 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
+
#ifndef FTSTREAM_H
#define FTSTREAM_H
@@ -9,292 +27,312 @@
#endif
-/* format of an 8-bit frame_op value = [ xxxxx | e | s ] */
-/* where s is set to 1 when the value is signed.. */
-/* where e is set to 1 when the value is little-endian */
-/* xxxxx is a command */
+ /* format of an 8-bit frame_op value = [ xxxxx | e | s ] */
+ /* s is set to 1 if the value is signed, */
+ /* e is set to 1 if the value is little-endian */
+ /* xxxxx is a command */
-#define FT_FRAME_OP_SHIFT 2
-#define FT_FRAME_OP_SIGNED 1
-#define FT_FRAME_OP_LITTLE 2
-#define FT_FRAME_OP_COMMAND(x) (x >> FT_FRAME_OP_SHIFT)
+#define FT_FRAME_OP_SHIFT 2
+#define FT_FRAME_OP_SIGNED 1
+#define FT_FRAME_OP_LITTLE 2
+#define FT_FRAME_OP_COMMAND( x ) ( x >> FT_FRAME_OP_SHIFT )
-#define FT_MAKE_FRAME_OP( command, little, sign ) \
- ((command << FT_FRAME_OP_SHIFT) | (little << 1) | sign)
+#define FT_MAKE_FRAME_OP( command, little, sign ) \
+ ( ( command << FT_FRAME_OP_SHIFT ) | ( little << 1 ) | sign )
#define FT_FRAME_OP_END 0
-#define FT_FRAME_OP_START 1 /* start a new frame */
-#define FT_FRAME_OP_BYTE 2 /* read 1-byte value */
-#define FT_FRAME_OP_SHORT 3 /* read 2-byte value */
-#define FT_FRAME_OP_LONG 4 /* read 4-byte value */
-#define FT_FRAME_OP_OFF3 5 /* read 3-byte value */
+#define FT_FRAME_OP_START 1 /* start a new frame */
+#define FT_FRAME_OP_BYTE 2 /* read 1-byte value */
+#define FT_FRAME_OP_SHORT 3 /* read 2-byte value */
+#define FT_FRAME_OP_LONG 4 /* read 4-byte value */
+#define FT_FRAME_OP_OFF3 5 /* read 3-byte value */
#define FT_FRAME_OP_BYTES 6 /* read a bytes sequence */
-typedef enum FT_Frame_Op_
-{
- ft_frame_end = 0,
- ft_frame_start = FT_MAKE_FRAME_OP( FT_FRAME_OP_START, 0, 0 ),
- ft_frame_byte = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE, 0, 0 ),
- ft_frame_schar = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE, 0, 1 ),
+ typedef enum FT_Frame_Op_
+ {
+ ft_frame_end = 0,
+ ft_frame_start = FT_MAKE_FRAME_OP( FT_FRAME_OP_START, 0, 0 ),
- ft_frame_ushort_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 0 ),
- ft_frame_short_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 1 ),
- ft_frame_ushort_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 0 ),
- ft_frame_short_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 1 ),
+ ft_frame_byte = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE, 0, 0 ),
+ ft_frame_schar = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE, 0, 1 ),
- ft_frame_ulong_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 0 ),
- ft_frame_ulong_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 1 ),
- ft_frame_long_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 0 ),
- ft_frame_long_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 1 ),
+ ft_frame_ushort_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 0 ),
+ ft_frame_short_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 1 ),
+ ft_frame_ushort_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 0 ),
+ ft_frame_short_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 1 ),
- ft_frame_uoff3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 0 ),
- ft_frame_uoff3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 1 ),
- ft_frame_off3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 0 ),
- ft_frame_off3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 1 ),
+ ft_frame_ulong_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 0 ),
+ ft_frame_ulong_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 1 ),
+ ft_frame_long_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 0 ),
+ ft_frame_long_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 1 ),
+
+ ft_frame_uoff3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 0 ),
+ ft_frame_uoff3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 1 ),
+ ft_frame_off3_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 0 ),
+ ft_frame_off3_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 1 ),
- ft_frame_bytes = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 0 ),
- ft_frame_skip = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 1 )
+ ft_frame_bytes = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 0 ),
+ ft_frame_skip = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 1 )
+
+ } FT_Frame_Op;
-} FT_Frame_Op;
+ typedef struct FT_Frame_Field_
+ {
+ FT_Frame_Op value;
+ char size;
+ FT_UShort offset;
-typedef struct FT_Frame_Field_
-{
- FT_Frame_Op value;
- char size;
- FT_UShort offset;
+ } FT_Frame_Field;
-} FT_Frame_Field;
-/* make-up a FT_Frame_Field out of a structure type and a field name */
-#define FT_FIELD_REF(s,f) (((s*)0)->f)
+ /* make-up a FT_Frame_Field out of a structure type and a field name */
+#define FT_FIELD_REF( s, f ) (((s*)0)->f)
-#define FT_FRAME_FIELD( frame_op, struct_type, field ) \
- { \
- frame_op, \
- sizeof(FT_FIELD_REF(struct_type,field)), \
- (FT_UShort)(char*)&FT_FIELD_REF(struct_type,field) }
+#define FT_FRAME_FIELD( frame_op, struct_type, field ) \
+ { \
+ frame_op, \
+ sizeof ( FT_FIELD_REF( struct_type,field ) ), \
+ (FT_UShort)(char*)&FT_FIELD_REF( struct_type, field ) \
+ }
#define FT_MAKE_EMPTY_FIELD( frame_op ) { frame_op, 0, 0 }
-#define FT_FRAME_START(s) { ft_frame_start, 0, s }
-#define FT_FRAME_END { ft_frame_end, 0, 0 }
+#define FT_FRAME_START( s ) { ft_frame_start, 0, s }
+#define FT_FRAME_END { ft_frame_end, 0, 0 }
-#define FT_FRAME_LONG(s,f) FT_FRAME_FIELD( ft_frame_long_be, s, f )
-#define FT_FRAME_ULONG(s,f) FT_FRAME_FIELD( ft_frame_ulong_be, s, f )
-#define FT_FRAME_SHORT(s,f) FT_FRAME_FIELD( ft_frame_short_be, s, f )
-#define FT_FRAME_USHORT(s,f) FT_FRAME_FIELD( ft_frame_ushort_be, s, f )
-#define FT_FRAME_BYTE(s,f) FT_FRAME_FIELD( ft_frame_byte, s, f )
-#define FT_FRAME_CHAR(s,f) FT_FRAME_FIELD( ft_frame_schar, s, f )
+#define FT_FRAME_LONG( s, f ) FT_FRAME_FIELD( ft_frame_long_be, s, f )
+#define FT_FRAME_ULONG( s, f ) FT_FRAME_FIELD( ft_frame_ulong_be, s, f )
+#define FT_FRAME_SHORT( s, f ) FT_FRAME_FIELD( ft_frame_short_be, s, f )
+#define FT_FRAME_USHORT( s, f ) FT_FRAME_FIELD( ft_frame_ushort_be, s, f )
+#define FT_FRAME_BYTE( s, f ) FT_FRAME_FIELD( ft_frame_byte, s, f )
+#define FT_FRAME_CHAR( s, f ) FT_FRAME_FIELD( ft_frame_schar, s, f )
-#define FT_FRAME_LONG_LE(s,f) FT_FRAME_FIELD( ft_frame_long_le, s, f )
-#define FT_FRAME_ULONG_LE(s,f) FT_FRAME_FIELD( ft_frame_ulong_le, s, f )
-#define FT_FRAME_SHORT_LE(s,f) FT_FRAME_FIELD( ft_frame_short_le, s, f )
-#define FT_FRAME_USHORT_LE(s,f) FT_FRAME_FIELD( ft_frame_ushort_le, s, f )
+#define FT_FRAME_LONG_LE( s, f ) FT_FRAME_FIELD( ft_frame_long_le, s, f )
+#define FT_FRAME_ULONG_LE( s, f ) FT_FRAME_FIELD( ft_frame_ulong_le, s, f )
+#define FT_FRAME_SHORT_LE( s, f ) FT_FRAME_FIELD( ft_frame_short_le, s, f )
+#define FT_FRAME_USHORT_LE( s, f ) FT_FRAME_FIELD( ft_frame_ushort_le, s, f )
-#define FT_FRAME_SKIP_LONG { ft_frame_long_be, 0, 0 }
-#define FT_FRAME_SKIP_SHORT { ft_frame_short_be, 0, 0 }
-#define FT_FRAME_SKIP_BYTE { ft_frame_byte, 0, 0 }
+#define FT_FRAME_SKIP_LONG { ft_frame_long_be, 0, 0 }
+#define FT_FRAME_SKIP_SHORT { ft_frame_short_be, 0, 0 }
+#define FT_FRAME_SKIP_BYTE { ft_frame_byte, 0, 0 }
#define FT_FRAME_BYTES( struct_type, field, count ) \
{ \
ft_frame_bytes, \
count, \
- (FT_UShort)(char*)&FT_FIELD_REF(struct_type,field) }
-
-#define FT_FRAME_SKIP_BYTES( count ) { ft_frame_skip, count, 0 }
+ (FT_UShort)(char*)&FT_FIELD_REF( struct_type, field ) \
+ }
+#define FT_FRAME_SKIP_BYTES( count ) { ft_frame_skip, count, 0 }
/*************************************************************************/
/* */
- /* integer extraction macros - the `buffer' parameter must ALWAYS be of */
+ /* integer extraction macros -- the `buffer' parameter must ALWAYS be of */
/* type `char*' or equivalent (1-byte elements). */
/* */
-#define NEXT_Char(buffer) ((signed char)*buffer++)
-#define NEXT_Byte(buffer) ((unsigned char)*buffer++)
+#define NEXT_Char( buffer ) \
+ ( (signed char)*buffer++ )
+#define NEXT_Byte( buffer ) \
+ ( (unsigned char)*buffer++ )
-#define NEXT_Short(buffer) ( buffer += 2, \
- ( (short)((signed char)buffer[-2] << 8) | \
- (unsigned char)buffer[-1] ) )
+#define NEXT_Short( buffer ) \
+ ( buffer += 2, \
+ ( (short)( (signed char)buffer[-2] << 8 ) | \
+ (unsigned char)buffer[-1] ) )
-#define NEXT_UShort(buffer) ((unsigned short)NEXT_Short(buffer))
+#define NEXT_UShort( buffer ) \
+ ( (unsigned short)NEXT_Short( buffer ) )
-#define NEXT_Offset(buffer) ( buffer += 3, \
- ( ((long)(signed char)buffer[-3] << 16) | \
- ((long)(unsigned char)buffer[-2] << 8) | \
- (long)(unsigned char)buffer[-1] ) )
+#define NEXT_Offset( buffer ) \
+ ( buffer += 3, \
+ ( ( (long)(signed char)buffer[-3] << 16 ) | \
+ ( (long)(unsigned char)buffer[-2] << 8 ) | \
+ (long)(unsigned char)buffer[-1] ) )
-#define NEXT_UOffset(buffer) ((unsigned long)NEXT_Offset(buffer))
+#define NEXT_UOffset( buffer ) \
+ ( (unsigned long)NEXT_Offset( buffer ) )
-#define NEXT_Long(buffer) ( buffer += 4, \
- ( ((long)(signed char)buffer[-4] << 24) | \
- ((long)(unsigned char)buffer[-3] << 16) | \
- ((long)(unsigned char)buffer[-2] << 8) | \
- (long)(unsigned char)buffer[-1] ) )
+#define NEXT_Long( buffer ) \
+ ( buffer += 4, \
+ ( ( (long)(signed char)buffer[-4] << 24 ) | \
+ ( (long)(unsigned char)buffer[-3] << 16 ) | \
+ ( (long)(unsigned char)buffer[-2] << 8 ) | \
+ (long)(unsigned char)buffer[-1] ) )
-#define NEXT_ULong(buffer) ((unsigned long)NEXT_Long(buffer))
+#define NEXT_ULong( buffer ) \
+ ( (unsigned long)NEXT_Long( buffer ) )
-#define NEXT_ShortLE(buffer) ( buffer += 2, \
- ( (short)((signed char)buffer[-1] << 8) | \
- (unsigned char)buffer[-2] ) )
+#define NEXT_ShortLE( buffer ) \
+ ( buffer += 2, \
+ ( (short)( (signed char)buffer[-1] << 8 ) | \
+ (unsigned char)buffer[-2] ) )
-#define NEXT_UShortLE(buffer) ((unsigned short)NEXT_ShortLE(buffer))
+#define NEXT_UShortLE( buffer ) \
+ ( (unsigned short)NEXT_ShortLE( buffer ) )
-#define NEXT_OffsetLE(buffer) ( buffer += 3, \
- ( ((long)(signed char)buffer[-1] << 16) | \
- ((long)(unsigned char)buffer[-2] << 8) | \
- (long)(unsigned char)buffer[-3] ) )
+#define NEXT_OffsetLE( buffer ) \
+ ( buffer += 3, \
+ ( ( (long)(signed char)buffer[-1] << 16 ) | \
+ ( (long)(unsigned char)buffer[-2] << 8 ) | \
+ (long)(unsigned char)buffer[-3] ) )
-#define NEXT_UOffsetLE(buffer) ((unsigned long)NEXT_OffsetLE(buffer))
+#define NEXT_UOffsetLE( buffer ) \
+ ( (unsigned long)NEXT_OffsetLE( buffer ) )
-#define NEXT_LongLE(buffer) ( buffer += 4, \
- ( ((long)(signed char)buffer[-1] << 24) | \
- ((long)(unsigned char)buffer[-2] << 16) | \
- ((long)(unsigned char)buffer[-3] << 8) | \
- (long)(unsigned char)buffer[-4] ) )
+#define NEXT_LongLE( buffer ) \
+ ( buffer += 4, \
+ ( ( (long)(signed char)buffer[-1] << 24 ) | \
+ ( (long)(unsigned char)buffer[-2] << 16 ) | \
+ ( (long)(unsigned char)buffer[-3] << 8 ) | \
+ (long)(unsigned char)buffer[-4] ) )
+
+#define NEXT_ULongLE( buffer ) \
+ ( (unsigned long)NEXT_LongLE( buffer ) )
-#define NEXT_ULongLE(buffer) ((unsigned long)NEXT_LongLE(buffer))
/*************************************************************************/
/* */
/* Each GET_xxxx() macro uses an implicit `stream' variable. */
/* */
-#define FT_GET_MACRO( func, type ) ( (type)func(stream) )
-
-#define GET_Char() FT_GET_MACRO( FT_Get_Char, FT_Char )
-#define GET_Byte() FT_GET_MACRO( FT_Get_Char, FT_Byte )
-#define GET_Short() FT_GET_MACRO( FT_Get_Short, FT_Short )
-#define GET_UShort() FT_GET_MACRO( FT_Get_Short, FT_UShort )
-#define GET_Offset() FT_GET_MACRO( FT_Get_Offset, FT_Long )
-#define GET_UOffset() FT_GET_MACRO( FT_Get_Offset, FT_ULong )
-#define GET_Long() FT_GET_MACRO( FT_Get_Long, FT_Long )
-#define GET_ULong() FT_GET_MACRO( FT_Get_Long, FT_ULong )
-#define GET_Tag4() FT_GET_MACRO( FT_Get_Long, FT_ULong )
+#define FT_GET_MACRO( func, type ) ( (type)func( stream ) )
+
+#define GET_Char() FT_GET_MACRO( FT_Get_Char, FT_Char )
+#define GET_Byte() FT_GET_MACRO( FT_Get_Char, FT_Byte )
+#define GET_Short() FT_GET_MACRO( FT_Get_Short, FT_Short )
+#define GET_UShort() FT_GET_MACRO( FT_Get_Short, FT_UShort )
+#define GET_Offset() FT_GET_MACRO( FT_Get_Offset, FT_Long )
+#define GET_UOffset() FT_GET_MACRO( FT_Get_Offset, FT_ULong )
+#define GET_Long() FT_GET_MACRO( FT_Get_Long, FT_Long )
+#define GET_ULong() FT_GET_MACRO( FT_Get_Long, FT_ULong )
+#define GET_Tag4() FT_GET_MACRO( FT_Get_Long, FT_ULong )
#define GET_ShortLE() FT_GET_MACRO( FT_Get_ShortLE, FT_Short )
#define GET_UShortLE() FT_GET_MACRO( FT_Get_ShortLE, FT_UShort )
-#define GET_LongLE() FT_GET_MACRO( FT_Get_LongLE, FT_Short )
-#define GET_ULongLE() FT_GET_MACRO( FT_Get_LongLE, FT_Short )
+#define GET_LongLE() FT_GET_MACRO( FT_Get_LongLE, FT_Short )
+#define GET_ULongLE() FT_GET_MACRO( FT_Get_LongLE, FT_Short )
#define FT_READ_MACRO( func, type, var ) \
( var = (type)func( stream, &error ), \
error != FT_Err_Ok )
-#define READ_Byte( var ) FT_READ_MACRO( FT_Read_Char, FT_Byte, var )
-#define READ_Char( var ) FT_READ_MACRO( FT_Read_Char, FT_Char, var )
-#define READ_Short( var ) FT_READ_MACRO( FT_Read_Short, FT_Short, var )
-#define READ_UShort( var ) FT_READ_MACRO( FT_Read_Short, FT_UShort, var )
-#define READ_Offset( var ) FT_READ_MACRO( FT_Read_Offset, FT_Long, var )
-#define READ_UOffset( var ) FT_READ_MACRO( FT_Read_Offset, FT_ULong, var )
-#define READ_Long( var ) FT_READ_MACRO( FT_Read_Long, FT_Long, var )
-#define READ_ULong( var ) FT_READ_MACRO( FT_Read_Long, FT_ULong, var )
+#define READ_Byte( var ) FT_READ_MACRO( FT_Read_Char, FT_Byte, var )
+#define READ_Char( var ) FT_READ_MACRO( FT_Read_Char, FT_Char, var )
+#define READ_Short( var ) FT_READ_MACRO( FT_Read_Short, FT_Short, var )
+#define READ_UShort( var ) FT_READ_MACRO( FT_Read_Short, FT_UShort, var )
+#define READ_Offset( var ) FT_READ_MACRO( FT_Read_Offset, FT_Long, var )
+#define READ_UOffset( var ) FT_READ_MACRO( FT_Read_Offset, FT_ULong, var )
+#define READ_Long( var ) FT_READ_MACRO( FT_Read_Long, FT_Long, var )
+#define READ_ULong( var ) FT_READ_MACRO( FT_Read_Long, FT_ULong, var )
+
+#define READ_ShortLE( var ) FT_READ_MACRO( FT_Read_ShortLE, FT_Short, var )
+#define READ_UShortLE( var ) FT_READ_MACRO( FT_Read_ShortLE, FT_UShort, var )
+#define READ_LongLE( var ) FT_READ_MACRO( FT_Read_LongLE, FT_Long, var )
+#define READ_ULongLE( var ) FT_READ_MACRO( FT_Read_LongLE, FT_ULong, var )
-#define READ_ShortLE( var ) FT_READ_MACRO( FT_Read_ShortLE, FT_Short, var )
-#define READ_UShortLE( var ) FT_READ_MACRO( FT_Read_ShortLE, FT_UShort, var )
-#define READ_LongLE( var ) FT_READ_MACRO( FT_Read_LongLE, FT_Long, var )
-#define READ_ULongLE( var ) FT_READ_MACRO( FT_Read_LongLE, FT_ULong, var )
+ BASE_DEF( void ) FT_New_Memory_Stream( FT_Library library,
+ FT_Byte* base,
+ FT_ULong size,
+ FT_Stream stream );
- BASE_DEF(void) FT_New_Memory_Stream( FT_Library library,
- FT_Byte* base,
- FT_ULong size,
- FT_Stream stream );
+ BASE_DEF( FT_Error ) FT_Seek_Stream( FT_Stream stream,
+ FT_ULong pos );
- BASE_DEF(FT_Error) FT_Seek_Stream( FT_Stream stream,
- FT_ULong pos );
+ BASE_DEF( FT_Error ) FT_Skip_Stream( FT_Stream stream,
+ FT_Long distance );
- BASE_DEF(FT_Error) FT_Skip_Stream( FT_Stream stream,
- FT_Long distance );
+ BASE_DEF( FT_Long ) FT_Stream_Pos( FT_Stream stream );
- BASE_DEF(FT_Long) FT_Stream_Pos( FT_Stream stream );
+ BASE_DEF( FT_Error ) FT_Read_Stream( FT_Stream stream,
+ FT_Byte* buffer,
+ FT_ULong count );
- BASE_DEF(FT_Error) FT_Read_Stream( FT_Stream stream,
- FT_Byte* buffer,
- FT_ULong count );
+ BASE_DEF( FT_Error ) FT_Read_Stream_At( FT_Stream stream,
+ FT_ULong pos,
+ FT_Byte* buffer,
+ FT_ULong count );
- BASE_DEF(FT_Error) FT_Read_Stream_At( FT_Stream stream,
- FT_ULong pos,
- FT_Byte* buffer,
+ BASE_DEF( FT_Error ) FT_Access_Frame( FT_Stream stream,
FT_ULong count );
- BASE_DEF(FT_Error) FT_Access_Frame( FT_Stream stream,
- FT_ULong count );
+ BASE_DEF( void ) FT_Forget_Frame( FT_Stream stream );
- BASE_DEF(void) FT_Forget_Frame( FT_Stream stream );
+ BASE_DEF( FT_Error ) FT_Extract_Frame( FT_Stream stream,
+ FT_ULong count,
+ FT_Byte** pbytes );
- BASE_DEF(FT_Error) FT_Extract_Frame( FT_Stream stream,
- FT_ULong count,
- FT_Byte* *pbytes );
+ BASE_DEF( void ) FT_Release_Frame( FT_Stream stream,
+ FT_Byte** pbytes );
- BASE_DEF(void) FT_Release_Frame( FT_Stream stream,
- FT_Byte* *pbytes );
+ BASE_DEF( FT_Char ) FT_Get_Char( FT_Stream stream );
- BASE_DEF(FT_Char) FT_Get_Char( FT_Stream stream );
+ BASE_DEF( FT_Short ) FT_Get_Short( FT_Stream stream );
- BASE_DEF(FT_Short) FT_Get_Short( FT_Stream stream );
+ BASE_DEF( FT_Long ) FT_Get_Offset( FT_Stream stream );
- BASE_DEF(FT_Long) FT_Get_Offset( FT_Stream stream );
+ BASE_DEF( FT_Long ) FT_Get_Long( FT_Stream stream );
- BASE_DEF(FT_Long) FT_Get_Long( FT_Stream stream );
+ BASE_DEF( FT_Short ) FT_Get_ShortLE( FT_Stream stream );
- BASE_DEF(FT_Short) FT_Get_ShortLE( FT_Stream stream );
+ BASE_DEF( FT_Long ) FT_Get_LongLE( FT_Stream stream );
- BASE_DEF(FT_Long) FT_Get_LongLE( FT_Stream stream );
+ BASE_DEF( FT_Char ) FT_Read_Char( FT_Stream stream,
+ FT_Error* error );
- BASE_DEF(FT_Char) FT_Read_Char( FT_Stream stream,
- FT_Error* error );
+ BASE_DEF( FT_Short ) FT_Read_Short( FT_Stream stream,
+ FT_Error* error );
- BASE_DEF(FT_Short) FT_Read_Short( FT_Stream stream,
- FT_Error* error );
+ BASE_DEF( FT_Long ) FT_Read_Offset( FT_Stream stream,
+ FT_Error* error );
- BASE_DEF(FT_Long) FT_Read_Offset( FT_Stream stream,
- FT_Error* error );
+ BASE_DEF( FT_Long ) FT_Read_Long( FT_Stream stream,
+ FT_Error* error );
- BASE_DEF(FT_Long) FT_Read_Long( FT_Stream stream,
- FT_Error* error );
+ BASE_DEF( FT_Short ) FT_Read_ShortLE( FT_Stream stream,
+ FT_Error* error );
- BASE_DEF(FT_Short) FT_Read_ShortLE( FT_Stream stream,
+ BASE_DEF( FT_Long ) FT_Read_LongLE( FT_Stream stream,
FT_Error* error );
- BASE_DEF(FT_Long) FT_Read_LongLE( FT_Stream stream,
- FT_Error* error );
+ BASE_DEF( FT_Error ) FT_Read_Fields( FT_Stream stream,
+ const FT_Frame_Field* fields,
+ void* structure );
- BASE_DEF(FT_Error) FT_Read_Fields( FT_Stream stream,
- const FT_Frame_Field* fields,
- void* structure );
-#define USE_Stream( resource, stream ) \
+#define USE_Stream( resource, stream ) \
FT_SET_ERROR( FT_Open_Stream( resource, stream ) )
-#define DONE_Stream( stream ) \
+#define DONE_Stream( stream ) \
FT_Done_Stream( stream )
-#define ACCESS_Frame( size ) \
+#define ACCESS_Frame( size ) \
FT_SET_ERROR( FT_Access_Frame( stream, size ) )
-#define FORGET_Frame() \
+#define FORGET_Frame() \
FT_Forget_Frame( stream )
-#define EXTRACT_Frame( size, bytes ) \
- FT_SET_ERROR( FT_Extract_Frame( stream, size, (FT_Byte**)&(bytes) ) )
+#define EXTRACT_Frame( size, bytes ) \
+ FT_SET_ERROR( FT_Extract_Frame( stream, size, \
+ (FT_Byte**)&(bytes) ) )
-#define RELEASE_Frame( bytes ) \
+#define RELEASE_Frame( bytes ) \
FT_Release_Frame( stream, (FT_Byte**)&(bytes) )
-#define FILE_Seek( position ) \
+#define FILE_Seek( position ) \
FT_SET_ERROR( FT_Seek_Stream( stream, position ) )
-#define FILE_Skip( distance ) \
+#define FILE_Skip( distance ) \
FT_SET_ERROR( FT_Skip_Stream( stream, distance ) )
-#define FILE_Pos() \
+#define FILE_Pos() \
FT_Stream_Pos( stream )
#define FILE_Read( buffer, count ) \
@@ -309,7 +347,7 @@ typedef struct FT_Frame_Field_
count ) )
#define READ_Fields( fields, object ) \
- ((error = FT_Read_Fields( stream, fields, object )) != FT_Err_Ok)
+ ( ( error = FT_Read_Fields( stream, fields, object ) ) != FT_Err_Ok )
#ifdef __cplusplus
@@ -318,3 +356,6 @@ typedef struct FT_Frame_Field_
#endif /* FTSTREAM_H */
+
+
+/* END */
diff --git a/include/freetype/internal/psnames.h b/include/freetype/internal/psnames.h
index bb3e658..ed86235 100644
--- a/include/freetype/internal/psnames.h
+++ b/include/freetype/internal/psnames.h
@@ -2,8 +2,8 @@
/* */
/* psnames.h */
/* */
-/* High-level interface for the "psnames" module (in charge of */
-/* various functions related to Postscript glyph names conversion) */
+/* High-level interface for the `PSNames' module (in charge of */
+/* various functions related to Postscript glyph names conversion). */
/* */
/* Copyright 1996-2000 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
@@ -16,132 +16,134 @@
/* */
/***************************************************************************/
+
#ifndef PSNAMES_H
#define PSNAMES_H
+
#include <freetype/freetype.h>
- /**************************************************************************
- *
- * <FuncType>
- * PS_Unicode_Value_Func
- *
- * <Description>
- * A function used to return the Unicode index corresponding to a
- * given glyph name.
- *
- * <Input>
- * glyph_name :: the glyph name
- *
- * <Return>
- * The Unicode character index. The non-Unicode value 0xFFFF if the
- * glyph name has no known Unicode meaning..
- *
- * <Note>
- * This function is able to map several different glyph names to the
- * same Unicode value, according to the rules defined in the Adobe
- * Glyph List table.
- *
- * This function will not be compiled if the configuration macro
- * FT_CONFIG_OPTION_ADOBE_GLYPH_LIST is undefined.
- *
- **************************************************************************/
-
- typedef FT_ULong (*PS_Unicode_Value_Func)( const char* glyph_name );
-
-
- /**************************************************************************
- *
- * <FuncType>
- * PS_Unicode_Index_Func
- *
- * <Description>
- * A function used to return the glyph index corresponding to
- * a given unicode value.
- *
- * <Input>
- * num_glyphs :: number of glyphs in face
- * glyph_names :: array of glyph name pointers
- * uncode :: unicode value.
- *
- * <Return>
- * The glyph index. 0xFFFF is no glyph correspond to this Unicode
- * value..
- *
- * <Note>
- * This function is able to recognize several glyph names per
- * unicode values, according to the Adobe Glyph List.
- *
- * This function will not be compiled if the configuration macro
- * FT_CONFIG_OPTION_ADOBE_GLYPH_LIST is undefined.
- *
- **************************************************************************/
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* PS_Unicode_Value_Func */
+ /* */
+ /* <Description> */
+ /* A function used to return the Unicode index corresponding to a */
+ /* given glyph name. */
+ /* */
+ /* <Input> */
+ /* glyph_name :: The glyph name. */
+ /* */
+ /* <Return> */
+ /* The Unicode character index resp. the non-Unicode value 0xFFFF if */
+ /* the glyph name has no known Unicode meaning. */
+ /* */
+ /* <Note> */
+ /* This function is able to map several different glyph names to the */
+ /* same Unicode value, according to the rules defined in the Adobe */
+ /* Glyph List table. */
+ /* */
+ /* This function will not be compiled if the configuration macro */
+ /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST is undefined. */
+ /* */
+ typedef FT_ULong (*PS_Unicode_Value_Func)( const char* glyph_name );
+
+
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* PS_Unicode_Index_Func */
+ /* */
+ /* <Description> */
+ /* A function used to return the glyph index corresponding to a given */
+ /* Unicode value. */
+ /* */
+ /* <Input> */
+ /* num_glyphs :: The number of glyphs in the face. */
+ /* */
+ /* glyph_names :: An array of glyph name pointers. */
+ /* */
+ /* unicode :: The Unicode value. */
+ /* */
+ /* <Return> */
+ /* The glyph index resp. 0xFFFF if no glyph corresponds to this */
+ /* Unicode value. */
+ /* */
+ /* <Note> */
+ /* This function is able to recognize several glyph names per Unicode */
+ /* value, according to the Adobe Glyph List. */
+ /* */
+ /* This function will not be compiled if the configuration macro */
+ /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST is undefined. */
+ /* */
typedef FT_UInt (*PS_Unicode_Index_Func)( FT_UInt num_glyphs,
const char** glyph_names,
FT_ULong unicode );
- /**************************************************************************
- *
- * <FuncType>
- * PS_Macintosh_Name_Func
- *
- * <Description>
- * A function used to return the glyph name corresponding to one
- * Apple glyph name index.
- *
- * <Input>
- * name_index :: index of the Mac name
- *
- * <Return>
- * The glyph name, or 0 if the index is incorrect.
- *
- * <Note>
- * This function will not be compiled if the configuration macro
- * FT_CONFIG_OPTION_POSTSCRIPT_NAMES is undefined
- *
- **************************************************************************/
+ /*************************************************************************/
+ /* */
+ /* <FuncType> */
+ /* PS_Macintosh_Name_Func */
+ /* */
+ /* <Description> */
+ /* A function used to return the glyph name corresponding to an Apple */
+ /* glyph name index. */
+ /* */
+ /* <Input> */
+ /* name_index :: The index of the Mac name. */
+ /* */
+ /* <Return> */
+ /* The glyph name, or 0 if the index is invalid. */
+ /* */
+ /* <Note> */
+ /* This function will not be compiled if the configuration macro */
+ /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES is undefined. */
+ /* */
typedef const char* (*PS_Macintosh_Name_Func)( FT_UInt name_index );
-
typedef const char* (*PS_Adobe_Std_Strings_Func)( FT_UInt string_index );
- /***************************************************************************
- *
- * <Struct>
- * PS_Unicodes
- *
- * <Description>
- * a simple table used to map Unicode values to glyph indices. It is
- * built by the PS_Build_Unicodes table according to the glyphs present
- * in a font file..
- *
- * <Fields>
- * num_codes :: number of glyphs in the font that match a given Unicode
- * value..
- *
- * unicodes :: array of unicode values, sorted in increasing order
- * gindex :: array of glyph indices, corresponding to each unicode
- *
- * <Note>
- * Use the function PS_Lookup_Unicode to retrieve the glyph index
- * corresponding to a given Unicode character code.
- *
- ***************************************************************************/
-
- typedef struct PS_UniMap_
+
+ typedef struct PS_UniMap_
{
FT_UInt unicode;
FT_UInt glyph_index;
} PS_UniMap;
- typedef struct PS_Unicodes_
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* PS_Unicodes */
+ /* */
+ /* <Description> */
+ /* A simple table used to map Unicode values to glyph indices. It is */
+ /* built by the PS_Build_Unicodes table according to the glyphs */
+ /* present in a font file. */
+ /* */
+ /* <Fields> */
+ /* num_codes :: The number of glyphs in the font that match a given */
+ /* Unicode value. */
+ /* */
+ /* unicodes :: An array of unicode values, sorted in increasing */
+ /* order. */
+ /* */
+ /* gindex :: An array of glyph indices, corresponding to each */
+ /* Unicode value. */
+ /* */
+ /* <Note> */
+ /* Use the function PS_Lookup_Unicode() to retrieve the glyph index */
+ /* corresponding to a given Unicode character code. */
+ /* */
+ typedef struct PS_Unicodes_
{
- FT_UInt num_maps;
- PS_UniMap* maps;
+ FT_UInt num_maps;
+ PS_UniMap* maps;
} PS_Unicodes;
@@ -151,49 +153,53 @@
const char** glyph_names,
PS_Unicodes* unicodes );
- typedef FT_UInt (*PS_Lookup_Unicode_Func)( PS_Unicodes* unicodes,
- FT_UInt unicode );
-
- /*************************************************************************
- *
- * <Struct>
- * PSNames_Interface
- *
- * <Description>
- * this structure holds pointers to the functions used to load and
- * free the basic tables that are required in a `sfnt' font file.
- *
- * <Fields>
- * unicode_value :: a function used to convert a glyph name into
- * a Unicode character code
- *
- * unicode_index :: a function used to return the glyph index
- * corresponding to a given Unicode character
- *
- * macintosh_name :: a function used to return the standard Apple
- * glyph Postscript name corresponding to a given
- * string index (used by the TrueType "post" table)
- *
- * adobe_std_strings :: a function that returns a pointer to a given
- * Adobe Standard Strings given a SID
- *
- * adobe_std_encoding :: a table of 256 unsigned shorts that maps
- * character codes in the Adobe Standard Encoding
- * to SIDs
- *
- * adobe_expert_encoding :: a table of 256 unsigned shorts that maps
- * character codes in the Adobe Expert Encoding
- * to SIDs.
- *
- * <Note>
- * The 'unicode_value' and 'unicode_index' will be set to 0 if the
- * configuration macro FT_CONFIG_OPTION_ADOBE_GLYPH_LIST is undefined
- *
- * The 'macintosh_name' will be set to 0 if the configuration macro
- * FT_CONFIG_OPTION_POSTSCRIPT_NAMES is undefined
- *
- *************************************************************************/
-
+ typedef FT_UInt (*PS_Lookup_Unicode_Func)( PS_Unicodes* unicodes,
+ FT_UInt unicode );
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* PSNames_Interface */
+ /* */
+ /* <Description> */
+ /* This structure defines the PSNames interface. */
+ /* */
+ /* <Fields> */
+ /* unicode_value :: A function used to convert a glyph name */
+ /* into a Unicode character code. */
+ /* */
+ /* build_unicodes :: A function which builds up the Unicode */
+ /* mapping table. */
+ /* */
+ /* lookup_unicode :: A function used to return the glyph index */
+ /* corresponding to a given Unicode */
+ /* character. */
+ /* */
+ /* macintosh_name :: A function used to return the standard */
+ /* Apple glyph Postscript name corresponding */
+ /* to a given string index (used by the */
+ /* TrueType `post' table). */
+ /* */
+ /* adobe_std_strings :: A function that returns a pointer to a */
+ /* Adobe Standard String for a given SID. */
+ /* */
+ /* adobe_std_encoding :: A table of 256 unsigned shorts that maps */
+ /* character codes in the Adobe Standard */
+ /* Encoding to SIDs. */
+ /* */
+ /* adobe_expert_encoding :: A table of 256 unsigned shorts that maps */
+ /* character codes in the Adobe Expert */
+ /* Encoding to SIDs. */
+ /* */
+ /* <Note> */
+ /* `unicode_value' and `unicode_index' will be set to 0 if the */
+ /* configuration macro FT_CONFIG_OPTION_ADOBE_GLYPH_LIST is */
+ /* undefined. */
+ /* */
+ /* `macintosh_name' will be set to 0 if the configuration macro */
+ /* FT_CONFIG_OPTION_POSTSCRIPT_NAMES is undefined. */
+ /* */
typedef struct PSNames_Interface_
{
PS_Unicode_Value_Func unicode_value;
@@ -207,8 +213,8 @@
} PSNames_Interface;
-#endif /* PSNAMES_H */
+#endif /* PSNAMES_H */
/* END */
diff --git a/include/freetype/internal/sfnt.h b/include/freetype/internal/sfnt.h
index e855dcc..380ee93 100644
--- a/include/freetype/internal/sfnt.h
+++ b/include/freetype/internal/sfnt.h
@@ -19,6 +19,7 @@
#ifndef SFNT_H
#define SFNT_H
+
#include <freetype/freetype.h>
#include <freetype/internal/ftdriver.h>
#include <freetype/internal/tttypes.h>
@@ -30,28 +31,34 @@
/* TT_Init_Face_Func */
/* */
/* <Description> */
- /* First part of the SFNT face object initialisation. This will */
- /* find the face in a SFNT file or collection, and load its */
- /* format tag in face->format_tag. */
+ /* First part of the SFNT face object initialization. This will find */
+ /* the face in a SFNT file or collection, and load its format tag in */
+ /* face->format_tag. */
/* */
/* <Input> */
/* stream :: The input stream. */
+ /* */
/* face :: A handle to the target face object. */
- /* faceIndex :: The index of the TrueType font, if we're opening a */
+ /* */
+ /* face_index :: The index of the TrueType font, if we are opening a */
/* collection. */
- /* num_params :: number of additional parameters */
- /* params :: optional additional parameters */
+ /* */
+ /* num_params :: The number of additional parameters. */
+ /* */
+ /* params :: Optional additional parameters. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
- /* The stream cursor must be at the font file's origin */
- /* This function recognizes fonts embedded in a "TrueType collection" */
+ /* The stream cursor must be at the font file's origin. */
+ /* */
+ /* This function recognizes fonts embedded in a `TrueType */
+ /* collection'. */
/* */
/* Once the format tag has been validated by the font driver, it */
- /* should then call the TT_Load_Face_Func callback to read the rest */
- /* of the SFNT tables in the object.. */
+ /* should then call the TT_Load_Face_Func() callback to read the rest */
+ /* of the SFNT tables in the object. */
/* */
typedef
FT_Error (*TT_Init_Face_Func)( FT_Stream stream,
@@ -60,29 +67,34 @@
FT_Int num_params,
FT_Parameter* params );
+
/*************************************************************************/
/* */
/* <FuncType> */
/* TT_Load_Face_Func */
/* */
/* <Description> */
- /* Second part of the SFNT face object initialisation. This will */
- /* load the common SFNT tables (head, OS/2, maxp, metrics, etc..) */
- /* in the face object.. */
+ /* Second part of the SFNT face object initialization. This will */
+ /* load the common SFNT tables (head, OS/2, maxp, metrics, etc.) in */
+ /* the face object. */
/* */
/* <Input> */
/* stream :: The input stream. */
+ /* */
/* face :: A handle to the target face object. */
- /* faceIndex :: The index of the TrueType font, if we're opening a */
+ /* */
+ /* face_index :: The index of the TrueType font, if we are opening a */
/* collection. */
- /* num_params :: number of additional parameters */
- /* params :: optional additional parameters */
+ /* */
+ /* num_params :: The number of additional parameters. */
+ /* */
+ /* params :: Optional additional parameters. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
- /* This function must be called after TT_Init_Face_Func */
+ /* This function must be called after TT_Init_Face_Func(). */
/* */
typedef
FT_Error (*TT_Load_Face_Func)( FT_Stream stream,
@@ -91,6 +103,7 @@
FT_Int num_params,
FT_Parameter* params );
+
/*************************************************************************/
/* */
/* <FuncType> */
@@ -100,13 +113,13 @@
/* A callback used to delete the common SFNT data from a face. */
/* */
/* <Input> */
- /* face :: A handle to the target face object. */
+ /* face :: A handle to the target face object. */
/* */
/* <Note> */
- /* This function does NOT destroy the face object.. */
+ /* This function does NOT destroy the face object. */
/* */
typedef
- void (*TT_Done_Face_Func)( TT_Face face );
+ void (*TT_Done_Face_Func)( TT_Face face );
typedef
@@ -117,33 +130,40 @@
/*************************************************************************/
/* */
/* <FuncType> */
- /* TT_Load_SFNT_Header */
+ /* TT_Load_SFNT_Header_Func */
/* */
/* <Description> */
- /* Loads the header of a SFNT font file. Supports collections.. */
+ /* Loads the header of a SFNT font file. Supports collections. */
/* */
/* <Input> */
- /* face :: A handle to the target face object. */
- /* stream :: The input stream. */
+ /* face :: A handle to the target face object. */
+ /* */
+ /* stream :: The input stream. */
+ /* */
+ /* face_index :: The index of the TrueType font, if we are opening a */
+ /* collection. */
/* */
/* <Output> */
- /* sfnt :: the sfnt header */
+ /* sfnt :: The SFNT header. */
/* */
/* <Return> */
- /* TrueType error code. 0 means success. */
+ /* FreeType error code. 0 means success. */
/* */
/* <Note> */
- /* The stream cursor must be at the font file's origin */
- /* This function recognizes fonts embedded in a "TrueType collection" */
+ /* The stream cursor must be at the font file's origin. */
+ /* */
+ /* This function recognizes fonts embedded in a `TrueType */
+ /* collection'. */
/* */
/* This function checks that the header is valid by looking at the */
- /* values of "search_range", "entry_selector" and "range_shift".. */
+ /* values of `search_range', `entry_selector', and `range_shift'. */
/* */
typedef
- FT_Error (*TT_Load_SFNT_Header_Func)( TT_Face face,
- FT_Stream stream,
- FT_Long faceIndex,
- SFNT_Header* sfnt );
+ FT_Error (*TT_Load_SFNT_Header_Func)( TT_Face face,
+ FT_Stream stream,
+ FT_Long face_index,
+ SFNT_Header* sfnt );
+
/*************************************************************************/
/* */
@@ -155,16 +175,18 @@
/* */
/* <Input> */
/* face :: A handle to the target face object. */
+ /* */
/* stream :: The input stream. */
- /* sfnt :: sfnt header */
+ /* */
+ /* sfnt :: The SFNT header. */
/* */
/* <Return> */
- /* TrueType error code. 0 means success. */
+ /* FreeType error code. 0 means success. */
/* */
/* <Note> */
- /* The stream cursor must be on the first byte after the 4-byte */
- /* font format tag. This is the case just after a call to */
- /* TT_Load_Format_Tag */
+ /* The stream cursor must be on the first byte after the 4-byte font */
+ /* format tag. This is the case just after a call to */
+ /* TT_Load_Format_Tag(). */
/* */
typedef
FT_Error (*TT_Load_Directory_Func)( TT_Face face,
@@ -178,13 +200,12 @@
/* TT_Load_Any_Func */
/* */
/* <Description> */
- /* Loads any font table into client memory. Used by the */
- /* TT_Get_Font_Data() API function. */
+ /* Loads any font table into client memory. */
/* */
/* <Input> */
/* face :: The face object to look for. */
/* */
- /* tag :: The tag of table to load. Use the value 0 if you want */
+ /* tag :: The tag of table to load. Use the value 0 if you want */
/* to access the whole font file, else set this parameter */
/* to a valid TrueType table tag that you can forge with */
/* the MAKE_TT_TAG macro. */
@@ -243,10 +264,11 @@
/* */
/* <Output> */
/* map :: The target pixmap. */
+ /* */
/* metrics :: A big sbit metrics structure for the glyph image. */
/* */
/* <Return> */
- /* TrueType error code. 0 means success. Returns an error if no */
+ /* FreeType error code. 0 means success. Returns an error if no */
/* glyph sbit exists for the index. */
/* */
/* <Note> */
@@ -262,6 +284,7 @@
FT_Bitmap* map,
TT_SBit_Metrics* metrics );
+
/*************************************************************************/
/* */
/* <FuncType> */
@@ -279,29 +302,31 @@
/* You must not modify the returned string! */
/* */
/* <Output> */
- /* TrueType error code. 0 means success. */
+ /* FreeType error code. 0 means success. */
/* */
typedef
- FT_Error (*TT_Get_PS_Name_Func)( TT_Face face,
- FT_UInt index,
- FT_String** PSname );
+ FT_Error (*TT_Get_PS_Name_Func)( TT_Face face,
+ FT_UInt index,
+ FT_String** PSname );
/*************************************************************************/
/* */
/* <FuncType> */
- /* TT_Load_Metrics */
+ /* TT_Load_Metrics_Func */
/* */
/* <Description> */
/* Loads the horizontal or vertical header in a face object. */
/* */
/* <Input> */
/* face :: A handle to the target face object. */
+ /* */
/* stream :: The input stream. */
+ /* */
/* vertical :: A boolean flag. If set, load vertical metrics. */
/* */
/* <Return> */
- /* TrueType error code. 0 means success. */
+ /* FreeType error code. 0 means success. */
/* */
typedef
FT_Error (*TT_Load_Metrics_Func)( TT_Face face,
@@ -309,7 +334,6 @@
FT_Bool vertical );
-
/*************************************************************************/
/* */
/* <FuncType> */
@@ -320,13 +344,14 @@
/* */
/* <Input> */
/* face :: A handle to the parent face object. */
+ /* */
/* stream :: A handle to the current stream object. */
/* */
/* <InOut> */
/* cmap :: A pointer to a cmap object. */
/* */
/* <Return> */
- /* Error code. 0 means success. */
+ /* FreeType error code. 0 means success. */
/* */
/* <Note> */
/* The function assumes that the stream is already in use (i.e., */
@@ -349,10 +374,11 @@
/* */
/* <Input> */
/* face :: A handle to the parent face object. */
+ /* */
/* cmap :: A handle to a cmap object. */
/* */
/* <Return> */
- /* Error code. 0 means success. */
+ /* FreeType error code. 0 means success. */
/* */
typedef
FT_Error (*TT_CharMap_Free_Func)( TT_Face face,
@@ -362,21 +388,22 @@
/*************************************************************************/
/* */
/* <FuncType> */
- /* TT_Load_Table */
+ /* TT_Load_Table_Func */
/* */
/* <Description> */
/* Loads a given TrueType table. */
/* */
/* <Input> */
/* face :: A handle to the target face object. */
+ /* */
/* stream :: The input stream. */
/* */
/* <Return> */
- /* TrueType error code. 0 means success. */
+ /* FreeType error code. 0 means success. */
/* */
/* <Note> */
/* The function will use `face->goto_table' to seek the stream to */
- /* the start of the table */
+ /* the start of the table. */
/* */
typedef
FT_Error (*TT_Load_Table_Func)( TT_Face face,
@@ -386,93 +413,79 @@
/*************************************************************************/
/* */
/* <FuncType> */
- /* TT_Load_Table */
+ /* TT_Free_Table_Func */
/* */
/* <Description> */
- /* Loads a given TrueType table. */
+ /* Frees a given TrueType table. */
/* */
/* <Input> */
- /* face :: A handle to the target face object. */
- /* stream :: The input stream. */
- /* */
- /* <Return> */
- /* TrueType error code. 0 means success. */
- /* */
- /* <Note> */
- /* The function will use `face->goto_table' to seek the stream to */
- /* the start of the table */
+ /* face :: A handle to the target face object. */
/* */
typedef
void (*TT_Free_Table_Func)( TT_Face face );
-
/*************************************************************************/
/* */
/* <Struct> */
/* SFNT_Interface */
/* */
/* <Description> */
- /* this structure holds pointers to the functions used to load and */
+ /* This structure holds pointers to the functions used to load and */
/* free the basic tables that are required in a `sfnt' font file. */
/* */
/* <Fields> */
- /* */
- /* */
- /* */
- /* */
- /* */
- /* */
- /* */
+ /* Check the various xxx_Func() descriptions for details. */
/* */
typedef struct SFNT_Interface_
{
- TT_Goto_Table_Func goto_table;
+ TT_Goto_Table_Func goto_table;
- TT_Init_Face_Func init_face;
- TT_Load_Face_Func load_face;
- TT_Done_Face_Func done_face;
- SFNT_Get_Interface_Func get_interface;
+ TT_Init_Face_Func init_face;
+ TT_Load_Face_Func load_face;
+ TT_Done_Face_Func done_face;
+ SFNT_Get_Interface_Func get_interface;
- TT_Load_Any_Func load_any;
- TT_Load_SFNT_Header_Func load_sfnt_header;
- TT_Load_Directory_Func load_directory;
-
- /* these functions are called by "load_face" but they can also */
- /* be called from external modules, if there is a need to */
- TT_Load_Table_Func load_header;
- TT_Load_Metrics_Func load_metrics;
- TT_Load_Table_Func load_charmaps;
- TT_Load_Table_Func load_max_profile;
- TT_Load_Table_Func load_os2;
- TT_Load_Table_Func load_psnames;
-
- TT_Load_Table_Func load_names;
- TT_Free_Table_Func free_names;
+ TT_Load_Any_Func load_any;
+ TT_Load_SFNT_Header_Func load_sfnt_header;
+ TT_Load_Directory_Func load_directory;
+
+ /* these functions are called by `load_face' but they can also */
+ /* be called from external modules, if there is a need to do so */
+ TT_Load_Table_Func load_header;
+ TT_Load_Metrics_Func load_metrics;
+ TT_Load_Table_Func load_charmaps;
+ TT_Load_Table_Func load_max_profile;
+ TT_Load_Table_Func load_os2;
+ TT_Load_Table_Func load_psnames;
+
+ TT_Load_Table_Func load_names;
+ TT_Free_Table_Func free_names;
/* optional tables */
- TT_Load_Table_Func load_hdmx;
- TT_Free_Table_Func free_hdmx;
+ TT_Load_Table_Func load_hdmx;
+ TT_Free_Table_Func free_hdmx;
- TT_Load_Table_Func load_kerning;
- TT_Load_Table_Func load_gasp;
- TT_Load_Table_Func load_pclt;
+ TT_Load_Table_Func load_kerning;
+ TT_Load_Table_Func load_gasp;
+ TT_Load_Table_Func load_pclt;
/* see `ttsbit.h' */
- TT_Load_Table_Func load_sbits;
- TT_Load_SBit_Image_Func load_sbit_image;
- TT_Free_Table_Func free_sbits;
+ TT_Load_Table_Func load_sbits;
+ TT_Load_SBit_Image_Func load_sbit_image;
+ TT_Free_Table_Func free_sbits;
/* see `ttpost.h' */
- TT_Get_PS_Name_Func get_psname;
- TT_Free_Table_Func free_psnames;
+ TT_Get_PS_Name_Func get_psname;
+ TT_Free_Table_Func free_psnames;
/* see `ttcmap.h' */
- TT_CharMap_Load_Func load_charmap;
- TT_CharMap_Free_Func free_charmap;
+ TT_CharMap_Load_Func load_charmap;
+ TT_CharMap_Free_Func free_charmap;
} SFNT_Interface;
+
#endif /* SFNT_H */
diff --git a/include/freetype/internal/t1errors.h b/include/freetype/internal/t1errors.h
index 80dadfb..58566d8 100644
--- a/include/freetype/internal/t1errors.h
+++ b/include/freetype/internal/t1errors.h
@@ -1,63 +1,67 @@
-/*******************************************************************
- *
- * t1errors.h
- *
- * Type1 Error ID definitions
- *
- * Copyright 1996-1998 by
- * David Turner, Robert Wilhelm, and Werner Lemberg.
- *
- * This file is part of the FreeType project, and may only be used
- * modified and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
- * this file you indicate that you have read the license and
- * understand and accept it fully.
- *
- ******************************************************************/
+/***************************************************************************/
+/* */
+/* t1errors.h */
+/* */
+/* Type 1 error ID definitions (specification only). */
+/* */
+/* Copyright 1996-2000 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
#ifndef T1ERRORS_H
#define T1ERRORS_H
+
/************************ error codes declaration **************/
- /* The error codes are grouped in 'classes' used to indicate the */
- /* 'level' at which the error happened. */
- /* The class is given by an error code's high byte. */
+ /* The error codes are grouped into `classes' used to indicate the */
+ /* `level' at which the error happened. */
+ /* */
+ /* The class is given by an error code's high byte. */
+
+ /* ------------- Success is always 0 -------- */
-/* ------------- Success is always 0 -------- */
+#define T1_Err_Ok FT_Err_Ok
-#define T1_Err_Ok FT_Err_Ok
+ /* ----------- high level API errors -------- */
-/* ----------- high level API errors -------- */
+#define T1_Err_Invalid_File_Format FT_Err_Invalid_File_Format
+#define T1_Err_Invalid_Argument FT_Err_Invalid_Argument
+#define T1_Err_Invalid_Driver_Handle FT_Err_Invalid_Driver_Handle
+#define T1_Err_Invalid_Face_Handle FT_Err_Invalid_Face_Handle
+#define T1_Err_Invalid_Size_Handle FT_Err_Invalid_Size_Handle
+#define T1_Err_Invalid_Glyph_Handle FT_Err_Invalid_Slot_Handle
+#define T1_Err_Invalid_CharMap_Handle FT_Err_Invalid_CharMap_Handle
+#define T1_Err_Invalid_Glyph_Index FT_Err_Invalid_Glyph_Index
-#define T1_Err_Invalid_File_Format FT_Err_Invalid_File_Format
-#define T1_Err_Invalid_Argument FT_Err_Invalid_Argument
-#define T1_Err_Invalid_Driver_Handle FT_Err_Invalid_Driver_Handle
-#define T1_Err_Invalid_Face_Handle FT_Err_Invalid_Face_Handle
-#define T1_Err_Invalid_Size_Handle FT_Err_Invalid_Size_Handle
-#define T1_Err_Invalid_Glyph_Handle FT_Err_Invalid_Slot_Handle
-#define T1_Err_Invalid_CharMap_Handle FT_Err_Invalid_CharMap_Handle
-#define T1_Err_Invalid_Glyph_Index FT_Err_Invalid_Glyph_Index
+#define T1_Err_Unimplemented_Feature FT_Err_Unimplemented_Feature
-#define T1_Err_Unimplemented_Feature FT_Err_Unimplemented_Feature
+#define T1_Err_Invalid_Engine FT_Err_Invalid_Driver_Handle
-#define T1_Err_Invalid_Engine FT_Err_Invalid_Driver_Handle
+ /* ------------- internal errors ------------ */
-/* ------------- internal errors ------------ */
+#define T1_Err_Out_Of_Memory FT_Err_Out_Of_Memory
+#define T1_Err_Unlisted_Object FT_Err_Unlisted_Object
-#define T1_Err_Out_Of_Memory FT_Err_Out_Of_Memory
-#define T1_Err_Unlisted_Object FT_Err_Unlisted_Object
+ /* ------------ general glyph outline errors ------ */
-/* ------------ general glyph outline errors ------ */
+#define T1_Err_Invalid_Composite FT_Err_Invalid_Composite
-#define T1_Err_Invalid_Composite FT_Err_Invalid_Composite
+#define T1_Err_Syntax_Error FT_Err_Invalid_File_Format
+#define T1_Err_Stack_Underflow FT_Err_Invalid_File_Format
+#define T1_Err_Stack_Overflow FT_Err_Invalid_File_Format
-#define T1_Err_Syntax_Error FT_Err_Invalid_File_Format
-#define T1_Err_Stack_Underflow FT_Err_Invalid_File_Format
-#define T1_Err_Stack_Overflow FT_Err_Invalid_File_Format
-#endif /* TDERRORS_H */
+#endif /* T1ERRORS_H */
/* END */
diff --git a/include/freetype/internal/t1types.h b/include/freetype/internal/t1types.h
index a1a2d7b..4d41a6b 100644
--- a/include/freetype/internal/t1types.h
+++ b/include/freetype/internal/t1types.h
@@ -1,72 +1,76 @@
-/*******************************************************************
- *
- * t1types.h 1.0
- *
- * Basic Type1/Type2 type definitions and interface.
- *
- * This code is shared by the Type1 and Type2 drivers
- *
- *
- * Copyright 1996-2000 by
- * David Turner, Robert Wilhelm, and Werner Lemberg.
- *
- * This file is part of the FreeType project, and may only be used
- * modified and distributed under the terms of the FreeType project
- * license, LICENSE.TXT. By continuing to use, modify, or distribute
- * this file you indicate that you have read the license and
- * understand and accept it fully.
- *
- ******************************************************************/
+/***************************************************************************/
+/* */
+/* t1types.h */
+/* */
+/* Basic Type1/Type2 type definitions and interface (specification */
+/* only). */
+/* */
+/* Copyright 1996-2000 by */
+/* David Turner, Robert Wilhelm, and Werner Lemberg. */
+/* */
+/* This file is part of the FreeType project, and may only be used, */
+/* modified, and distributed under the terms of the FreeType project */
+/* license, LICENSE.TXT. By continuing to use, modify, or distribute */
+/* this file you indicate that you have read the license and */
+/* understand and accept it fully. */
+/* */
+/***************************************************************************/
+
#ifndef T1TYPES_H
#define T1TYPES_H
+
#include <freetype/t1tables.h>
#include <freetype/internal/psnames.h>
-
-/*************************************************************************/
-/*************************************************************************/
-/*************************************************************************/
-/*** ***/
-/*** ***/
-/*** REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS ***/
-/*** ***/
-/*** ***/
-/*************************************************************************/
-/*************************************************************************/
-/*************************************************************************/
-
- /***********************************************************************/
- /* */
- /* <Struct> T1_Encoding */
- /* */
- /* <Description> */
- /* A structure modeling a custom encoding */
- /* */
- /* <Fields> */
- /* num_chars :: number of char codes in encoding. Usually 256 */
- /* code_first :: lower char code in encoding */
- /* code_last :: higher char code in encoding */
- /* */
- /* char_code :: array of character codes */
- /* char_index :: array of correpsonding glyph indices */
- /* char_name :: array of correpsonding glyph names */
- /* */
- typedef struct T1_Encoding_
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+ /*** ***/
+ /*** ***/
+ /*** REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS ***/
+ /*** ***/
+ /*** ***/
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* <Struct> */
+ /* T1_Encoding */
+ /* */
+ /* <Description> */
+ /* A structure modeling a custom encoding */
+ /* */
+ /* <Fields> */
+ /* num_chars :: The number of character codes in the encoding. */
+ /* Usually 256. */
+ /* */
+ /* code_first :: The lowest valid character code in the encoding. */
+ /* */
+ /* code_last :: The highest valid character code in the encoding. */
+ /* */
+ /* char_index :: An array of corresponding glyph indices. */
+ /* */
+ /* char_name :: An array of corresponding glyph names. */
+ /* */
+ typedef struct T1_Encoding_
{
- FT_Int num_chars;
- FT_Int code_first;
- FT_Int code_last;
+ FT_Int num_chars;
+ FT_Int code_first;
+ FT_Int code_last;
- FT_UShort* char_index;
- FT_String** char_name;
+ FT_UShort* char_index;
+ FT_String** char_name;
} T1_Encoding;
- typedef enum T1_EncodingType_
+ typedef enum T1_EncodingType_
{
t1_encoding_none = 0,
t1_encoding_array,
@@ -76,46 +80,46 @@
} T1_EncodingType;
- typedef struct T1_Font_
+ typedef struct T1_Font_
{
- /* font info dictionary */
- T1_FontInfo font_info;
+ /* font info dictionary */
+ T1_FontInfo font_info;
- /* private dictionary */
- T1_Private private_dict;
+ /* private dictionary */
+ T1_Private private_dict;
- /* top-level dictionary */
- FT_String* font_name;
+ /* top-level dictionary */
+ FT_String* font_name;
T1_EncodingType encoding_type;
T1_Encoding encoding;
- FT_Byte* subrs_block;
- FT_Byte* charstrings_block;
- FT_Byte* glyph_names_block;
+ FT_Byte* subrs_block;
+ FT_Byte* charstrings_block;
+ FT_Byte* glyph_names_block;
- FT_Int num_subrs;
- FT_Byte** subrs;
- FT_Int* subrs_len;
+ FT_Int num_subrs;
+ FT_Byte** subrs;
+ FT_Int* subrs_len;
- FT_Int num_glyphs;
- FT_String** glyph_names; /* array of glyph names */
- FT_Byte** charstrings; /* array of glyph charstrings */
- FT_Int* charstrings_len;
+ FT_Int num_glyphs;
+ FT_String** glyph_names; /* array of glyph names */
+ FT_Byte** charstrings; /* array of glyph charstrings */
+ FT_Int* charstrings_len;
- FT_Byte paint_type;
- FT_Byte font_type;
- FT_Matrix font_matrix;
- FT_BBox font_bbox;
- FT_Long font_id;
+ FT_Byte paint_type;
+ FT_Byte font_type;
+ FT_Matrix font_matrix;
+ FT_BBox font_bbox;
+ FT_Long font_id;
- FT_Int stroke_width;
+ FT_Int stroke_width;
} T1_Font;
- typedef struct CID_Subrs_
+ typedef struct CID_Subrs_
{
FT_UInt num_subrs;
FT_Byte** code;
@@ -123,65 +127,57 @@
} CID_Subrs;
-/*************************************************************************/
-/*************************************************************************/
-/*************************************************************************/
-/*** ***/
-/*** ***/
-/*** ORIGINAL T1_FACE CLASS DEFINITION ***/
-/*** ***/
-/*** ***/
-/*************************************************************************/
-/*************************************************************************/
-/*************************************************************************/
-/*** ***/
-/*** ***/
-/*** This structure/class is defined here because it is common ***/
-/*** to the following formats : TTF, OpenType-TT and OpenType-CFF ***/
-/*** ***/
-/*** Note however that the classes TT_Size, TT_GlyphSlot and ***/
-/*** TT_CharMap are not shared between font drivers, and are ***/
-/*** thus defined normally in "drivers/truetype/ttobjs.h" ***/
-/*** ***/
-/*** ***/
-/*************************************************************************/
-/*************************************************************************/
-/*************************************************************************/
-
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+ /*** ***/
+ /*** ***/
+ /*** ORIGINAL T1_FACE CLASS DEFINITION ***/
+ /*** ***/
+ /*** ***/
+ /*************************************************************************/
+ /*************************************************************************/
+ /*************************************************************************/
+
+
+ /*************************************************************************/
+ /* */
+ /* This structure/class is defined here because it is common to the */
+ /* following formats: TTF, OpenType-TT, and OpenType-CFF. */
+ /* */
+ /* Note, however, that the classes TT_Size, TT_GlyphSlot, and TT_CharMap */
+ /* are not shared between font drivers, and are thus defined normally in */
+ /* `ttobjs.h'. */
+ /* */
+ /*************************************************************************/
typedef struct T1_FaceRec_* T1_Face;
typedef struct CID_FaceRec_* CID_Face;
- /***************************************************/
- /* */
- /* T1_Face : */
- /* */
- /* Type1 face record.. */
- /* */
- typedef struct T1_FaceRec_
+ typedef struct T1_FaceRec_
{
- FT_FaceRec root;
- T1_Font type1;
- void* psnames;
- void* afm_data;
- FT_CharMapRec charmaprecs[2];
- FT_CharMap charmaps[2];
- PS_Unicodes unicode_map;
+ FT_FaceRec root;
+ T1_Font type1;
+ void* psnames;
+ void* afm_data;
+ FT_CharMapRec charmaprecs[2];
+ FT_CharMap charmaps[2];
+ PS_Unicodes unicode_map;
- /* support for multiple masters */
- T1_Blend* blend;
+ /* support for Multiple Masters fonts */
+ T1_Blend* blend;
} T1_FaceRec;
- typedef struct CID_FaceRec_
+ typedef struct CID_FaceRec_
{
- FT_FaceRec root;
- void* psnames;
- CID_Info cid;
- void* afm_data;
- CID_Subrs* subrs;
+ FT_FaceRec root;
+ void* psnames;
+ CID_Info cid;
+ void* afm_data;
+ CID_Subrs* subrs;
} CID_FaceRec;
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index b582ed8..40b2ecf 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -350,8 +350,7 @@
/* TT_Load_Any */
/* */
/* <Description> */
- /* Loads any font table into client memory. Used by the */
- /* TT_Get_Font_Data() API function. */
+ /* Loads any font table into client memory. */
/* */
/* <Input> */
/* face :: The face object to look for. */