Commit b442ca17130e5d103f299440419e5ea3ad1f9fd3

Werner Lemberg 2003-04-23T15:50:27

Cleanups.

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
diff --git a/ChangeLog b/ChangeLog
index e9b4c7e..d485690 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -64,10 +64,8 @@
 	* src/type1/t1load.c (is_name_char): The Type 1 loader now accepts
 	more general names according to the PostScript specification (the
 	previous one was too restrictive).
-
 	(parse_font_name, parse_encoding, parse_charstrings, parse_dict):
 	Use `is_name_char'.
-
 	(parse_subrs): Handle empty arrays.
 
 2003-03-20  David Turner  <david@freetype.org>
@@ -145,7 +143,7 @@
 2003-03-14  David Turner  <david@freetype.org>
 
 	* src/truetype/ttdriver.c (Set_Char_Sizes): Fixing the small
-	TrueType native rendering glitches, they came from a small rounding
+	TrueType native rendering glitches; they came from a small rounding
 	error.
 
 2003-03-13  David Turner  <david@freetype.org>
@@ -204,8 +202,7 @@
 
 	* src/gzip/ftgzip.c (ft_gzip_file_fill_output): Fixed a bug that
 	caused FreeType to loop endlessly when trying to read certain
-	compressed gzip files.  The following test could be used to reveal
-	the bug:
+	compressed gzip files.  The following test reveals the bug:
 
 	  touch 0123456789 ; gzip 0123456789 ; ftdump 0123456789.gz
 
@@ -271,7 +268,7 @@
 
 	Changed the incremental loading interface in a way that makes it
 	simpler and allows glyph metrics to be changed (e.g., by adding a
-	constant, as required by CFF fonts) rather than just overridden. 
+	constant, as required by CFF fonts) rather than just overridden.
 	This was required to make the GhostScript-to-FreeType bridge work.
 
 	* src/cff/cffgload.c (cff_slot_load) [FT_CONFIG_OPTION_INCREMENTAL]:
@@ -405,9 +402,11 @@
 
 	* include/freetype/config/ftheader.h (FT_WINFONTS_H): New macro
 	for ftwinfnt.h.
-	* include/freetype/internal/fnttypes.h: Move Windows FNT definition
-	to...
+	* include/freetype/internal/fnttypes.h: Include FT_WINFONTS_H.
+	(FNT_FontRec): Updated.
+	Move Windows FNT definition to...
 	* include/freetype/ftwinfnt.h: This new file.
+	(FT_WinFNT_HeaderRec): Rename `reserved2' to `reserved1'.
 	* src/base/ftwinfnt.c: New file, providing `FT_Get_WinFNT_Header'.
 	* src/winfonts/winfnt.c (winfnt_header_fields): Updated.
 	Rename `reserved2' to `reserved1'.
@@ -434,7 +433,7 @@
 
 2003-01-11  David Chester  <davidchester@qmx.net>
 
-	Patches to the auto-hinter in order to slightly improve the output. 
+	Patches to the auto-hinter in order to slightly improve the output.
 	Note that everything is controlled through the new
 	FT_CONFIG_OPTION_CHESTER_HINTS defined in "ftoption.h".  There are
 	also individual FT_CONFIG_CHESTER_XXX macros to control individual
@@ -474,8 +473,8 @@
 
 2003-01-11  David Turner  <david@freetype.org>
 
-	* include/freetype/internal/fnttypes.h: Fixed a structure field
-	definition to avoid memory overwrites.
+	* include/freetype/internal/fnttypes.h (WinFNT_HeaderRec): Increase
+	size of `reserved2' to avoid memory overwrites.
 
 2003-01-08  Huw Dawies  <huw@codeweavers.com>
 
@@ -572,9 +571,8 @@
 
 	* src/base/ftobjs.c (find_unicode_charmap): Added some comments to
 	better explain what's happening there.
-
-	* src/base/ftobjs.c (open_face): Included Graham Asher's fix to
-	prevent faces without Unicode charmaps from loading.
+	(open_face): Included Graham Asher's fix to prevent faces without
+	Unicode charmaps from loading.
 
 	* src/winfonts/winfnt.c: Included George Williams's fix to support
 	version 2 fonts correctly.
@@ -663,7 +661,7 @@
 	the use of system-wide zlib.
 
 	Note that this macro, as well as
-	FT_CONFIG_OPTION_BYTECODE_INTERPRETER, is not #undef-ed anymore. 
+	FT_CONFIG_OPTION_BYTECODE_INTERPRETER, is not #undef-ed anymore.
 	This allows the build system to define them depending on the
 	configuration (typically by adding -D flags at compile time).
 
@@ -753,7 +751,7 @@
 
 2002-10-30  David Turner  <david@freetype.org>
 
-	* FreeType 2.1.3rc3 released
+	* FreeType 2.1.3rc3 released.
 
 2002-10-25  David Turner  <david@freetype.org>
 
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 7a79503..78e402d 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 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -213,13 +213,13 @@
 
         has_head = 1;
 
-       /* the table length should be 0x36, but certain font tools
-        * make it 0x38, so we will just check that it is greater.
-        *
-        * note that according to the specification,
-        * the table must be padded to 32-bit lengths, but this doesn't
-        * apply to the value of its "Length" field !!
-        */
+        /* The table length should be 0x36, but certain font tools
+         * make it 0x38, so we will just check that it is greater.
+         *
+         * Note that according to the specification,
+         * the table must be padded to 32-bit lengths, but this doesn't
+         * apply to the value of its "Length" field!
+         */
         if ( table.Length < 0x36                 ||
              FT_STREAM_SEEK( table.Offset + 12 ) ||
              FT_READ_ULONG( magic )              ||
@@ -840,16 +840,16 @@
       {
 
 #ifdef FT_CONFIG_OPTION_INCREMENTAL
-      /* If this is an incrementally loaded font and there are    */
-      /* overriding metrics tolerate a missing 'hmtx' table.      */
+        /* If this is an incrementally loaded font and there are */
+        /* overriding metrics tolerate a missing 'hmtx' table.   */
         if ( face->root.internal->incremental_interface &&
              face->root.internal->incremental_interface->funcs->
-                 get_glyph_metrics )
+               get_glyph_metrics )
         {
           face->horizontal.number_Of_HMetrics = 0;
           error = SFNT_Err_Ok;
           goto Exit;
-	    }
+        }
 #endif
 
         FT_ERROR(( " no horizontal metrics in file!\n" ));
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index 9cfa92b..55e7bd7 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType and OpenType embedded bitmap support (body).                */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -1232,9 +1232,9 @@
     if ( error )
       goto Exit;
 
-    /* this function is recursive.  At the top-level call, we  */
+    /* This function is recursive.  At the top-level call, we  */
     /* compute the dimensions of the higher-level glyph to     */
-    /* allocate the final pixmap buffer                        */
+    /* allocate the final pixmap buffer.                       */
     if ( depth == 0 )
     {
       FT_Long  size;
@@ -1355,7 +1355,7 @@
                                  y_offset + comp->y_offset,
                                  stream,
                                  &elem_metrics,
-                                 depth+1 );
+                                 depth + 1 );
         if ( error )
           goto Fail_Memory;
       }
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 6c09481..5cffbe9 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    A new `perfect' anti-aliasing renderer (body).                       */
 /*                                                                         */
-/*  Copyright 2000-2001, 2002 by                                           */
+/*  Copyright 2000-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index 0b56602..df023d5 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType font driver implementation (body).                          */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 42cf13a..c66050d 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType Glyph Loader (body).                                        */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -823,9 +823,10 @@
       {
         FT_Incremental_MetricsRec  metrics;
 
-		metrics.bearing_x = left_bearing;
-		metrics.bearing_y = 0;
-		metrics.advance = advance_width;
+
+        metrics.bearing_x = left_bearing;
+        metrics.bearing_y = 0;
+        metrics.advance = advance_width;
         error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
                   face->root.internal->incremental_interface->object,
                   glyph_index, FALSE, &metrics );
@@ -1066,7 +1067,7 @@
           num_base_points = gloader->base.outline.n_points;
 
           error = load_truetype_glyph( loader, subglyph->index,
-                                       recurse_count+1 );
+                                       recurse_count + 1 );
           if ( error )
             goto Fail;
 
@@ -1492,9 +1493,10 @@
         FT_Incremental_MetricsRec  metrics;
         FT_Error                   error = 0;
 
-		metrics.bearing_x = 0;
-		metrics.bearing_y = top_bearing;
-		metrics.advance = advance_height;
+
+        metrics.bearing_x = 0;
+        metrics.bearing_y = top_bearing;
+        metrics.advance = advance_height;
         error =
           face->root.internal->incremental_interface->funcs->get_glyph_metrics(
             face->root.internal->incremental_interface->object,
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 74726a1..0997f5c 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    TrueType bytecode interpreter (body).                                */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 9d78bae..abc370b 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Objects manager (body).                                              */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -70,6 +70,7 @@
   {
     FT_Memory  memory = zone->memory;
 
+
     if ( memory )
     {
       FT_FREE( zone->contours );
diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h
index e462d64..4608afd 100644
--- a/src/truetype/ttobjs.h
+++ b/src/truetype/ttobjs.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Objects manager (specification).                                     */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -311,7 +311,7 @@ FT_BEGIN_HEADER
   {
     FT_SizeRec         root;
 
-    FT_Size_Metrics    metrics;    /* slightly different from the root metrics */
+    FT_Size_Metrics    metrics; /* slightly different from the root metrics */
     TT_Size_Metrics    ttmetrics;
 
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 6ebb872..6a28ac6 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 Glyph Loader (body).                                          */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -98,8 +98,8 @@
       FT_Incremental_MetricsRec  metrics;
 
       metrics.bearing_x = decoder->builder.left_bearing.x;
-	  metrics.bearing_y = decoder->builder.left_bearing.y;
-	  metrics.advance   = decoder->builder.advance.x;
+      metrics.bearing_y = decoder->builder.left_bearing.y;
+      metrics.advance   = decoder->builder.advance.x;
       error = face->root.internal->incremental_interface->funcs->get_glyph_metrics(
                 face->root.internal->incremental_interface->object,
                 glyph_index, FALSE, &metrics );
@@ -130,7 +130,7 @@
       T1_Face  face = (T1_Face)decoder->builder.face;
 
 
-	  if ( face->root.internal->incremental_interface )
+      if ( face->root.internal->incremental_interface )
         face->root.internal->incremental_interface->funcs->free_glyph_data(
           face->root.internal->incremental_interface->object,
           &glyph_data );
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index d11213e..5103d9d 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 1 font loader (body).                                           */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -1793,9 +1793,9 @@
             }
           }
       }
-     /* yes, this happens, certain PDF-embedded fonts have only a ".notdef"
-      * glyph defined !
-      */
+      /* Yes, this happens: Certain PDF-embedded fonts have only a ".notdef"
+       * glyph defined!
+       */
       if ( min_char > max_char )
       {
         min_char = 0;
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
index c485634..af42379 100644
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Type 42 objects manager (body).                                      */
 /*                                                                         */
-/*  Copyright 2002 by Roberto Alameda.                                     */
+/*  Copyright 2002, 2003 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      */
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index a82f5eb..a8dfcdf 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType font driver for Windows FNT/FON files                       */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -618,7 +618,7 @@
 
     /* allocate and build bitmap */
     {
-      FT_Int     pitch  = ( bitmap->width + 7 ) >> 3;
+      FT_Int  pitch  = ( bitmap->width + 7 ) >> 3;
 
 
       bitmap->pitch      = pitch;