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 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
diff --git a/ChangeLog b/ChangeLog
index 0ed2b29..85889a3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -142,6 +142,10 @@
FT_AutoHinter_Interface* => FT_AutoHinter_Service
etc.
+ FT_AutoHinter_Get_Global_Func => FT_AutoHinter_GlobalGetFunc
+ FT_AutoHinter_Done_Global_Func => FT_AutoHinter_GlobalDoneFunc
+ etc.
+
* include/freetype/internal/cfftypes.h, src/cff/*.c: Updating the
type definitions of the CFF font driver.
@@ -161,6 +165,10 @@
src/winfonts/winfnt.c, src/winfonts/winfnt.h: Updating type
definitions for font drivers.
+ FTDriver_initFace => FT_Face_InitFunc
+ FTDriver_initGlyphSlot => FT_Slot_InitFunc
+ etc.
+
* include/freetype/internal/ftobjs.h, src/base/ftapi.c,
src/base/ftobjs.c: Updated a few face method definitions:
@@ -400,12 +408,16 @@
* Moving all memory and list management code to "src/base/ftutil.c"
(previously in "ftobjs.c" and "ftlist.c" respectively).
- * Moving all code related to glyph loaders to "internal/ftgloadr.h"
- and "src/base/ftgloadr.c".
+ * include/freetype/internal/ftobjs.h: Moving all code related to
+ glyph loaders to ...
+ * include/freetype/"internal/ftgloadr.h: This new file.
"FT_GlyphLoader" is now a pointer to the structure
"FT_GlyphLoaderRec".
-
- * Renaming "ft_glyph_own_bitmap" into "FT_GLYPH_OWN_BITMAP".
+ (ft_glyph_own_bitmap): Renamed to ...
+ (FT_GLYPH_OWN_BITMAP): This.
+ * src/base/ftobjs.c: Moving all code related to glyph loaders
+ to ...
+ * src/base/ftgloadr.c: This new file.
2002-02-22 Werner Lemberg <wl@gnu.org>
@@ -429,9 +441,9 @@
(FT_ASSERT): This.
Some stuff from ftdebug.h has been moved to ...
- * include/freetype/internal/fttrace.h: This new file to define the
- trace levels used for debugging. It is used both to define enums
- and toggle names for FT2_DEBUG.
+ * include/freetype/internal/fttrace.h: New file, to define the trace
+ levels used for debugging. It is used both to define enums and
+ toggle names for FT2_DEBUG.
* include/freetype/internal/internal.h: Updated.
* src/base/ftobjs.c, src/base/ftstream.c: Updated.
diff --git a/include/freetype/internal/autohint.h b/include/freetype/internal/autohint.h
index 161a8b5..cf1568e 100644
--- a/include/freetype/internal/autohint.h
+++ b/include/freetype/internal/autohint.h
@@ -4,7 +4,7 @@
/* */
/* High-level `autohint' module-specific interface (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -88,8 +88,8 @@ FT_BEGIN_HEADER
/* <Description> */
/* Retrieves the global hints computed for a given face object the */
/* resulting data is dissociated from the face and will survive a */
- /* call to FT_Done_Face(). It must be discarded through the API */
- /* FT_AutoHinter_GlobalDoneFunc (). */
+ /* call to FT_Done_Face(). It must be discarded through the API */
+ /* FT_AutoHinter_GlobalDoneFunc(). */
/* */
/* <Input> */
/* hinter :: A handle to the source auto-hinter. */
@@ -102,10 +102,10 @@ FT_BEGIN_HEADER
/* global_len :: The size in bytes of the global hints. */
/* */
typedef void
- (*FT_AutoHinter_GlobalGetFunc )( FT_AutoHinter hinter,
- FT_Face face,
- void** global_hints,
- long* global_len );
+ (*FT_AutoHinter_GlobalGetFunc)( FT_AutoHinter hinter,
+ FT_Face face,
+ void** global_hints,
+ long* global_len );
/*************************************************************************/
@@ -115,7 +115,7 @@ FT_BEGIN_HEADER
/* */
/* <Description> */
/* Discards the global hints retrieved through */
- /* FT_AutoHinter_GlobalGetFunc (). This is the only way these hints */
+ /* FT_AutoHinter_GlobalGetFunc(). This is the only way these hints */
/* are freed from memory. */
/* */
/* <Input> */
@@ -124,8 +124,8 @@ FT_BEGIN_HEADER
/* global :: A pointer to retrieved global hints to discard. */
/* */
typedef void
- (*FT_AutoHinter_GlobalDoneFunc )( FT_AutoHinter hinter,
- void* global );
+ (*FT_AutoHinter_GlobalDoneFunc)( FT_AutoHinter hinter,
+ void* global );
/*************************************************************************/
@@ -144,8 +144,8 @@ FT_BEGIN_HEADER
/* face :: A handle to the face. */
/* */
typedef void
- (*FT_AutoHinter_GlobalResetFunc )( FT_AutoHinter hinter,
- FT_Face face );
+ (*FT_AutoHinter_GlobalResetFunc)( FT_AutoHinter hinter,
+ FT_Face face );
/*************************************************************************/
@@ -159,7 +159,9 @@ FT_BEGIN_HEADER
/* */
/* <Input> */
/* face :: A handle to the face. */
+ /* */
/* glyph_index :: The glyph index. */
+ /* */
/* load_flags :: The load flags. */
/* */
/* <Note> */
@@ -187,13 +189,14 @@ FT_BEGIN_HEADER
/* */
typedef struct FT_AutoHinter_ServiceRec_
{
- FT_AutoHinter_GlobalResetFunc reset_face;
- FT_AutoHinter_GlobalGetFunc get_global_hints;
- FT_AutoHinter_GlobalDoneFunc done_global_hints;
- FT_AutoHinter_GlyphLoadFunc load_glyph;
+ FT_AutoHinter_GlobalResetFunc reset_face;
+ FT_AutoHinter_GlobalGetFunc get_global_hints;
+ FT_AutoHinter_GlobalDoneFunc done_global_hints;
+ FT_AutoHinter_GlyphLoadFunc load_glyph;
} FT_AutoHinter_ServiceRec, *FT_AutoHinter_Service;
+
FT_END_HEADER
#endif /* __AUTOHINT_H__ */
diff --git a/include/freetype/internal/cfftypes.h b/include/freetype/internal/cfftypes.h
index f243ac6..ab95109 100644
--- a/include/freetype/internal/cfftypes.h
+++ b/include/freetype/internal/cfftypes.h
@@ -5,7 +5,7 @@
/* Basic OpenType/CFF type definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -31,7 +31,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* <Struct> */
- /* CFF_IndexRec */
+ /* CFF_IndexRec */
/* */
/* <Description> */
/* A structure used to model a CFF Index table. */
@@ -184,16 +184,16 @@ FT_BEGIN_HEADER
} CFF_FDSelectRec, *CFF_FDSelect;
- /* A SubFont packs a font dict and a private dict together. They are */
- /* needed to support CID-keyed CFF fonts. */
+ /* A SubFont packs a font dict and a private dict together. They are */
+ /* needed to support CID-keyed CFF fonts. */
typedef struct CFF_SubFontRec_
{
CFF_FontRecDictRec font_dict;
- CFF_PrivateRec private_dict;
+ CFF_PrivateRec private_dict;
- CFF_IndexRec local_subrs_index;
- FT_UInt num_local_subrs;
- FT_Byte** local_subrs;
+ CFF_IndexRec local_subrs_index;
+ FT_UInt num_local_subrs;
+ FT_Byte** local_subrs;
} CFF_SubFontRec, *CFF_SubFont;
diff --git a/include/freetype/internal/fnttypes.h b/include/freetype/internal/fnttypes.h
index fbefa4b..54e37ec 100644
--- a/include/freetype/internal/fnttypes.h
+++ b/include/freetype/internal/fnttypes.h
@@ -5,7 +5,7 @@
/* Basic Windows FNT/FON type definitions and interface (specification */
/* only). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -115,13 +115,13 @@ FT_BEGIN_HEADER
typedef struct FNT_FontRec_
{
- FT_ULong offset;
- FT_Int size_shift;
+ FT_ULong offset;
+ FT_Int size_shift;
WinFNT_HeaderRec header;
- FT_Byte* fnt_frame;
- FT_ULong fnt_size;
+ FT_Byte* fnt_frame;
+ FT_ULong fnt_size;
} FNT_FontRec, *FNT_Font;
@@ -129,7 +129,7 @@ FT_BEGIN_HEADER
typedef struct FNT_SizeRec_
{
FT_SizeRec root;
- FNT_Font font;
+ FNT_Font font;
} FNT_SizeRec, *FNT_Size;
diff --git a/include/freetype/internal/ftdebug.h b/include/freetype/internal/ftdebug.h
index 3d1100a..039b17b 100644
--- a/include/freetype/internal/ftdebug.h
+++ b/include/freetype/internal/ftdebug.h
@@ -4,7 +4,7 @@
/* */
/* Debugging and logging component (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,9 +27,9 @@
FT_BEGIN_HEADER
-/* force the definition of FT_DEBUG_LEVEL_ERROR if FT_DEBUG_LEVEL_TRACE */
-/* is already defined; this simplifies the following #ifdefs */
-/* */
+ /* force the definition of FT_DEBUG_LEVEL_ERROR if FT_DEBUG_LEVEL_TRACE */
+ /* is already defined; this simplifies the following #ifdefs */
+ /* */
#ifdef FT_DEBUG_LEVEL_TRACE
#undef FT_DEBUG_LEVEL_ERROR
#define FT_DEBUG_LEVEL_ERROR
@@ -38,8 +38,8 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* Define the trace enums as well as the trace levels array when */
- /* they're needed */
+ /* Define the trace enums as well as the trace levels array when they */
+ /* are needed. */
/* */
/*************************************************************************/
@@ -47,7 +47,7 @@ FT_BEGIN_HEADER
#define FT_TRACE_DEF( x ) trace_ ## x ,
- /* defining the enums */
+ /* defining the enumeration */
typedef enum
{
#include FT_INTERNAL_TRACE_H
@@ -57,7 +57,7 @@ FT_BEGIN_HEADER
/* defining the array of trace levels, provided by `src/base/ftdebug.c' */
- extern int ft_trace_levels[trace_count];
+ extern int ft_trace_levels[trace_count];
#undef FT_TRACE_DEF
@@ -66,7 +66,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* Define the FT_TRACE macro */
+ /* Define the FT_TRACE macro */
/* */
/* IMPORTANT! */
/* */
@@ -128,7 +128,7 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
- /* Define the FT_ASSERT macro */
+ /* Define the FT_ASSERT macro */
/* */
/*************************************************************************/
@@ -170,7 +170,8 @@ FT_BEGIN_HEADER
#endif /* FT_DEBUG_LEVEL_ERROR */
- FT_BASE( void ) ft_debug_init( void );
+ FT_BASE( void )
+ ft_debug_init( void );
#if defined( _MSC_VER ) /* Visual C++ (and Intel C++) */
diff --git a/include/freetype/internal/ftdriver.h b/include/freetype/internal/ftdriver.h
index bd7da86..875d090 100644
--- a/include/freetype/internal/ftdriver.h
+++ b/include/freetype/internal/ftdriver.h
@@ -4,7 +4,7 @@
/* */
/* FreeType font driver interface (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -76,14 +76,14 @@ FT_BEGIN_HEADER
FT_Long charcode );
typedef FT_Long
- (*FT_CharMap_CharNextFunc)( FT_CharMap charmap,
- FT_Long charcode );
+ (*FT_CharMap_CharNextFunc)( FT_CharMap charmap,
+ FT_Long charcode );
typedef FT_Error
- (*FT_Face_GetKerningFunc)( FT_Face face,
- FT_UInt left_glyph,
- FT_UInt right_glyph,
- FT_Vector* kerning );
+ (*FT_Face_GetKerningFunc)( FT_Face face,
+ FT_UInt left_glyph,
+ FT_UInt right_glyph,
+ FT_Vector* kerning );
typedef FT_Error
@@ -167,31 +167,31 @@ FT_BEGIN_HEADER
/* */
typedef struct FT_Driver_ClassRec_
{
- FT_Module_Class root;
+ FT_Module_Class root;
- FT_Int face_object_size;
- FT_Int size_object_size;
- FT_Int slot_object_size;
+ FT_Int face_object_size;
+ FT_Int size_object_size;
+ FT_Int slot_object_size;
- FT_Face_InitFunc init_face;
- FT_Face_DoneFunc done_face;
+ FT_Face_InitFunc init_face;
+ FT_Face_DoneFunc done_face;
- FT_Size_InitFunc init_size;
- FT_Size_DoneFunc done_size;
+ FT_Size_InitFunc init_size;
+ FT_Size_DoneFunc done_size;
- FT_Slot_InitFunc init_slot;
- FT_Slot_DoneFunc done_slot;
+ FT_Slot_InitFunc init_slot;
+ FT_Slot_DoneFunc done_slot;
- FT_Size_ResetPointsFunc set_char_sizes;
- FT_Size_ResetPixelsFunc set_pixel_sizes;
+ FT_Size_ResetPointsFunc set_char_sizes;
+ FT_Size_ResetPixelsFunc set_pixel_sizes;
- FT_Slot_LoadFunc load_glyph;
- FT_CharMap_CharIndexFunc get_char_index;
+ FT_Slot_LoadFunc load_glyph;
+ FT_CharMap_CharIndexFunc get_char_index;
- FT_Face_GetKerningFunc get_kerning;
- FT_Face_AttachFunc attach_file;
- FT_Face_GetAdvancesFunc get_advances;
- FT_CharMap_CharNextFunc get_next_char;
+ FT_Face_GetKerningFunc get_kerning;
+ FT_Face_AttachFunc attach_file;
+ FT_Face_GetAdvancesFunc get_advances;
+ FT_CharMap_CharNextFunc get_next_char;
} FT_Driver_ClassRec, *FT_Driver_Class;
diff --git a/include/freetype/internal/ftgloadr.h b/include/freetype/internal/ftgloadr.h
index 8206682..d66d10b 100644
--- a/include/freetype/internal/ftgloadr.h
+++ b/include/freetype/internal/ftgloadr.h
@@ -1,22 +1,30 @@
-#ifndef __FT_INTERNAL_GLYPH_LOADER_H__
-#define __FT_INTERNAL_GLYPH_LOADER_H__
+/***************************************************************************/
+/* */
+/* ftgloadr.h */
+/* */
+/* The FreeType glyph loader (specification). */
+/* */
+/* Copyright 2002 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 __FTGLOADR_H__
+#define __FTGLOADR_H__
+
#include <ft2build.h>
#include FT_FREETYPE_H
-FT_BEGIN_HEADER
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
- /**** ****/
- /**** ****/
- /**** G L Y P H L O A D E R ****/
- /**** ****/
- /**** ****/
- /*************************************************************************/
- /*************************************************************************/
- /*************************************************************************/
+FT_BEGIN_HEADER
/*************************************************************************/
@@ -63,9 +71,9 @@ FT_BEGIN_HEADER
typedef struct FT_GlyphLoadRec_
{
- FT_Outline outline; /* outline */
- FT_Vector* extra_points; /* extra points table */
- FT_UInt num_subglyphs; /* number of subglyphs */
+ FT_Outline outline; /* outline */
+ FT_Vector* extra_points; /* extra points table */
+ FT_UInt num_subglyphs; /* number of subglyphs */
FT_SubGlyph subglyphs; /* subglyphs */
} FT_GlyphLoadRec, *FT_GlyphLoad;
@@ -87,55 +95,59 @@ FT_BEGIN_HEADER
} FT_GlyphLoaderRec;
- /* create new empty glyph loader */
+ /* create new empty glyph loader */
FT_BASE( FT_Error )
- FT_GlyphLoader_New( FT_Memory memory,
- FT_GlyphLoader *aloader );
+ FT_GlyphLoader_New( FT_Memory memory,
+ FT_GlyphLoader *aloader );
- /* add an extra points table to a glyph loader */
+ /* add an extra points table to a glyph loader */
FT_BASE( FT_Error )
- FT_GlyphLoader_CreateExtra( FT_GlyphLoader loader );
+ FT_GlyphLoader_CreateExtra( FT_GlyphLoader loader );
- /* destroy a glyph loader */
+ /* destroy a glyph loader */
FT_BASE( void )
- FT_GlyphLoader_Done( FT_GlyphLoader loader );
+ FT_GlyphLoader_Done( FT_GlyphLoader loader );
- /* reset a glyph loader (frees everything int it) */
+ /* reset a glyph loader (frees everything int it) */
FT_BASE( void )
- FT_GlyphLoader_Reset( FT_GlyphLoader loader );
+ FT_GlyphLoader_Reset( FT_GlyphLoader loader );
- /* rewind a glyph loader */
+ /* rewind a glyph loader */
FT_BASE( void )
- FT_GlyphLoader_Rewind( FT_GlyphLoader loader );
+ FT_GlyphLoader_Rewind( FT_GlyphLoader loader );
- /* check that there is enough room to add 'n_points' and 'n_contours' */
- /* to the glyph loader.. */
+ /* check that there is enough room to add 'n_points' and 'n_contours' */
+ /* to the glyph loader */
FT_BASE( FT_Error )
- FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader,
- FT_UInt n_points,
- FT_UInt n_contours );
+ FT_GlyphLoader_CheckPoints( FT_GlyphLoader loader,
+ FT_UInt n_points,
+ FT_UInt n_contours );
- /* check that there is enough room to add 'n_subs' sub-glyphs to */
- /* a glyph loader */
+ /* check that there is enough room to add 'n_subs' sub-glyphs to */
+ /* a glyph loader */
FT_BASE( FT_Error )
- FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader,
- FT_UInt n_subs );
+ FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader loader,
+ FT_UInt n_subs );
- /* prepare a glyph loader, i.e. empty the current glyph */
+ /* prepare a glyph loader, i.e. empty the current glyph */
FT_BASE( void )
- FT_GlyphLoader_Prepare( FT_GlyphLoader loader );
+ FT_GlyphLoader_Prepare( FT_GlyphLoader loader );
- /* add the current glyph to the base glyph */
+ /* add the current glyph to the base glyph */
FT_BASE( void )
- FT_GlyphLoader_Add( FT_GlyphLoader loader );
+ FT_GlyphLoader_Add( FT_GlyphLoader loader );
- /* copy points from one glyph loader to another */
+ /* copy points from one glyph loader to another */
FT_BASE( FT_Error )
- FT_GlyphLoader_CopyPoints( FT_GlyphLoader target,
- FT_GlyphLoader source );
+ FT_GlyphLoader_CopyPoints( FT_GlyphLoader target,
+ FT_GlyphLoader source );
/* */
+
FT_END_HEADER
-#endif /* __FT_INTERNAL_GLYPH_LOADER_H__ */
+#endif /* __FTGLOADR_H__ */
+
+
+/* END */
diff --git a/include/freetype/internal/ftmemory.h b/include/freetype/internal/ftmemory.h
index a4b40b4..821d8c4 100644
--- a/include/freetype/internal/ftmemory.h
+++ b/include/freetype/internal/ftmemory.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType memory management macros (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -183,80 +183,79 @@ FT_BEGIN_HEADER
#define FT_MEM_MOVE( dest, source, count ) memmove( dest, source, count )
-/**************************************************************************
- *
- * we first define FT_MEM_ALLOC, FT_MEM_REALLOC and FT_MEM_FREE
- * all macros use an _implicit_ 'memory' parameter to access the
- * current memory allocator
- *
- */
+ /*************************************************************************/
+ /* */
+ /* We first define FT_MEM_ALLOC, FT_MEM_REALLOC, and FT_MEM_FREE. All */
+ /* macros use an _implicit_ `memory' parameter to access the current */
+ /* memory allocator. */
+ /* */
#ifdef FT_DEBUG_MEMORY
-# define FT_MEM_ALLOC( _pointer_, _size_ ) \
- FT_Alloc_Debug( memory, _size_, \
+#define FT_MEM_ALLOC( _pointer_, _size_ ) \
+ FT_Alloc_Debug( memory, _size_, \
(void**)&(_pointer_), __FILE__, __LINE__ )
-# define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
- FT_Realloc_Debug( memory, _current_, _size_, \
+#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
+ FT_Realloc_Debug( memory, _current_, _size_, \
(void**)&(_pointer_), __FILE__, __LINE__ )
-# define FT_MEM_FREE( _pointer_ ) \
+#define FT_MEM_FREE( _pointer_ ) \
FT_Free_Debug( memory, (void**)&(_pointer_), __FILE__, __LINE__ )
#else /* !FT_DEBUG_MEMORY */
-# define FT_MEM_ALLOC( _pointer_, _size_ ) \
+
+#define FT_MEM_ALLOC( _pointer_, _size_ ) \
FT_Alloc( memory, _size_, (void**)&(_pointer_) )
-# define FT_MEM_FREE( _pointer_ ) \
+#define FT_MEM_FREE( _pointer_ ) \
FT_Free( memory, (void**)&(_pointer_) )
-# define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
+#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
FT_Realloc( memory, _current_, _size_, (void**)&(_pointer_) )
-#endif /* !FT_DEBUG_MEMORY */
-
-/**************************************************************************
- *
- * the following functions macros that their pointer argument is _typed_
- * in order to automatically compute array element sizes..
- */
-#define FT_MEM_NEW( _pointer_ ) \
- FT_MEM_ALLOC( _pointer_, sizeof(*(_pointer_)) )
+#endif /* !FT_DEBUG_MEMORY */
-#define FT_MEM_NEW_ARRAY( _pointer_, _count_ ) \
- FT_MEM_ALLOC( _pointer_, (_count_)*sizeof(*(_pointer_)) )
-#define FT_MEM_RENEW_ARRAY( _pointer_, _old_, _new_ ) \
- FT_MEM_REALLOC( _pointer_, (_old_)*sizeof(*(_pointer_)), \
- (_new_)*sizeof(*(_pointer_)) )
+ /*************************************************************************/
+ /* */
+ /* The following functions macros expect that their pointer argument is */
+ /* _typed_ in order to automatically compute array element sizes. */
+ /* */
+#define FT_MEM_NEW( _pointer_ ) \
+ FT_MEM_ALLOC( _pointer_, sizeof ( *(_pointer_) ) )
-/**************************************************************************
- *
- * the following macros are obsolete but kept for compatibility reasons
- */
+#define FT_MEM_NEW_ARRAY( _pointer_, _count_ ) \
+ FT_MEM_ALLOC( _pointer_, (_count_) * sizeof ( *(_pointer_) ) )
-#define FT_MEM_ALLOC_ARRAY( _pointer_, _count_, _type_ ) \
- FT_MEM_ALLOC( _pointer_, (_count_)*sizeof(_type_) )
+#define FT_MEM_RENEW_ARRAY( _pointer_, _old_, _new_ ) \
+ FT_MEM_REALLOC( _pointer_, (_old_) * sizeof ( *(_pointer_) ), \
+ (_new_) * sizeof ( *(_pointer_) ) )
-#define FT_MEM_REALLOC_ARRAY( _pointer_, _old_, _new_, _type_ ) \
- FT_MEM_REALLOC( _pointer_, (_old_)*sizeof(_type), \
- (_new_)*sizeof(_type_) )
+ /*************************************************************************/
+ /* */
+ /* the following macros are obsolete but kept for compatibility reasons */
+ /* */
+#define FT_MEM_ALLOC_ARRAY( _pointer_, _count_, _type_ ) \
+ FT_MEM_ALLOC( _pointer_, (_count_) * sizeof ( _type_ ) )
-/**************************************************************************
- *
- * the following macros are variants of their FT_MEM_XXXX equivalents
- * they're used to set an _implicit_ 'error' variable and return TRUE
- * if an error occured (i.e. if 'error != 0')
- */
+#define FT_MEM_REALLOC_ARRAY( _pointer_, _old_, _new_, _type_ ) \
+ FT_MEM_REALLOC( _pointer_, (_old_) * sizeof ( _type ), \
+ (_new_) * sizeof ( _type_ ) )
+ /*************************************************************************/
+ /* */
+ /* The following macros are variants of their FT_MEM_XXXX equivalents; */
+ /* they are used to set an _implicit_ `error' variable and return TRUE */
+ /* if an error occured (i.e. if 'error != 0'). */
+ /* */
#define FT_ALLOC( _pointer_, _size_ ) \
FT_SET_ERROR( FT_MEM_ALLOC( _pointer_, _size_ ) )
@@ -276,17 +275,18 @@ FT_BEGIN_HEADER
#define FT_RENEW_ARRAY( _pointer_, _old_, _new_ ) \
FT_SET_ERROR( FT_MEM_RENEW_ARRAY( _pointer_, _old_, _new_ ) )
+#define FT_ALLOC_ARRAY( _pointer_, _count_, _type_ ) \
+ FT_SET_ERROR( FT_MEM_ALLOC( _pointer_, \
+ (_count_) * sizeof ( _type_ ) ) )
-#define FT_ALLOC_ARRAY( _pointer_, _count_, _type_ ) \
- FT_SET_ERROR( FT_MEM_ALLOC( _pointer_, \
- (_count_)*sizeof ( _type_ ) ) )
-
-#define FT_REALLOC_ARRAY( _pointer_, _old_, _new_, _type_ ) \
+#define FT_REALLOC_ARRAY( _pointer_, _old_, _new_, _type_ ) \
FT_SET_ERROR( FT_MEM_REALLOC( _pointer_, \
- (_old_)*sizeof ( _type_ ), \
- (_new_)*sizeof ( _type_ ) ) )
+ (_old_) * sizeof ( _type_ ), \
+ (_new_) * sizeof ( _type_ ) ) )
+
/* */
+
FT_END_HEADER
#endif /* __FTMEMORY_H__ */
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 15becd1..4f2cbad 100644
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -4,7 +4,7 @@
/* */
/* The FreeType private base classes (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -86,36 +86,36 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
- /* handle to a validation object */
- typedef struct FT_ValidatorRec_* FT_Validator;
-
- /**************************************************************************
- *
- * there are three distinct validation levels defined here:
- *
- * FT_VALIDATE_DEFAULT ::
- * a table that passes this validation level can be used reliably by
- * FreeType. It generally means that all offsets have been checked to
- * prevent out-of-bound reads, array counts are correct, etc..
- *
- *
- * FT_VALIDATE_TIGHT ::
- * a table that passes this validation level can be used reliably and
- * doesn't contain invalid data. For example, a charmap table that
- * returns invalid glyph indices will not pass, even though it can
- * be used with FreeType in default mode (the library will simply
- * return an error later when trying to load the glyph)
- *
- * it also check that fields that must be a multiple of 2, 4 or 8 don't
- * have incorrect values, etc..
- *
- *
- * FT_VALIDATE_PARANOID ::
- * only for font facists. Checks that a table follows the specification
- * 100%. Very few fonts will be able to pass this level anyway but it
- * can be useful for certain tools like font editors/converters..
- */
- typedef enum FT_ValidationLevel_
+ /* handle to a validation object */
+ typedef struct FT_ValidatorRec_* FT_Validator;
+
+
+ /*************************************************************************/
+ /* */
+ /* There are three distinct validation levels defined here: */
+ /* */
+ /* FT_VALIDATE_DEFAULT :: */
+ /* A table that passes this validation level can be used reliably by */
+ /* FreeType. It generally means that all offsets have been checked to */
+ /* prevent out-of-bound reads, array counts are correct, etc. */
+ /* */
+ /* FT_VALIDATE_TIGHT :: */
+ /* A table that passes this validation level can be used reliably and */
+ /* doesn't contain invalid data. For example, a charmap table that */
+ /* returns invalid glyph indices will not pass, even though it can */
+ /* be used with FreeType in default mode (the library will simply */
+ /* return an error later when trying to load the glyph). */
+ /* */
+ /* It also check that fields that must be a multiple of 2, 4, or 8 */
+ /* dont' have incorrect values, etc. */
+ /* */
+ /* FT_VALIDATE_PARANOID :: */
+ /* Only for font debugging. Checks that a table follows the */
+ /* specification by 100%. Very few fonts will be able to pass this */
+ /* level anyway but it can be useful for certain tools like font */
+ /* editors/converters. */
+ /* */
+ typedef enum FT_ValidationLevel_
{
FT_VALIDATE_DEFAULT = 0,
FT_VALIDATE_TIGHT,
@@ -124,19 +124,21 @@ FT_BEGIN_HEADER
} FT_ValidationLevel;
- /* validator structure */
- typedef struct FT_ValidatorRec_
+ /* validator structure */
+ typedef struct FT_ValidatorRec_
{
- const FT_Byte* base; /* address of table in memory */
- const FT_Byte* limit; /* 'base' + sizeof(table) in memory */
- FT_ValidationLevel level; /* validation level */
- FT_Error error; /* error returned. 0 means success */
+ const FT_Byte* base; /* address of table in memory */
+ const FT_Byte* limit; /* `base' + sizeof(table) in memory */
+ FT_ValidationLevel level; /* validation level */
+ FT_Error error; /* error returned. 0 means success */
jmp_buf jump_buffer; /* used for exception handling */
} FT_ValidatorRec;
-#define FT_VALIDATOR(x) ((FT_Validator)(x))
+
+#define FT_VALIDATOR( x ) ((FT_Validator)( x ))
+
FT_BASE( void )
ft_validator_init( FT_Validator valid,
@@ -147,34 +149,34 @@ FT_BEGIN_HEADER
FT_BASE( FT_Int )
ft_validator_run( FT_Validator valid );
- /* sets the error field in a validator, then calls 'longjmp' to return */
- /* to high-level caller. Using 'setjmp/longjmp' avoids many stupid */
- /* error checks within the validation routines.. */
- /* */
+ /* Sets the error field in a validator, then calls `longjmp' to return */
+ /* to high-level caller. Using `setjmp/longjmp' avoids many stupid */
+ /* error checks within the validation routines. */
+ /* */
FT_BASE( void )
ft_validator_error( FT_Validator valid,
FT_Error error );
- /* calls ft_validate_error. Assumes that the 'valid' local variable holds */
- /* a pointer to the current validator object.. */
- /* */
-#define FT_INVALID(_error) ft_validator_error( valid, _error )
- /* called when a broken table is detected */
-#define FT_INVALID_TOO_SHORT FT_INVALID( FT_Err_Invalid_Table )
+ /* Calls ft_validate_error. Assumes that the `valid' local variable */
+ /* holds a pointer to the current validator object. */
+ /* */
+#define FT_INVALID( _error ) ft_validator_error( valid, _error )
- /* called when an invalid offset is detected */
-#define FT_INVALID_OFFSET FT_INVALID( FT_Err_Invalid_Offset )
+ /* called when a broken table is detected */
+#define FT_INVALID_TOO_SHORT FT_INVALID( FT_Err_Invalid_Table )
- /* called when an invalid format/value is detected */
-#define FT_INVALID_FORMAT FT_INVALID( FT_Err_Invalid_Table )
+ /* called when an invalid offset is detected */
+#define FT_INVALID_OFFSET FT_INVALID( FT_Err_Invalid_Offset )
- /* called when an invalid glyph index is detected */
-#define FT_INVALID_GLYPH_ID FT_INVALID( FT_Err_Invalid_Glyph_Index )
+ /* called when an invalid format/value is detected */
+#define FT_INVALID_FORMAT FT_INVALID( FT_Err_Invalid_Table )
- /* called when an invalid field value is detected */
-#define FT_INVALID_DATA FT_INVALID( FT_Err_Invalid_Table )
+ /* called when an invalid glyph index is detected */
+#define FT_INVALID_GLYPH_ID FT_INVALID( FT_Err_Invalid_Glyph_Index )
+ /* called when an invalid field value is detected */
+#define FT_INVALID_DATA FT_INVALID( FT_Err_Invalid_Table )
/*************************************************************************/
@@ -189,43 +191,48 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
- /* handle to internal charmap object */
+ /* handle to internal charmap object */
typedef struct FT_CMapRec_* FT_CMap;
- /* handle to charmap class structure */
- typedef const struct FT_CMap_ClassRec_* FT_CMap_Class;
+ /* handle to charmap class structure */
+ typedef const struct FT_CMap_ClassRec_* FT_CMap_Class;
- /* internal charmap object structure */
- typedef struct FT_CMapRec_
+ /* internal charmap object structure */
+ typedef struct FT_CMapRec_
{
FT_CharMapRec charmap;
FT_CMap_Class clazz;
} FT_CMapRec;
- /* typecase any pointer to a charmap handle */
-#define FT_CMAP(x) ((FT_CMap)(x))
+ /* typecase any pointer to a charmap handle */
+#define FT_CMAP( x ) ((FT_CMap)( x ))
+
+ /* obvious macros */
+#define FT_CMAP_PLATFORM_ID( x ) FT_CMAP( x )->charmap.platform_id
+#define FT_CMAP_ENCODING_ID( x ) FT_CMAP( x )->charmap.encoding_id
+#define FT_CMAP_ENCODING( x ) FT_CMAP( x )->charmap.encoding
+#define FT_CMAP_FACE( x ) FT_CMAP( x )->charmap.face
- /* obvious macros */
-#define FT_CMAP_PLATFORM_ID(x) FT_CMAP(x)->charmap.platform_id
-#define FT_CMAP_ENCODING_ID(x) FT_CMAP(x)->charmap.encoding_id
-#define FT_CMAP_ENCODING(x) FT_CMAP(x)->charmap.encoding
-#define FT_CMAP_FACE(x) FT_CMAP(x)->charmap.face
+ /* class method definitions */
+ typedef FT_Error
+ (*FT_CMap_InitFunc)( FT_CMap cmap,
+ FT_Pointer init_data );
- /* class method definitions */
- typedef FT_Error (*FT_CMap_InitFunc)( FT_CMap cmap,
- FT_Pointer init_data );
+ typedef void
+ (*FT_CMap_DoneFunc)( FT_CMap cmap );
- typedef void (*FT_CMap_DoneFunc)( FT_CMap cmap );
+ typedef FT_UInt
+ (*FT_CMap_CharIndexFunc)( FT_CMap cmap,
+ FT_UInt32 char_code );
- typedef FT_UInt (*FT_CMap_CharIndexFunc)( FT_CMap cmap,
- FT_UInt32 char_code );
+ typedef FT_UInt
+ (*FT_CMap_CharNextFunc)( FT_CMap cmap,
+ FT_UInt32 *achar_code );
- typedef FT_UInt (*FT_CMap_CharNextFunc)( FT_CMap cmap,
- FT_UInt32 *achar_code );
- typedef struct FT_CMap_ClassRec_
+ typedef struct FT_CMap_ClassRec_
{
FT_UInt size;
FT_CMap_InitFunc init;
@@ -236,14 +243,14 @@ FT_BEGIN_HEADER
} FT_CMap_ClassRec;
- /* create a new charmap and add it to charmap->face */
+ /* create a new charmap and add it to charmap->face */
FT_BASE( FT_Error )
FT_CMap_New( FT_CMap_Class clazz,
FT_Pointer init_data,
FT_CharMap charmap,
FT_CMap *acmap );
- /* destroy a charmap (don't remove it from face's list though) */
+ /* destroy a charmap (don't remove it from face's list though) */
FT_BASE( void )
FT_CMap_Done( FT_CMap cmap );
@@ -330,11 +337,11 @@ FT_BEGIN_HEADER
/* */
typedef struct FT_Slot_InternalRec_
{
- FT_GlyphLoader loader;
- FT_Bool glyph_transformed;
- FT_Matrix glyph_matrix;
- FT_Vector glyph_delta;
- void* glyph_hints;
+ FT_GlyphLoader loader;
+ FT_Bool glyph_transformed;
+ FT_Matrix glyph_matrix;
+ FT_Vector glyph_delta;
+ void* glyph_hints;
} FT_GlyphSlot_InternalRec;
@@ -380,10 +387,11 @@ FT_BEGIN_HEADER
/* typecast an object to a FT_Module */
-#define FT_MODULE( x ) ((FT_Module)(x))
-#define FT_MODULE_CLASS( x ) FT_MODULE(x)->clazz
-#define FT_MODULE_LIBRARY( x ) FT_MODULE(x)->library
-#define FT_MODULE_MEMORY( x ) FT_MODULE(x)->memory
+#define FT_MODULE( x ) ((FT_Module)( x ))
+#define FT_MODULE_CLASS( x ) FT_MODULE( x )->clazz
+#define FT_MODULE_LIBRARY( x ) FT_MODULE( x )->library
+#define FT_MODULE_MEMORY( x ) FT_MODULE( x )->memory
+
#define FT_MODULE_IS_DRIVER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
ft_module_font_driver )
@@ -397,13 +405,13 @@ FT_BEGIN_HEADER
#define FT_MODULE_IS_STYLER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
ft_module_styler )
-#define FT_DRIVER_IS_SCALABLE( x ) ( FT_MODULE_CLASS(x)->module_flags & \
+#define FT_DRIVER_IS_SCALABLE( x ) ( FT_MODULE_CLASS( x )->module_flags & \
ft_module_driver_scalable )
-#define FT_DRIVER_USES_OUTLINES( x ) !( FT_MODULE_CLASS(x)->module_flags & \
+#define FT_DRIVER_USES_OUTLINES( x ) !( FT_MODULE_CLASS( x )->module_flags & \
ft_module_driver_no_outlines )
-#define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS(x)->module_flags & \
+#define FT_DRIVER_HAS_HINTER( x ) ( FT_MODULE_CLASS( x )->module_flags & \
ft_module_driver_has_hinter )
@@ -587,13 +595,13 @@ FT_BEGIN_HEADER
/* */
typedef struct FT_DriverRec_
{
- FT_ModuleRec root;
- FT_Driver_Class clazz;
+ FT_ModuleRec root;
+ FT_Driver_Class clazz;
- FT_ListRec faces_list;
- void* extensions;
+ FT_ListRec faces_list;
+ void* extensions;
- FT_GlyphLoader glyph_loader;
+ FT_GlyphLoader glyph_loader;
} FT_DriverRec;
@@ -611,8 +619,8 @@ FT_BEGIN_HEADER
/*************************************************************************/
-#define FT_DEBUG_HOOK_TRUETYPE 0
-#define FT_DEBUG_HOOK_TYPE1 1
+#define FT_DEBUG_HOOK_TRUETYPE 0
+#define FT_DEBUG_HOOK_TYPE1 1
/*************************************************************************/
@@ -677,7 +685,7 @@ FT_BEGIN_HEADER
FT_Module auto_hinter;
FT_Byte* raster_pool; /* scan-line conversion */
- /* render pool */
+ /* render pool */
FT_ULong raster_pool_size; /* size of render pool in bytes */
FT_DebugHook_Func debug_hooks[4];
diff --git a/include/freetype/internal/ftstream.h b/include/freetype/internal/ftstream.h
index a9c4450..ead5e09 100644
--- a/include/freetype/internal/ftstream.h
+++ b/include/freetype/internal/ftstream.h
@@ -2,9 +2,9 @@
/* */
/* ftstream.h */
/* */
-/* Stream handling(specification). */
+/* Stream handling (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -27,19 +27,14 @@
FT_BEGIN_HEADER
-
-
-
-
-
-
-
-
-
- /* 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 */
+ /* format of an 8-bit frame_op value: */
+ /* */
+ /* bit 76543210 */
+ /* xxxxxxes */
+ /* */
+ /* s is set to 1 if the value is signed. */
+ /* e is set to 1 if the value is little-endian. */
+ /* xxx is a command. */
#define FT_FRAME_OP_SHIFT 2
#define FT_FRAME_OP_SIGNED 1
@@ -49,13 +44,13 @@ FT_BEGIN_HEADER
#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_BYTES 6 /* read a bytes sequence */
+#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_BYTES 6 /* read a bytes sequence */
typedef enum FT_Frame_Op_
@@ -89,9 +84,9 @@ FT_BEGIN_HEADER
typedef struct FT_Frame_Field_
{
- FT_Byte value;
- FT_Byte size;
- FT_UShort offset;
+ FT_Byte value;
+ FT_Byte size;
+ FT_UShort offset;
} FT_Frame_Field;
@@ -99,6 +94,7 @@ FT_BEGIN_HEADER
/* Construct an FT_Frame_Field out of a structure type and a field name. */
/* The structure type must be set in the FT_STRUCTURE macro before */
/* calling the FT_FRAME_START() macro. */
+ /* */
#define FT_FIELD_SIZE( f ) \
(FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f )
@@ -146,120 +142,118 @@ FT_BEGIN_HEADER
#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 FT_BYTE_(p,i) (((const FT_Byte*)(p))[(i)])
-#define FT_INT8_(p,i) (((const FT_Char*)(p))[(i)])
+#define FT_BYTE_( p, i ) ( ((const FT_Byte*)(p))[(i)] )
+#define FT_INT8_( p, i ) ( ((const FT_Char*)(p))[(i)] )
-#define FT_INT16(x) ((FT_Int16)(x))
-#define FT_UINT16(x) ((FT_UInt16)(x))
-#define FT_INT32(x) ((FT_Int32)(x))
-#define FT_UINT32(x) ((FT_UInt32)(x))
+#define FT_INT16( x ) ( (FT_Int16)(x) )
+#define FT_UINT16( x ) ( (FT_UInt16)(x) )
+#define FT_INT32( x ) ( (FT_Int32)(x) )
+#define FT_UINT32( x ) ( (FT_UInt32)(x) )
-#define FT_BYTE_I16(p,i,s) (FT_INT16( FT_BYTE_(p,i)) << (s))
-#define FT_BYTE_U16(p,i,s) (FT_UINT16(FT_BYTE_(p,i)) << (s))
-#define FT_BYTE_I32(p,i,s) (FT_INT32( FT_BYTE_(p,i)) << (s))
-#define FT_BYTE_U32(p,i,s) (FT_UINT32(FT_BYTE_(p,i)) << (s))
+#define FT_BYTE_I16( p, i, s ) ( FT_INT16( FT_BYTE_( p, i ) ) << (s) )
+#define FT_BYTE_U16( p, i, s ) ( FT_UINT16( FT_BYTE_( p, i ) ) << (s) )
+#define FT_BYTE_I32( p, i, s ) ( FT_INT32( FT_BYTE_( p, i ) ) << (s) )
+#define FT_BYTE_U32( p, i, s ) ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) )
-#define FT_INT8_I16(p,i,s) (FT_INT16( FT_INT8_(p,i)) << (s))
-#define FT_INT8_U16(p,i,s) (FT_UINT16(FT_INT8_(p,i)) << (s))
-#define FT_INT8_I32(p,i,s) (FT_INT32( FT_INT8_(p,i)) << (s))
-#define FT_INT8_U32(p,i,s) (FT_UINT32(FT_INT8_(p,i)) << (s))
+#define FT_INT8_I16( p, i, s ) ( FT_INT16( FT_INT8_( p, i ) ) << (s) )
+#define FT_INT8_U16( p, i, s ) ( FT_UINT16( FT_INT8_( p, i ) ) << (s) )
+#define FT_INT8_I32( p, i, s ) ( FT_INT32( FT_INT8_( p, i ) ) << (s) )
+#define FT_INT8_U32( p, i, s ) ( FT_UINT32( FT_INT8_( p, i ) ) << (s) )
-#define FT_PEEK_SHORT( p ) FT_INT16( FT_INT8_I16(p,0,8) | \
- FT_BYTE_I16(p,1,0) )
-#define FT_PEEK_USHORT( p ) FT_UINT16( FT_BYTE_U16(p,0,8) | \
- FT_BYTE_U16(p,1,0) )
+#define FT_PEEK_SHORT( p ) FT_INT16( FT_INT8_I16( p, 0, 8) | \
+ FT_BYTE_I16( p, 1, 0) )
-#define FT_PEEK_LONG( p ) FT_INT32( FT_INT8_I32(p,0,24) | \
- FT_BYTE_I32(p,1,16) | \
- FT_BYTE_I32(p,2, 8) | \
- FT_BYTE_I32(p,3, 0) )
+#define FT_PEEK_USHORT( p ) FT_UINT16( FT_BYTE_U16( p, 0, 8 ) | \
+ FT_BYTE_U16( p, 1, 0 ) )
-#define FT_PEEK_ULONG( p ) FT_UINT32( FT_BYTE_U32(p,0,24) | \
- FT_BYTE_U32(p,1,16) | \
- FT_BYTE_U32(p,2, 8) | \
- FT_BYTE_U32(p,3, 0) )
+#define FT_PEEK_LONG( p ) FT_INT32( FT_INT8_I32( p, 0, 24 ) | \
+ FT_BYTE_I32( p, 1, 16 ) | \
+ FT_BYTE_I32( p, 2, 8 ) | \
+ FT_BYTE_I32( p, 3, 0 ) )
-#define FT_PEEK_OFF3( p ) FT_INT32( FT_INT8_I32(p,0,16) | \
- FT_BYTE_I32(p,1, 8) | \
- FT_BYTE_I32(p,2, 0) )
+#define FT_PEEK_ULONG( p ) FT_UINT32( FT_BYTE_U32( p, 0, 24 ) | \
+ FT_BYTE_U32( p, 1, 16 ) | \
+ FT_BYTE_U32( p, 2, 8 ) | \
+ FT_BYTE_U32( p, 3, 0 ) )
-#define FT_PEEK_UOFF3( p ) FT_UINT32( FT_BYTE_U32(p,0,16) | \
- FT_BYTE_U32(p,1, 8) | \
- FT_BYTE_U32(p,2, 0) )
+#define FT_PEEK_OFF3( p ) FT_INT32( FT_INT8_I32( p, 0, 16 ) | \
+ FT_BYTE_I32( p, 1, 8 ) | \
+ FT_BYTE_I32( p, 2, 0 ) )
+#define FT_PEEK_UOFF3( p ) FT_UINT32( FT_BYTE_U32( p, 0, 16 ) | \
+ FT_BYTE_U32( p, 1, 8 ) | \
+ FT_BYTE_U32( p, 2, 0 ) )
-#define FT_PEEK_SHORT_LE( p ) FT_INT16( FT_INT8_I16(p,1,8) | \
- FT_BYTE_I16(p,0,0) )
+#define FT_PEEK_SHORT_LE( p ) FT_INT16( FT_INT8_I16( p, 1, 8 ) | \
+ FT_BYTE_I16( p, 0, 0 ) )
-#define FT_PEEK_USHORT_LE( p ) FT_UINT16( FT_BYTE_U16(p,1,8) | \
- FT_BYTE_U16(p,0,0) )
+#define FT_PEEK_USHORT_LE( p ) FT_UINT16( FT_BYTE_U16( p, 1, 8 ) | \
+ FT_BYTE_U16( p, 0, 0 ) )
-#define FT_PEEK_LONG_LE( p ) FT_INT32( FT_INT8_I32(p,3,24) | \
- FT_BYTE_I32(p,2,16) | \
- FT_BYTE_I32(p,1, 8) | \
- FT_BYTE_I32(p,0, 0) )
+#define FT_PEEK_LONG_LE( p ) FT_INT32( FT_INT8_I32( p, 3, 24 ) | \
+ FT_BYTE_I32( p, 2, 16 ) | \
+ FT_BYTE_I32( p, 1, 8 ) | \
+ FT_BYTE_I32( p, 0, 0 ) )
-#define FT_PEEK_ULONG_LE( p ) FT_UINT32( FT_BYTE_U32(p,3,24) | \
- FT_BYTE_U32(p,2,16) | \
- FT_BYTE_U32(p,1, 8) | \
- FT_BYTE_U32(p,0, 0) )
+#define FT_PEEK_ULONG_LE( p ) FT_UINT32( FT_BYTE_U32( p, 3, 24 ) | \
+ FT_BYTE_U32( p, 2, 16 ) | \
+ FT_BYTE_U32( p, 1, 8 ) | \
+ FT_BYTE_U32( p, 0, 0 ) )
-#define FT_PEEK_OFF3_LE( p ) FT_INT32( FT_INT8_I32(p,2,16) | \
- FT_BYTE_I32(p,1, 8) | \
- FT_BYTE_I32(p,0, 0) )
+#define FT_PEEK_OFF3_LE( p ) FT_INT32( FT_INT8_I32( p, 2, 16 ) | \
+ FT_BYTE_I32( p, 1, 8 ) | \
+ FT_BYTE_I32( p, 0, 0 ) )
-#define FT_PEEK_UOFF3_LE( p ) FT_UINT32( FT_BYTE_U32(p,2,16) | \
- FT_BYTE_U32(p,1, 8) | \
- FT_BYTE_U32(p,0, 0) )
+#define FT_PEEK_UOFF3_LE( p ) FT_UINT32( FT_BYTE_U32( p, 2, 16 ) | \
+ FT_BYTE_U32( p, 1, 8 ) | \
+ FT_BYTE_U32( p, 0, 0 ) )
-#define FT_NEXT_CHAR( buffer ) \
+#define FT_NEXT_CHAR( buffer ) \
( (signed char)*buffer++ )
-#define FT_NEXT_BYTE( buffer ) \
+#define FT_NEXT_BYTE( buffer ) \
( (unsigned char)*buffer++ )
-#define FT_NEXT_SHORT( buffer ) \
+#define FT_NEXT_SHORT( buffer ) \
( (short)( buffer += 2, FT_PEEK_SHORT( buffer - 2 ) ) )
#define FT_NEXT_USHORT( buffer ) \
( (unsigned short)( buffer += 2, FT_PEEK_USHORT( buffer - 2 ) ) )
-#define FT_NEXT_OFF3( buffer ) \
+#define FT_NEXT_OFF3( buffer ) \
( (long)( buffer += 3, FT_PEEK_OFF3( buffer - 3 ) ) )
-#define FT_NEXT_UOFF3( buffer ) \
+#define FT_NEXT_UOFF3( buffer ) \
( (unsigned long)( buffer += 3, FT_PEEK_UOFF3( buffer - 3 ) ) )
-#define FT_NEXT_LONG( buffer ) \
+#define FT_NEXT_LONG( buffer ) \
( (long)( buffer += 4, FT_PEEK_LONG( buffer - 4 ) ) )
-#define FT_NEXT_ULONG( buffer ) \
+#define FT_NEXT_ULONG( buffer ) \
( (unsigned long)( buffer += 4, FT_PEEK_ULONG( buffer - 4 ) ) )
-#define FT_NEXT_SHORT_LE( buffer ) \
+#define FT_NEXT_SHORT_LE( buffer ) \
( (short)( buffer += 2, FT_PEEK_SHORT_LE( buffer - 2 ) ) )
-#define FT_NEXT_USHORT_LE( buffer ) \
+#define FT_NEXT_USHORT_LE( buffer ) \
( (unsigned short)( buffer += 2, FT_PEEK_USHORT_LE( buffer - 2 ) ) )
-#define FT_NEXT_OFF3_LE( buffer ) \
+#define FT_NEXT_OFF3_LE( buffer ) \
( (long)( buffer += 3, FT_PEEK_OFF3_LE( buffer - 3 ) ) )
#define FT_NEXT_UOFF3_LE( buffer ) \
( (unsigned long)( buffer += 3, FT_PEEK_UOFF3_LE( buffer - 3 ) ) )
-
-#define FT_NEXT_LONG_LE( buffer ) \
+#define FT_NEXT_LONG_LE( buffer ) \
( (long)( buffer += 4, FT_PEEK_LONG_LE( buffer - 4 ) ) )
#define FT_NEXT_ULONG_LE( buffer ) \
@@ -272,15 +266,15 @@ FT_BEGIN_HEADER
/* */
#define FT_GET_MACRO( func, type ) ( (type)func( stream ) )
-#define FT_GET_CHAR() FT_GET_MACRO( FT_Stream_GetChar, FT_Char )
-#define FT_GET_BYTE() FT_GET_MACRO( FT_Stream_GetChar, FT_Byte )
-#define FT_GET_SHORT() FT_GET_MACRO( FT_Stream_GetShort, FT_Short )
-#define FT_GET_USHORT() FT_GET_MACRO( FT_Stream_GetShort, FT_UShort )
-#define FT_GET_OFF3() FT_GET_MACRO( FT_Stream_GetOffset, FT_Long )
-#define FT_GET_UOFF3() FT_GET_MACRO( FT_Stream_GetOffset, FT_ULong )
-#define FT_GET_LONG() FT_GET_MACRO( FT_Stream_GetLong, FT_Long )
-#define FT_GET_ULONG() FT_GET_MACRO( FT_Stream_GetLong, FT_ULong )
-#define FT_GET_TAG4() FT_GET_MACRO( FT_Stream_GetLong, FT_ULong )
+#define FT_GET_CHAR() FT_GET_MACRO( FT_Stream_GetChar, FT_Char )
+#define FT_GET_BYTE() FT_GET_MACRO( FT_Stream_GetChar, FT_Byte )
+#define FT_GET_SHORT() FT_GET_MACRO( FT_Stream_GetShort, FT_Short )
+#define FT_GET_USHORT() FT_GET_MACRO( FT_Stream_GetShort, FT_UShort )
+#define FT_GET_OFF3() FT_GET_MACRO( FT_Stream_GetOffset, FT_Long )
+#define FT_GET_UOFF3() FT_GET_MACRO( FT_Stream_GetOffset, FT_ULong )
+#define FT_GET_LONG() FT_GET_MACRO( FT_Stream_GetLong, FT_Long )
+#define FT_GET_ULONG() FT_GET_MACRO( FT_Stream_GetLong, FT_ULong )
+#define FT_GET_TAG4() FT_GET_MACRO( FT_Stream_GetLong, FT_ULong )
#define FT_GET_SHORT_LE() FT_GET_MACRO( FT_Stream_GetShortLE, FT_Short )
#define FT_GET_USHORT_LE() FT_GET_MACRO( FT_Stream_GetShortLE, FT_UShort )
@@ -306,11 +300,9 @@ FT_BEGIN_HEADER
#define FT_READ_ULONG_LE( var ) FT_READ_MACRO( FT_Stream_ReadLongLE, FT_ULong, var )
-
-
#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
- /* initialize a stream for reading a regular system stream */
+ /* initialize a stream for reading a regular system stream */
FT_EXPORT( FT_Error )
FT_Stream_Open( FT_Stream stream,
const char* filepathname );
@@ -318,147 +310,144 @@ FT_BEGIN_HEADER
#endif /* FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */
- /* initialize a stream for reading in-memory data */
+ /* initialize a stream for reading in-memory data */
FT_BASE( void )
FT_Stream_OpenMemory( FT_Stream stream,
const FT_Byte* base,
FT_ULong size );
- /* close a stream (does not destroy the stream structure) */
+ /* close a stream (does not destroy the stream structure) */
FT_BASE( void )
FT_Stream_Close( FT_Stream stream );
- /* seek within a stream. position is relative to start of stream */
+ /* seek within a stream. position is relative to start of stream */
FT_BASE( FT_Error )
FT_Stream_Seek( FT_Stream stream,
FT_ULong pos );
- /* skip bytes in a stream */
+ /* skip bytes in a stream */
FT_BASE( FT_Error )
FT_Stream_Skip( FT_Stream stream,
FT_Long distance );
- /* return current stream position */
+ /* return current stream position */
FT_BASE( FT_Long )
FT_Stream_Pos( FT_Stream stream );
-
- /* read bytes from a stream into a user-allocated buffer, returns an */
- /* error if all bytes could not be read.. */
+ /* read bytes from a stream into a user-allocated buffer, returns an */
+ /* error if not all bytes could be read. */
FT_BASE( FT_Error )
FT_Stream_Read( FT_Stream stream,
FT_Byte* buffer,
FT_ULong count );
- /* read bytes from a stream at a given position */
+ /* read bytes from a stream at a given position */
FT_BASE( FT_Error )
FT_Stream_ReadAt( FT_Stream stream,
FT_ULong pos,
FT_Byte* buffer,
FT_ULong count );
- /* enter a frame of 'count' consecutive bytes in a stream. returns an */
- /* error if the frame could not be read/accessed. The caller can use */
- /* the FT_Stream_Get_XXX function to retrieve frame data without */
- /* error checks.. */
- /* */
- /* you must _always_ call FT_Stream_ExitFrame once you've entered */
- /* a stream frame !! */
- /* */
+ /* Enter a frame of `count' consecutive bytes in a stream. Returns an */
+ /* error if the frame could not be read/accessed. The caller can use */
+ /* the FT_Stream_Get_XXX functions to retrieve frame data without */
+ /* error checks. */
+ /* */
+ /* You must _always_ call FT_Stream_ExitFrame() once you have entered */
+ /* a stream frame! */
+ /* */
FT_BASE( FT_Error )
FT_Stream_EnterFrame( FT_Stream stream,
FT_ULong count );
- /* exit a stream frame.. */
- /* */
+ /* exit a stream frame */
FT_BASE( void )
FT_Stream_ExitFrame( FT_Stream stream );
- /* extract a stream frame. if the stream is disk-based, a heap block */
- /* is allocated and the frame bytes are read into it. if the stream */
- /* is memory-based, this function simply set a pointer to the data */
- /* */
- /* useful to optimize access to memory-based streams transparently. */
- /* */
- /* all extracted frames must be "freed" with a call to the function */
- /* FT_Stream_ReleaseFrame */
- /* */
+ /* Extract a stream frame. If the stream is disk-based, a heap block */
+ /* is allocated and the frame bytes are read into it. If the stream */
+ /* is memory-based, this function simply set a pointer to the data. */
+ /* */
+ /* Useful to optimize access to memory-based streams transparently. */
+ /* */
+ /* All extracted frames must be `freed` with a call to the function */
+ /* FT_Stream_ReleaseFrame(). */
+ /* */
FT_BASE( FT_Error )
FT_Stream_ExtractFrame( FT_Stream stream,
FT_ULong count,
FT_Byte** pbytes );
- /* release an extract frame (see FT_Stream_ExtractFrame) */
- /* */
+ /* release an extract frame (see FT_Stream_ExtractFrame) */
FT_BASE( void )
FT_Stream_ReleaseFrame( FT_Stream stream,
FT_Byte** pbytes );
- /* read a byte from an entered frame */
+ /* read a byte from an entered frame */
FT_BASE( FT_Char )
FT_Stream_GetChar( FT_Stream stream );
- /* read a 16-bit big-endian integer from an entered frame */
+ /* read a 16-bit big-endian integer from an entered frame */
FT_BASE( FT_Short )
FT_Stream_GetShort( FT_Stream stream );
- /* read a 24-bit big-endian integer from an entered frame */
+ /* read a 24-bit big-endian integer from an entered frame */
FT_BASE( FT_Long )
FT_Stream_GetOffset( FT_Stream stream );
- /* read a 32-bit big-endian integer from an entered frame */
+ /* read a 32-bit big-endian integer from an entered frame */
FT_BASE( FT_Long )
FT_Stream_GetLong( FT_Stream stream );
- /* read a 16-bit little-endian integer from an entered frame */
+ /* read a 16-bit little-endian integer from an entered frame */
FT_BASE( FT_Short )
FT_Stream_GetShortLE( FT_Stream stream );
- /* read a 32-bit little-endian integer from an entered frame */
+ /* read a 32-bit little-endian integer from an entered frame */
FT_BASE( FT_Long )
FT_Stream_GetLongLE( FT_Stream stream );
- /* read a byte from a stream */
+ /* read a byte from a stream */
FT_BASE( FT_Char )
FT_Stream_ReadChar( FT_Stream stream,
FT_Error* error );
- /* read a 16-bit big-endian integer from a stream */
+ /* read a 16-bit big-endian integer from a stream */
FT_BASE( FT_Short )
FT_Stream_ReadShort( FT_Stream stream,
FT_Error* error );
- /* read a 24-bit big-endian integer from a stream */
+ /* read a 24-bit big-endian integer from a stream */
FT_BASE( FT_Long )
FT_Stream_ReadOffset( FT_Stream stream,
FT_Error* error );
- /* read a 32-bit big-endian integer from a stream */
+ /* read a 32-bit big-endian integer from a stream */
FT_BASE( FT_Long )
FT_Stream_ReadLong( FT_Stream stream,
FT_Error* error );
- /* read a 16-bit little-endian integer from a stream */
+ /* read a 16-bit little-endian integer from a stream */
FT_BASE( FT_Short )
FT_Stream_ReadShortLE( FT_Stream stream,
FT_Error* error );
- /* read a 32-bit little-endian integer from a stream */
+ /* read a 32-bit little-endian integer from a stream */
FT_BASE( FT_Long )
FT_Stream_ReadLongLE( FT_Stream stream,
FT_Error* error );
- /* read a structure from a stream. The structure must be described */
- /* by an array of FT_Frame_Field records.. */
+ /* Read a structure from a stream. The structure must be described */
+ /* by an array of FT_Frame_Field records. */
FT_BASE( FT_Error )
FT_Stream_ReadFields( FT_Stream stream,
const FT_Frame_Field* fields,
void* structure );
-#define FT_STREAM_POS() \
+#define FT_STREAM_POS() \
FT_Stream_Pos( stream )
#define FT_STREAM_SEEK( position ) \
@@ -467,9 +456,9 @@ FT_BEGIN_HEADER
#define FT_STREAM_SKIP( distance ) \
FT_SET_ERROR( FT_Stream_Skip( stream, distance ) )
-#define FT_STREAM_READ( buffer, count ) \
- FT_SET_ERROR( FT_Stream_Read( stream, \
- (FT_Byte*)buffer, \
+#define FT_STREAM_READ( buffer, count ) \
+ FT_SET_ERROR( FT_Stream_Read( stream, \
+ (FT_Byte*)buffer, \
count ) )
#define FT_STREAM_READ_AT( position, buffer, count ) \
@@ -478,25 +467,24 @@ FT_BEGIN_HEADER
(FT_Byte*)buffer, \
count ) )
-#define FT_STREAM_READ_FIELDS( fields, object ) \
+#define FT_STREAM_READ_FIELDS( fields, object ) \
FT_SET_ERROR( FT_Stream_ReadFields( stream, fields, object ) )
-#define FT_FRAME_ENTER( size ) \
+#define FT_FRAME_ENTER( size ) \
FT_SET_ERROR( FT_Stream_EnterFrame( stream, size ) )
-#define FT_FRAME_EXIT() \
+#define FT_FRAME_EXIT() \
FT_Stream_ExitFrame( stream )
#define FT_FRAME_EXTRACT( size, bytes ) \
FT_SET_ERROR( FT_Stream_ExtractFrame( stream, size, \
- (FT_Byte**)&(bytes) ) )
+ (FT_Byte**)&(bytes) ) )
-#define FT_FRAME_RELEASE( bytes ) \
+#define FT_FRAME_RELEASE( bytes ) \
FT_Stream_ReleaseFrame( stream, (FT_Byte**)&(bytes) )
-
FT_END_HEADER
#endif /* __FTSTREAM_H__ */
diff --git a/include/freetype/internal/fttrace.h b/include/freetype/internal/fttrace.h
index f1e9d6e..6295d12 100644
--- a/include/freetype/internal/fttrace.h
+++ b/include/freetype/internal/fttrace.h
@@ -1,3 +1,21 @@
+/***************************************************************************/
+/* */
+/* fttrace.h */
+/* */
+/* Tracing handling (specification only). */
+/* */
+/* Copyright 2002 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. */
+/* */
+/***************************************************************************/
+
+
/* definitions of trace levels for FreeType 2 */
/* the first level must always be `trace_any' */
@@ -73,3 +91,6 @@ FT_TRACE_DEF( winfnt )
/* PCF fonts component */
FT_TRACE_DEF( pcfdriver )
FT_TRACE_DEF( pcfread )
+
+
+/* END */
diff --git a/include/freetype/internal/internal.h b/include/freetype/internal/internal.h
index 054413c..3d42383 100644
--- a/include/freetype/internal/internal.h
+++ b/include/freetype/internal/internal.h
@@ -4,7 +4,7 @@
/* */
/* Internal header files (specification only). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h
index 123f239..a2cf527 100644
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -5,7 +5,7 @@
/* Auxiliary functions and data structures related to PostScript fonts */
/* (specification). */
/* */
-/* Copyright 1996-2001 by */
+/* Copyright 1996-2001, 2002 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -41,6 +41,7 @@ FT_BEGIN_HEADER
typedef struct PS_TableRec_* PS_Table;
typedef const struct PS_Table_FuncsRec_* PS_Table_Funcs;
+
/*************************************************************************/
/* */
/* <Struct> */
@@ -162,8 +163,8 @@ FT_BEGIN_HEADER
/* a simple structure used to identify tokens */
typedef struct T1_TokenRec_
{
- FT_Byte* start; /* first character of token in input stream */
- FT_Byte* limit; /* first character after the token */
+ FT_Byte* start; /* first character of token in input stream */
+ FT_Byte* limit; /* first character after the token */
T1_TokenType type; /* type of token */
} T1_TokenRec;
@@ -186,6 +187,7 @@ FT_BEGIN_HEADER
} T1_FieldType;
+
typedef enum T1_FieldLocation_
{
T1_FIELD_LOCATION_CID_INFO,
@@ -229,12 +231,12 @@ FT_BEGIN_HEADER
0, 0 \
},
-#define T1_NEW_CALLBACK_FIELD( _ident, _reader ) \
- { \
- _ident, T1CODE, T1_FIELD_TYPE_CALLBACK, \
+#define T1_NEW_CALLBACK_FIELD( _ident, _reader ) \
+ { \
+ _ident, T1CODE, T1_FIELD_TYPE_CALLBACK, \
(T1_Field_ParseFunc)_reader, \
- 0, 0, \
- 0, 0 \
+ 0, 0, \
+ 0, 0 \
},
#define T1_NEW_TABLE_FIELD( _ident, _type, _fname, _max ) \
@@ -257,40 +259,38 @@ FT_BEGIN_HEADER
},
-#define T1_FIELD_TYPE_BOOL( _ident, _fname ) \
+#define T1_FIELD_TYPE_BOOL( _ident, _fname ) \
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL, _fname )
-#define T1_FIELD_NUM( _ident, _fname ) \
+#define T1_FIELD_NUM( _ident, _fname ) \
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER, _fname )
-#define T1_FIELD_FIXED( _ident, _fname ) \
+#define T1_FIELD_FIXED( _ident, _fname ) \
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED, _fname )
-#define T1_FIELD_STRING( _ident, _fname ) \
+#define T1_FIELD_STRING( _ident, _fname ) \
T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_STRING, _fname )
-#define T1_FIELD_NUM_TABLE( _ident, _fname, _fmax ) \
- T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
- _fname, _fmax )
+#define T1_FIELD_NUM_TABLE( _ident, _fname, _fmax ) \
+ T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
+ _fname, _fmax )
-#define T1_FIELD_FIXED_TABLE( _ident, _fname, _fmax ) \
- T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
- _fname, _fmax )
+#define T1_FIELD_FIXED_TABLE( _ident, _fname, _fmax ) \
+ T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
+ _fname, _fmax )
-#define T1_FIELD_NUM_TABLE2( _ident, _fname, _fmax ) \
- T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
- _fname, _fmax )
+#define T1_FIELD_NUM_TABLE2( _ident, _fname, _fmax ) \
+ T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
+ _fname, _fmax )
#define T1_FIELD_FIXED_TABLE2( _ident, _fname, _fmax ) \
- T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
- _fname, _fmax )
+ T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
+ _fname, _fmax )
-#define T1_FIELD_CALLBACK( _ident, _name ) \
+#define T1_FIELD_CALLBACK( _ident, _name ) \
T1_NEW_CALLBACK_FIELD( _ident, _name )
-
-
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -305,9 +305,9 @@ FT_BEGIN_HEADER
{
void
(*init)( PS_Parser parser,
- FT_Byte* base,
- FT_Byte* limit,
- FT_Memory memory );
+ FT_Byte* base,
+ FT_Byte* limit,
+ FT_Memory memory );
void
(*done)( PS_Parser parser );
@@ -321,16 +321,16 @@ FT_BEGIN_HEADER
(*to_int)( PS_Parser parser );
FT_Fixed
(*to_fixed)( PS_Parser parser,
- FT_Int power_ten );
+ FT_Int power_ten );
FT_Int
(*to_coord_array)( PS_Parser parser,
- FT_Int max_coords,
- FT_Short* coords );
+ FT_Int max_coords,
+ FT_Short* coords );
FT_Int
(*to_fixed_array)( PS_Parser parser,
- FT_Int max_values,
- FT_Fixed* values,
- FT_Int power_ten );
+ FT_Int max_values,
+ FT_Fixed* values,
+ FT_Int power_ten );
void
(*to_token)( PS_Parser parser,
@@ -338,22 +338,22 @@ FT_BEGIN_HEADER
void
(*to_token_array)( PS_Parser parser,
T1_Token tokens,
- FT_UInt max_tokens,
- FT_Int* pnum_tokens );
+ FT_UInt max_tokens,
+ FT_Int* pnum_tokens );
FT_Error
(*load_field)( PS_Parser parser,
const T1_Field field,
- void** objects,
- FT_UInt max_objects,
- FT_ULong* pflags );
+ void** objects,
+ FT_UInt max_objects,
+ FT_ULong* pflags );
FT_Error
(*load_field_table)( PS_Parser parser,
const T1_Field field,
- void** objects,
- FT_UInt max_objects,
- FT_ULong* pflags );
+ void** objects,
+ FT_UInt max_objects,
+ FT_ULong* pflags );
} PS_Parser_FuncsRec;
@@ -379,20 +379,19 @@ FT_BEGIN_HEADER
/* */
/* funcs :: A table of functions for the parser. */
/* */
- typedef struct PS_ParserRec_
+ typedef struct PS_ParserRec_
{
- FT_Byte* cursor;
- FT_Byte* base;
- FT_Byte* limit;
- FT_Error error;
- FT_Memory memory;
+ FT_Byte* cursor;
+ FT_Byte* base;
+ FT_Byte* limit;
+ FT_Error error;
+ FT_Memory memory;
PS_Parser_FuncsRec funcs;
} PS_ParserRec;
-
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -411,22 +410,22 @@ FT_BEGIN_HEADER
typedef void
(*T1_Builder_Add_Point_Func)( T1_Builder builder,
- FT_Pos x,
- FT_Pos y,
- FT_Byte flag );
+ FT_Pos x,
+ FT_Pos y,
+ FT_Byte flag );
typedef FT_Error
(*T1_Builder_Add_Point1_Func)( T1_Builder builder,
- FT_Pos x,
- FT_Pos y );
+ FT_Pos x,
+ FT_Pos y );
typedef FT_Error
(*T1_Builder_Add_Contour_Func)( T1_Builder builder );
typedef FT_Error
(*T1_Builder_Start_Point_Func)( T1_Builder builder,
- FT_Pos x,
- FT_Pos y );
+ FT_Pos x,
+ FT_Pos y );
typedef void
(*T1_Builder_Close_Contour_Func)( T1_Builder builder );
@@ -514,35 +513,35 @@ FT_BEGIN_HEADER
/* */
typedef struct T1_BuilderRec_
{
- FT_Memory memory;
- FT_Face face;
- FT_GlyphSlot glyph;
- FT_GlyphLoader loader;
- FT_Outline* base;
- FT_Outline* current;
+ FT_Memory memory;
+ FT_Face face;
+ FT_GlyphSlot glyph;
+ FT_GlyphLoader loader;
+ FT_Outline* base;
+ FT_Outline* current;
- FT_Vector last;
+ FT_Vector last;
- FT_Fixed scale_x;
- FT_Fixed scale_y;
+ FT_Fixed scale_x;
+ FT_Fixed scale_y;
- FT_Pos pos_x;
- FT_Pos pos_y;
+ FT_Pos pos_x;
+ FT_Pos pos_y;
- FT_Vector left_bearing;
- FT_Vector advance;
+ FT_Vector left_bearing;
+ FT_Vector advance;
- FT_BBox bbox; /* bounding box */
- FT_Bool path_begun;
- FT_Bool load_points;
- FT_Bool no_recurse;
- FT_Bool shift;
+ FT_BBox bbox; /* bounding box */
+ FT_Bool path_begun;
+ FT_Bool load_points;
+ FT_Bool no_recurse;
+ FT_Bool shift;
- FT_Error error; /* only used for memory errors */
- FT_Bool metrics_only;
+ FT_Error error; /* only used for memory errors */
+ FT_Bool metrics_only;
- void* hints_funcs; /* hinter-specific */
- void* hints_globals; /* hinter-specific */
+ void* hints_funcs; /* hinter-specific */
+ void* hints_globals; /* hinter-specific */
T1_Builder_FuncsRec funcs;
@@ -598,22 +597,22 @@ FT_BEGIN_HEADER
typedef struct T1_Decoder_FuncsRec_
{
FT_Error
- (*init) ( T1_Decoder decoder,
- FT_Face face,
- FT_Size size,
- FT_GlyphSlot slot,
- FT_Byte** glyph_names,
- PS_Blend blend,
- FT_Bool hinting,
- T1_Decoder_Callback callback );
+ (*init)( T1_Decoder decoder,
+ FT_Face face,
+ FT_Size size,
+ FT_GlyphSlot slot,
+ FT_Byte** glyph_names,
+ PS_Blend blend,
+ FT_Bool hinting,
+ T1_Decoder_Callback callback );
void
- (*done) ( T1_Decoder decoder );
+ (*done)( T1_Decoder decoder );
FT_Error
(*parse_charstrings)( T1_Decoder decoder,
- FT_Byte* base,
- FT_UInt len );
+ FT_Byte* base,
+ FT_UInt len );
} T1_Decoder_FuncsRec;
@@ -651,6 +650,7 @@ FT_BEGIN_HEADER
} T1_DecoderRec;
+
/*************************************************************************/
/*************************************************************************/
/***** *****/
@@ -692,11 +692,11 @@ FT_BEGIN_HEADER
FT_Offset length,
FT_UShort seed );
- T1_CMap_Classes t1_cmap_classes;
+ T1_CMap_Classes t1_cmap_classes;
} PSAux_ServiceRec, *PSAux_Service;
- /* backwards-compatible type definition */
+ /* backwards-compatible type definition */
typedef PSAux_ServiceRec PSAux_Interface;
FT_END_HEADER