* src/sfnt/sfdriver.c: Include ttsbit.h and ttpost.h only conditionally. * src/truetype/ttdriver.c (Set_Char_Sizes, Set_Pixel_Sizes): Set `size->strike_index' only conditionally. * src/type1/t1driver.c, src/type1/t1objs.c: Include t1afm.h only conditionally. * src/winfonts/winfnt.h: Move all type definitions to... * src/include/freetype/internal/fnttypes.h: New file. * src/winfonts/winfnt.c: Use it. * include/freetype/internal/ftdebug.h: Replaced FT_CAT and FT_XCAT with a direct solution (which also satifies picky compilers).
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
diff --git a/ChangeLog b/ChangeLog
index b19e908..d0e99df 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,23 @@
+2000-11-29 Werner Lemberg <wl@gnu.org>
+
+ * src/sfnt/sfdriver.c: Include ttsbit.h and ttpost.h only
+ conditionally.
+
+ * src/truetype/ttdriver.c (Set_Char_Sizes, Set_Pixel_Sizes): Set
+ `size->strike_index' only conditionally.
+
+ * src/type1/t1driver.c, src/type1/t1objs.c: Include t1afm.h only
+ conditionally.
+
+ * src/winfonts/winfnt.h: Move all type definitions to...
+ * src/include/freetype/internal/fnttypes.h: New file.
+ * src/winfonts/winfnt.c: Use it.
+
+2000-11-29 ??? ??? <darin@eazel.com>
+
+ * include/freetype/internal/ftdebug.h: Replaced FT_CAT and FT_XCAT
+ with a direct solution (which also satifies picky compilers).
+
2000-11-28 YAMANO-UCHI Hidetoshi <mer@din.or.jp>
* src/truetype/ttobjs.c (TT_Init_Size): Fix #ifdef's to work with
diff --git a/include/freetype/internal/ftdebug.h b/include/freetype/internal/ftdebug.h
index 9359984..36c60e2 100644
--- a/include/freetype/internal/ftdebug.h
+++ b/include/freetype/internal/ftdebug.h
@@ -27,17 +27,6 @@
#endif
- /* A very stupid pre-processor trick. See K&R version 2 */
- /* section A12.3 for details... */
- /* */
- /* It is also described in the section `Separate */
- /* Expansion of Macro Arguments' in the info file */
- /* `cpp.info', describing GNU cpp. */
- /* */
-#define FT_CAT( x, y ) x ## y
-#define FT_XCAT( x, y ) FT_CAT( x, y )
-
-
#ifdef FT_DEBUG_LEVEL_TRACE
@@ -134,7 +123,7 @@
do \
{ \
if ( ft_trace_levels[FT_COMPONENT] >= level ) \
- FT_XCAT( FT_Message, varformat ); \
+ FT_Message varformat; \
} while ( 0 )
@@ -205,7 +194,7 @@
/* print a message and exit */
FT_EXPORT( void ) FT_Panic( const char* fmt, ... );
-#define FT_ERROR( varformat ) FT_XCAT( FT_Message, varformat )
+#define FT_ERROR( varformat ) FT_Message varformat
#endif /* FT_DEBUG_LEVEL_TRACE || FT_DEBUG_LEVEL_ERROR */
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index a2d28c0..4df3c69 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -24,20 +24,32 @@
#include "sfdriver.h"
#include "ttload.h"
-#include "ttsbit.h"
-#include "ttpost.h"
#include "ttcmap.h"
#include "sfobjs.h"
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+#include "ttsbit.h"
+#endif
+
+#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+#include "ttpost.h"
+#endif
+
#else
#include <sfnt/sfdriver.h>
#include <sfnt/ttload.h>
-#include <sfnt/ttsbit.h>
-#include <sfnt/ttpost.h>
#include <sfnt/ttcmap.h>
#include <sfnt/sfobjs.h>
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
+#include <sfnt/ttsbit.h>
+#endif
+
+#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
+#include <sfnt/ttpost.h>
+#endif
+
#endif
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index 40b3837..cddd407 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -225,7 +225,9 @@
}
size->ttmetrics.valid = FALSE;
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
size->strike_index = 0xFFFF;
+#endif
return TT_Reset_Size( size );
}
@@ -262,7 +264,9 @@
/* many things have been pre-computed by the base layer */
size->ttmetrics.valid = FALSE;
+#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
size->strike_index = 0xFFFF;
+#endif
return TT_Reset_Size( size );
}
diff --git a/src/type1/t1driver.c b/src/type1/t1driver.c
index f513e65..ea8ab91 100644
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -21,14 +21,20 @@
#include "t1driver.h"
#include "t1gload.h"
#include "t1load.h"
+
+#ifndef T1_CONFIG_OPTION_NO_AFM
#include "t1afm.h"
+#endif
#else
#include <type1/t1driver.h>
#include <type1/t1gload.h>
#include <type1/t1load.h>
+
+#ifndef T1_CONFIG_OPTION_NO_AFM
#include <type1/t1afm.h>
+#endif
#endif
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index 65c3344..101e7f3 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -26,13 +26,19 @@
#include "t1gload.h"
#include "t1load.h"
+
+#ifndef T1_CONFIG_OPTION_NO_AFM
#include "t1afm.h"
+#endif
#else
#include <type1/t1gload.h>
#include <type1/t1load.h>
+
+#ifndef T1_CONFIG_OPTION_NO_AFM
#include <type1/t1afm.h>
+#endif
#endif
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index 3641079..5c759d7 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -31,6 +31,7 @@
#include <freetype/internal/ftstream.h>
#include <freetype/internal/ftdebug.h>
#include <freetype/internal/ftobjs.h>
+#include <freetype/internal/fnttypes.h>
/*************************************************************************/
diff --git a/src/winfonts/winfnt.h b/src/winfonts/winfnt.h
index 0acc04e..ba215b7 100644
--- a/src/winfonts/winfnt.h
+++ b/src/winfonts/winfnt.h
@@ -27,125 +27,6 @@
#endif
- typedef struct WinMZ_Header_
- {
- FT_UShort magic;
- /* skipped content */
- FT_UShort lfanew;
-
- } WinMZ_Header;
-
-
- typedef struct WinNE_Header_
- {
- FT_UShort magic;
- /* skipped content */
- FT_UShort resource_tab_offset;
- FT_UShort rname_tab_offset;
-
- } WinNE_Header;
-
-
- typedef struct WinNameInfo_
- {
- FT_UShort offset;
- FT_UShort length;
- FT_UShort flags;
- FT_UShort id;
- FT_UShort handle;
- FT_UShort usage;
-
- } WinNameInfo;
-
-
- typedef struct WinResourceInfo_
- {
- FT_UShort type_id;
- FT_UShort count;
-
- } WinResourceInfo;
-
-
-#define WINFNT_MZ_MAGIC 0x5A4D
-#define WINFNT_NE_MAGIC 0x454E
-
-
- typedef struct WinFNT_Header_
- {
- FT_UShort version;
- FT_ULong file_size;
- FT_Byte copyright[60];
- FT_UShort file_type;
- FT_UShort nominal_point_size;
- FT_UShort vertical_resolution;
- FT_UShort horizontal_resolution;
- FT_UShort ascent;
- FT_UShort internal_leading;
- FT_UShort external_leading;
- FT_Byte italic;
- FT_Byte underline;
- FT_Byte strike_out;
- FT_UShort weight;
- FT_Byte charset;
- FT_UShort pixel_width;
- FT_UShort pixel_height;
- FT_Byte pitch_and_family;
- FT_UShort avg_width;
- FT_UShort max_width;
- FT_Byte first_char;
- FT_Byte last_char;
- FT_Byte default_char;
- FT_Byte break_char;
- FT_UShort bytes_per_row;
- FT_ULong device_offset;
- FT_ULong face_name_offset;
- FT_ULong bits_pointer;
- FT_ULong bits_offset;
- FT_Byte reserved;
- FT_ULong flags;
- FT_UShort A_space;
- FT_UShort B_space;
- FT_UShort C_space;
- FT_UShort color_table_offset;
- FT_Byte reserved2[4];
-
- } WinFNT_Header;
-
-
- typedef struct FNT_Font_
- {
- FT_ULong offset;
- FT_Int size_shift;
-
- WinFNT_Header header;
-
- FT_Byte* fnt_frame;
- FT_ULong fnt_size;
-
- } FNT_Font;
-
-
- typedef struct FNT_SizeRec_
- {
- FT_SizeRec root;
- FNT_Font* font;
-
- } FNT_SizeRec, *FNT_Size;
-
-
- typedef struct FNT_FaceRec_
- {
- FT_FaceRec root;
-
- FT_UInt num_fonts;
- FNT_Font* fonts;
-
- FT_CharMap charmap_handle;
- FT_CharMapRec charmap; /* a single charmap per face */
-
- } FNT_FaceRec, *FNT_Face;
-
-
FT_EXPORT_VAR( const FT_Driver_Class ) winfnt_driver_class;