shithub: freetype+ttf2subf

Download patch

ref: 8eb0353fec1494ab7d9fe9bb91a5954449ab30c1
parent: 0b3a99153a15e94dc93d50b616724b0f7402af7b
author: Werner Lemberg <[email protected]>
date: Tue Jun 19 19:03:41 EDT 2001

Formatting.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,20 +1,35 @@
 2001-06-19  David Turner  <[email protected]>
 
-        * builds/win32/visualc/freetype.dsp, builds/win32/visualc/index.html:
-        updated the Visual C++ project (for the 2.0.4 release)
+	* builds/win32/visualc/freetype.dsp, builds/win32/visualc/index.html:
+	Updated the Visual C++ project (for the 2.0.4 release).
 
-        * builds/unix/detect.mk: added rule for AIX detection (which uses
-        /usr/sbin/init instead of /sbin/init, go figure..)
+	* builds/unix/detect.mk: Added rule for AIX detection (which uses
+	/usr/sbin/init instead of /sbin/init).
 
-        * include/freetype/fterrors.h: updated some of the error macros to
-        simplify Werner's latest tricks :o)
-        
-        * include/freetype/freetype.h (FT_New_Memory_Face): updated docs
-        
-        Removing _lots_ of compiler warnings when the most pedantic warning
-        levels of Visual C++ and Borland C++ are used. Too many files to be
-        listed here.., but FT2 now compiles without warnings with VC++ and
-        the "/W4" warning level (lint-style)
+	* include/freetype/fterrors.h, src/*/*err*.h: Updated some of the
+	error macros to simplify handling of new error scheme.
+
+2001-06-19  Werner Lemberg  <[email protected]>
+
+	* include/freetype/fttypes.h (FT_ERROR_MODULE): New macro.
+
+2001-06-19  David Turner  <[email protected]>
+
+	Removing _lots_ of compiler warnings when the most pedantic warning
+	levels of Visual C++ and Borland C++ are used.  Too many files to be
+	listed here, but FT2 now compiles without warnings with VC++ and the
+	"/W4" warning level (lint-style).
+
+        * include/freetype/freetype.h (FT_New_Memory_Face): Updated
+	documentation.
+	* include/freetype/fttypes.h (FT_BOOL): New macro.
+	* include/freetype/internal/ftdebug.h: Add #pragma for Visual C++
+	to suppress warning.
+	* include/freetype/internal/ftstream.h (FT_GET_SHORT_{BE,LE},
+	FT_GET_OFF3_{BE,LE}, FT_GET_LONG_{BE,LE}): New macros.
+	(NEXT_*): Use them.
+	* src/autohint/ahglobal.c: Include FT_INTERNAL_DEBUG_H.
+	(FT_New_Memory_Face): Add `const' to function declaration.
 
 2001-06-18  Werner Lemberg  <[email protected]>
 
--- a/include/freetype/freetype.h
+++ b/include/freetype/freetype.h
@@ -1536,10 +1536,10 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   /* <Note>                                                                */
-  /*    the font data bytes are used _directly_ by the @FT_Face object.    */
-  /*    this means that they're not copied, and that the client is         */
+  /*    The font data bytes are used _directly_ by the @FT_Face object.    */
+  /*    This means that they are not copied, and that the client is        */
   /*    responsible for releasing/destroying them _after_ the              */
-  /*    corresponding call to @FT_Done_Face                                */
+  /*    corresponding call to @FT_Done_Face .                              */
   /*                                                                       */
   /*    Unlike FreeType 1.x, this function automatically creates a glyph   */
   /*    slot for the face object which can be accessed directly through    */
--- a/include/freetype/fterrors.h
+++ b/include/freetype/fterrors.h
@@ -13,81 +13,88 @@
 /*  this file you indicate that you have read the license and              */
 /*  understand and accept it fully.                                        */
 /*                                                                         */
-/*                                                                         */
-/*  This special header file is used to define the FT2 enumeration         */
-/*  constants. It can also be used to generate error message strings       */
-/*  with a small macro trick explained below.                              */
-/*                                                                         */
-/*  I - Error Formats:                                                     */
-/*  ------------------                                                     */
-/*                                                                         */
-/*    Since release 2.1, the error constants have changed. The lower byte  */
-/*    of the error value gives the "generic" error code, while the higher  */
-/*    bytes indicates in which module the error occured.                   */
-/*                                                                         */
-/*    You can use the macro FT_ERROR_BASE(x) macro to extract the          */
-/*    generic error code from a FT_Error                                   */
-/*                                                                         */
-/*    The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can       */
-/*    be undefined in ftoption.h in order to make the higher byte always   */
-/*    zero, in case you'd need to be compatible with previous versions     */
-/*    of FT2.                                                              */
-/*                                                                         */
-/*                                                                         */
-/*  II - Error Message strings:                                            */
-/*  ---------------------------                                            */
-/*                                                                         */
-/*    The error definitions below are made through special macros that     */
-/*    allow client applications to build a table of error message strings  */
-/*    if they need it. The strings are not included in a normal build of   */
-/*    FT2 to save space (most client apps do not use them)                 */
-/*                                                                         */
-/*    To do so, you'll need to define the following macros before          */
-/*    including this file:                                                 */
-/*                                                                         */
-/*    FT_ERROR_START_LIST ::                                               */
-/*       this macro is called before anything else to define the           */
-/*       start of the error list. It is followed by several                */
-/*       FT_ERROR_DEF calls (see below)                                    */
-/*                                                                         */
-/*    FT_ERROR_DEF( e, v, s ) ::                                           */
-/*        this macro is called to define one single error.                 */
-/*        'e' is the error code identifier (e.g. FT_Err_Invalid_Argument)  */
-/*        'v' is the error numerical value                                 */
-/*        's' is the corresponding error string                            */
-/*                                                                         */
-/*    FT_ERROR_END_LIST ::                                                 */
-/*        this macro is used to end the list.                              */
-/*                                                                         */
-/*    Additionally, you'll need to undefine __FTERRORS_H__ before          */
-/*    #including this file.                                                */
-/*                                                                         */
-/*    Here's a simple example:                                             */
-/*                                                                         */
-/*     {                                                                   */
-/*       #undef __FTERRORS_H__                                             */
-/*       #define FT_ERRORDEF( e, v, s )   { e, s },                        */
-/*       #define FT_ERROR_START_LIST      {                                */
-/*       #define FT_ERROR_END_LIST        { 0, 0 } };                      */
-/*                                                                         */
-/*       const struct                                                      */
-/*       {                                                                 */
-/*         int          err_code;                                          */
-/*         const char*  err_msg                                            */
-/*       } ft_errors[] =                                                   */
-/*                                                                         */
-/*       #include FT_ERRORS_H                                              */
-/*     }                                                                   */
-/*                                                                         */
-/*                                                                         */
 /***************************************************************************/
 
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This special header file is used to define the FT2 enumeration        */
+  /* constants.  It can also be used to generate error message strings     */
+  /* with a small macro trick explained below.                             */
+  /*                                                                       */
+  /* I - Error Formats                                                     */
+  /* -----------------                                                     */
+  /*                                                                       */
+  /*   Since release 2.1, the error constants have changed.  The lower     */
+  /*   byte of the error value gives the "generic" error code, while the   */
+  /*   higher byte indicates in which module the error occured.            */
+  /*                                                                       */
+  /*   You can use the macro FT_ERROR_BASE(x) macro to extract the generic */
+  /*   error code from an FT_Error value.                                  */
+  /*                                                                       */
+  /*   The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be   */
+  /*   undefined in ftoption.h in order to make the higher byte always     */
+  /*   zero, in case you need to be compatible with previous versions of   */
+  /*   FreeType 2.                                                         */
+  /*                                                                       */
+  /*                                                                       */
+  /* II - Error Message strings                                            */
+  /* --------------------------                                            */
+  /*                                                                       */
+  /*   The error definitions below are made through special macros that    */
+  /*   allow client applications to build a table of error message strings */
+  /*   if they need it.  The strings are not included in a normal build of */
+  /*   FreeType 2 to save space (most client applications do not use       */
+  /*   them).                                                              */
+  /*                                                                       */
+  /*   To do so, you have to define the following macros before including  */
+  /*   this file:                                                          */
+  /*                                                                       */
+  /*   FT_ERROR_START_LIST ::                                              */
+  /*     This macro is called before anything else to define the start of  */
+  /*     the error list.  It is followed by several FT_ERROR_DEF calls     */
+  /*     (see below).                                                      */
+  /*                                                                       */
+  /*   FT_ERROR_DEF( e, v, s ) ::                                          */
+  /*     This macro is called to define one single error.                  */
+  /*     `e' is the error code identifier (e.g. FT_Err_Invalid_Argument).  */
+  /*     `v' is the error numerical value.                                 */
+  /*     `s' is the corresponding error string.                            */
+  /*                                                                       */
+  /*   FT_ERROR_END_LIST ::                                                */
+  /*     This macro ends the list.                                         */
+  /*                                                                       */
+  /*   Additionally, you have to undefine __FTERRORS_H__ before #including */
+  /*   this file.                                                          */
+  /*                                                                       */
+  /*   Here is a simple example:                                           */
+  /*                                                                       */
+  /*     {                                                                 */
+  /*       #undef __FTERRORS_H__                                           */
+  /*       #define FT_ERRORDEF( e, v, s )   { e, s },                      */
+  /*       #define FT_ERROR_START_LIST      {                              */
+  /*       #define FT_ERROR_END_LIST        { 0, 0 } };                    */
+  /*                                                                       */
+  /*       const struct                                                    */
+  /*       {                                                               */
+  /*         int          err_code;                                        */
+  /*         const char*  err_msg                                          */
+  /*       } ft_errors[] =                                                 */
+  /*                                                                       */
+  /*       #include FT_ERRORS_H                                            */
+  /*     }                                                                 */
+  /*                                                                       */
+  /*************************************************************************/
+
+
 #ifndef __FTERRORS_H__
 #define __FTERRORS_H__
 
-/* include module base error codes */
+
+  /* include module base error codes */
 #include FT_MODULE_ERRORS_H
 
+
   /*******************************************************************/
   /*******************************************************************/
   /*****                                                         *****/
@@ -95,73 +102,76 @@
   /*****                                                         *****/
   /*******************************************************************/
   /*******************************************************************/
+
   
-#undef   FT_NEED_EXTERN_C
-#define  FT_ERR_XCAT(x,y)    x ## y
-#define  FT_ERR_CAT(x,y)     FT_ERR_XCAT(x,y)
+#undef  FT_NEED_EXTERN_C
+#define FT_ERR_XCAT( x, y )  x ## y
+#define FT_ERR_CAT( x, y )   FT_ERR_XCAT( x, y )
 
 
-/* FT_ERR_PREFIX is used as a prefix for error identifiers */
-/* by default, we use "FT_Err_"                            */
-/*                                                         */
-#ifndef   FT_ERR_PREFIX
-#  define FT_ERR_PREFIX  FT_Err_
+  /* FT_ERR_PREFIX is used as a prefix for error identifiers. */
+  /* By default, we use `FT_Err_'.                            */
+  /*                                                          */
+#ifndef FT_ERR_PREFIX
+#define FT_ERR_PREFIX  FT_Err_
 #endif
 
 
-
-/* FT_ERR_BASE is used as the base for module-specific errors */
-/*                                                            */
+  /* FT_ERR_BASE is used as the base for module-specific errors. */
+  /*                                                             */
 #ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
-#  ifndef   FT_ERR_BASE
-#    define FT_ERR_BASE  FT_Mod_Err_Base
-#  endif
-#else
-#  define   FT_ERR_BASE  0
+
+#ifndef FT_ERR_BASE
+#define FT_ERR_BASE  FT_Mod_Err_Base
 #endif
 
+#else
 
+#define FT_ERR_BASE  0
 
-/*  if FT_ERRORDEF is not defined, we need to define a simple enumeration */
-/*  type..                                                                */
-/*                                                                        */
+#endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */
+
+
+  /* If FT_ERRORDEF is not defined, we need to define a simple */
+  /* enumeration type.                                         */
+  /*                                                           */
 #ifndef FT_ERRORDEF
 
-#  define FT_ERRORDEF( e, v, s )  e = v,
-#  define FT_ERROR_START_LIST     enum {
-#  define FT_ERROR_END_LIST       FT_ERR_CAT(FT_ERR_PREFIX,Max) };
+#define FT_ERRORDEF( e, v, s )  e = v,
+#define FT_ERROR_START_LIST     enum {
+#define FT_ERROR_END_LIST       FT_ERR_CAT( FT_ERR_PREFIX, Max ) };
 
-#  ifdef __cplusplus
-#    define FT_NEED_EXTERN_C
-      extern "C" {
-#  endif
+#ifdef __cplusplus
+#define FT_NEED_EXTERN_C
+  extern "C" {
+#endif
 
 #endif /* !FT_ERRORDEF */
 
 
-/* this macro is used to define an error */
-#  define FT_ERRORDEF_( e, v, s )   \
-          FT_ERRORDEF( FT_ERR_CAT(FT_ERR_PREFIX,e), v + FT_ERR_BASE, s )
+  /* this macro is used to define an error */
+#define FT_ERRORDEF_( e, v, s )   \
+          FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )
 
+  /* this is only used for FT_Err_Ok, which must be 0! */
+#define FT_NOERRORDEF_( e, v, s ) \
+          FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s )
 
-/* this is only used for FT_Err_Ok, which must be 0 !! */
-#  define FT_NOERRORDEF_( e, v, s ) \
-          FT_ERRORDEF( FT_ERR_CAT(FT_ERR_PREFIX,e), v, s )
 
-
-
   /*******************************************************************/
   /*******************************************************************/
   /*****                                                         *****/
-  /*****                   LIST ERROR CODES/MESSAGES             *****/
+  /*****                LIST OF ERROR CODES/MESSAGES             *****/
   /*****                                                         *****/
   /*******************************************************************/
   /*******************************************************************/
 
+
 #ifdef FT_ERROR_START_LIST
   FT_ERROR_START_LIST
 #endif
 
+
   /* generic errors */
 
   FT_NOERRORDEF_( Ok,                                        0x00, \
@@ -342,10 +352,11 @@
   FT_ERROR_END_LIST
 #endif
 
+
   /*******************************************************************/
   /*******************************************************************/
   /*****                                                         *****/
-  /*****                      SIMPLE CLEANUPP                    *****/
+  /*****                      SIMPLE CLEANUP                     *****/
   /*****                                                         *****/
   /*******************************************************************/
   /*******************************************************************/
--- a/include/freetype/ftmoderr.h
+++ b/include/freetype/ftmoderr.h
@@ -66,25 +66,28 @@
   /*******************************************************************/
   /*******************************************************************/
 
+
 #undef  FT_NEED_EXTERN_C
+
 #ifndef FT_MODERRDEF
 
-#  ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
-#    define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = v,
-#  else
-#    define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = 0,
-#  endif
+#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
+#define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = v,
+#else
+#define FT_MODERRDEF( e, v, s )  FT_Mod_Err_ ## e = 0,
+#endif
 
-#  define FT_MODERR_START_LIST     enum {
-#  define FT_MODERR_END_LIST       FT_Mod_Err_Max };
+#define FT_MODERR_START_LIST  enum {
+#define FT_MODERR_END_LIST    FT_Mod_Err_Max };
 
-#  ifdef __cplusplus
-#    define FT_NEED_EXTERN_C
+#ifdef __cplusplus
+#define FT_NEED_EXTERN_C
   extern "C" {
-#  endif
+#endif
 
 #endif /* !FT_MODERRDEF */
 
+
   /*******************************************************************/
   /*******************************************************************/
   /*****                                                         *****/
@@ -93,6 +96,7 @@
   /*******************************************************************/
   /*******************************************************************/
 
+
 #ifdef FT_MODERR_START_LIST
   FT_MODERR_START_LIST
 #endif
@@ -118,6 +122,7 @@
   FT_MODERR_END_LIST
 #endif
 
+
   /*******************************************************************/
   /*******************************************************************/
   /*****                                                         *****/
@@ -125,6 +130,7 @@
   /*****                                                         *****/
   /*******************************************************************/
   /*******************************************************************/
+
 
 #ifdef FT_NEED_EXTERN_C
   }
--- a/include/freetype/fttypes.h
+++ b/include/freetype/fttypes.h
@@ -510,9 +510,12 @@
 #define FT_IS_EMPTY( list )  ( (list).head == 0 )
 
   /* return base error code (without module-specific prefix) */
-#define FT_ERROR_BASE( x )     ( (x) & 255 )
+#define FT_ERROR_BASE( x )    ( (x) & 0xFF )
 
-#define FT_BOOL(x)             ((FT_Bool)(x))
+  /* return module error code */
+#define FT_ERROR_MODULE( x )  ( (x) & 0xFF00U )
+
+#define FT_BOOL( x )  ( (FT_Bool)( x ) )
 
 FT_END_HEADER
 
--- a/include/freetype/internal/ftdebug.h
+++ b/include/freetype/internal/ftdebug.h
@@ -221,10 +221,11 @@
 #define FT_TRACE6( varformat )  FT_TRACE( 6, varformat )
 #define FT_TRACE7( varformat )  FT_TRACE( 7, varformat )
 
+
 #if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
 
-/* we disable the warnings "conditional expression is constant" here */
-/* in order to compile cleanly with the maximum level of warnings    */
+  /* we disable the warning `conditional expression is constant' here */
+  /* in order to compile cleanly with the maximum level of warnings   */
 #pragma warning( disable : 4127 )
 
 #endif /* _MSC_VER */
--- a/include/freetype/internal/ftstream.h
+++ b/include/freetype/internal/ftstream.h
@@ -144,35 +144,34 @@
   /* type `char*' or equivalent (1-byte elements).                         */
   /*                                                                       */
 
-#define FT_GET_SHORT_BE(p)                         \
-          ((short)( ((signed char)(p)[0] <<  8) |  \
-                                  (p)[1]        ))
+#define FT_GET_SHORT_BE( p )                           \
+          ( (short)( ( (signed char)(p)[0] <<  8 ) |   \
+                                    (p)[1]         ) )
 
-#define FT_GET_OFF3_BE(p)                          \
-          ((long) ( ((signed char)(p)[0] << 16) |  \
-                                 ((p)[1] <<  8) |  \
-                                  (p)[2]        ))
+#define FT_GET_OFF3_BE( p )                            \
+          ( (long) ( ( (signed char)(p)[0] << 16 ) |   \
+                                  ( (p)[1] <<  8 ) |   \
+                                    (p)[2]         ) )
 
-#define FT_GET_LONG_BE(p)                          \
-          ((long) ( ((signed char)(p)[0] << 24) |  \
-                                 ((p)[1] << 16) |  \
-                                 ((p)[2] <<  8) |  \
-                                  (p)[3]        ))
+#define FT_GET_LONG_BE( p )                            \
+          ( (long) ( ( (signed char)(p)[0] << 24 ) |   \
+                                  ( (p)[1] << 16 ) |   \
+                                  ( (p)[2] <<  8 ) |   \
+                                    (p)[3]         ) )
 
-#define FT_GET_SHORT_LE(p)                         \
-          ((short)( ((signed char)(p)[1] <<  8) |  \
-                                  (p)[0]        ))
+#define FT_GET_SHORT_LE( p )                           \
+          ( (short)( ( (signed char)(p)[1] <<  8 ) |   \
+                                    (p)[0]         ) )
 
-#define FT_GET_OFF3_LE(p)                          \
-          ((long) ( ((signed char)(p)[2] << 16) |  \
-                                 ((p)[1] <<  8) |  \
-                                  (p)[0]        ))
+#define FT_GET_OFF3_LE( p )                            \
+          ( (long) ( ( (signed char)(p)[2] << 16 ) |   \
+                                    (p)[0]         ) )
 
-#define FT_GET_LONG_LE(p)                          \
-          ((long) ( ((signed char)(p)[3] << 24) |  \
-                                 ((p)[2] << 16) |  \
-                                 ((p)[1] <<  8) |  \
-                                  (p)[0]        ))
+#define FT_GET_LONG_LE( p )                            \
+          ( (long) ( ( (signed char)(p)[3] << 24 ) |   \
+                                  ( (p)[2] << 16 ) |   \
+                                  ( (p)[1] <<  8 ) |   \
+                                    (p)[0]         ) )
 
 #define NEXT_Char( buffer )            \
           ( (signed char)*buffer++ )
@@ -180,42 +179,42 @@
 #define NEXT_Byte( buffer )            \
           ( (unsigned char)*buffer++ )
 
-#define NEXT_Short( buffer )                              \
-          ( (short)( buffer += 2, FT_GET_SHORT_BE(buffer-2) ) )
+#define NEXT_Short( buffer )                                        \
+          ( (short)( buffer += 2, FT_GET_SHORT_BE( buffer - 2 ) ) )
 
-#define NEXT_UShort( buffer )                      \
+#define NEXT_UShort( buffer )                                       \
           ( (unsigned short)NEXT_Short( buffer ) )
 
 #define NEXT_Offset( buffer )                                     \
-          ( (long)( buffer += 3, FT_GET_OFF3_BE(buffer-3) ) )
+          ( (long)( buffer += 3, FT_GET_OFF3_BE( buffer - 3 ) ) )
 
-#define NEXT_UOffset( buffer )                     \
+#define NEXT_UOffset( buffer )                                    \
           ( (unsigned long)NEXT_Offset( buffer ) )
 
 #define NEXT_Long( buffer )                                       \
-          ( (long)( buffer += 4, FT_GET_LONG_BE(buffer-4) ) )
+          ( (long)( buffer += 4, FT_GET_LONG_BE( buffer - 4 ) ) )
 
-#define NEXT_ULong( buffer )                     \
+#define NEXT_ULong( buffer )                                      \
           ( (unsigned long)NEXT_Long( buffer ) )
 
 
-#define NEXT_ShortLE( buffer )                            \
-          ( (short)( buffer += 2, FT_GET_SHORT_LE(buffer-2) ) )
+#define NEXT_ShortLE( buffer )                                      \
+          ( (short)( buffer += 2, FT_GET_SHORT_LE( buffer - 2 ) ) )
 
-#define NEXT_UShortLE( buffer )                      \
+#define NEXT_UShortLE( buffer )                                     \
           ( (unsigned short)NEXT_ShortLE( buffer ) )
 
-#define NEXT_OffsetLE( buffer )                           \
-          ( (long)( buffer += 3, FT_GET_OFF3_LE(buffer-3) ) )
+#define NEXT_OffsetLE( buffer )                                   \
+          ( (long)( buffer += 3, FT_GET_OFF3_LE( buffer - 3 ) ) )
 
-#define NEXT_UOffsetLE( buffer )                     \
+#define NEXT_UOffsetLE( buffer )                                  \
          ( (unsigned long)NEXT_OffsetLE( buffer ) )
 
 
-#define NEXT_LongLE( buffer )                             \
-          ( (long)( buffer += 4, FT_GET_LONG_LE(buffer-4) ) )
+#define NEXT_LongLE( buffer )                                     \
+          ( (long)( buffer += 4, FT_GET_LONG_LE( buffer - 4 ) ) )
 
-#define NEXT_ULongLE( buffer )                     \
+#define NEXT_ULongLE( buffer )                                    \
           ( (unsigned long)NEXT_LongLE( buffer ) )
 
 
--- a/src/autohint/aherrors.h
+++ b/src/autohint/aherrors.h
@@ -30,8 +30,8 @@
 
 #undef __FTERRORS_H__
 
-#define FT_ERR_PREFIX     AH_Err_
-#define FT_ERR_BASE       FT_Mod_Err_Autohint
+#define FT_ERR_PREFIX  AH_Err_
+#define FT_ERR_BASE    FT_Mod_Err_Autohint
 
 #include FT_ERRORS_H
 
--- a/src/autohint/ahglyph.c
+++ b/src/autohint/ahglyph.c
@@ -558,7 +558,7 @@
         for ( ; contour < contour_limit; contour++, end++ )
         {
           contour[0] = points + index;
-          index      = (short)(end[0] + 1);
+          index      = (short)( end[0] + 1 );
         }
       }
 
@@ -961,7 +961,7 @@
 
             is_dir = (FT_Bool)( seg1->dir == outline->horz_major_dir ||
                                 seg1->dir == outline->vert_major_dir );
-            is_pos = (FT_Bool)(pos1 > pos2);
+            is_pos = (FT_Bool)( pos1 > pos2 );
 
             if ( pos1 == pos2 || !(is_dir ^ is_pos) )
               continue;
@@ -1199,7 +1199,7 @@
 
           /* check for links -- if seg->serif is set, then seg->link must */
           /* be ignored                                                   */
-          is_serif = (FT_Bool)(seg->serif && seg->serif->edge != edge);
+          is_serif = (FT_Bool)( seg->serif && seg->serif->edge != edge );
 
           if ( seg->link || is_serif )
           {
@@ -1371,8 +1371,10 @@
         /* zone, check for left edges                                      */
         /*                                                                 */
         /* of course, that's for TrueType XXX                              */
-        FT_Bool  is_top_blue  = FT_BOOL(AH_IS_TOP_BLUE( blue ));
-        FT_Bool  is_major_dir = FT_BOOL(edge->dir == outline->horz_major_dir);
+        FT_Bool  is_top_blue  =
+                   FT_BOOL( AH_IS_TOP_BLUE( blue ) );
+        FT_Bool  is_major_dir =
+                   FT_BOOL( edge->dir == outline->horz_major_dir );
 
         if ( !blue_active[blue] )
           continue;
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -529,13 +529,17 @@
     FT_UInt        n;
 
 
-    base->outline.n_points   = (short)( base->outline.n_points   + current->outline.n_points );
-    base->outline.n_contours = (short)( base->outline.n_contours + current->outline.n_contours );
-    base->num_subglyphs      += current->num_subglyphs;
+    base->outline.n_points =
+      (short)( base->outline.n_points + current->outline.n_points );
+    base->outline.n_contours =
+      (short)( base->outline.n_contours + current->outline.n_contours );
 
+    base->num_subglyphs += current->num_subglyphs;
+
     /* adjust contours count in newest outline */
     for ( n = 0; n < n_curr_contours; n++ )
-      current->outline.contours[n] = (short)( current->outline.contours[n] + n_base_points );
+      current->outline.contours[n] =
+        (short)( current->outline.contours[n] + n_base_points );
 
     /* prepare for another new glyph image */
     FT_GlyphLoader_Prepare( loader );
@@ -844,10 +848,11 @@
     /* do we need to load the glyph through the auto-hinter? */
     library  = driver->root.library;
     hinter   = library->auto_hinter;
-    autohint = FT_BOOL( hinter                                             &&
+    autohint =
+      FT_BOOL( hinter                                                      &&
                !( load_flags & ( FT_LOAD_NO_SCALE | FT_LOAD_NO_HINTING ) ) &&
-               FT_DRIVER_IS_SCALABLE(driver) &&
-               FT_DRIVER_USES_OUTLINES(driver) );
+               FT_DRIVER_IS_SCALABLE( driver )                             &&
+               FT_DRIVER_USES_OUTLINES( driver )                           );
     if ( autohint )
     {
       if ( FT_DRIVER_HAS_HINTER( driver ) &&
@@ -1172,7 +1177,8 @@
 
     *aface = 0;
 
-    external_stream = FT_BOOL(( args->flags & ft_open_stream ) && args->stream);
+    external_stream = FT_BOOL( ( args->flags & ft_open_stream ) &&
+                               args->stream                     );
 
     /* create input stream */
     error = ft_new_input_stream( library, args, &stream );
--- a/src/base/ftstream.c
+++ b/src/base/ftstream.c
@@ -31,10 +31,10 @@
 #define FT_COMPONENT  trace_stream
 
 
-  FT_BASE_DEF( void )  FT_New_Memory_Stream( FT_Library      library,
-                                             FT_Byte*  base,
-                                             FT_ULong        size,
-                                             FT_Stream       stream )
+  FT_BASE_DEF( void )  FT_New_Memory_Stream( FT_Library  library,
+                                             FT_Byte*    base,
+                                             FT_ULong    size,
+                                             FT_Stream   stream )
   {
     stream->memory = library->memory;
     stream->base   = base;
--- a/src/cache/ftcchunk.c
+++ b/src/cache/ftcchunk.c
@@ -50,9 +50,10 @@
     data->ref_count    = (FT_Short) 0;
     node->cset         = cset;
     node->cset_index   = (FT_UShort)index;
-    node->num_elements = (unsigned short)(( index + 1 < cset->num_chunks )
-                         ? cset->element_count
-                         : cset->element_max - cset->element_count*index );
+    node->num_elements = (unsigned short)(
+                          ( index + 1 < cset->num_chunks )
+                            ? cset->element_count
+                            : cset->element_max - cset->element_count*index );
     if ( alloc )
     {
       /* allocate elements array */
--- a/src/cache/ftcerror.h
+++ b/src/cache/ftcerror.h
@@ -30,8 +30,8 @@
 
 #undef __FTERRORS_H__
 
-#define FT_ERR_PREFIX     FTC_Err_
-#define FT_ERR_BASE       FT_Mod_Err_Cache
+#define FT_ERR_PREFIX  FTC_Err_
+#define FT_ERR_BASE    FT_Mod_Err_Cache
 
 #include FT_ERRORS_H
 
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -225,7 +225,7 @@
   FT_Bool  ftc_image_set_compare( FTC_ImageSet     iset,
                                   FTC_Image_Desc*  type )
   {
-    return FT_BOOL(!memcmp( &iset->description, type, sizeof ( *type ) ));
+    return FT_BOOL( !memcmp( &iset->description, type, sizeof ( *type ) ) );
   }
 
 
--- a/src/cache/ftcmanag.c
+++ b/src/cache/ftcmanag.c
@@ -74,7 +74,7 @@
   {
     FT_UNUSED( lru );
 
-    return FT_BOOL(((FT_Size)node->root.data)->face == (FT_Face)data);
+    return FT_BOOL( ((FT_Size)node->root.data)->face == (FT_Face)data );
   }
 
 
--- a/src/cache/ftcsbits.c
+++ b/src/cache/ftcsbits.c
@@ -317,7 +317,7 @@
   FT_Bool  ftc_sbit_chunk_set_compare( FTC_SBitSet      sset,
                                        FTC_Image_Desc*  type )
   {
-    return FT_BOOL(!memcmp( &sset->desc, type, sizeof ( *type ) ));
+    return FT_BOOL( !memcmp( &sset->desc, type, sizeof ( *type ) ) );
   }
 
 
--- a/src/cff/cfferrs.h
+++ b/src/cff/cfferrs.h
@@ -29,8 +29,8 @@
 
 #undef __FTERRORS_H__
 
-#define FT_ERR_PREFIX     CFF_Err_
-#define FT_ERR_BASE       FT_Mod_Err_CFF
+#define FT_ERR_PREFIX  CFF_Err_
+#define FT_ERR_BASE    FT_Mod_Err_CFF
 
 
 #include FT_ERRORS_H
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -409,7 +409,7 @@
 
       point->x = x >> 16;
       point->y = y >> 16;
-      *control = (FT_Byte)(flag ? FT_Curve_Tag_On : FT_Curve_Tag_Cubic);
+      *control = (FT_Byte)( flag ? FT_Curve_Tag_On : FT_Curve_Tag_Cubic );
 
       builder->last = *point;
     }
@@ -452,7 +452,8 @@
     if ( !error )
     {
       if ( outline->n_contours > 0 )
-        outline->contours[outline->n_contours - 1] = (short)(outline->n_points - 1);
+        outline->contours[outline->n_contours - 1] =
+          (short)( outline->n_points - 1 );
 
       outline->n_contours++;
     }
@@ -512,7 +513,8 @@
     }
 
     if ( outline->n_contours > 0 )
-      outline->contours[outline->n_contours - 1] = (short)(outline->n_points - 1);
+      outline->contours[outline->n_contours - 1] =
+        (short)( outline->n_points - 1 );
   }
 
 
@@ -655,7 +657,7 @@
       FT_Outline  dummy;
 
 
-      dummy.n_points = (short)(base->n_points - n_base_points);
+      dummy.n_points = (short)( base->n_points - n_base_points );
       dummy.points   = base->points   + n_base_points;
 
       FT_Outline_Translate( &dummy, adx, ady );
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -385,10 +385,11 @@
           root->num_glyphs = cff->charstrings_index.count;
 
         /* set global bbox, as well as EM size */
-        root->bbox         = dict->font_bbox;
-        root->ascender     = (FT_Short)( root->bbox.yMax >> 16 );
-        root->descender    = (FT_Short)( root->bbox.yMin >> 16 );
-        root->height       = (FT_Short)(( ( root->ascender - root->descender ) * 12 ) / 10);
+        root->bbox      = dict->font_bbox;
+        root->ascender  = (FT_Short)( root->bbox.yMax >> 16 );
+        root->descender = (FT_Short)( root->bbox.yMin >> 16 );
+        root->height    = (FT_Short)(
+          ( ( root->ascender - root->descender ) * 12 ) / 10 );
 
         if ( dict->units_per_em )
           root->units_per_EM = dict->units_per_em;
--- a/src/cid/ciderrs.h
+++ b/src/cid/ciderrs.h
@@ -29,8 +29,8 @@
 
 #undef __FTERRORS_H__
 
-#define FT_ERR_PREFIX     CID_Err_
-#define FT_ERR_BASE       FT_Mod_Err_CID
+#define FT_ERR_PREFIX  CID_Err_
+#define FT_ERR_BASE    FT_Mod_Err_CID
 
 #include FT_ERRORS_H
 
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -71,7 +71,7 @@
 
 
       plain     = (FT_Byte)( *buffer ^ ( seed >> 8 ) );
-      seed      = (FT_UShort)(( *buffer + seed ) * 52845 + 22719);
+      seed      = (FT_UShort)( ( *buffer + seed ) * 52845 + 22719 );
       *buffer++ = plain;
       length--;
     }
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -223,14 +223,14 @@
         root->num_fixed_sizes = 0;
         root->available_sizes = 0;
 
-        root->bbox         = face->cid.font_bbox;
+        root->bbox = face->cid.font_bbox;
         if ( !root->units_per_EM )
           root->units_per_EM  = 1000;
 
-        root->ascender     = (FT_Short)( face->cid.font_bbox.yMax >> 16 );
-        root->descender    = (FT_Short)( face->cid.font_bbox.yMin >> 16 );
-        root->height       = (FT_Short)( (( root->ascender + root->descender ) * 12 )
-                             / 10 );
+        root->ascender  = (FT_Short)( face->cid.font_bbox.yMax >> 16 );
+        root->descender = (FT_Short)( face->cid.font_bbox.yMin >> 16 );
+        root->height    = (FT_Short)(
+          ( ( root->ascender + root->descender ) * 12 ) / 10 );
 
 
 #if 0
--- a/src/pcf/pcferror.h
+++ b/src/pcf/pcferror.h
@@ -29,8 +29,8 @@
 
 #undef __FTERRORS_H__
 
-#define FT_ERR_PREFIX     PCF_Err_
-#define FT_ERR_BASE       FT_Mod_Err_PCF
+#define FT_ERR_PREFIX  PCF_Err_
+#define FT_ERR_BASE    FT_Mod_Err_PCF
 
 #include FT_ERRORS_H
 
--- a/src/pcf/pcfread.c
+++ b/src/pcf/pcfread.c
@@ -224,12 +224,17 @@
     if ( READ_Fields( pcf_compressed_metric_header, &compr_metric ) )
       return error;
 
-    metric->leftSideBearing  = (FT_Short)(compr_metric.leftSideBearing - 0x80);
-    metric->rightSideBearing = (FT_Short)(compr_metric.rightSideBearing - 0x80);
-    metric->characterWidth   = (FT_Short)(compr_metric.characterWidth - 0x80);
-    metric->ascent           = (FT_Short)(compr_metric.ascent - 0x80);
-    metric->descent          = (FT_Short)(compr_metric.descent - 0x80);
-    metric->attributes       = 0;
+    metric->leftSideBearing =
+      (FT_Short)( compr_metric.leftSideBearing - 0x80 );
+    metric->rightSideBearing =
+      (FT_Short)( compr_metric.rightSideBearing - 0x80 );
+    metric->characterWidth =
+      (FT_Short)( compr_metric.characterWidth - 0x80 );
+    metric->ascent =
+      (FT_Short)( compr_metric.ascent - 0x80 );
+    metric->descent =
+      (FT_Short)( compr_metric.descent - 0x80 );
+    metric->attributes = 0;
   
     return PCF_Err_Ok;
   }
--- a/src/psaux/psauxerr.h
+++ b/src/psaux/psauxerr.h
@@ -30,8 +30,8 @@
 
 #undef __FTERRORS_H__
 
-#define FT_ERR_PREFIX     PSaux_Err_
-#define FT_ERR_BASE       FT_Mod_Err_PSaux
+#define FT_ERR_PREFIX  PSaux_Err_
+#define FT_ERR_BASE    FT_Mod_Err_PSaux
 
 #include FT_ERRORS_H
 
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -925,7 +925,8 @@
     old_limit  = parser->limit;
 
     /* we store the elements count */
-    *(FT_Byte*)( (FT_Byte*)objects[0] + field->count_offset ) = (FT_Byte)num_elements;
+    *(FT_Byte*)( (FT_Byte*)objects[0] + field->count_offset ) =
+      (FT_Byte)num_elements;
 
     /* we now load each element, adjusting the field.offset on each one */
     token = elements;
@@ -1156,7 +1157,7 @@
       }
       point->x = x;
       point->y = y;
-      *control = (FT_Byte)(flag ? FT_Curve_Tag_On : FT_Curve_Tag_Cubic);
+      *control = (FT_Byte)( flag ? FT_Curve_Tag_On : FT_Curve_Tag_Cubic );
 
       builder->last = *point;
     }
@@ -1199,7 +1200,8 @@
     if ( !error )
     {
       if ( outline->n_contours > 0 )
-        outline->contours[outline->n_contours - 1] = (short)(outline->n_points - 1);
+        outline->contours[outline->n_contours - 1] =
+          (short)( outline->n_points - 1 );
 
       outline->n_contours++;
     }
@@ -1260,7 +1262,8 @@
     }
 
     if ( outline->n_contours > 0 )
-      outline->contours[outline->n_contours - 1] = (short)(outline->n_points - 1);
+      outline->contours[outline->n_contours - 1] =
+        (short)( outline->n_points - 1 );
   }
 
 
@@ -1282,8 +1285,8 @@
       FT_Byte  plain;
 
 
-      plain     = (FT_Byte)   ( *buffer ^ ( seed >> 8 ) );
-      seed      = (FT_UShort)(( *buffer + seed ) * 52845 + 22719 );
+      plain     = (FT_Byte)( *buffer ^ ( seed >> 8 ) );
+      seed      = (FT_UShort)( ( *buffer + seed ) * 52845 + 22719 );
       *buffer++ = plain;
       length--;
     }
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -284,8 +284,8 @@
       FT_Outline  dummy;
 
 
-      dummy.n_points = (short)(base->n_points - n_base_points);
-      dummy.points   = base->points   + n_base_points;
+      dummy.n_points = (short)( base->n_points - n_base_points );
+      dummy.points   = base->points + n_base_points;
 
       FT_Outline_Translate( &dummy, adx - asb, ady );
     }
--- a/src/psnames/psnamerr.h
+++ b/src/psnames/psnamerr.h
@@ -30,8 +30,8 @@
 
 #undef __FTERRORS_H__
 
-#define FT_ERR_PREFIX     PSnames_Err_
-#define FT_ERR_BASE       FT_Mod_Err_PSnames
+#define FT_ERR_PREFIX  PSnames_Err_
+#define FT_ERR_BASE    FT_Mod_Err_PSnames
 
 #include FT_ERRORS_H
 
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -1833,7 +1833,9 @@
       ras.state    = Unknown;
       ras.gProfile = NULL;
 
-      if ( Decompose_Curve( RAS_VARS (unsigned short)start, ras.outline.contours[i], flipped ) )
+      if ( Decompose_Curve( RAS_VARS (unsigned short)start,
+                            ras.outline.contours[i],
+                            flipped ) )
         return FAILURE;
 
       start = ras.outline.contours[i] + 1;
@@ -2755,7 +2757,7 @@
       Sort( &draw_right );
 
       y_change = (Short)ras.sizeBuff[-ras.numTurns--];
-      y_height = (Short)(y_change - y);
+      y_height = (Short)( y_change - y );
 
       while ( y < y_change )
       {
@@ -2929,7 +2931,7 @@
         i = ras.band_stack[ras.band_top].y_min;
         j = ras.band_stack[ras.band_top].y_max;
 
-        k = (Short)(( i + j ) / 2);
+        k = (Short)( ( i + j ) / 2 );
 
         if ( ras.band_top >= 7 || k < i )
         {
@@ -2942,7 +2944,7 @@
         ras.band_stack[ras.band_top + 1].y_min = k;
         ras.band_stack[ras.band_top + 1].y_max = j;
 
-        ras.band_stack[ras.band_top].y_max = (Short)(k - 1);
+        ras.band_stack[ras.band_top].y_max = (Short)( k - 1 );
 
         ras.band_top++;
       }
@@ -2980,7 +2982,8 @@
                         ft_outline_high_precision );
     ras.scale_shift    = ras.precision_shift;
     ras.dropOutControl = 2;
-    ras.second_pass    = (FT_Byte)(!( ras.outline.flags & ft_outline_single_pass ));
+    ras.second_pass    = (FT_Byte)( !( ras.outline.flags &
+                                       ft_outline_single_pass ) );
 
     /* Vertical Sweep */
     ras.Proc_Sweep_Init = Vertical_Sweep_Init;
@@ -2990,7 +2993,7 @@
 
     ras.band_top            = 0;
     ras.band_stack[0].y_min = 0;
-    ras.band_stack[0].y_max = (short)(ras.target.rows - 1);
+    ras.band_stack[0].y_max = (short)( ras.target.rows - 1 );
 
     ras.bWidth  = (unsigned short)ras.target.width;
     ras.bTarget = (Byte*)ras.target.buffer;
@@ -3008,7 +3011,7 @@
 
       ras.band_top            = 0;
       ras.band_stack[0].y_min = 0;
-      ras.band_stack[0].y_max = (short)(ras.target.width - 1);
+      ras.band_stack[0].y_max = (short)( ras.target.width - 1 );
 
       if ( ( error = Render_Single_Pass( RAS_VARS 1 ) ) != 0 )
         return error;
--- a/src/raster/rasterrs.h
+++ b/src/raster/rasterrs.h
@@ -30,8 +30,8 @@
 
 #undef __FTERRORS_H__
 
-#define FT_ERR_PREFIX     Raster_Err_
-#define FT_ERR_BASE       FT_Mod_Err_Raster
+#define FT_ERR_PREFIX  Raster_Err_
+#define FT_ERR_BASE    FT_Mod_Err_Raster
 
 #include FT_ERRORS_H
 
--- a/src/sfnt/sferrors.h
+++ b/src/sfnt/sferrors.h
@@ -29,8 +29,8 @@
 
 #undef __FTERRORS_H__
 
-#define FT_ERR_PREFIX     SFNT_Err_
-#define FT_ERR_BASE       FT_Mod_Err_SFNT
+#define FT_ERR_PREFIX  SFNT_Err_
+#define FT_ERR_BASE    FT_Mod_Err_SFNT
 
 #include FT_ERRORS_H
 
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -286,7 +286,7 @@
     /* if this font doesn't contain outlines, we try to load */
     /* a `bhed' table                                        */
     if ( !has_outline )
-      is_apple_sbit = FT_BOOL(!LOAD_( bitmap_header ));
+      is_apple_sbit = FT_BOOL( !LOAD_( bitmap_header ) );
 
 #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
 
@@ -544,7 +544,7 @@
         /* if the line_gap is 0, we add an extra 15% to the text height --  */
         /* this computation is based on various versions of Times New Roman */
         if ( face->horizontal.Line_Gap == 0 )
-          root->height = (FT_Short)(( root->height * 115 + 50 ) / 100 );
+          root->height = (FT_Short)( ( root->height * 115 + 50 ) / 100 );
 
 #if 0
 
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -123,7 +123,7 @@
 
       for ( i = 0; i < 256; i++ )
       {
-        u = (FT_UShort)(GET_UShort() / 8);
+        u = (FT_UShort)( GET_UShort() / 8 );
         cmap2->subHeaderKeys[i] = u;
 
         if ( num_SH < u )
@@ -151,7 +151,8 @@
         cmap2sub->entryCount    = GET_UShort();
         cmap2sub->idDelta       = GET_Short();
         /* we apply the location offset immediately */
-        cmap2sub->idRangeOffset = (FT_UShort)( GET_UShort() - ( num_SH - i ) * 8 - 2 );
+        cmap2sub->idRangeOffset = (FT_UShort)(
+          GET_UShort() - ( num_SH - i ) * 8 - 2 );
 
         cmap2sub++;
       }
@@ -185,7 +186,7 @@
       cmap4->entrySelector = GET_UShort();
       cmap4->rangeShift    = GET_UShort();
 
-      num_Seg = (FT_UShort)(cmap4->segCountX2 / 2);
+      num_Seg = (FT_UShort)( cmap4->segCountX2 / 2 );
 
       FORGET_Frame();
 
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -604,11 +604,13 @@
 
     face->root.num_glyphs = maxProfile->numGlyphs;
 
-    face->root.internal->max_points = (FT_UShort)MAX( maxProfile->maxCompositePoints,
-                                                      maxProfile->maxPoints );
+    face->root.internal->max_points =
+      (FT_UShort)MAX( maxProfile->maxCompositePoints,
+                      maxProfile->maxPoints );
 
-    face->root.internal->max_contours = (FT_Short)MAX( maxProfile->maxCompositeContours,
-                                                       maxProfile->maxContours );
+    face->root.internal->max_contours =
+      (FT_Short)MAX( maxProfile->maxCompositeContours,
+                     maxProfile->maxContours );
 
     face->max_components = (FT_ULong)maxProfile->maxComponentElements +
                            maxProfile->maxComponentDepth;
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -104,10 +104,10 @@
 
     for ( height = target->rows; height > 0; height-- )
     {
-      FT_Byte*  cur   = line_buff;      /* current write cursor          */
-      FT_Int    count = line_bits;      /* # of bits to extract per line */
-      FT_Byte   shift = (FT_Byte)(x_offset & 7); /* current write shift  */
-      FT_Byte   space = (FT_Byte)(8 - shift);
+      FT_Byte*  cur   = line_buff;        /* current write cursor          */
+      FT_Int    count = line_bits;        /* # of bits to extract per line */
+      FT_Byte   shift = (FT_Byte)( x_offset & 7 ); /* current write shift  */
+      FT_Byte   space = (FT_Byte)( 8 - shift );
 
 
       /* first of all, read individual source bytes */
@@ -163,7 +163,7 @@
         }
 
         /* now write remaining bits */
-        val     = (FT_Byte)(( (FT_Byte)( acc >> 8 ) ) & ~( 0xFF >> count ));
+        val     = (FT_Byte)( ( (FT_Byte)( acc >> 8 ) ) & ~( 0xFF >> count ) );
         cur[0] |= val >> shift;
 
         if ( count > space )
@@ -699,7 +699,7 @@
       if ( glyph_index >= (FT_UInt)range->first_glyph &&
            glyph_index <= (FT_UInt)range->last_glyph  )
       {
-        FT_UShort  delta = (FT_UShort)(glyph_index - range->first_glyph);
+        FT_UShort  delta = (FT_UShort)( glyph_index - range->first_glyph );
 
 
         switch ( range->index_format )
@@ -1068,8 +1068,8 @@
 
 
           val    = cur[1];
-          cur[0] = (FT_Byte)(old | ( val >> 7 ));
-          old    = (FT_Byte)(val << 1);
+          cur[0] = (FT_Byte)( old | ( val >> 7 ) );
+          old    = (FT_Byte)( val << 1 );
           cur++;
         }
         cur[0] = old;
@@ -1098,7 +1098,7 @@
 
       line  = (FT_Byte*)map->buffer + ( right >> 3 );
       limit = line + rows * line_len;
-      mask  = (FT_Byte)(0x80 >> ( right & 7 ));
+      mask  = (FT_Byte)( 0x80 >> ( right & 7 ) );
 
       for ( ; line < limit; line += line_len )
         if ( line[0] & mask )
@@ -1452,7 +1452,7 @@
 
       /* some heuristic values */
 
-      metrics->vertBearingX = (FT_Char)(-metrics->width / 2);
+      metrics->vertBearingX = (FT_Char)(-metrics->width / 2 );
       metrics->vertBearingY = (FT_Char)( advance / 10 );
       metrics->vertAdvance  = (FT_Char)( advance * 12 / 10 );
     }
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1308,7 +1308,7 @@
            (int)span->x + span->len == (int)x &&
            span->coverage == coverage )
       {
-        span->len = (unsigned short)(span->len + acount);
+        span->len = (unsigned short)( span->len + acount );
         return;
       }
 
--- a/src/smooth/ftsmerrs.h
+++ b/src/smooth/ftsmerrs.h
@@ -30,8 +30,8 @@
 
 #undef __FTERRORS_H__
 
-#define FT_ERR_PREFIX     Smooth_Err_
-#define FT_ERR_BASE       FT_Mod_Err_Smooth
+#define FT_ERR_PREFIX  Smooth_Err_
+#define FT_ERR_BASE    FT_Mod_Err_Smooth
 
 #include FT_ERRORS_H
 
--- a/src/truetype/tterrors.h
+++ b/src/truetype/tterrors.h
@@ -30,8 +30,8 @@
 
 #undef __FTERRORS_H__
 
-#define FT_ERR_PREFIX     TT_Err_
-#define FT_ERR_BASE       FT_Mod_Err_TrueType
+#define FT_ERR_PREFIX  TT_Err_
+#define FT_ERR_BASE    FT_Mod_Err_TrueType
 
 #include FT_ERRORS_H
 
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -180,8 +180,8 @@
                          FT_UInt        start_point,
                          FT_UInt        start_contour )
   {
-    zone->n_points   = (FT_UShort)(load->outline.n_points - start_point);
-    zone->n_contours = (FT_Short) (load->outline.n_contours - start_contour);
+    zone->n_points   = (FT_UShort)( load->outline.n_points - start_point );
+    zone->n_contours = (FT_Short) ( load->outline.n_contours - start_contour );
     zone->org        = load->extra_points + start_point;
     zone->cur        = load->outline.points + start_point;
     zone->tags       = (FT_Byte*)load->outline.tags + start_point;
@@ -1215,7 +1215,7 @@
         /*                                                     */
         if ( face->os2.version != 0xFFFF )
         {
-          top_bearing    = (FT_Short)(face->os2.sTypoLineGap / 2);
+          top_bearing    = (FT_Short)( face->os2.sTypoLineGap / 2 );
           advance_height = (FT_UShort)( face->os2.sTypoAscender -
                                         face->os2.sTypoDescender +
                                         face->os2.sTypoLineGap );
@@ -1222,7 +1222,7 @@
         }
         else
         {
-          top_bearing    = (FT_Short)(face->horizontal.Line_Gap / 2);
+          top_bearing    = (FT_Short)( face->horizontal.Line_Gap / 2 );
           advance_height = (FT_UShort)( face->horizontal.Ascender  +
                                         face->horizontal.Descender +
                                         face->horizontal.Line_Gap );
--- a/src/type1/t1errors.h
+++ b/src/type1/t1errors.h
@@ -29,8 +29,8 @@
 
 #undef __FTERRORS_H__
 
-#define FT_ERR_PREFIX     T1_Err_
-#define FT_ERR_BASE       FT_Mod_Err_Type1
+#define FT_ERR_PREFIX  T1_Err_
+#define FT_ERR_BASE    FT_Mod_Err_Type1
 
 #include FT_ERRORS_H
 
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -176,7 +176,8 @@
     if ( error )
       goto Exit;
 
-    decoder.builder.no_recurse = FT_BOOL( ( load_flags & FT_LOAD_NO_RECURSE ) != 0 );
+    decoder.builder.no_recurse = FT_BOOL(
+                                   ( load_flags & FT_LOAD_NO_RECURSE ) != 0 );
 
     decoder.num_subrs = type1->num_subrs;
     decoder.subrs     = type1->subrs;
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -278,7 +278,8 @@
 
       root->ascender  = (FT_Short)( face->type1.font_bbox.yMax >> 16 );
       root->descender = (FT_Short)( face->type1.font_bbox.yMin >> 16 );
-      root->height    = (FT_Short)(( ( root->ascender - root->descender ) * 12 ) / 10 );
+      root->height    = (FT_Short)(
+                          ( ( root->ascender - root->descender ) * 12 ) / 10 );
 
       /* now compute the maximum advance width */
       root->max_advance_width =
--- a/src/type1/t1parse.c
+++ b/src/type1/t1parse.c
@@ -436,7 +436,7 @@
             break;
 
           /* otherwise, store byte */
-          *write++ = (FT_Byte)(( hex1 << 4 ) | hexa_value( cur[1] ));
+          *write++ = (FT_Byte)( ( hex1 << 4 ) | hexa_value( cur[1] ) );
           count++;
           cur++;
         }
--- a/src/winfonts/fnterrs.h
+++ b/src/winfonts/fnterrs.h
@@ -30,8 +30,8 @@
 
 #undef __FTERRORS_H__
 
-#define FT_ERR_PREFIX     FNT_Err_
-#define FT_ERR_BASE       FT_Mod_Err_Winfonts
+#define FT_ERR_PREFIX  FNT_Err_
+#define FT_ERR_BASE    FT_Mod_Err_Winfonts
 
 #include FT_ERRORS_H