Commit 17432b5e3719db41ddbd85381ce4b02cb52cd0c3

Werner Lemberg 2007-01-12T09:28:44

* src/type1/t1load.c (is_space): Removed. (parse_encoding, parse_charstrings): Use IS_PS_DELIM. (parse_charstrings): Use IS_PS_TOKEN. * autogen.sh: Avoid bash specific syntax.

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
diff --git a/ChangeLog b/ChangeLog
index 1527a01..5860b11 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,34 +1,44 @@
+2007-01-11  Werner Lemberg  <wl@gnu.org>
+
+	* src/type1/t1load.c (is_space): Removed.
+	(parse_encoding, parse_charstrings): Use IS_PS_DELIM.
+	(parse_charstrings): Use IS_PS_TOKEN.
+
+
+	* autogen.sh: Avoid bash specific syntax.
+
 2007-01-11  David Turner  <david@freetype.org>
 
-	* docs/CHANGES: small update
+	* docs/CHANGES: Small update.
 
-	* builds/unix/configure.ac: updating libtool version number to 9.11.3
+	* builds/unix/configure.raw (version_info): Set to 9:11:3.
 
-	* src/base/ftobjs.c (IsMacResource): fixed a small bug that caused a
-	crash with some Mac OS X .dfont files. Submitted by Masatake Yamoto.
+	* src/base/ftobjs.c (IsMacResource): Fix a small bug that caused a
+	crash with some Mac OS X .dfont files.  Submitted by Masatake
+	Yamoto.
 
-	* autogen.sh: small fix to get it working on Mac OS X properly,
-	the issue is that GNU libtool is called "glibtool" on this platform,
-	and we must call "glibtoolize", since "libtoolize" doesn't exist
+	* autogen.sh: Small fix to get it working on Mac OS X properly:
+	The issue is that GNU libtool is called `glibtool' on this platform,
+	and we must call `glibtoolize', since `libtoolize' doesn't exist.
 
 2007-01-10  David Turner  <david@freetype.org>
 
-	* all-sources: tagging all sources with VER-2-3-0-RC1 and
-	VER-2-3-0
+	* all-sources: Tag all sources with VER-2-3-0-RC1 and
+	VER-2-3-0.
+
+	* Jamfile (RefDoc), README, builds/win32/visualc/freetype.dsp,
+	builds/win32/visualc/freetype.vcproj, docs/VERSION.DLL: Update
+	version number to 2.3.0.
 
-	* Jamfile, README, builds/win32/visualc/freetype.dsp,
-	builds/win32/visualc/freetype.vcproj, docs/VERSION.DLL,
-	include/freetype/freetype.h, include/freetype/t1tables.h,
-	include/freetype/internal/tttypes.h: updating version
-	number to 2.3.0 !!
+	* include/freetype/freetype.h (FREETYPE_MINOR): Set to 3.
+	(FREETYPE_PATCH): Set to 0.
 
 	* include/freetype/ftchapters.h, include/freetype/ftgasp.h,
-	include/freetype/ftlcdfil.h: updating reference documentation
-	with GASP support and LCD filtering sections
+	include/freetype/ftlcdfil.h: Update reference documentation with
+	GASP support and LCD filtering sections.
 
-	* src/pshinter/pshalgo.c (psh_glyph_compute_inflections):
-	fixed a typo which created an endless loop with some malformed
-	font files
+	* src/pshinter/pshalgo.c (psh_glyph_compute_inflections): Fix a typo
+	which created an endless loop with some malformed font files.
 
 2007-01-10  Derek Clegg  <dclegg@apple.com>
 
diff --git a/Jamfile b/Jamfile
index 9c0a622..8d36468 100644
--- a/Jamfile
+++ b/Jamfile
@@ -1,6 +1,6 @@
 # FreeType 2 top Jamfile.
 #
-# Copyright 2001, 2002, 2003, 2004, 2005, 2006 by
+# Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
diff --git a/README b/README
index f5fa23d..1766d2e 100644
--- a/README
+++ b/README
@@ -51,7 +51,7 @@
 
 ----------------------------------------------------------------------
 
-Copyright 2006 by
+Copyright 2006, 2007 by
 David Turner, Robert Wilhelm, and Werner Lemberg.
 
 This  file is  part of  the FreeType  project, and  may only  be used,
diff --git a/autogen.sh b/autogen.sh
index 3e09c1f..d8fb5b2 100644
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,6 +1,6 @@
 #!/bin/sh
 
-# Copyright 2005, 2006 by
+# Copyright 2005, 2006, 2007 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -40,14 +40,13 @@ echo "generating \`configure.ac'"
 sed -e "s;@VERSION@;$freetype_major$freetype_minor$freetype_patch;" \
     < configure.raw > configure.ac
 
-# on MacOS X, the GNU libtool is named "glibtool"
-HOSTOS=$(uname)
+# On MacOS X, the GNU libtool is named `glibtool'.
+HOSTOS=`uname`
 LIBTOOLIZE=libtoolize
-if [ "$HOSTOS"x == Darwinx ] ; then
+if test "$HOSTOS"x = Darwinx; then
   LIBTOOLIZE=glibtoolize
 fi
 
-
 run aclocal -I . --force
 run $LIBTOOLIZE --force --copy
 run autoconf --force
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index f8cf60e..f8f42ea 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -2,7 +2,7 @@
 #
 # Process this file with autoconf to produce a configure script.
 #
-# Copyright 2001, 2002, 2003, 2004, 2005, 2006 by
+# Copyright 2001, 2002, 2003, 2004, 2005, 2006, 2007 by
 # David Turner, Robert Wilhelm, and Werner Lemberg.
 #
 # This file is part of the FreeType project, and may only be used, modified,
@@ -17,7 +17,7 @@ AC_CONFIG_SRCDIR([ftconfig.in])
 
 # Don't forget to update docs/VERSION.DLL!
 
-version_info='9:10:3'
+version_info='9:11:3'
 AC_SUBST([version_info])
 ft_version=`echo $version_info | tr : .`
 AC_SUBST([ft_version])
diff --git a/docs/CHANGES b/docs/CHANGES
index 46bb3ab..ea7cd1c 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -1,4 +1,4 @@
-CHANGES BETWEEN 2.2.2 and 2.2.1
+CHANGES BETWEEN 2.3.0 and 2.2.1
 
   I. IMPORTANT BUG FIXES
 
@@ -127,8 +127,9 @@ CHANGES BETWEEN 2.2.2 and 2.2.1
     - Better support for Mac  Fonts on POSIX systems, plus compilation
       fixes for PPC64.
 
-    - The TrueTypeGX validator (gxvalid) checks the order of glyph ids
-      in the kern table
+    - The TrueTypeGX validator (gxvalid) checks the order of glyph IDs
+      in the kern table.
+
 
 ======================================================================
 
diff --git a/docs/VERSION.DLL b/docs/VERSION.DLL
index 00fa2cd..df8d8f0 100644
--- a/docs/VERSION.DLL
+++ b/docs/VERSION.DLL
@@ -113,7 +113,7 @@ other release numbers.
 
 ------------------------------------------------------------------------
 
-Copyright 2002, 2003, 2004, 2005, 2006 by
+Copyright 2002, 2003, 2004, 2005, 2006, 2007 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/freetype.h b/include/freetype/freetype.h
index e2eeed4..5954385 100644
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType high-level API and common types (specification only).       */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by                   */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007 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/ftgasp.h b/include/freetype/ftgasp.h
index 07c6883..90c6426 100644
--- a/include/freetype/ftgasp.h
+++ b/include/freetype/ftgasp.h
@@ -22,24 +22,23 @@
 #include <ft2build.h>
 #include FT_FREETYPE_H
 
- /***************************************************************************
-  *
-  * @section:
-  *    gasp_table
-  *
-  * @title:
-  *    Gasp Table
-  *
-  * @abstract:
-  *    Retrieving TrueType GASP table entries
-  *
-  * @description:
-  *   The function @FT_Get_Gasp can be used to query a TrueType or OpenType
-  *   font for specific entries in their GASP table, if any. This is mainly
-  *   useful when implementing native TrueType hinting with the bytecode
-  *   interpreter and when one wants to duplicate the Windows text rendering
-  *   results
-  */
+  /***************************************************************************
+   *
+   * @section:
+   *   gasp_table
+   *
+   * @title:
+   *   Gasp Table
+   *
+   * @abstract:
+   *   Retrieving TrueType `gasp' table entries
+   *
+   * @description:
+   *   The function @FT_Get_Gasp can be used to query a TrueType or OpenType
+   *   font for specific entries in their `gasp' table, if any.  This is
+   *   mainly useful when implementing native TrueType hinting with the
+   *   bytecode interpreter to duplicate the Windows text rendering results.
+   */
 
   /*************************************************************************
    *
@@ -72,7 +71,8 @@
    *   `ClearType' is Microsoft's implementation of LCD rendering, partly
    *   protected by patents.
    *
-   * @since: 2.3.0
+   * @since:
+   *   2.3.0
    */
 #define FT_GASP_NO_TABLE               -1
 #define FT_GASP_DO_GRIDFIT           0x01
@@ -98,7 +98,8 @@
    *   Bit flags (see @FT_GASP_XXX), or @FT_GASP_NO_TABLE is there is no
    *   `gasp' table in the face.
    *
-   * @since: 2.3.0
+   * @since:
+   *   2.3.0
    */
   FT_EXPORT( FT_Int )
   FT_Get_Gasp( FT_Face  face,
diff --git a/include/freetype/ftlcdfil.h b/include/freetype/ftlcdfil.h
index 50416bc..5a6f0cf 100644
--- a/include/freetype/ftlcdfil.h
+++ b/include/freetype/ftlcdfil.h
@@ -5,7 +5,7 @@
 /*    FreeType API for color filtering of subpixel bitmap glyphs           */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 2006 by                                                      */
+/*  Copyright 2006, 2007 by                                                */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -26,27 +26,29 @@
 
 FT_BEGIN_HEADER
 
- /***************************************************************************
-  *
-  * @section:
-  *    lcd_filtering
-  *
-  * @title:
-  *    LCD Filtering
-  *
-  * @abstract:
-  *    Reduce color fringes of LCD-optimized bitmaps
-  *
-  * @description:
-  *   The @FT_Library_SetLcdFilter API can be used to specify a low-pass filter
-  *   to be applied to LCD-optimized bitmaps generated through @FT_Render_Glyph.
-  *   This is useful to reduce color fringes when compared to unfiltered rendering.
-  *
-  *   Note that no filter is active by default, and that this function is
-  *   *not* implemented in default builds of the library. You need to #define
-  *   FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your ftoption.h file in order to
-  *   activate it.
-  */
+  /***************************************************************************
+   *
+   * @section:
+   *   lcd_filtering
+   *
+   * @title:
+   *   LCD Filtering
+   *
+   * @abstract:
+   *   Reduce color fringes of LCD-optimized bitmaps.
+   *
+   * @description:
+   *   The @FT_Library_SetLcdFilter API can be used to specify a low-pass
+   *   filter which is then applied to LCD-optimized bitmaps generated
+   *   through @FT_Render_Glyph.  This is useful to reduce color fringes
+   *   which would occur with unfiltered rendering.
+   *
+   *   Note that no filter is active by default, and that this function is
+   *   *not* implemented in default builds of the library.  You need to
+   *   #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING in your `ftoption.h' file
+   *   in order to activate it.
+   */
+
 
   /****************************************************************************
    *
@@ -68,7 +70,7 @@ FT_BEGIN_HEADER
    *   FT_LCD_FILTER_LIGHT ::
    *     The light filter is a variant that produces less blurriness at the
    *     cost of slightly more color fringes than the default one.  It might
-   *     be better, depending on taste, your monitor or your personal vision.
+   *     be better, depending on taste, your monitor, or your personal vision.
    *
    *   FT_LCD_FILTER_LEGACY ::
    *     This filter corresponds to the original libXft color filter.  It
@@ -80,7 +82,8 @@ FT_BEGIN_HEADER
    *     This filter is only provided for comparison purposes, and might be
    *     disabled or stay unsupported in the future.
    *
-   * @since: 2.3.0
+   * @since:
+   *   2.3.0
    */
   typedef enum
   {
@@ -145,7 +148,8 @@ FT_BEGIN_HEADER
    *   need to modify their layout and glyph positioning code when enabling
    *   the filter.
    *
-   * @since: 2.3.0
+   * @since:
+   *   2.3.0
    */
   FT_EXPORT( FT_Error )
   FT_Library_SetLcdFilter( FT_Library    library,
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 0101b70..7eb2efc 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -1446,7 +1446,7 @@
                                       face_index, aface );
       FT_FREE( data_offsets );
       /* POST exists in an LWFN providing a single face */
-      if (!error)
+      if ( !error )
         (*aface)->num_faces = 1;
       return error;
     }
@@ -1463,7 +1463,7 @@
       error = Mac_Read_sfnt_Resource( library, stream, data_offsets, count,
                                       face_index_internal, aface );
       FT_FREE( data_offsets );
-      if (!error)
+      if ( !error )
         (*aface)->num_faces = count;
     }
 
diff --git a/src/type1/t1load.c b/src/type1/t1load.c
index 8efd5fa..93c9e01 100644
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -1015,15 +1015,6 @@
 
 
   static int
-  is_space( FT_Byte  c )
-  {
-    return ( c == ' '  || c == '\t'              ||
-             c == '\r' || c == '\n' || c == '\f' ||
-             c == '\0'                           );
-  }
-
-
-  static int
   read_binary_data( T1_Parser  parser,
                     FT_Long*   size,
                     FT_Byte**  base )
@@ -1206,9 +1197,9 @@
         /* we stop when we encounter a `def' or `]' */
         if ( *cur == 'd' && cur + 3 < limit )
         {
-          if ( cur[1] == 'e'      &&
-               cur[2] == 'f'      &&
-               is_space( cur[3] ) )
+          if ( cur[1] == 'e'         &&
+               cur[2] == 'f'         &&
+               IS_PS_DELIM( cur[3] ) )
           {
             FT_TRACE6(( "encoding end\n" ));
             cur += 3;
@@ -1488,7 +1479,7 @@
         break;
 
       /* we stop when we find a `def' or `end' keyword */
-      if ( cur + 3 < limit && is_space( cur[3] ) )
+      if ( cur + 3 < limit && IS_PS_DELIM( cur[3] ) )
       {
         if ( cur[0] == 'd' &&
              cur[1] == 'e' &&