* Jamfile, vms_make.com, builds/win32/visualc/freetype.dsp, builds/win32/visualc/freetype/vcproj, include/freetype/ftmoderr.h: Add LZW module. * Jamfile.in: Removed. * docs/CHANGES: Updated. * include/freetype/internal/ftobjs.h: s/MIN/FT_MIN/, s/MAX/FT_MAX/, s/ABS/FT_ABS/. Updated all callers. * src/type1/t1load.c (parse_dict), src/pcf/pcfdrivr.c (PCF_Face_Init): Use FT_ERROR_BASE. Add support for PCF fonts compressed with LZW (extension .pcf.Z, created with `compress'). * include/freetype/config/ftoption.h, devel/ftoption.h (FT_CONFIG_OPTION_USE_LZW): New macro. * include/freetype/ftlzw.h: New file. * include/freetype/config/ftheader.h (FT_LZW_H): New macro for ftlzw.h. * src/lzw/*: New files. * src/pcf/pcfdrivr.c: Include FT_LZW_H. (PCF_Face_Init): Try LZW also. * src/gzip/ftgzip.c: s/0/Gzip_Err_Ok/ where appropriate. Beautify.
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
diff --git a/ChangeLog b/ChangeLog
index e3d3ea7..de7b8f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,39 @@
+2004-03-04 Werner Lemberg <wl@gnu.org>
+
+ * Jamfile, vms_make.com, builds/win32/visualc/freetype.dsp,
+ builds/win32/visualc/freetype/vcproj, include/freetype/ftmoderr.h:
+ Add LZW module.
+
+ * Jamfile.in: Removed.
+
+ * docs/CHANGES: Updated.
+
+ * include/freetype/internal/ftobjs.h: s/MIN/FT_MIN/, s/MAX/FT_MAX/,
+ s/ABS/FT_ABS/. Updated all callers.
+
+ * src/type1/t1load.c (parse_dict), src/pcf/pcfdrivr.c
+ (PCF_Face_Init): Use FT_ERROR_BASE.
+
+2004-03-04 Albert Chin <china@thewrittenword.com>
+
+ Add support for PCF fonts compressed with LZW (extension .pcf.Z,
+ created with `compress').
+
+ * include/freetype/config/ftoption.h, devel/ftoption.h
+ (FT_CONFIG_OPTION_USE_LZW): New macro.
+
+ * include/freetype/ftlzw.h: New file.
+ * include/freetype/config/ftheader.h (FT_LZW_H): New macro for
+ ftlzw.h.
+
+ * src/lzw/*: New files.
+
+ * src/pcf/pcfdrivr.c: Include FT_LZW_H.
+ (PCF_Face_Init): Try LZW also.
+
+ * src/gzip/ftgzip.c: s/0/Gzip_Err_Ok/ where appropriate.
+ Beautify.
+
2004-03-03 Werner Lemberg <wl@gnu.org>
* src/pshinter/pshalgo.c (psh_hint_table_init): Simplify code.
diff --git a/Jamfile b/Jamfile
index 61583c7..c4e98a9 100644
--- a/Jamfile
+++ b/Jamfile
@@ -62,13 +62,14 @@ FT2_BUILD_INCLUDE ?= ;
# if you modify this list or provide your own.
#
FT2_COMPONENTS ?= autofit # auto-fitter
- gzip # support for gzip-compressed files
autohint # auto-hinter
base # base component (public APIs)
bdf # BDF font driver
cache # cache sub-system
cff # CFF/CEF font driver
cid # PostScript CID-keyed font driver
+ gzip # support for gzip-compressed files
+ lzw # support for LZW-compressed files
pcf # PCF font driver
pfr # PFR/TrueDoc font driver
psaux # common PostScript routines module
diff --git a/builds/win32/visualc/freetype.dsp b/builds/win32/visualc/freetype.dsp
index b467c0a..bb353de 100644
--- a/builds/win32/visualc/freetype.dsp
+++ b/builds/win32/visualc/freetype.dsp
@@ -235,6 +235,10 @@ SOURCE=..\..\..\src\gzip\ftgzip.c
# End Source File
# Begin Source File
+SOURCE=..\..\..\src\lzw\ftlzw.c
+# End Source File
+# Begin Source File
+
SOURCE=..\..\..\src\base\ftinit.c
# SUBTRACT CPP /Fr
# End Source File
diff --git a/builds/win32/visualc/freetype.vcproj b/builds/win32/visualc/freetype.vcproj
index 2b15dcb..fefe7c7 100644
--- a/builds/win32/visualc/freetype.vcproj
+++ b/builds/win32/visualc/freetype.vcproj
@@ -771,6 +771,60 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\..\..\src\lzw\ftlzw.c">
+ <FileConfiguration
+ Name="Release|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="2"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Singlethreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Debug Multithreaded|Win32">
+ <Tool
+ Name="VCCLCompilerTool"
+ Optimization="0"
+ AdditionalIncludeDirectories=""
+ PreprocessorDefinitions=""
+ BasicRuntimeChecks="3"/>
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\..\..\src\base\ftinit.c">
<FileConfiguration
Name="Release|Win32">
diff --git a/devel/ftoption.h b/devel/ftoption.h
index b6afbb6..d8f699f 100644
--- a/devel/ftoption.h
+++ b/devel/ftoption.h
@@ -97,16 +97,30 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* LZW-compressed file support. */
+ /* */
+ /* FreeType now handles font files that have been compressed with the */
+ /* 'compress' program. This is mostly used to parse many of the PCF */
+ /* files that come with various X11 distributions. The implementation */
+ /* uses NetBSD's `zopen' to partially uncompress the file on the fly */
+ /* (see src/lzw/ftgzip.c). */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+#define FT_CONFIG_OPTION_USE_LZW
+
+
+ /*************************************************************************/
+ /* */
/* Gzip-compressed file support. */
/* */
/* FreeType now handles font files that have been compressed with the */
/* 'gzip' program. This is mostly used to parse many of the PCF files */
/* that come with XFree86. The implementation uses `zlib' to */
- /* partially uncompress the file on the fly (see src/base/ftgzip.c). */
+ /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */
/* */
- /* Define this macro if you want to enable this "feature". Note that */
- /* this will however force you to link the zlib to any program that */
- /* also uses FreeType. */
+ /* Define this macro if you want to enable this `feature'. See also */
+ /* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */
/* */
#define FT_CONFIG_OPTION_USE_ZLIB
@@ -116,7 +130,7 @@ FT_BEGIN_HEADER
/* ZLib library selection */
/* */
/* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */
- /* It allows FreeType's "ftgzip" component to link to the system's */
+ /* It allows FreeType's `ftgzip' component to link to the system's */
/* installation of the ZLib library. This is useful on systems like */
/* Unix or VMS where it generally is already available. */
/* */
diff --git a/docs/CHANGES b/docs/CHANGES
index 4420df0..75cbcba 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -16,8 +16,6 @@ LATEST CHANGES BETWEEN 2.1.8 and 2.1.7
correctly treated as a CID, similar to FreeType's CID driver
module. Note that CID CMap support is still missing.
- - Embedded bitmaps in SFNT-based CFF fonts are now supported.
-
- The FT_FACE_FLAGS_GLYPH_NAMES is now set correctly for all font
formats.
@@ -52,6 +50,9 @@ LATEST CHANGES BETWEEN 2.1.8 and 2.1.7
ADD_STYLE_NAME properties. Values are appended to
face->style_name; example: `Bold SemiCondensed'.
+ - The PCF driver now handles bitmap fonts compressed with the LZW
+ algorithm (extension .pcf.Z, compressed with `compress').
+
- A new API function `FT_Get_CMap_Language_ID' (declared in
`tttables.h') is available to get the language ID of a
TrueType/SFNT cmap.
@@ -61,6 +62,8 @@ LATEST CHANGES BETWEEN 2.1.8 and 2.1.7
in file-based fonts, it can happen in document-embedded
resources of PostScript documents.
+ - Embedded bitmaps in SFNT-based CFF fonts are now supported.
+
- A simple API is now available to control FreeType's tracing
mechanism if compiled with FT_DEBUG_LEVEL_TRACE. See the file
`ftdebug.h' for more details.
diff --git a/include/freetype/config/ftheader.h b/include/freetype/config/ftheader.h
index 52d1819..b996a7a 100644
--- a/include/freetype/config/ftheader.h
+++ b/include/freetype/config/ftheader.h
@@ -4,7 +4,7 @@
/* */
/* Build macros of the FreeType 2 library. */
/* */
-/* Copyright 1996-2001, 2002, 2003 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -150,6 +150,7 @@
#define FT_CONFIG_MODULES_H <freetype/config/ftmodule.h>
#endif
+
/* public headers */
/*************************************************************************/
@@ -376,6 +377,18 @@
/*************************************************************************/
/* */
/* @macro: */
+ /* FT_LZW_H */
+ /* */
+ /* @description: */
+ /* A macro used in #include statements to name the file containing */
+ /* the definitions of an API to support for LZW-compressed files. */
+ /* */
+#define FT_LZW_H <freetype/ftlzw.h>
+
+
+ /*************************************************************************/
+ /* */
+ /* @macro: */
/* FT_WINFONTS_H */
/* */
/* @description: */
@@ -384,6 +397,7 @@
/* */
#define FT_WINFONTS_H <freetype/ftwinfnt.h>
+
/*************************************************************************/
/* */
/* @macro: */
diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h
index 58125c1..a527ec1 100644
--- a/include/freetype/config/ftoption.h
+++ b/include/freetype/config/ftoption.h
@@ -97,16 +97,30 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
+ /* LZW-compressed file support. */
+ /* */
+ /* FreeType now handles font files that have been compressed with the */
+ /* 'compress' program. This is mostly used to parse many of the PCF */
+ /* files that come with various X11 distributions. The implementation */
+ /* uses NetBSD's `zopen' to partially uncompress the file on the fly */
+ /* (see src/lzw/ftgzip.c). */
+ /* */
+ /* Define this macro if you want to enable this `feature'. */
+ /* */
+#define FT_CONFIG_OPTION_USE_LZW
+
+
+ /*************************************************************************/
+ /* */
/* Gzip-compressed file support. */
/* */
/* FreeType now handles font files that have been compressed with the */
/* 'gzip' program. This is mostly used to parse many of the PCF files */
/* that come with XFree86. The implementation uses `zlib' to */
- /* partially uncompress the file on the fly (see src/base/ftgzip.c). */
+ /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */
/* */
- /* Define this macro if you want to enable this "feature". Note that */
- /* this will however force you to link the zlib to any program that */
- /* also uses FreeType. */
+ /* Define this macro if you want to enable this `feature'. See also */
+ /* the macro FT_CONFIG_OPTION_SYSTEM_ZLIB below. */
/* */
#define FT_CONFIG_OPTION_USE_ZLIB
@@ -116,7 +130,7 @@ FT_BEGIN_HEADER
/* ZLib library selection */
/* */
/* This macro is only used when FT_CONFIG_OPTION_USE_ZLIB is defined. */
- /* It allows FreeType's "ftgzip" component to link to the system's */
+ /* It allows FreeType's `ftgzip' component to link to the system's */
/* installation of the ZLib library. This is useful on systems like */
/* Unix or VMS where it generally is already available. */
/* */
diff --git a/include/freetype/ftmoderr.h b/include/freetype/ftmoderr.h
index c9b8121..d190167 100644
--- a/include/freetype/ftmoderr.h
+++ b/include/freetype/ftmoderr.h
@@ -4,7 +4,7 @@
/* */
/* FreeType module error offsets (specification). */
/* */
-/* Copyright 2001, 2002, 2003 by */
+/* Copyright 2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -23,8 +23,8 @@
/* The lower byte gives the error code, the higher byte gives the */
/* module. The base module has error offset 0. For example, the error */
/* `FT_Err_Invalid_File_Format' has value 0x003, the error */
- /* `TT_Err_Invalid_File_Format' has value 0xF03, the error */
- /* `T1_Err_Invalid_File_Format' has value 0x1003, etc. */
+ /* `TT_Err_Invalid_File_Format' has value 0x1003, the error */
+ /* `T1_Err_Invalid_File_Format' has value 0x1103, etc. */
/* */
/* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h */
/* to make the higher byte always zero (disabling the module error */
@@ -109,18 +109,19 @@
FT_MODERRDEF( CFF, 0x400, "CFF module" )
FT_MODERRDEF( CID, 0x500, "CID module" )
FT_MODERRDEF( Gzip, 0x600, "Gzip module" )
- FT_MODERRDEF( PCF, 0x700, "PCF module" )
- FT_MODERRDEF( PFR, 0x800, "PFR module" )
- FT_MODERRDEF( PSaux, 0x900, "PS auxiliary module" )
- FT_MODERRDEF( PShinter, 0xA00, "PS hinter module" )
- FT_MODERRDEF( PSnames, 0xB00, "PS names module" )
- FT_MODERRDEF( Raster, 0xC00, "raster module" )
- FT_MODERRDEF( SFNT, 0xD00, "SFNT module" )
- FT_MODERRDEF( Smooth, 0xE00, "smooth raster module" )
- FT_MODERRDEF( TrueType, 0xF00, "TrueType module" )
- FT_MODERRDEF( Type1, 0x1000, "Type 1 module" )
- FT_MODERRDEF( Type42, 0x1100, "Type 42 module" )
- FT_MODERRDEF( Winfonts, 0x1200, "Windows FON/FNT module" )
+ FT_MODERRDEF( LZW, 0x700, "LZW module" )
+ FT_MODERRDEF( PCF, 0x800, "PCF module" )
+ FT_MODERRDEF( PFR, 0x900, "PFR module" )
+ FT_MODERRDEF( PSaux, 0xA00, "PS auxiliary module" )
+ FT_MODERRDEF( PShinter, 0xB00, "PS hinter module" )
+ FT_MODERRDEF( PSnames, 0xC00, "PS names module" )
+ FT_MODERRDEF( Raster, 0xD00, "raster module" )
+ FT_MODERRDEF( SFNT, 0xE00, "SFNT module" )
+ FT_MODERRDEF( Smooth, 0xF00, "smooth raster module" )
+ FT_MODERRDEF( TrueType, 0x1000, "TrueType module" )
+ FT_MODERRDEF( Type1, 0x1100, "Type 1 module" )
+ FT_MODERRDEF( Type42, 0x1200, "Type 42 module" )
+ FT_MODERRDEF( Winfonts, 0x1300, "Windows FON/FNT module" )
#ifdef FT_MODERR_END_LIST
diff --git a/include/freetype/internal/ftobjs.h b/include/freetype/internal/ftobjs.h
index 75569b7..3a28119 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, 2002, 2003 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -64,19 +64,12 @@ FT_BEGIN_HEADER
/*************************************************************************/
/* */
/* The min and max functions missing in C. As usual, be careful not to */
- /* write things like MIN( a++, b++ ) to avoid side effects. */
+ /* write things like FT_MIN( a++, b++ ) to avoid side effects. */
/* */
-#ifndef MIN
-#define MIN( a, b ) ( (a) < (b) ? (a) : (b) )
-#endif
-
-#ifndef MAX
-#define MAX( a, b ) ( (a) > (b) ? (a) : (b) )
-#endif
+#define FT_MIN( a, b ) ( (a) < (b) ? (a) : (b) )
+#define FT_MAX( a, b ) ( (a) > (b) ? (a) : (b) )
-#ifndef ABS
-#define ABS( a ) ( (a) < 0 ? -(a) : (a) )
-#endif
+#define FT_ABS( a ) ( (a) < 0 ? -(a) : (a) )
#define FT_PAD_FLOOR( x, n ) ( (x) & ~((n)-1) )
diff --git a/src/autofit/afhints.c b/src/autofit/afhints.c
index a415fdf..0a2c96a 100644
--- a/src/autofit/afhints.c
+++ b/src/autofit/afhints.c
@@ -137,8 +137,8 @@
FT_Pos dy )
{
AF_Direction dir;
- FT_Pos ax = ABS( dx );
- FT_Pos ay = ABS( dy );
+ FT_Pos ax = FT_ABS( dx );
+ FT_Pos ay = FT_ABS( dy );
dir = AF_DIR_NONE;
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index 00fb7b6..385f559 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -469,7 +469,7 @@
FT_Pos max_coord = -32000;
#endif
- major_dir = ABS( axis->major_dir );
+ major_dir = FT_ABS( axis->major_dir );
segment_dir = major_dir;
/* set up (u,v) in each point */
@@ -524,8 +524,8 @@
if ( point == last ) /* skip singletons -- just in case */
continue;
- if ( ABS( last->out_dir ) == major_dir &&
- ABS( point->out_dir ) == major_dir )
+ if ( FT_ABS( last->out_dir ) == major_dir &&
+ FT_ABS( point->out_dir ) == major_dir )
{
/* we are already on an edge, try to locate its start */
last = point;
@@ -533,7 +533,7 @@
for (;;)
{
point = point->prev;
- if ( ABS( point->out_dir ) != major_dir )
+ if ( FT_ABS( point->out_dir ) != major_dir )
{
point = point->next;
break;
@@ -598,7 +598,7 @@
passed = 1;
}
- if ( !on_edge && ABS( point->out_dir ) == major_dir )
+ if ( !on_edge && FT_ABS( point->out_dir ) == major_dir )
{
/* this is the start of a new segment! */
segment_dir = point->out_dir;
diff --git a/src/autohint/ahglyph.c b/src/autohint/ahglyph.c
index ad2f46e..d0c2c66 100644
--- a/src/autohint/ahglyph.c
+++ b/src/autohint/ahglyph.c
@@ -5,7 +5,7 @@
/* Routines used to load and analyze a given glyph before hinting */
/* (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003 Catharon Productions Inc. */
+/* Copyright 2000-2001, 2002, 2003, 2004 Catharon Productions Inc. */
/* Author: David Turner */
/* */
/* This file is part of the Catharon Typography Project and shall only */
@@ -141,8 +141,8 @@
FT_Pos dy )
{
AH_Direction dir;
- FT_Pos ax = ABS( dx );
- FT_Pos ay = ABS( dy );
+ FT_Pos ax = FT_ABS( dx );
+ FT_Pos ay = FT_ABS( dy );
dir = AH_DIR_NONE;
@@ -884,8 +884,8 @@
if ( point == last ) /* skip singletons -- just in case */
continue;
- if ( ABS( last->out_dir ) == major_dir &&
- ABS( point->out_dir ) == major_dir )
+ if ( FT_ABS( last->out_dir ) == major_dir &&
+ FT_ABS( point->out_dir ) == major_dir )
{
/* we are already on an edge, try to locate its start */
last = point;
@@ -893,7 +893,7 @@
for (;;)
{
point = point->prev;
- if ( ABS( point->out_dir ) != major_dir )
+ if ( FT_ABS( point->out_dir ) != major_dir )
{
point = point->next;
break;
@@ -958,7 +958,7 @@
passed = 1;
}
- if ( !on_edge && ABS( point->out_dir ) == major_dir )
+ if ( !on_edge && FT_ABS( point->out_dir ) == major_dir )
{
/* this is the start of a new segment! */
segment_dir = point->out_dir;
diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c
index 4fb2366..f169642 100644
--- a/src/base/ftcalc.c
+++ b/src/base/ftcalc.c
@@ -4,7 +4,7 @@
/* */
/* Arithmetic computations (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -325,9 +325,9 @@
if ( a == 0 || b == c )
return a;
- s = a; a = ABS( a );
- s ^= b; b = ABS( b );
- s ^= c; c = ABS( c );
+ s = a; a = FT_ABS( a );
+ s ^= b; b = FT_ABS( b );
+ s ^= c; c = FT_ABS( c );
if ( a <= 46340L && b <= 46340L && c <= 176095L && c > 0 )
a = ( a * b + ( c >> 1 ) ) / c;
@@ -364,9 +364,9 @@
if ( a == 0 || b == c )
return a;
- s = a; a = ABS( a );
- s ^= b; b = ABS( b );
- s ^= c; c = ABS( c );
+ s = a; a = FT_ABS( a );
+ s ^= b; b = FT_ABS( b );
+ s ^= c; c = FT_ABS( c );
if ( a <= 46340L && b <= 46340L && c > 0 )
a = a * b / c;
@@ -401,8 +401,8 @@
if ( a == 0 || b == 0x10000L )
return a;
- s = a; a = ABS(a);
- s ^= b; b = ABS(b);
+ s = a; a = FT_ABS(a);
+ s ^= b; b = FT_ABS(b);
ua = (FT_ULong)a;
ub = (FT_ULong)b;
@@ -434,8 +434,8 @@
FT_UInt32 q;
- s = a; a = ABS(a);
- s ^= b; b = ABS(b);
+ s = a; a = FT_ABS(a);
+ s ^= b; b = FT_ABS(b);
if ( b == 0 )
{
@@ -474,8 +474,8 @@
FT_Int32 s;
- s = x; x = ABS( x );
- s ^= y; y = ABS( y );
+ s = x; x = FT_ABS( x );
+ s ^= y; y = FT_ABS( y );
ft_multo64( x, y, z );
@@ -508,7 +508,7 @@
x->lo = (FT_UInt32)-(FT_Int32)x->lo;
x->hi = ~x->hi + !x->lo;
}
- s ^= y; y = ABS( y );
+ s ^= y; y = FT_ABS( y );
/* Shortcut */
if ( x->hi == 0 )
@@ -562,7 +562,7 @@
x->lo = (FT_UInt32)-(FT_Int32)x->lo;
x->hi = ~x->hi + !x->lo;
}
- s ^= y; y = ABS( y );
+ s ^= y; y = FT_ABS( y );
/* Shortcut */
if ( x->hi == 0 )
diff --git a/src/bdf/bdflib.c b/src/bdf/bdflib.c
index b4066db..be0e398 100644
--- a/src/bdf/bdflib.c
+++ b/src/bdf/bdflib.c
@@ -1,6 +1,6 @@
/*
* Copyright 2000 Computing Research Labs, New Mexico State University
- * Copyright 2001, 2002, 2003 Francesco Zappa Nardelli
+ * Copyright 2001, 2002, 2003, 2004 Francesco Zappa Nardelli
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
@@ -1770,14 +1770,14 @@
/* Determine the overall font bounding box as the characters are */
/* loaded so corrections can be done later if indicated. */
- p->maxas = (short)MAX( glyph->bbx.ascent, p->maxas );
- p->maxds = (short)MAX( glyph->bbx.descent, p->maxds );
+ p->maxas = (short)FT_MAX( glyph->bbx.ascent, p->maxas );
+ p->maxds = (short)FT_MAX( glyph->bbx.descent, p->maxds );
p->rbearing = (short)( glyph->bbx.width + glyph->bbx.x_offset );
- p->maxrb = (short)MAX( p->rbearing, p->maxrb );
- p->minlb = (short)MIN( glyph->bbx.x_offset, p->minlb );
- p->maxlb = (short)MAX( glyph->bbx.x_offset, p->maxlb );
+ p->maxrb = (short)FT_MAX( p->rbearing, p->maxrb );
+ p->minlb = (short)FT_MIN( glyph->bbx.x_offset, p->minlb );
+ p->maxlb = (short)FT_MAX( glyph->bbx.x_offset, p->maxlb );
if ( !( p->flags & _BDF_DWIDTH ) )
{
diff --git a/src/cache/ftcsbits.c b/src/cache/ftcsbits.c
index c9043fd..006dd5c 100644
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -163,7 +163,7 @@
/* now, compute size */
if ( asize )
- *asize = ABS( sbit->pitch ) * sbit->height;
+ *asize = FT_ABS( sbit->pitch ) * sbit->height;
} /* glyph loading successful */
diff --git a/src/cff/cffparse.c b/src/cff/cffparse.c
index a44e43e..c4e5a6c 100644
--- a/src/cff/cffparse.c
+++ b/src/cff/cffparse.c
@@ -4,7 +4,7 @@
/* */
/* CFF token stream parser (body) */
/* */
-/* Copyright 1996-2001, 2002, 2003 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -334,7 +334,7 @@
offset->x = cff_parse_fixed_thousand( data++ );
offset->y = cff_parse_fixed_thousand( data );
- temp = ABS( matrix->yy );
+ temp = FT_ABS( matrix->yy );
*upm = (FT_UShort)FT_DivFix( 0x10000L, FT_DivFix( temp, 1000 ) );
diff --git a/src/cid/cidload.c b/src/cid/cidload.c
index 3a418e2..ad29dd5 100644
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -162,7 +162,7 @@
(void)cid_parser_to_fixed_array( parser, 6, temp, 3 );
- temp_scale = ABS( temp[3] );
+ temp_scale = FT_ABS( temp[3] );
/* Set units per EM based on FontMatrix values. We set the value to */
/* `1000/temp_scale', because temp_scale was already multiplied by */
diff --git a/src/gzip/ftgzip.c b/src/gzip/ftgzip.c
index 0787d80..e35c073 100644
--- a/src/gzip/ftgzip.c
+++ b/src/gzip/ftgzip.c
@@ -4,11 +4,11 @@
/* */
/* FreeType support for .gz compressed files. */
/* */
-/* this optional component relies on zlib. It should mainly be used to */
+/* This optional component relies on zlib. It should mainly be used to */
/* parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
-/* Copyright 2002, 2003 by */
+/* Copyright 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -144,7 +144,7 @@
/***************************************************************************/
/***************************************************************************/
-#define FT_GZIP_BUFFER_SIZE 4096
+#define FT_GZIP_BUFFER_SIZE 4096
typedef struct FT_GZipFileRec_
{
@@ -154,7 +154,7 @@
z_stream zstream; /* zlib input stream */
FT_ULong start; /* starting position, after .gz header */
- FT_Byte input[FT_GZIP_BUFFER_SIZE]; /* input read buffer */
+ FT_Byte input[FT_GZIP_BUFFER_SIZE]; /* input read buffer */
FT_Byte buffer[FT_GZIP_BUFFER_SIZE]; /* output buffer */
FT_ULong pos; /* position in output */
@@ -173,7 +173,7 @@
#define FT_GZIP_RESERVED 0xE0 /* bits 5..7: reserved */
- /* check and skip .gz header - we don't support "transparent" compression */
+ /* check and skip .gz header - we don't support `transparent' compression */
static FT_Error
ft_gzip_check_header( FT_Stream stream )
{
@@ -254,7 +254,7 @@
FT_Stream source )
{
z_stream* zstream = &zip->zstream;
- FT_Error error = 0;
+ FT_Error error = Gzip_Err_Ok;
zip->stream = stream;
@@ -276,9 +276,9 @@
zip->start = FT_STREAM_POS();
}
- /* initialize zlib - there is no zlib header in the compressed stream */
- zstream->zalloc = (alloc_func) ft_gzip_alloc;
- zstream->zfree = (free_func) ft_gzip_free;
+ /* initialize zlib -- there is no zlib header in the compressed stream */
+ zstream->zalloc = (alloc_func)ft_gzip_alloc;
+ zstream->zfree = (free_func) ft_gzip_free;
zstream->opaque = stream->memory;
zstream->avail_in = 0;
@@ -286,10 +286,7 @@
if ( inflateInit2( zstream, -MAX_WBITS ) != Z_OK ||
zstream->next_in == NULL )
- {
error = Gzip_Err_Invalid_File_Format;
- goto Exit;
- }
Exit:
return error;
@@ -301,6 +298,7 @@
{
z_stream* zstream = &zip->zstream;
+
inflateEnd( zstream );
/* clear the rest */
@@ -341,7 +339,8 @@
zip->cursor = zip->limit;
zip->pos = 0;
}
- return error;
+
+ return error;
}
@@ -376,7 +375,7 @@
zstream->next_in = zip->input;
zstream->avail_in = size;
- return 0;
+ return Gzip_Err_Ok;
}
@@ -418,6 +417,7 @@
break;
}
}
+
return error;
}
@@ -427,8 +427,8 @@
ft_gzip_file_skip_output( FT_GZipFile zip,
FT_ULong count )
{
- FT_Error error = 0;
- FT_ULong delta;
+ FT_Error error = Gzip_Err_Ok;
+ FT_ULong delta;
for (;;)
diff --git a/src/pcf/pcfdrivr.c b/src/pcf/pcfdrivr.c
index dc25b5d..503daae 100644
--- a/src/pcf/pcfdrivr.c
+++ b/src/pcf/pcfdrivr.c
@@ -31,6 +31,7 @@ THE SOFTWARE.
#include FT_INTERNAL_STREAM_H
#include FT_INTERNAL_OBJECTS_H
#include FT_GZIP_H
+#include FT_LZW_H
#include FT_ERRORS_H
#include FT_BDF_H
@@ -214,7 +215,7 @@ THE SOFTWARE.
FT_TRACE4(( "PCF_Face_Done: done face\n" ));
- /* close gzip stream if any */
+ /* close gzip/LZW stream if any */
if ( face->root.stream == &face->gzip_stream )
{
FT_Stream_Close( &face->gzip_stream );
@@ -247,21 +248,44 @@ THE SOFTWARE.
/* this didn't work, try gzip support! */
error2 = FT_Stream_OpenGzip( &face->gzip_stream, stream );
- if ( error2 == PCF_Err_Unimplemented_Feature )
+ if ( FT_ERROR_BASE( error2 ) == FT_Err_Unimplemented_Feature )
goto Fail;
error = error2;
if ( error )
- goto Fail;
+ {
+ FT_Error error3;
- face->gzip_source = stream;
- face->root.stream = &face->gzip_stream;
- stream = face->root.stream;
+ /* this didn't work, try LZW support! */
+ error3 = FT_Stream_OpenLZW( &face->gzip_stream, stream );
+ if ( FT_ERROR_BASE( error3 ) == FT_Err_Unimplemented_Feature )
+ goto Fail;
- error = pcf_load_font( stream, face );
- if ( error )
- goto Fail;
+ error = error3;
+ if ( error )
+ goto Fail;
+
+ face->gzip_source = stream;
+ face->root.stream = &face->gzip_stream;
+
+ stream = face->root.stream;
+
+ error = pcf_load_font( stream, face );
+ if ( error )
+ goto Fail;
+ }
+ else
+ {
+ face->gzip_source = stream;
+ face->root.stream = &face->gzip_stream;
+
+ stream = face->root.stream;
+
+ error = pcf_load_font( stream, face );
+ if ( error )
+ goto Fail;
+ }
}
/* set-up charmap */
diff --git a/src/pshinter/pshalgo.c b/src/pshinter/pshalgo.c
index 3acd62e..5f077d5 100644
--- a/src/pshinter/pshalgo.c
+++ b/src/pshinter/pshalgo.c
@@ -427,7 +427,7 @@
FT_Fixed delta2 = FT_PIX_ROUND( pos + len ) - pos - len;
- if ( ABS( delta1 ) <= ABS( delta2 ) )
+ if ( FT_ABS( delta1 ) <= FT_ABS( delta2 ) )
return delta1;
else
return delta2;
@@ -771,7 +771,7 @@
FT_Fixed side_delta = psh_hint_snap_stem_side_delta ( pos,
len );
- if ( ABS( side_delta ) < ABS( delta_b ) )
+ if ( FT_ABS( side_delta ) < FT_ABS( delta_b ) )
pos += side_delta;
else
pos += delta_b;
@@ -1414,7 +1414,7 @@
flag = PSH_POINT_EDGE_MIN;
d = point->org_u - hint->org_pos;
- if ( ABS( d ) < threshold )
+ if ( FT_ABS( d ) < threshold )
{
Is_Strong:
psh_point_set_strong( point );
@@ -1428,7 +1428,7 @@
flag = PSH_POINT_EDGE_MAX;
d = point->org_u - hint->org_pos - hint->org_len;
- if ( ABS( d ) < threshold )
+ if ( FT_ABS( d ) < threshold )
goto Is_Strong;
}
}
@@ -1464,7 +1464,7 @@
flag = PSH_POINT_EDGE_MIN;
d = point->org_u - hint->org_pos;
- if ( ABS( d ) < threshold )
+ if ( FT_ABS( d ) < threshold )
{
Is_Strong2:
point->flags2 |= flag;
@@ -1478,7 +1478,7 @@
flag = PSH_POINT_EDGE_MAX;
d = point->org_u - hint->org_pos - hint->org_len;
- if ( ABS( d ) < threshold )
+ if ( FT_ABS( d ) < threshold )
goto Is_Strong2;
}
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 27323f2..937cd02 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -5,7 +5,7 @@
/* Load the basic TrueType tables, i.e., tables that can be either in */
/* TTF or OTF fonts (body). */
/* */
-/* Copyright 1996-2001, 2002, 2003 by */
+/* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -740,12 +740,12 @@
face->root.num_glyphs = maxProfile->numGlyphs;
face->root.internal->max_points =
- (FT_UShort)MAX( maxProfile->maxCompositePoints,
- maxProfile->maxPoints );
+ (FT_UShort)FT_MAX( maxProfile->maxCompositePoints,
+ maxProfile->maxPoints );
face->root.internal->max_contours =
- (FT_Short)MAX( maxProfile->maxCompositeContours,
- maxProfile->maxContours );
+ (FT_Short)FT_MAX( maxProfile->maxCompositeContours,
+ maxProfile->maxContours );
face->max_components = (FT_ULong)maxProfile->maxComponentElements +
maxProfile->maxComponentDepth;
@@ -896,7 +896,8 @@
/* do we have an inconsistent number of metric values? */
{
TT_ShortMetrics* cur = *shorts;
- TT_ShortMetrics* limit = cur + MIN( num_shorts, num_shorts_checked );
+ TT_ShortMetrics* limit = cur +
+ FT_MIN( num_shorts, num_shorts_checked );
for ( ; cur < limit; cur++ )
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 0186541..889ebbf 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -2403,7 +2403,7 @@
/* at small sizes, F_dot_P can become too small, resulting */
/* in overflows and `spikes' in a number of glyphs like `w'. */
- if ( ABS( CUR.F_dot_P ) < 0x4000000L )
+ if ( FT_ABS( CUR.F_dot_P ) < 0x4000000L )
CUR.F_dot_P = 0x40000000L;
/* Disable cached aspect ratio */
@@ -2446,7 +2446,7 @@
FT_UNUSED_EXEC;
- if ( ABS( Vx ) < 0x10000L && ABS( Vy ) < 0x10000L )
+ if ( FT_ABS( Vx ) < 0x10000L && FT_ABS( Vy ) < 0x10000L )
{
Vx *= 0x100;
Vy *= 0x100;
@@ -2985,8 +2985,8 @@
args[0] = TT_MULDIV( args[0], args[1], 64L );
-#define DO_ABS \
- args[0] = ABS( args[0] );
+#define DO_ABS \
+ args[0] = FT_ABS( args[0] );
#define DO_NEG \
@@ -5708,7 +5708,7 @@
if ( ( CUR.opcode & 1 ) != 0 ) /* rounding and control cutin flag */
{
- if ( ABS( distance - org_dist ) > CUR.GS.control_value_cutin )
+ if ( FT_ABS( distance - org_dist ) > CUR.GS.control_value_cutin )
distance = org_dist;
distance = CUR_Func_round( distance, CUR.tt_metrics.compensations[0] );
@@ -5752,7 +5752,7 @@
/* single width cutin test */
- if ( ABS( org_dist - CUR.GS.single_width_value ) <
+ if ( FT_ABS( org_dist - CUR.GS.single_width_value ) <
CUR.GS.single_width_cutin )
{
if ( org_dist >= 0 )
@@ -5842,7 +5842,7 @@
/* single width test */
- if ( ABS( cvt_dist - CUR.GS.single_width_value ) <
+ if ( FT_ABS( cvt_dist - CUR.GS.single_width_value ) <
CUR.GS.single_width_cutin )
{
if ( cvt_dist >= 0 )
@@ -5886,7 +5886,7 @@
/* refer to the same zone. */
if ( CUR.GS.gep0 == CUR.GS.gep1 )
- if ( ABS( cvt_dist - org_dist ) >= CUR.GS.control_value_cutin )
+ if ( FT_ABS( cvt_dist - org_dist ) >= CUR.GS.control_value_cutin )
cvt_dist = org_dist;
distance = CUR_Func_round(
@@ -6036,7 +6036,7 @@
discriminant = TT_MULDIV( dax, -dby, 0x40 ) +
TT_MULDIV( day, dbx, 0x40 );
- if ( ABS( discriminant ) >= 0x40 )
+ if ( FT_ABS( discriminant ) >= 0x40 )
{
val = TT_MULDIV( dx, -dby, 0x40 ) + TT_MULDIV( dy, dbx, 0x40 );
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 6b33b68..16a0341 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -854,7 +854,7 @@
(void)T1_ToFixedArray( parser, 6, temp, 3 );
- temp_scale = ABS( temp[3] );
+ temp_scale = FT_ABS( temp[3] );
/* Set Units per EM based on FontMatrix values. We set the value to */
/* 1000 / temp_scale, because temp_scale was already multiplied by */
@@ -1660,7 +1660,7 @@
keyword_flag[0] = 1;
else
{
- if ( parser->root.error == T1_Err_Ignore )
+ if ( FT_ERROR_BASE( parser->root.error ) == FT_Err_Ignore )
parser->root.error = T1_Err_Ok;
else
return parser->root.error;
diff --git a/src/type42/t42parse.c b/src/type42/t42parse.c
index bf97947..ff53a3e 100644
--- a/src/type42/t42parse.c
+++ b/src/type42/t42parse.c
@@ -4,7 +4,7 @@
/* */
/* Type 42 font parser (body). */
/* */
-/* Copyright 2002, 2003 by Roberto Alameda. */
+/* Copyright 2002, 2003, 2004 by Roberto Alameda. */
/* */
/* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */
@@ -245,7 +245,7 @@
(void)T1_ToFixedArray( parser, 6, temp, 3 );
- temp_scale = ABS( temp[3] );
+ temp_scale = FT_ABS( temp[3] );
/* Set Units per EM based on FontMatrix values. We set the value to */
/* 1000 / temp_scale, because temp_scale was already multiplied by */
diff --git a/tests/gview.c b/tests/gview.c
index 77f15bc..f685985 100644
--- a/tests/gview.c
+++ b/tests/gview.c
@@ -745,7 +745,7 @@ ah_draw_edges( void )
x = (NV_Pos)( v1.x + 0.5 );
nv_pixmap_fill_rect( target, x - 1, y2, 3,
- ABS( y1 - y2 ) + 1, SEGMENT_COLOR );
+ FT_ABS( y1 - y2 ) + 1, SEGMENT_COLOR );
}
}
@@ -787,7 +787,7 @@ ah_draw_edges( void )
x = (NV_Pos)( v1.y + 0.5 );
nv_pixmap_fill_rect( target, y1, x - 1,
- ABS( y1 - y2 ) + 1, 3, SEGMENT_COLOR );
+ FT_ABS( y1 - y2 ) + 1, 3, SEGMENT_COLOR );
}
}
diff --git a/vms_make.com b/vms_make.com
index 184a093..12152ad 100644
--- a/vms_make.com
+++ b/vms_make.com
@@ -151,6 +151,8 @@ all :
$(MMS)$(MMSQUALIFIERS)
set default [-.gzip]
$(MMS)$(MMSQUALIFIERS)
+ set default [-.lzw]
+ $(MMS)$(MMSQUALIFIERS)
set default [-.pcf]
$(MMS)$(MMSQUALIFIERS)
set default [-.pfr]
@@ -277,6 +279,39 @@ all : $(OBJS)
# EOF
$ eod
$ close out
+$ write sys$output "... [.src.lzw] directory"
+$ create [.src.lzw]descrip.mms
+$ open/append out [.src.lzw]descrip.mms
+$ copy sys$input: out
+$ deck
+#
+# FreeType 2 LZW support compilation rules for VMS
+#
+
+
+# Copyright 2004 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.
+$EOD
+$ if libincs .nes. "" then write out "LIBINCS = ", libincs, ","
+$ copy sys$input: out
+$ deck
+
+CFLAGS=$(COMP_FLAGS)$(DEBUG)/include=($(LIBINCS)[--.include],[--.src.lzw])
+
+OBJS=ftlzw.obj
+
+all : $(OBJS)
+ library [--.lib]freetype.olb $(OBJS)
+
+# EOF
+$ eod
+$ close out
$ write sys$output "... [.src.type1] directory"
$ create [.src.type1]descrip.mms
$ open/append out [.src.type1]descrip.mms