Commit b4142d5126a77088affded240ee3bd5de823c3b8

Werner Lemberg 2007-01-17T12:45:26

Whitespace and spelling fixes from Alexei. Formatting, copyright years.

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
diff --git a/builds/mac/FreeType.m68k_cfm.make.txt b/builds/mac/FreeType.m68k_cfm.make.txt
index f1520d3..78d65d2 100644
--- a/builds/mac/FreeType.m68k_cfm.make.txt
+++ b/builds/mac/FreeType.m68k_cfm.make.txt
@@ -25,7 +25,7 @@ COptions        = \xB6
 			-d FT2_BUILD_LIBRARY \xB6
 			-d FT_CONFIG_CONFIG_H="<ftconfig.h>" \xB6
 			-d FT_CONFIG_MODULES_H="<ftmodule.h>" \xB6
-			{Includes} {Sym-68K} -model cfmseg 
+			{Includes} {Sym-68K} -model cfmseg
 
 
 ### Source Files ###
@@ -118,7 +118,7 @@ ObjFiles-68K    =  \xB6
 
 ### Libraries ###
 
-LibFiles-68K    = 
+LibFiles-68K    =
 
 
 ### Default Rules ###
diff --git a/builds/mac/FreeType.m68k_far.make.txt b/builds/mac/FreeType.m68k_far.make.txt
index 125d082..c23dead 100644
--- a/builds/mac/FreeType.m68k_far.make.txt
+++ b/builds/mac/FreeType.m68k_far.make.txt
@@ -24,7 +24,7 @@ COptions        = \xB6
 			-d FT2_BUILD_LIBRARY \xB6
 			-d FT_CONFIG_CONFIG_H="<ftconfig.h>" \xB6
 			-d FT_CONFIG_MODULES_H="<ftmodule.h>" \xB6
-			{Includes} {Sym-68K} -model far 
+			{Includes} {Sym-68K} -model far
 
 
 ### Source Files ###
@@ -117,7 +117,7 @@ ObjFiles-68K    =  \xB6
 
 ### Libraries ###
 
-LibFiles-68K    = 
+LibFiles-68K    =
 
 
 ### Default Rules ###
diff --git a/builds/mac/FreeType.ppc_carbon.make.txt b/builds/mac/FreeType.ppc_carbon.make.txt
index 6e9a63f..f8e2d66 100644
--- a/builds/mac/FreeType.ppc_carbon.make.txt
+++ b/builds/mac/FreeType.ppc_carbon.make.txt
@@ -25,7 +25,7 @@ PPCCOptions     = \xB6
 			-d FT2_BUILD_LIBRARY \xB6
 			-d FT_CONFIG_CONFIG_H="<ftconfig.h>" \xB6
 			-d FT_CONFIG_MODULES_H="<ftmodule.h>" \xB6
-			{Includes} {Sym-PPC} -d TARGET_API_MAC_CARBON=1 
+			{Includes} {Sym-PPC} -d TARGET_API_MAC_CARBON=1
 
 
 ### Source Files ###
@@ -118,7 +118,7 @@ ObjFiles-PPC    =  \xB6
 
 ### Libraries ###
 
-LibFiles-PPC    = 
+LibFiles-PPC    =
 
 
 ### Default Rules ###
diff --git a/builds/mac/FreeType.ppc_classic.make.txt b/builds/mac/FreeType.ppc_classic.make.txt
index 56e953b..5c743fd 100644
--- a/builds/mac/FreeType.ppc_classic.make.txt
+++ b/builds/mac/FreeType.ppc_classic.make.txt
@@ -25,7 +25,7 @@ PPCCOptions     = \xB6
 			-d FT2_BUILD_LIBRARY \xB6
 			-d FT_CONFIG_CONFIG_H="<ftconfig.h>" \xB6
 			-d FT_CONFIG_MODULES_H="<ftmodule.h>" \xB6
-			{Includes} {Sym-PPC} 
+			{Includes} {Sym-PPC}
 
 
 ### Source Files ###
@@ -118,7 +118,7 @@ ObjFiles-PPC    =  \xB6
 
 ### Libraries ###
 
-LibFiles-PPC    = 
+LibFiles-PPC    =
 
 
 ### Default Rules ###
diff --git a/builds/mac/README b/builds/mac/README
index 8d92782..e976ca4 100644
--- a/builds/mac/README
+++ b/builds/mac/README
@@ -191,7 +191,7 @@ environment by Metrowerks. GCC for MPW and Symantec
   just updated versions of these by Leonard. Some
   modules are added after the last maintainance, they
   are not included.
-	  
+
   4-2. Working test with ftdemos
   ------------------------------
 
@@ -316,7 +316,7 @@ APPENDIX I
 
       http://www.gyve.org/~mpsuzuki/ats_benchmark.html
 
-  A-3. Framework Availabilities 
+  A-3. Framework Availabilities
   -----------------------------
 
   The framework of MacOS are often revised, especially
@@ -386,7 +386,7 @@ ATSFontGetFileSpecification()         |    x    |    x    |    x    |    x    | 
     there's no InterfaceLib 9.x for m68k platforms.
     In fact, these functions are FSRef dependent.
 
-    (***) 
+    (***)
     ATSUI framework is available on ATSUnicode 8.5 on
     ppc Toolbox CFM, CarbonLib 1.0 too. But its base:
     ATS font manager is not published in these versions.
diff --git a/builds/unix/configure.raw b/builds/unix/configure.raw
index f8f42ea..b52542d 100644
--- a/builds/unix/configure.raw
+++ b/builds/unix/configure.raw
@@ -246,7 +246,7 @@ elif test x$with_old_mac_fonts = xyes -a x$with_fsspec != x; then
   /* FSSpec functions: deprecated sicne Mac OS X 10.4 */
   PBGetFCBInfoSync( paramBlock );
   FSMakeFSSpec( vRefNum, dirID, fileName, spec );
- 
+
     ],
     [AC_MSG_RESULT([ok])
      CFLAGS="$CFLAGS -DHAVE_FSSPEC=1"],
@@ -309,7 +309,7 @@ elif test x$with_old_mac_fonts = xyes -a x$with_fsref != x; then
   FSGetCatalogInfo( ref, whichInfo, catalogInfo,
                     outForkName, spec, ref );
   FSPathMakeRef( path, ref, isDirectory );
- 
+
     ],
     [AC_MSG_RESULT([ok])
      CFLAGS="$CFLAGS -DHAVE_FSREF=1"],
diff --git a/builds/win32/detect.mk b/builds/win32/detect.mk
index 71ab826..7e35060 100644
--- a/builds/win32/detect.mk
+++ b/builds/win32/detect.mk
@@ -76,7 +76,7 @@ ifeq ($(PLATFORM),win32)
   # So we need to hack.
   #
   # Kudos to Eli Zaretskii (DJGPP guru) that helped debug it.
-  # Details are available in threads of the freetype mailing list 
+  # Details are available in threads of the freetype mailing list
   # (2004-11-11), and then in the devel mailing list (2004-11-20 to -23).
   #
   ifeq ($(OS),Windows_NT)
diff --git a/docs/CHANGES b/docs/CHANGES
index d49c189..0fe209f 100644
--- a/docs/CHANGES
+++ b/docs/CHANGES
@@ -15,10 +15,14 @@ CHANGES BETWEEN 2.3.0 and 2.2.1
       monochrome/gray  issues  when   scaling  the  CVT.   Some  fonts
       exhibited bad rendering artifacts otherwise.
 
-    - FT_GlyphSlot_Embolden  now supports  vertical  layouts correctly
+    - `FT_GlyphSlot_Embolden' now  supports vertical layouts correctly
       (it mangled the vertical advance height).
 
-    - Fixed byte endian issues of ftmac.c to support Mac OS X on i386.
+    - Fixed byte  endian issues  of `ftmac.c' to  support Mac OS  X on
+      i386.
+
+    - The  PFR  font loader  no  longer  erroneously  tags font  files
+      without any outlines as FT_FACE_FLAG_SCALABLE.
 
 
   II. NEW API FUNCTIONS
@@ -40,7 +44,7 @@ CHANGES BETWEEN 2.3.0 and 2.2.1
 
     - `FT_Get_Gasp'  allows you  to query  the flags  of  the TrueType
       `gasp' table for  a given character pixel size.   This is useful
-      to duplicate the  text rendering of MS Windows,  when the native
+      to duplicate  the text rendering  of MS Windows when  the native
       bytecode  interpreter is  enabled (which  isn't the  default for
       other patent reasons).
 
@@ -68,7 +72,7 @@ CHANGES BETWEEN 2.3.0 and 2.2.1
       release.
 
       Note  that  the API  hasn't  changed,  so  you can  still  force
-      unpatented hinting  with a special parameter  to FT_Open_Face as
+      unpatented hinting with a special parameter to `FT_Open_Face' as
       well.  This  might be useful in  same cases; for  example, a PDF
       reader might present  a user option to activate  it to deal with
       certain  `tricky'   embedded  fonts  which   cannot  be  clearly
@@ -76,16 +80,16 @@ CHANGES BETWEEN 2.3.0 and 2.2.1
 
       If you are  a developer for embedded systems,  you might want to
       *disable*  the   feature  to  save  code   space  by  undefining
-      TT_CONFIG_OPTION_UNPATENTED_HINTING in ftoption.h.
+      TT_CONFIG_OPTION_UNPATENTED_HINTING in file `ftoption.h'.
 
-    - LCD-optimized rendering is now DISABLED in all default builds of
-      the library, mainly due  to PATENT issues.  For more information
-      see:
+    - LCD-optimized rendering is now  *disabled* in all default builds
+      of  the  library,  mainly   due  to  patent  issues.   For  more
+      information see:
 
       http://lists.gnu.org/archive/html/freetype/2006-09/msg00064.html
 
       A  new  configuration macro  FT_CONFIG_OPTION_SUBPIXEL_RENDERING
-      has been  introduced in ftoption.h;  manually define it  in this
+      has been introduced in  `ftoption.h'; manually define it in this
       file if you want to re-enable the feature.
 
       The  change only  affects the  implementation, not  the FreeType
@@ -105,12 +109,12 @@ CHANGES BETWEEN 2.3.0 and 2.2.1
       differences we had experienced with the Windows renderer.
 
     - It is now possible to cross-compile the library easily.  See the
-      file docs/INSTALL.CROSS for details.
+      file `docs/INSTALL.CROSS' for details.
 
     - The file `src/base/ftmac.c' now contains code for Mac OS X only;
       its  deprecated function  `FT_GetFile_From_Mac_Font_Name' always
-      returns an error even  if QuickDraw framework is available.  The
-      previous version has been moved to `builds/mac/ftmac.c'.
+      returns an  error even if the QuickDraw  framework is available.
+      The previous version has been moved to `builds/mac/ftmac.c'.
 
       Selecting  configure option `--with-quickdraw-carbon'  makes the
       build process use the original `ftmac.c' file instead of the Mac
@@ -123,7 +127,7 @@ CHANGES BETWEEN 2.3.0 and 2.2.1
       performed on  the TrueType and CFF font  loaders, sometimes with
       very drastic  benefits (e.g., the  TrueType loader is  now about
       25% faster;  FreeType should use  less heap memory  under nearly
-      all conditions)
+      all conditions).
 
     - The anti-aliased rasterizer has been optimized and is now 15% to
       25%  percent  faster than  in  previous  versions, depending  on
@@ -132,9 +136,6 @@ CHANGES BETWEEN 2.3.0 and 2.2.1
     - The Type 1 loader has been improved; as an example, it now skips
       top-level dictionaries properly.
 
-    - The  PFR  font loader  no  longer  erroneously  tags font  files
-      without any outlines as FT_FACE_FLAG_SCALABLE.
-
     - Better support for Mac  fonts on POSIX systems, plus compilation
       fixes for Mac OS X on ppc64 where `ftmac.c' cannot be built.
 
@@ -627,7 +628,7 @@ CHANGES BETWEEN 2.1.8 and 2.1.7
         of  various programming  tricks.   Cache hits  are  up to  70%
         faster than in the old code.
 
-      - The  FTC_CMapCache has  been simplied.   Charmaps can  only be
+      - The  FTC_CMapCache has  been simplified.  Charmaps can only be
         accessed by  index right now.  There  is also a  new API named
         `FT_Charmap_GetIndex' for this purpose.
 
@@ -974,7 +975,7 @@ CHANGES BETWEEN 2.1.3 and 2.1.2
 
     - The  automatic and  postscript hinters  have both  been updated.
       This  results in  a relatively  important increase  of rendering
-      quality since  many nasty defaults have  been supressed.  Please
+      quality since  many nasty defaults have been suppressed.  Please
       visit the web page:
 
         http://www.freetype.org/hinting/smooth-hinting.html
@@ -1140,7 +1141,7 @@ CHANGES BETWEEN 2.1.1 and 2.1.0
       glyph bitmaps produced by FreeType 1.x and FreeType 2.x with the
       bytecode  interpreter enabled.   This was  caused by  an invalid
       flag setting in the TrueType glyph loader, making the rasterizer
-      change  its  drop-out   control  mode.   Now  theresults  should
+      change  its  drop-out   control  mode.   Now  the results should
       _really_ be completely identical.
 
     - The TrueType name table loader has been improved to support many
@@ -1638,7 +1639,7 @@ CHANGES BETWEEN 2.0.4 and 2.0.3
   - Updated  the  Unix-specific  portions  of the  build  system  (new
     libtool version, etc.).
 
-  - The  SFNT kerning  lodaer now  ensures  that the  table is  sorted
+  - The  SFNT kerning  loader now  ensures  that the  table is  sorted
     (since some problem fonts do not meet this requirement).
 
 
@@ -1651,7 +1652,7 @@ CHANGES BETWEEN 2.0.3 and 2.0.2
     - THE  AUTO-HINTER HAS  BEEN SLIGHTLY  IMPROVED, in  order  to fix
       several annoying artefacts, mainly:
 
-        - Blue  zone alignement of  horizontal stems  wasn't performed
+        - Blue  zone alignment  of  horizontal stems  wasn't performed
           correctly, resulting in artefacts  like the `d' being placed
           one pixel below the `b' in some fonts like Time New Roman.
 
@@ -1931,7 +1932,7 @@ CHANGES BETWEEN beta8 and 2.0
     * Incorrect glyph names for certain TrueType fonts.
     * The  glyph advance  was not  copied when  FT_Glyph_To_Bitmap was
       called.
-    * The  linearHoriAdvance  and  linerVertAdvance  fields  were  not
+    * The  linearHoriAdvance  and  linearVertAdvance  fields  were not
       correctly returned for glyphs processed by the auto-hinter.
     * `type1z'  renamed back to  `type1'; the  old `type1'  module has
       been removed.
@@ -2554,7 +2555,7 @@ OLD CHANGES - 22-feb-2000
   - introduced the `psnames' module.  It is used to:
 
       o convert  a Postscript glyph  name into the  equivalent Unicode
-        character code (used by the  Type 1 driver(s) to synthetize on
+        character code (used by the  Type 1 driver(s) to synthesize on
         the fly a Unicode charmap).
 
       o provide an  interface to retrieve the Postscript  names of the
@@ -2599,8 +2600,8 @@ TODO
 
   - Write FT_Get_Glyph_Bitmap and FT_Load_Glyph_Bitmap
 
-  - Add a function like FT_Load_Character( face, char_code, load_flags
-    )  that  would really  embbed  a  call  to FT_Get_Char_Index  then
+  - Add a function like FT_Load_Character(face, char_code, load_flags)
+    that  would   really  embed  a  call   to  FT_Get_Char_Index  then
     FT_Load_Glyph to ease developer's work.
 
   - Update the tutorial!
@@ -2639,7 +2640,7 @@ OLDER CHANGES - 27-jan-2000
     fonts.
 
   - very minor  changes in the implementation  of FT_Set_Char_Size and
-    FT_Set_Pixel_Sizes (they now implement default to ligthen the font
+    FT_Set_Pixel_Sizes (they now implement default to lighten the font
     driver's code).
 
 
@@ -2647,8 +2648,8 @@ OLDER CHANGES - 27-jan-2000
 
 OLD MESSAGE
 
-This file summarizes the changes that occured since the last `beta' of
-FreeType 2.  Because  the list is important, it  has been divided into
+This file summarizes the changes  that occurred  since the last `beta'
+of FreeType 2. Because the list is important, it has been divided into
 separate sections:
 
 Table Of Contents:
@@ -2735,7 +2736,7 @@ Glyph Image Formats:
   Drivers are now able to  register new glyph image formats within the
   library.  For  now, the  base layer supports  of course  bitmaps and
   vector  outlines, but  one  could imagine  something different  like
-  colored bitmaps, bi-color vectors or wathever else (Metafonts anyone
+  colored bitmaps, bi-color vectors or whatever else (Metafonts anyone
   ??).
 
   See  the   file  `include/ftimage.h'.   Note  also  that   the  type
diff --git a/docs/INSTALL.CROSS b/docs/INSTALL.CROSS
index 03de60c..1a0c00c 100644
--- a/docs/INSTALL.CROSS
+++ b/docs/INSTALL.CROSS
@@ -79,8 +79,8 @@ INSTALL.UNIX for required tools and the basic self-building procedure.
   3. Building command
   -------------------
 
-    If the configuration finishes successfuly, invoking GNU make builds
-    FreeType2.  Just say
+    If  the  configuration  finishes successfully,  invoking  GNU make
+    builds FreeType2.  Just say
 
       make
 
diff --git a/docs/INSTALL.GNU b/docs/INSTALL.GNU
index 6309f82..7b588cb 100644
--- a/docs/INSTALL.GNU
+++ b/docs/INSTALL.GNU
@@ -77,7 +77,7 @@ in the file INSTALL.UNIX instead.
 
     If the build system correctly detected your platform, but you want
     to use a different compiler  than the one specified in the summary
-    (for most platforms, gcc is  the defaut compiler), invoke GNU Make
+    (for most platforms, gcc is the default compiler), invoke GNU Make
     with
 
       make setup <compiler>
diff --git a/docs/INSTALL.VMS b/docs/INSTALL.VMS
index 7d3ee6e..994e566 100644
--- a/docs/INSTALL.VMS
+++ b/docs/INSTALL.VMS
@@ -21,10 +21,10 @@ process relies on this to figure the location of the Freetype2 include
 files.
 
 
-To rebuild the  sources it is neccessary to  have MMS/MMK installed on
+To rebuild  the  sources it is necessary to  have MMS/MMK installed on
 the system.
 
-The library is avalaible in the directory
+The library is available in the directory
 
   [.LIB]
 
diff --git a/docs/raster.txt b/docs/raster.txt
index a70926c..c263398 100644
--- a/docs/raster.txt
+++ b/docs/raster.txt
@@ -331,7 +331,7 @@ II. Rendering Technology
 
     The  render pool doesn't  need to  be large.   A 4KByte  pool is
     enough for nearly all renditions, though nearly 100% slower than
-    a more confortable 16KByte or 32KByte pool (that was tested with
+    a more comfortable 16KByte or 32KByte pool (that was tested with
     complex glyphs at sizes over 500 pixels).
 
 
@@ -545,8 +545,8 @@ II. Rendering Technology
                                  compute its intersections with the
                                  drawn scanlines.  As already
       ---------------------      mentioned this can be done
-                                 directly, but the involed algorithm
-          * P2         _---# P3  is far too slow.
+                                 directly, but the involved
+          * P2         _---# P3  algorithm is far too slow.
       ------------- _--  --
                   _-
                 _/               Instead, it is still possible to
diff --git a/src/autofit/aflatin.c b/src/autofit/aflatin.c
index cb85e9d..fbb9e15 100644
--- a/src/autofit/aflatin.c
+++ b/src/autofit/aflatin.c
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    Auto-fitter hinting routines for latin script (body).                */
 /*                                                                         */
-/*  Copyright 2003, 2004, 2005, 2006 by                                    */
+/*  Copyright 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,       */
@@ -723,7 +723,8 @@
 
             segment->min_coord = (FT_Short)min_pos;
             segment->max_coord = (FT_Short)max_pos;
-            segment->height    = (FT_Short)(segment->max_coord - segment->min_coord);
+            segment->height    = (FT_Short)( segment->max_coord -
+                                             segment->min_coord );
 
             on_edge = 0;
             segment = NULL;
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index 921557c..1f04728 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -337,8 +337,8 @@
                                                          cff->psnames );
       font_info->italic_angle        = dict->italic_angle;
       font_info->is_fixed_pitch      = dict->is_fixed_pitch;
-      font_info->underline_position  = (FT_Short) dict->underline_position;
-      font_info->underline_thickness = (FT_Short) dict->underline_thickness;
+      font_info->underline_position  = (FT_Short)dict->underline_position;
+      font_info->underline_thickness = (FT_Short)dict->underline_thickness;
 
       cff->font_info = font_info;
     }
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 9d751f9..640001b 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -5417,7 +5417,8 @@
       first_point = (FT_UShort)( CUR.pts.contours[contour - 1] + 1 -
                                  CUR.pts.first_point );
 
-    last_point = (FT_UShort)(CUR.pts.contours[contour] - CUR.pts.first_point);
+    last_point = (FT_UShort)( CUR.pts.contours[contour] -
+                              CUR.pts.first_point );
 
     /* XXX: this is probably wrong... at least it prevents memory */
     /*      corruption when zp2 is the twilight zone              */
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index f4665d8..9f8683a 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -292,7 +292,8 @@
         }
       }
 
-      ttface->internal->ignore_unpatented_hinter = FT_BOOL(!unpatented_hinting);
+      ttface->internal->ignore_unpatented_hinter =
+        FT_BOOL( !unpatented_hinting );
     }
 
 #endif /* TT_CONFIG_OPTION_UNPATENTED_HINTING &&