* massive re-formatting changes to many, many source files. I don't
    want to list them all here. The operations performed were all logical
    transformations of the sources:

      - trying to convert all enums and constants to CAPITALIZED_STYLE, with
        #define definitions like

          #define  my_old_constants   MY_NEW_CONSTANT

      - big, big update of the documentation comments

    * include/freetype/freetype.h, src/base/ftobjs.c, src/smooth/ftsmooth.c,
    include/freetype/ftimage.h: adding support for LCD-optimized rendering
    though the new constants/enums:

      FT_RENDER_MODE_LCD, FT_RENDER_MODE_LCD_V
      FT_PIXEL_MODE_LCD,  FT_PIXEL_MODE_LCD_V

    this is still work in progress, don't expect everything to work correctly
    though most of the features have been implemented.

    * adding new FT_LOAD_XXX flags, used to specify both hinting and rendering
    targets:

      FT_LOAD_TARGET_NORMAL :: anti-aliased hinting & rendering
      FT_LOAD_TARGET_MONO   :: monochrome bitmaps
      FT_LOAD_TARGET_LCD    :: horizontal RGB/BGR decimated hinting & rendering
      FT_LOAD_TARGET_LCD_V  :: vertical RGB/BGR decimated hinting & rendering

    note that FT_LOAD_TARGET_NORMAL is 0, which means that the default
    behaviour of the font engine is _unchanged_.
diff --git a/src/autohint/ahglobal.c b/src/autohint/ahglobal.c
index 3924ffb..f9c3a8d 100644
--- a/src/autohint/ahglobal.c
+++ b/src/autohint/ahglobal.c
@@ -28,7 +28,7 @@
 #define MAX_TEST_CHARACTERS  12
 
   static
-  const char*  blue_chars[ah_blue_max] =
+  const char*  blue_chars[AH_BLUE_MAX] =
   {
     "THEZOCQS",
     "HEZLOCUS",
@@ -62,10 +62,10 @@
 
 
   static FT_Error
-  ah_hinter_compute_blues( AH_Hinter*  hinter )
+  ah_hinter_compute_blues( AH_Hinter  hinter )
   {
     AH_Blue       blue;
-    AH_Globals*   globals = &hinter->globals->design;
+    AH_Globals    globals = &hinter->globals->design;
     FT_Pos        flats [MAX_TEST_CHARACTERS];
     FT_Pos        rounds[MAX_TEST_CHARACTERS];
     FT_Int        num_flats;
@@ -84,7 +84,7 @@
     charmap = face->charmap;
 
     /* do we have a Unicode charmap in there? */
-    error = FT_Select_Charmap( face, ft_encoding_unicode );
+    error = FT_Select_Charmap( face, FT_ENCODING_UNICODE );
     if ( error )
       goto Exit;
 
@@ -95,7 +95,7 @@
     AH_LOG(( "blue zones computation\n" ));
     AH_LOG(( "------------------------------------------------\n" ));
 
-    for ( blue = ah_blue_capital_top; blue < ah_blue_max; blue++ )
+    for ( blue = AH_BLUE_CAPITAL_TOP; blue < AH_BLUE_MAX; blue++ )
     {
       const char*  p     = blue_chars[blue];
       const char*  limit = p + MAX_TEST_CHARACTERS;
@@ -216,8 +216,8 @@
 
           /* now, set the `round' flag depending on the segment's kind */
           round = FT_BOOL(
-            FT_CURVE_TAG( glyph->outline.tags[prev] ) != FT_Curve_Tag_On ||
-            FT_CURVE_TAG( glyph->outline.tags[next] ) != FT_Curve_Tag_On );
+            FT_CURVE_TAG( glyph->outline.tags[prev] ) != FT_CURVE_TAG_ON ||
+            FT_CURVE_TAG( glyph->outline.tags[next] ) != FT_CURVE_TAG_ON );
 
           AH_LOG(( "%c ", round ? 'r' : 'f' ));
         }
@@ -286,13 +286,13 @@
 
 
   static FT_Error
-  ah_hinter_compute_widths( AH_Hinter*  hinter )
+  ah_hinter_compute_widths( AH_Hinter  hinter )
   {
     /* scan the array of segments in each direction */
-    AH_Outline*  outline = hinter->glyph;
-    AH_Segment*  segments;
-    AH_Segment*  limit;
-    AH_Globals*  globals = &hinter->globals->design;
+    AH_Outline   outline = hinter->glyph;
+    AH_Segment   segments;
+    AH_Segment   limit;
+    AH_Globals   globals = &hinter->globals->design;
     FT_Pos*      widths;
     FT_Int       dimension;
     FT_Int*      p_num_widths;
@@ -334,8 +334,8 @@
 
     for ( dimension = 1; dimension >= 0; dimension-- )
     {
-      AH_Segment*  seg = segments;
-      AH_Segment*  link;
+      AH_Segment   seg = segments;
+      AH_Segment   link;
       FT_Int       num_widths = 0;
 
 
@@ -384,7 +384,7 @@
 
 
   FT_LOCAL_DEF( FT_Error )
-  ah_hinter_compute_globals( AH_Hinter*  hinter )
+  ah_hinter_compute_globals( AH_Hinter  hinter )
   {
     return ah_hinter_compute_widths( hinter ) ||
            ah_hinter_compute_blues ( hinter );
diff --git a/src/autohint/ahglobal.h b/src/autohint/ahglobal.h
index 6dbd711..9d557b9 100644
--- a/src/autohint/ahglobal.h
+++ b/src/autohint/ahglobal.h
@@ -32,13 +32,13 @@
 FT_BEGIN_HEADER
 
 
-#define AH_IS_TOP_BLUE( b )  ( (b) == ah_blue_capital_top || \
-                               (b) == ah_blue_small_top   )
+#define AH_IS_TOP_BLUE( b )  ( (b) == AH_BLUE_CAPITAL_TOP || \
+                               (b) == AH_BLUE_SMALL_TOP   )
 
 
   /* compute global metrics automatically */
   FT_LOCAL( FT_Error )
-  ah_hinter_compute_globals( AH_Hinter*  hinter );
+  ah_hinter_compute_globals( AH_Hinter  hinter );
 
 
 FT_END_HEADER
diff --git a/src/autohint/ahglyph.c b/src/autohint/ahglyph.c
index 1268ee0..46700d2 100644
--- a/src/autohint/ahglyph.c
+++ b/src/autohint/ahglyph.c
@@ -32,11 +32,11 @@
 #include <stdio.h>
 
   void
-  ah_dump_edges( AH_Outline*  outline )
+  ah_dump_edges( AH_Outline   outline )
   {
-    AH_Edge*     edges;
-    AH_Edge*     edge_limit;
-    AH_Segment*  segments;
+    AH_Edge      edges;
+    AH_Edge      edge_limit;
+    AH_Segment   segments;
     FT_Int       dimension;
 
 
@@ -46,7 +46,7 @@
 
     for ( dimension = 1; dimension >= 0; dimension-- )
     {
-      AH_Edge*  edge;
+      AH_Edge   edge;
 
 
       printf ( "Table of %s edges:\n",
@@ -59,13 +59,13 @@
         printf ( "  [ %5d | %4d | %5s | %4d | %5d |  %c  | %5.2f | %5.2f ]\n",
                  edge - edges,
                  (int)edge->fpos,
-                 edge->dir == ah_dir_up
+                 edge->dir == AH_DIR_UP
                    ? "up"
-                   : ( edge->dir == ah_dir_down
+                   : ( edge->dir == AH_DIR_DOWN
                          ? "down"
-                         : ( edge->dir == ah_dir_left
+                         : ( edge->dir == AH_DIR_LEFT
                                ? "left"
-                               : ( edge->dir == ah_dir_right
+                               : ( edge->dir == AH_DIR_RIGHT
                                      ? "right"
                                      : "none" ) ) ),
                  edge->link ? ( edge->link - edges ) : -1,
@@ -84,11 +84,11 @@
 
   /* A function used to dump the array of linked segments */
   void
-  ah_dump_segments( AH_Outline*  outline )
+  ah_dump_segments( AH_Outline   outline )
   {
-    AH_Segment*  segments;
-    AH_Segment*  segment_limit;
-    AH_Point*    points;
+    AH_Segment   segments;
+    AH_Segment   segment_limit;
+    AH_Point     points;
     FT_Int       dimension;
 
 
@@ -98,7 +98,7 @@
 
     for ( dimension = 1; dimension >= 0; dimension-- )
     {
-      AH_Segment*  seg;
+      AH_Segment   seg;
 
 
       printf ( "Table of %s segments:\n",
@@ -111,13 +111,13 @@
         printf ( "  [ %5d | %4d | %5s | %4d | %5d | %4d | %5d | %5d ]\n",
                  seg - segments,
                  (int)seg->pos,
-                 seg->dir == ah_dir_up
+                 seg->dir == AH_DIR_UP
                    ? "up"
-                   : ( seg->dir == ah_dir_down
+                   : ( seg->dir == AH_DIR_DOWN
                          ? "down"
-                         : ( seg->dir == ah_dir_left
+                         : ( seg->dir == AH_DIR_LEFT
                                ? "left"
-                               : ( seg->dir == ah_dir_right
+                               : ( seg->dir == AH_DIR_RIGHT
                                      ? "right"
                                      : "none" ) ) ),
                  seg->link ? (seg->link-segments) : -1,
@@ -145,17 +145,17 @@
     FT_Pos        ay = ABS( dy );
 
 
-    dir = ah_dir_none;
+    dir = AH_DIR_NONE;
 
     /* test for vertical direction */
     if ( ax * 12 < ay )
     {
-      dir = dy > 0 ? ah_dir_up : ah_dir_down;
+      dir = dy > 0 ? AH_DIR_UP : AH_DIR_DOWN;
     }
     /* test for horizontal direction */
     else if ( ay * 12 < ax )
     {
-      dir = dx > 0 ? ah_dir_right : ah_dir_left;
+      dir = dx > 0 ? AH_DIR_RIGHT : AH_DIR_LEFT;
     }
 
     return dir;
@@ -209,7 +209,7 @@
 
 
   /* Compute the orientation of path filling.  It differs between TrueType */
-  /* and Type1 formats.  We could use the `ft_outline_reverse_fill' flag,  */
+  /* and Type1 formats.  We could use the `FT_OUTLINE_REVERSE_FILL' flag,  */
   /* but it is better to re-compute it directly (it seems that this flag   */
   /* isn't correctly set for some weird composite glyphs currently).       */
   /*                                                                       */
@@ -298,14 +298,14 @@
   /*    ah_outline_new                                                     */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Creates a new and empty AH_Outline object.                         */
+  /*    Creates a new and empty AH_OutlineRec object.                         */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
   ah_outline_new( FT_Memory     memory,
-                  AH_Outline**  aoutline )
+                  AH_Outline *  aoutline )
   {
     FT_Error     error;
-    AH_Outline*  outline;
+    AH_Outline   outline;
 
 
     if ( !FT_NEW( outline ) )
@@ -324,10 +324,10 @@
   /*    ah_outline_done                                                    */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Destroys a given AH_Outline object.                                */
+  /*    Destroys a given AH_OutlineRec object.                                */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  ah_outline_done( AH_Outline*  outline )
+  ah_outline_done( AH_Outline   outline )
   {
     FT_Memory memory = outline->memory;
 
@@ -347,15 +347,15 @@
   /*    ah_outline_save                                                    */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Saves the content of a given AH_Outline object into a face's glyph */
+  /*    Saves the content of a given AH_OutlineRec object into a face's glyph */
   /*    slot.                                                              */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  ah_outline_save( AH_Outline*  outline,
+  ah_outline_save( AH_Outline   outline,
                    AH_Loader    gloader )
   {
-    AH_Point*   point       = outline->points;
-    AH_Point*   point_limit = point + outline->num_points;
+    AH_Point    point       = outline->points;
+    AH_Point    point_limit = point + outline->num_points;
     FT_Vector*  vec         = gloader->current.outline.points;
     char*       tag         = gloader->current.outline.tags;
 
@@ -366,12 +366,12 @@
       vec->x = point->x;
       vec->y = point->y;
 
-      if ( point->flags & ah_flag_conic )
-        tag[0] = FT_Curve_Tag_Conic;
-      else if ( point->flags & ah_flag_cubic )
-        tag[0] = FT_Curve_Tag_Cubic;
+      if ( point->flags & AH_FLAG_CONIC )
+        tag[0] = FT_CURVE_TAG_CONIC;
+      else if ( point->flags & AH_FLAG_CUBIC )
+        tag[0] = FT_CURVE_TAG_CUBIC;
       else
-        tag[0] = FT_Curve_Tag_On;
+        tag[0] = FT_CURVE_TAG_ON;
     }
   }
 
@@ -382,11 +382,11 @@
   /*    ah_outline_load                                                    */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Loads an unscaled outline from a glyph slot into an AH_Outline     */
+  /*    Loads an unscaled outline from a glyph slot into an AH_OutlineRec     */
   /*    object.                                                            */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  ah_outline_load( AH_Outline*  outline,
+  ah_outline_load( AH_Outline   outline,
                    FT_Face      face )
   {
     FT_Memory   memory       = outline->memory;
@@ -394,13 +394,13 @@
     FT_Outline* source       = &face->glyph->outline;
     FT_Int      num_points   = source->n_points;
     FT_Int      num_contours = source->n_contours;
-    AH_Point*   points;
+    AH_Point    points;
 
 
     /* check arguments */
     if ( !face                                          ||
          !face->size                                    ||
-         face->glyph->format != ft_glyph_format_outline )
+         face->glyph->format != FT_GLYPH_FORMAT_OUTLINE )
       return AH_Err_Invalid_Argument;
 
     /* first of all, reallocate the contours array if necessary */
@@ -450,13 +450,13 @@
     /* direction used for a glyph, given that some fonts are broken (e.g. */
     /* the Arphic ones). We thus recompute it each time we need to.       */
     /*                                                                    */
-    outline->vert_major_dir = ah_dir_up;
-    outline->horz_major_dir = ah_dir_left;
+    outline->vert_major_dir = AH_DIR_UP;
+    outline->horz_major_dir = AH_DIR_LEFT;
 
     if ( ah_get_orientation( source ) > 1 )
     {
-      outline->vert_major_dir = ah_dir_down;
-      outline->horz_major_dir = ah_dir_right;
+      outline->vert_major_dir = AH_DIR_DOWN;
+      outline->horz_major_dir = AH_DIR_RIGHT;
     }
 
     outline->x_scale = face->size->metrics.x_scale;
@@ -469,8 +469,8 @@
     {
       /* do one thing at a time -- it is easier to understand, and */
       /* the code is clearer                                       */
-      AH_Point*  point;
-      AH_Point*  point_limit = points + outline->num_points;
+      AH_Point   point;
+      AH_Point   point_limit = points + outline->num_points;
 
 
       /* compute coordinates */
@@ -500,10 +500,10 @@
         {
           switch ( FT_CURVE_TAG( *tag ) )
           {
-          case FT_Curve_Tag_Conic:
-            point->flags = ah_flag_conic; break;
-          case FT_Curve_Tag_Cubic:
-            point->flags = ah_flag_cubic; break;
+          case FT_CURVE_TAG_CONIC:
+            point->flags = AH_FLAG_CONIC; break;
+          case FT_CURVE_TAG_CUBIC:
+            point->flags = AH_FLAG_CUBIC; break;
           default:
             ;
           }
@@ -513,9 +513,9 @@
       /* compute `next' and `prev' */
       {
         FT_Int     contour_index;
-        AH_Point*  prev;
-        AH_Point*  first;
-        AH_Point*  end;
+        AH_Point   prev;
+        AH_Point   first;
+        AH_Point   end;
 
 
         contour_index = 0;
@@ -548,8 +548,8 @@
 
       /* set-up the contours array */
       {
-        AH_Point**  contour       = outline->contours;
-        AH_Point**  contour_limit = contour + outline->num_contours;
+        AH_Point *  contour       = outline->contours;
+        AH_Point *  contour_limit = contour + outline->num_contours;
         short*      end           = source->contours;
         short       idx           = 0;
 
@@ -565,8 +565,8 @@
       {
         for ( point = points; point < point_limit; point++ )
         {
-          AH_Point*  prev;
-          AH_Point*  next;
+          AH_Point   prev;
+          AH_Point   next;
           FT_Vector  ivec, ovec;
 
 
@@ -583,17 +583,17 @@
           point->out_dir = ah_compute_direction( ovec.x, ovec.y );
 
 #ifndef AH_OPTION_NO_WEAK_INTERPOLATION
-          if ( point->flags & (ah_flag_conic | ah_flag_cubic) )
+          if ( point->flags & (AH_FLAG_CONIC | AH_FLAG_CUBIC) )
           {
           Is_Weak_Point:
-            point->flags |= ah_flag_weak_interpolation;
+            point->flags |= AH_FLAG_WEAK_INTERPOLATION;
           }
           else if ( point->out_dir == point->in_dir )
           {
             AH_Angle  angle_in, angle_out, delta;
 
 
-            if ( point->out_dir != ah_dir_none )
+            if ( point->out_dir != AH_DIR_NONE )
               goto Is_Weak_Point;
 
             angle_in  = ah_angle( &ivec );
@@ -622,11 +622,11 @@
 
 
   FT_LOCAL_DEF( void )
-  ah_setup_uv( AH_Outline*  outline,
+  ah_setup_uv( AH_Outline   outline,
                AH_UV        source )
   {
-    AH_Point*  point       = outline->points;
-    AH_Point*  point_limit = point + outline->num_points;
+    AH_Point   point       = outline->points;
+    AH_Point   point_limit = point + outline->num_points;
 
 
     for ( ; point < point_limit; point++ )
@@ -636,31 +636,31 @@
 
       switch ( source )
       {
-      case ah_uv_fxy:
+      case AH_UV_FXY:
         u = point->fx;
         v = point->fy;
         break;
-      case ah_uv_fyx:
+      case AH_UV_FYX:
         u = point->fy;
         v = point->fx;
         break;
-      case ah_uv_oxy:
+      case AH_UV_OXY:
         u = point->ox;
         v = point->oy;
         break;
-      case ah_uv_oyx:
+      case AH_UV_OYX:
         u = point->oy;
         v = point->ox;
         break;
-      case ah_uv_yx:
+      case AH_UV_YX:
         u = point->y;
         v = point->x;
         break;
-      case ah_uv_ox:
+      case AH_UV_OX:
         u = point->x;
         v = point->ox;
         break;
-      case ah_uv_oy:
+      case AH_UV_OY:
         u = point->y;
         v = point->oy;
         break;
@@ -677,25 +677,25 @@
 
   /* compute all inflex points in a given glyph */
   static void
-  ah_outline_compute_inflections( AH_Outline*  outline )
+  ah_outline_compute_inflections( AH_Outline   outline )
   {
-    AH_Point**  contour       =  outline->contours;
-    AH_Point**  contour_limit =  contour + outline->num_contours;
+    AH_Point *  contour       =  outline->contours;
+    AH_Point *  contour_limit =  contour + outline->num_contours;
 
 
     /* load original coordinates in (u,v) */
-    ah_setup_uv( outline, ah_uv_fxy );
+    ah_setup_uv( outline, AH_UV_FXY );
 
     /* do each contour separately */
     for ( ; contour < contour_limit; contour++ )
     {
       FT_Vector  vec;
-      AH_Point*  point   = contour[0];
-      AH_Point*  first   = point;
-      AH_Point*  start   = point;
-      AH_Point*  end     = point;
-      AH_Point*  before;
-      AH_Point*  after;
+      AH_Point   point   = contour[0];
+      AH_Point   first   = point;
+      AH_Point   start   = point;
+      AH_Point   end     = point;
+      AH_Point   before;
+      AH_Point   after;
       AH_Angle   angle_in, angle_seg, angle_out;
       AH_Angle   diff_in, diff_out;
       FT_Int     finished = 0;
@@ -770,12 +770,12 @@
 
           do
           {
-            start->flags |= ah_flag_inflection;
+            start->flags |= AH_FLAG_INFLECTION;
             start = start->next;
 
           } while ( start != end );
 
-          start->flags |= ah_flag_inflection;
+          start->flags |= AH_FLAG_INFLECTION;
         }
 
         start     = end;
@@ -792,10 +792,10 @@
 
 
   FT_LOCAL_DEF( void )
-  ah_outline_compute_segments( AH_Outline*  outline )
+  ah_outline_compute_segments( AH_Outline   outline )
   {
     int           dimension;
-    AH_Segment*   segments;
+    AH_Segment    segments;
     FT_Int*       p_num_segments;
     AH_Direction  segment_dir;
     AH_Direction  major_dir;
@@ -803,22 +803,22 @@
 
     segments       = outline->horz_segments;
     p_num_segments = &outline->num_hsegments;
-    major_dir      = ah_dir_right;      /* This value must be positive! */
+    major_dir      = AH_DIR_RIGHT;      /* This value must be positive! */
     segment_dir    = major_dir;
 
     /* set up (u,v) in each point */
-    ah_setup_uv( outline, ah_uv_fyx );
+    ah_setup_uv( outline, AH_UV_FYX );
 
     for ( dimension = 1; dimension >= 0; dimension-- )
     {
-      AH_Point**   contour       =  outline->contours;
-      AH_Point**   contour_limit =  contour + outline->num_contours;
-      AH_Segment*  segment       =  segments;
+      AH_Point *   contour       =  outline->contours;
+      AH_Point *   contour_limit =  contour + outline->num_contours;
+      AH_Segment   segment       =  segments;
       FT_Int       num_segments  =  0;
 
 #ifdef AH_HINT_METRICS
-      AH_Point*    min_point     =  0;
-      AH_Point*    max_point     =  0;
+      AH_Point     min_point     =  0;
+      AH_Point     max_point     =  0;
       FT_Pos       min_coord     =  32000;
       FT_Pos       max_coord     = -32000;
 #endif
@@ -827,8 +827,8 @@
       /* do each contour separately */
       for ( ; contour < contour_limit; contour++ )
       {
-        AH_Point*  point   = contour[0];
-        AH_Point*  last    = point->prev;
+        AH_Point   point   = contour[0];
+        AH_Point   last    = point->prev;
         int        on_edge = 0;
         FT_Pos     min_pos = +32000;  /* minimum segment pos != min_coord */
         FT_Pos     max_pos = -32000;  /* maximum segment pos != max_coord */
@@ -895,8 +895,8 @@
               /* a segment is round if either its first or last point */
               /* is a control point                                   */
               if ( ( segment->first->flags | point->flags ) &
-                     ah_flag_control                        )
-                segment->flags |= ah_edge_round;
+                     AH_FLAG_CONTROL                        )
+                segment->flags |= AH_EDGE_ROUND;
 
               /* compute segment size */
               min_pos = max_pos = point->v;
@@ -934,7 +934,7 @@
             FT_ZERO( segment );
 
             segment->dir      = segment_dir;
-            segment->flags    = ah_edge_normal;
+            segment->flags    = AH_EDGE_NORMAL;
             min_pos = max_pos = point->u;
             segment->first    = point;
             segment->last     = point;
@@ -961,8 +961,8 @@
       /* we do this by inserting fake segments when needed            */
       if ( dimension == 0 )
       {
-        AH_Point*  point       =  outline->points;
-        AH_Point*  point_limit =  point + outline->num_points;
+        AH_Point   point       =  outline->points;
+        AH_Point   point_limit =  point + outline->num_points;
 
         FT_Pos     min_pos     =  32000;
         FT_Pos     max_pos     = -32000;
@@ -996,7 +996,7 @@
           FT_ZERO( segment );
 
           segment->dir   = segment_dir;
-          segment->flags = ah_edge_normal;
+          segment->flags = AH_EDGE_NORMAL;
           segment->first = min_point;
           segment->last  = min_point;
           segment->pos   = min_pos;
@@ -1012,7 +1012,7 @@
           FT_ZERO( segment );
 
           segment->dir   = segment_dir;
-          segment->flags = ah_edge_normal;
+          segment->flags = AH_EDGE_NORMAL;
           segment->first = max_point;
           segment->last  = max_point;
           segment->pos   = max_pos;
@@ -1026,36 +1026,36 @@
       *p_num_segments = num_segments;
 
       segments       = outline->vert_segments;
-      major_dir      = ah_dir_up;
+      major_dir      = AH_DIR_UP;
       p_num_segments = &outline->num_vsegments;
-      ah_setup_uv( outline, ah_uv_fxy );
+      ah_setup_uv( outline, AH_UV_FXY );
     }
   }
 
 
   FT_LOCAL_DEF( void )
-  ah_outline_link_segments( AH_Outline*  outline )
+  ah_outline_link_segments( AH_Outline   outline )
   {
-    AH_Segment*  segments;
-    AH_Segment*  segment_limit;
+    AH_Segment   segments;
+    AH_Segment   segment_limit;
     int          dimension;
 
 
-    ah_setup_uv( outline, ah_uv_fyx );
+    ah_setup_uv( outline, AH_UV_FYX );
 
     segments      = outline->horz_segments;
     segment_limit = segments + outline->num_hsegments;
 
     for ( dimension = 1; dimension >= 0; dimension-- )
     {
-      AH_Segment*  seg1;
-      AH_Segment*  seg2;
+      AH_Segment   seg1;
+      AH_Segment   seg2;
 
       /* now compare each segment to the others */
       for ( seg1 = segments; seg1 < segment_limit; seg1++ )
       {
         FT_Pos       best_score;
-        AH_Segment*  best_segment;
+        AH_Segment   best_segment;
 
         /* the fake segments are introduced to hint the metrics -- */
         /* we must never link them to anything                     */
@@ -1105,9 +1105,9 @@
                 dist = seg2->pos - seg1->pos;
                 if ( dist < 0 )
                   dist = -dist;
-  
+
                 score = dist + 3000 / len;
-  
+
                 if ( score < best_score )
                 {
                   best_score   = score;
@@ -1139,7 +1139,7 @@
         }
       }
 
-      ah_setup_uv( outline, ah_uv_fxy );
+      ah_setup_uv( outline, AH_UV_FXY );
 
       segments      = outline->vert_segments;
       segment_limit = segments + outline->num_vsegments;
@@ -1148,11 +1148,11 @@
 
 
   static void
-  ah_outline_compute_edges( AH_Outline*  outline )
+  ah_outline_compute_edges( AH_Outline   outline )
   {
-    AH_Edge*      edges;
-    AH_Segment*   segments;
-    AH_Segment*   segment_limit;
+    AH_Edge       edges;
+    AH_Segment    segments;
+    AH_Segment    segment_limit;
     AH_Direction  up_dir;
     FT_Int*       p_num_edges;
     FT_Int        dimension;
@@ -1164,14 +1164,14 @@
     segments      = outline->horz_segments;
     segment_limit = segments + outline->num_hsegments;
     p_num_edges   = &outline->num_hedges;
-    up_dir        = ah_dir_right;
+    up_dir        = AH_DIR_RIGHT;
     scale         = outline->y_scale;
 
     for ( dimension = 1; dimension >= 0; dimension-- )
     {
-      AH_Edge*     edge;
-      AH_Edge*     edge_limit;  /* really == edge + num_edges */
-      AH_Segment*  seg;
+      AH_Edge      edge;
+      AH_Edge      edge_limit;  /* really == edge + num_edges */
+      AH_Segment   seg;
 
 
       /*********************************************************************/
@@ -1198,7 +1198,7 @@
       edge_limit = edges;
       for ( seg = segments; seg < segment_limit; seg++ )
       {
-        AH_Edge*  found = 0;
+        AH_Edge   found = 0;
 
 
         /* look for an edge corresponding to the segment */
@@ -1296,7 +1296,7 @@
 
 
           /* check for roundness of segment */
-          if ( seg->flags & ah_edge_round )
+          if ( seg->flags & AH_EDGE_ROUND )
             is_round++;
           else
             is_straight++;
@@ -1313,8 +1313,8 @@
 
           if ( seg->link || is_serif )
           {
-            AH_Edge*     edge2;
-            AH_Segment*  seg2;
+            AH_Edge      edge2;
+            AH_Segment   seg2;
 
 
             edge2 = edge->link;
@@ -1357,13 +1357,13 @@
         } while ( seg != edge->first );
 
         /* set the round/straight flags */
-        edge->flags = ah_edge_normal;
+        edge->flags = AH_EDGE_NORMAL;
 
         if ( is_round > 0 && is_round >= is_straight )
-          edge->flags |= ah_edge_round;
+          edge->flags |= AH_EDGE_ROUND;
 
         /* set the edge's main direction */
-        edge->dir = ah_dir_none;
+        edge->dir = AH_DIR_NONE;
 
         if ( ups > downs )
           edge->dir = up_dir;
@@ -1386,7 +1386,7 @@
       segments      = outline->vert_segments;
       segment_limit = segments + outline->num_vsegments;
       p_num_edges   = &outline->num_vedges;
-      up_dir        = ah_dir_up;
+      up_dir        = AH_DIR_UP;
       scale         = outline->x_scale;
     }
   }
@@ -1398,10 +1398,10 @@
   /*    ah_outline_detect_features                                         */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    Performs feature detection on a given AH_Outline object.           */
+  /*    Performs feature detection on a given AH_OutlineRec object.           */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  ah_outline_detect_features( AH_Outline*  outline )
+  ah_outline_detect_features( AH_Outline   outline )
   {
     ah_outline_compute_segments   ( outline );
     ah_outline_link_segments      ( outline );
@@ -1420,15 +1420,15 @@
   /*    be snapped to a blue zone edge (top or bottom).                    */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  ah_outline_compute_blue_edges( AH_Outline*       outline,
-                                 AH_Face_Globals*  face_globals )
+  ah_outline_compute_blue_edges( AH_Outline        outline,
+                                 AH_Face_Globals   face_globals )
   {
-    AH_Edge*     edge       = outline->horz_edges;
-    AH_Edge*     edge_limit = edge + outline->num_hedges;
-    AH_Globals*  globals    = &face_globals->design;
+    AH_Edge      edge       = outline->horz_edges;
+    AH_Edge      edge_limit = edge + outline->num_hedges;
+    AH_Globals   globals    = &face_globals->design;
     FT_Fixed     y_scale    = outline->y_scale;
 
-    FT_Bool      blue_active[ah_blue_max];
+    FT_Bool      blue_active[AH_BLUE_MAX];
 
 
     /* compute which blue zones are active, i.e. have their scaled */
@@ -1438,7 +1438,7 @@
       FT_Bool  check = 0;
 
 
-      for ( blue = ah_blue_capital_top; blue < ah_blue_max; blue++ )
+      for ( blue = AH_BLUE_CAPITAL_TOP; blue < AH_BLUE_MAX; blue++ )
       {
         FT_Pos  ref, shoot, dist;
 
@@ -1476,7 +1476,7 @@
       if ( best_dist > 64 / 4 )
         best_dist = 64 / 4;
 
-      for ( blue = ah_blue_capital_top; blue < ah_blue_max; blue++ )
+      for ( blue = AH_BLUE_CAPITAL_TOP; blue < AH_BLUE_MAX; blue++ )
       {
         /* if it is a top zone, check for right edges -- if it is a bottom */
         /* zone, check for left edges                                      */
@@ -1514,7 +1514,7 @@
           /* now, compare it to the overshoot position if the edge is     */
           /* rounded, and if the edge is over the reference position of a */
           /* top zone, or under the reference position of a bottom zone   */
-          if ( edge->flags & ah_edge_round && dist != 0 )
+          if ( edge->flags & AH_EDGE_ROUND && dist != 0 )
           {
             FT_Bool  is_under_ref = FT_BOOL( edge->fpos < *blue_pos );
 
@@ -1554,11 +1554,11 @@
   /*    edge' pointer from `design units' to `scaled ones').               */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  ah_outline_scale_blue_edges( AH_Outline*       outline,
-                               AH_Face_Globals*  globals )
+  ah_outline_scale_blue_edges( AH_Outline        outline,
+                               AH_Face_Globals   globals )
   {
-    AH_Edge*  edge       = outline->horz_edges;
-    AH_Edge*  edge_limit = edge + outline->num_hedges;
+    AH_Edge   edge       = outline->horz_edges;
+    AH_Edge   edge_limit = edge + outline->num_hedges;
     FT_Int    delta;
 
 
diff --git a/src/autohint/ahglyph.h b/src/autohint/ahglyph.h
index 8089f41..fc9941f 100644
--- a/src/autohint/ahglyph.h
+++ b/src/autohint/ahglyph.h
@@ -33,56 +33,56 @@
 
   typedef enum  AH_UV_
   {
-    ah_uv_fxy,
-    ah_uv_fyx,
-    ah_uv_oxy,
-    ah_uv_oyx,
-    ah_uv_ox,
-    ah_uv_oy,
-    ah_uv_yx,
-    ah_uv_xy  /* should always be last! */
+    AH_UV_FXY,
+    AH_UV_FYX,
+    AH_UV_OXY,
+    AH_UV_OYX,
+    AH_UV_OX,
+    AH_UV_OY,
+    AH_UV_YX,
+    AH_UV_XY  /* should always be last! */
 
   } AH_UV;
 
 
   FT_LOCAL( void )
-  ah_setup_uv( AH_Outline*  outline,
+  ah_setup_uv( AH_Outline   outline,
                AH_UV        source );
 
 
-  /* AH_Outline functions - they should be typically called in this order */
+  /* AH_OutlineRec functions - they should be typically called in this order */
 
   FT_LOCAL( FT_Error )
   ah_outline_new( FT_Memory     memory,
-                  AH_Outline**  aoutline );
+                  AH_Outline *  aoutline );
 
   FT_LOCAL( FT_Error )
-  ah_outline_load( AH_Outline*  outline,
+  ah_outline_load( AH_Outline   outline,
                    FT_Face      face );
 
   FT_LOCAL( void )
-  ah_outline_compute_segments( AH_Outline*  outline );
+  ah_outline_compute_segments( AH_Outline   outline );
 
   FT_LOCAL( void )
-  ah_outline_link_segments( AH_Outline*  outline );
+  ah_outline_link_segments( AH_Outline   outline );
 
   FT_LOCAL( void )
-  ah_outline_detect_features( AH_Outline*  outline );
+  ah_outline_detect_features( AH_Outline   outline );
 
   FT_LOCAL( void )
-  ah_outline_compute_blue_edges( AH_Outline*       outline,
-                                 AH_Face_Globals*  globals );
+  ah_outline_compute_blue_edges( AH_Outline        outline,
+                                 AH_Face_Globals   globals );
 
   FT_LOCAL( void )
-  ah_outline_scale_blue_edges( AH_Outline*       outline,
-                               AH_Face_Globals*  globals );
+  ah_outline_scale_blue_edges( AH_Outline        outline,
+                               AH_Face_Globals   globals );
 
   FT_LOCAL( void )
-  ah_outline_save( AH_Outline*  outline,
+  ah_outline_save( AH_Outline   outline,
                    AH_Loader    loader );
 
   FT_LOCAL( void )
-  ah_outline_done( AH_Outline*  outline );
+  ah_outline_done( AH_Outline   outline );
 
 
 FT_END_HEADER
diff --git a/src/autohint/ahhint.c b/src/autohint/ahhint.c
index de23d12..e9fcedb 100644
--- a/src/autohint/ahhint.c
+++ b/src/autohint/ahhint.c
@@ -27,7 +27,7 @@
 #include FT_OUTLINE_H
 
 
-#define FACE_GLOBALS( face )  ((AH_Face_Globals*)(face)->autohint.data)
+#define FACE_GLOBALS( face )  ((AH_Face_Globals )(face)->autohint.data)
 
 #define AH_USE_IUP
 #define OPTIM_STEM_SNAP
@@ -90,11 +90,11 @@
 
   /* compute the snapped width of a given stem */
   static FT_Pos
-  ah_compute_stem_width( AH_Hinter*  hinter,
+  ah_compute_stem_width( AH_Hinter  hinter,
                          int         vertical,
                          FT_Pos      width )
   {
-    AH_Globals*  globals = &hinter->globals->scaled;
+    AH_Globals   globals = &hinter->globals->scaled;
     FT_Pos       dist    = width;
     FT_Int       sign    = 0;
 
@@ -159,7 +159,7 @@
     {
       dist = ah_snap_width( globals->widths,  globals->num_widths, dist );
 
-      if ( hinter->flags & ah_hinter_monochrome )
+      if ( hinter->flags & AH_HINTER_MONOCHROME )
       {
         /* monochrome horizontal hinting: snap widths to integer pixels */
         /* with a different threshold                                   */
@@ -194,9 +194,9 @@
 
   /* align one stem edge relative to the previous stem edge */
   static void
-  ah_align_linked_edge( AH_Hinter*  hinter,
-                        AH_Edge*    base_edge,
-                        AH_Edge*    stem_edge,
+  ah_align_linked_edge( AH_Hinter  hinter,
+                        AH_Edge     base_edge,
+                        AH_Edge     stem_edge,
                         int         vertical )
   {
     FT_Pos  dist = stem_edge->opos - base_edge->opos;
@@ -208,9 +208,9 @@
 
 
   static void
-  ah_align_serif_edge( AH_Hinter*  hinter,
-                       AH_Edge*    base,
-                       AH_Edge*    serif,
+  ah_align_serif_edge( AH_Hinter  hinter,
+                       AH_Edge     base,
+                       AH_Edge     serif,
                        int         vertical )
   {
     FT_Pos  dist;
@@ -231,7 +231,7 @@
       dist = 32;
 #else
     /* do not strengthen serifs */
-    if ( base->flags & ah_edge_done )
+    if ( base->flags & AH_EDGE_DONE )
     {
       if ( dist >= 64 )
         dist = (dist+8) & -64;
@@ -260,11 +260,11 @@
 
   /* Another alternative edge hinting algorithm */
   static void
-  ah_hint_edges_3( AH_Hinter*  hinter )
+  ah_hint_edges_3( AH_Hinter  hinter )
   {
-    AH_Edge*     edges;
-    AH_Edge*     edge_limit;
-    AH_Outline*  outline = hinter->glyph;
+    AH_Edge      edges;
+    AH_Edge      edge_limit;
+    AH_Outline   outline = hinter->glyph;
     FT_Int       dimension;
 
 
@@ -273,8 +273,8 @@
 
     for ( dimension = 1; dimension >= 0; dimension-- )
     {
-      AH_Edge*  edge;
-      AH_Edge*  anchor = 0;
+      AH_Edge   edge;
+      AH_Edge   anchor = 0;
       int       has_serifs = 0;
 
 
@@ -291,10 +291,10 @@
         for ( edge = edges; edge < edge_limit; edge++ )
         {
           FT_Pos*  blue;
-          AH_Edge  *edge1, *edge2;
+          AH_EdgeRec  *edge1, *edge2;
 
 
-          if ( edge->flags & ah_edge_done )
+          if ( edge->flags & AH_EDGE_DONE )
             continue;
 
           blue  = edge->blue_edge;
@@ -316,12 +316,12 @@
             continue;
 
           edge1->pos    = blue[0];
-          edge1->flags |= ah_edge_done;
+          edge1->flags |= AH_EDGE_DONE;
 
           if ( edge2 && !edge2->blue_edge )
           {
             ah_align_linked_edge( hinter, edge1, edge2, dimension );
-            edge2->flags |= ah_edge_done;
+            edge2->flags |= AH_EDGE_DONE;
           }
 
           if ( !anchor )
@@ -333,10 +333,10 @@
       /* relative order of stems in the glyph..                    */
       for ( edge = edges; edge < edge_limit; edge++ )
       {
-        AH_Edge  *edge2;
+        AH_EdgeRec  *edge2;
 
 
-        if ( edge->flags & ah_edge_done )
+        if ( edge->flags & AH_EDGE_DONE )
           continue;
 
         /* skip all non-stem edges */
@@ -359,7 +359,7 @@
 #endif
 
           ah_align_linked_edge( hinter, edge2, edge, dimension );
-          edge->flags |= ah_edge_done;
+          edge->flags |= AH_EDGE_DONE;
           continue;
         }
 
@@ -374,7 +374,7 @@
             edge->pos = ( edge->opos + 32 ) & -64;
             anchor    = edge;
 
-            edge->flags |= ah_edge_done;
+            edge->flags |= AH_EDGE_DONE;
 
             ah_align_linked_edge( hinter, edge, edge2, dimension );
           }
@@ -403,8 +403,8 @@
             edge->pos  = ( delta1 <= delta2 ) ? cur_pos1 : cur_pos2;
             edge2->pos = edge->pos + cur_len;
 
-            edge->flags  |= ah_edge_done;
-            edge2->flags |= ah_edge_done;
+            edge->flags  |= AH_EDGE_DONE;
+            edge2->flags |= AH_EDGE_DONE;
 
             if ( edge > edges && edge->pos < edge[-1].pos )
               edge->pos = edge[-1].pos;
@@ -412,7 +412,7 @@
 #if 0
             delta = 0;
             if ( edge2 + 1 < edge_limit        &&
-                 edge2[1].flags & ah_edge_done )
+                 edge2[1].flags & AH_EDGE_DONE )
               delta = edge2[1].pos - edge2->pos;
 
             if ( delta < 0 )
@@ -421,7 +421,7 @@
               if ( !min )
                 edge->pos += delta;
             }
-            edge2->flags |= ah_edge_done;
+            edge2->flags |= AH_EDGE_DONE;
 #endif
           }
         }
@@ -434,7 +434,7 @@
       /* to complete our processing                                 */
       for ( edge = edges; edge < edge_limit; edge++ )
       {
-        if ( edge->flags & ah_edge_done )
+        if ( edge->flags & AH_EDGE_DONE )
           continue;
 
         if ( edge->serif )
@@ -448,13 +448,13 @@
           edge->pos = anchor->pos +
                       ( ( edge->opos-anchor->opos + 32 ) & -64 );
 
-        edge->flags |= ah_edge_done;
+        edge->flags |= AH_EDGE_DONE;
 
         if ( edge > edges && edge->pos < edge[-1].pos )
           edge->pos = edge[-1].pos;
 
         if ( edge + 1 < edge_limit        &&
-             edge[1].flags & ah_edge_done &&
+             edge[1].flags & AH_EDGE_DONE &&
              edge->pos > edge[1].pos      )
           edge->pos = edge[1].pos;
       }
@@ -467,7 +467,7 @@
 
 
   FT_LOCAL_DEF( void )
-  ah_hinter_hint_edges( AH_Hinter*  hinter,
+  ah_hinter_hint_edges( AH_Hinter  hinter,
                         FT_Bool     no_horz_edges,
                         FT_Bool     no_vert_edges )
   {
@@ -486,7 +486,7 @@
 
 #if 0
       /* outline optimizer removed temporarily */
-      if ( hinter->flags & ah_hinter_optimize )
+      if ( hinter->flags & AH_HINTER_OPTIMIZE )
       {
         AH_Optimizer  opt;
 
@@ -514,11 +514,11 @@
   /*************************************************************************/
 
   static void
-  ah_hinter_align_edge_points( AH_Hinter*  hinter )
+  ah_hinter_align_edge_points( AH_Hinter  hinter )
   {
-    AH_Outline*  outline = hinter->glyph;
-    AH_Edge*     edges;
-    AH_Edge*     edge_limit;
+    AH_Outline   outline = hinter->glyph;
+    AH_Edge      edges;
+    AH_Edge      edge_limit;
     FT_Int       dimension;
 
 
@@ -527,7 +527,7 @@
 
     for ( dimension = 1; dimension >= 0; dimension-- )
     {
-      AH_Edge*   edge;
+      AH_Edge    edge;
 
 
       edge = edges;
@@ -535,12 +535,12 @@
       {
         /* move the points of each segment     */
         /* in each edge to the edge's position */
-        AH_Segment*  seg = edge->first;
+        AH_Segment   seg = edge->first;
 
 
         do
         {
-          AH_Point*  point = seg->first;
+          AH_Point   point = seg->first;
 
 
           for (;;)
@@ -548,12 +548,12 @@
             if ( dimension )
             {
               point->y      = edge->pos;
-              point->flags |= ah_flag_touch_y;
+              point->flags |= AH_FLAG_TOUCH_Y;
             }
             else
             {
               point->x      = edge->pos;
-              point->flags |= ah_flag_touch_x;
+              point->flags |= AH_FLAG_TOUCH_X;
             }
 
             if ( point == seg->last )
@@ -575,14 +575,14 @@
 
   /* hint the strong points -- this is equivalent to the TrueType `IP' */
   static void
-  ah_hinter_align_strong_points( AH_Hinter*  hinter )
+  ah_hinter_align_strong_points( AH_Hinter  hinter )
   {
-    AH_Outline*  outline = hinter->glyph;
+    AH_Outline   outline = hinter->glyph;
     FT_Int       dimension;
-    AH_Edge*     edges;
-    AH_Edge*     edge_limit;
-    AH_Point*    points;
-    AH_Point*    point_limit;
+    AH_Edge      edges;
+    AH_Edge      edge_limit;
+    AH_Point     points;
+    AH_Point     point_limit;
     AH_Flags     touch_flag;
 
 
@@ -591,12 +591,12 @@
 
     edges       = outline->horz_edges;
     edge_limit  = edges + outline->num_hedges;
-    touch_flag  = ah_flag_touch_y;
+    touch_flag  = AH_FLAG_TOUCH_Y;
 
     for ( dimension = 1; dimension >= 0; dimension-- )
     {
-      AH_Point*  point;
-      AH_Edge*   edge;
+      AH_Point   point;
+      AH_Edge    edge;
 
 
       if ( edges < edge_limit )
@@ -612,8 +612,8 @@
 #ifndef AH_OPTION_NO_WEAK_INTERPOLATION
           /* if this point is candidate to weak interpolation, we will  */
           /* interpolate it after all strong points have been processed */
-          if (  ( point->flags & ah_flag_weak_interpolation ) &&
-               !( point->flags & ah_flag_inflection )         )
+          if (  ( point->flags & AH_FLAG_WEAK_INTERPOLATION ) &&
+               !( point->flags & AH_FLAG_INFLECTION )         )
             continue;
 #endif
 
@@ -650,8 +650,8 @@
 
           /* otherwise, interpolate the point in between */
           {
-            AH_Edge*  before = 0;
-            AH_Edge*  after  = 0;
+            AH_Edge   before = 0;
+            AH_Edge   after  = 0;
 
 
             for ( edge = edges; edge < edge_limit; edge++ )
@@ -697,7 +697,7 @@
 
       edges      = outline->vert_edges;
       edge_limit = edges + outline->num_vedges;
-      touch_flag = ah_flag_touch_x;
+      touch_flag = AH_FLAG_TOUCH_X;
     }
   }
 
@@ -705,11 +705,11 @@
 #ifndef AH_OPTION_NO_WEAK_INTERPOLATION
 
   static void
-  ah_iup_shift( AH_Point*  p1,
-                AH_Point*  p2,
-                AH_Point*  ref )
+  ah_iup_shift( AH_Point   p1,
+                AH_Point   p2,
+                AH_Point   ref )
   {
-    AH_Point*  p;
+    AH_Point   p;
     FT_Pos     delta = ref->u - ref->v;
 
 
@@ -722,12 +722,12 @@
 
 
   static void
-  ah_iup_interp( AH_Point*  p1,
-                 AH_Point*  p2,
-                 AH_Point*  ref1,
-                 AH_Point*  ref2 )
+  ah_iup_interp( AH_Point   p1,
+                 AH_Point   p2,
+                 AH_Point   ref1,
+                 AH_Point   ref2 )
   {
-    AH_Point*  p;
+    AH_Point   p;
     FT_Pos     u;
     FT_Pos     v1 = ref1->v;
     FT_Pos     v2 = ref2->v;
@@ -791,13 +791,13 @@
 
   /* interpolate weak points -- this is equivalent to the TrueType `IUP' */
   static void
-  ah_hinter_align_weak_points( AH_Hinter*  hinter )
+  ah_hinter_align_weak_points( AH_Hinter  hinter )
   {
-    AH_Outline*  outline = hinter->glyph;
+    AH_Outline   outline = hinter->glyph;
     FT_Int       dimension;
-    AH_Point*    points;
-    AH_Point*    point_limit;
-    AH_Point**   contour_limit;
+    AH_Point     points;
+    AH_Point     point_limit;
+    AH_Point *   contour_limit;
     AH_Flags     touch_flag;
 
 
@@ -806,18 +806,18 @@
 
     /* PASS 1: Move segment points to edge positions */
 
-    touch_flag = ah_flag_touch_y;
+    touch_flag = AH_FLAG_TOUCH_Y;
 
     contour_limit = outline->contours + outline->num_contours;
 
-    ah_setup_uv( outline, ah_uv_oy );
+    ah_setup_uv( outline, AH_UV_OY );
 
     for ( dimension = 1; dimension >= 0; dimension-- )
     {
-      AH_Point*   point;
-      AH_Point*   end_point;
-      AH_Point*   first_point;
-      AH_Point**  contour;
+      AH_Point    point;
+      AH_Point    end_point;
+      AH_Point    first_point;
+      AH_Point *  contour;
 
 
       point   = points;
@@ -834,8 +834,8 @@
 
         if ( point <= end_point )
         {
-          AH_Point*  first_touched = point;
-          AH_Point*  cur_touched   = point;
+          AH_Point   first_touched = point;
+          AH_Point   cur_touched   = point;
 
 
           point++;
@@ -880,8 +880,8 @@
         for ( point = points; point < point_limit; point++ )
           point->y = point->u;
 
-        touch_flag = ah_flag_touch_x;
-        ah_setup_uv( outline, ah_uv_ox );
+        touch_flag = AH_FLAG_TOUCH_X;
+        ah_setup_uv( outline, AH_UV_OX );
       }
       else
       {
@@ -897,7 +897,7 @@
 
 
   FT_LOCAL_DEF( void )
-  ah_hinter_align_points( AH_Hinter*  hinter )
+  ah_hinter_align_points( AH_Hinter  hinter )
   {
     ah_hinter_align_edge_points( hinter );
 
@@ -924,14 +924,14 @@
 
   /* scale and fit the global metrics */
   static void
-  ah_hinter_scale_globals( AH_Hinter*  hinter,
+  ah_hinter_scale_globals( AH_Hinter  hinter,
                            FT_Fixed    x_scale,
                            FT_Fixed    y_scale )
   {
     FT_Int            n;
-    AH_Face_Globals*  globals = hinter->globals;
-    AH_Globals*       design = &globals->design;
-    AH_Globals*       scaled = &globals->scaled;
+    AH_Face_Globals   globals = hinter->globals;
+    AH_Globals        design = &globals->design;
+    AH_Globals        scaled = &globals->scaled;
 
 
     /* copy content */
@@ -948,7 +948,7 @@
     scaled->stds[1] = ( design->num_heights > 0 ) ? scaled->heights[0] : 32000;
 
     /* scale the blue zones */
-    for ( n = 0; n < ah_blue_max; n++ )
+    for ( n = 0; n < AH_BLUE_MAX; n++ )
     {
       FT_Pos  delta, delta2;
 
@@ -980,7 +980,7 @@
 
 
   static void
-  ah_hinter_align( AH_Hinter*  hinter )
+  ah_hinter_align( AH_Hinter  hinter )
   {
     ah_hinter_align_edge_points( hinter );
     ah_hinter_align_points( hinter );
@@ -989,7 +989,7 @@
 
   /* finalize a hinter object */
   FT_LOCAL_DEF( void )
-  ah_hinter_done( AH_Hinter*  hinter )
+  ah_hinter_done( AH_Hinter  hinter )
   {
     if ( hinter )
     {
@@ -1013,9 +1013,9 @@
   /* create a new empty hinter object */
   FT_LOCAL_DEF( FT_Error )
   ah_hinter_new( FT_Library   library,
-                 AH_Hinter**  ahinter )
+                 AH_Hinter*  ahinter )
   {
-    AH_Hinter*  hinter = 0;
+    AH_Hinter  hinter = 0;
     FT_Memory   memory = library->memory;
     FT_Error    error;
 
@@ -1048,13 +1048,13 @@
 
   /* create a face's autohint globals */
   FT_LOCAL_DEF( FT_Error )
-  ah_hinter_new_face_globals( AH_Hinter*   hinter,
+  ah_hinter_new_face_globals( AH_Hinter   hinter,
                               FT_Face      face,
-                              AH_Globals*  globals )
+                              AH_Globals   globals )
   {
     FT_Error          error;
     FT_Memory         memory = hinter->memory;
-    AH_Face_Globals*  face_globals;
+    AH_Face_Globals   face_globals;
 
 
     if ( FT_NEW( face_globals ) )
@@ -1080,7 +1080,7 @@
 
   /* discard a face's autohint globals */
   FT_LOCAL_DEF( void )
-  ah_hinter_done_face_globals( AH_Face_Globals*  globals )
+  ah_hinter_done_face_globals( AH_Face_Globals   globals )
   {
     FT_Face    face   = globals->face;
     FT_Memory  memory = face->memory;
@@ -1091,7 +1091,7 @@
 
 
   static FT_Error
-  ah_hinter_load( AH_Hinter*  hinter,
+  ah_hinter_load( AH_Hinter  hinter,
                   FT_UInt     glyph_index,
                   FT_UInt     load_flags,
                   FT_UInt     depth )
@@ -1102,7 +1102,7 @@
     FT_Fixed          x_scale  = face->size->metrics.x_scale;
     FT_Fixed          y_scale  = face->size->metrics.y_scale;
     FT_Error          error;
-    AH_Outline*       outline  = hinter->glyph;
+    AH_Outline        outline  = hinter->glyph;
     AH_Loader         gloader  = hinter->loader;
     FT_Bool           no_horz_hints = FT_BOOL(
                         ( load_flags & AH_HINT_NO_HORZ_EDGES ) != 0 );
@@ -1137,7 +1137,7 @@
 
     switch ( slot->format )
     {
-    case ft_glyph_format_outline:
+    case FT_GLYPH_FORMAT_OUTLINE:
 
       /* translate glyph outline if we need to */
       if ( hinter->transformed )
@@ -1208,8 +1208,8 @@
       /* width/positioning that occured during the hinting process  */
       {
         FT_Pos    old_advance, old_rsb, old_lsb, new_lsb;
-        AH_Edge*  edge1 = outline->vert_edges;     /* leftmost edge  */
-        AH_Edge*  edge2 = edge1 +
+        AH_Edge   edge1 = outline->vert_edges;     /* leftmost edge  */
+        AH_Edge   edge2 = edge1 +
                           outline->num_vedges - 1; /* rightmost edge */
 
 
@@ -1230,7 +1230,7 @@
       ah_loader_add( gloader );
       break;
 
-    case ft_glyph_format_composite:
+    case FT_GLYPH_FORMAT_COMPOSITE:
       {
         FT_UInt      nn, num_subglyphs = slot->num_subglyphs;
         FT_UInt      num_base_subgs, start_point;
@@ -1407,7 +1407,7 @@
         goto Exit;
 
       slot->outline = slot->internal->loader->base.outline;
-      slot->format  = ft_glyph_format_outline;
+      slot->format  = FT_GLYPH_FORMAT_OUTLINE;
     }
 
 #ifdef DEBUG_HINTER
@@ -1421,7 +1421,7 @@
 
   /* load and hint a given glyph */
   FT_LOCAL_DEF( FT_Error )
-  ah_hinter_load_glyph( AH_Hinter*    hinter,
+  ah_hinter_load_glyph( AH_Hinter    hinter,
                         FT_GlyphSlot  slot,
                         FT_Size       size,
                         FT_UInt       glyph_index,
@@ -1431,7 +1431,7 @@
     FT_Error          error;
     FT_Fixed          x_scale      = size->metrics.x_scale;
     FT_Fixed          y_scale      = size->metrics.y_scale;
-    AH_Face_Globals*  face_globals = FACE_GLOBALS( face );
+    AH_Face_Globals   face_globals = FACE_GLOBALS( face );
 
 
     /* first of all, we need to check that we're using the correct face and */
@@ -1475,12 +1475,12 @@
 
   /* retrieve a face's autohint globals for client applications */
   FT_LOCAL_DEF( void )
-  ah_hinter_get_global_hints( AH_Hinter*  hinter,
+  ah_hinter_get_global_hints( AH_Hinter  hinter,
                               FT_Face     face,
                               void**      global_hints,
                               long*       global_len )
   {
-    AH_Globals*  globals = 0;
+    AH_Globals   globals = 0;
     FT_Memory    memory  = hinter->memory;
     FT_Error     error;
 
@@ -1512,7 +1512,7 @@
 
 
   FT_LOCAL_DEF( void )
-  ah_hinter_done_global_hints( AH_Hinter*  hinter,
+  ah_hinter_done_global_hints( AH_Hinter  hinter,
                                void*       global_hints )
   {
     FT_Memory  memory = hinter->memory;
diff --git a/src/autohint/ahhint.h b/src/autohint/ahhint.h
index b0857f3..88b950f 100644
--- a/src/autohint/ahhint.h
+++ b/src/autohint/ahhint.h
@@ -39,11 +39,11 @@
   /* create a new empty hinter object */
   FT_LOCAL( FT_Error )
   ah_hinter_new( FT_Library   library,
-                 AH_Hinter**  ahinter );
+                 AH_Hinter*  ahinter );
 
   /* Load a hinted glyph in the hinter */
   FT_LOCAL( FT_Error )
-  ah_hinter_load_glyph( AH_Hinter*    hinter,
+  ah_hinter_load_glyph( AH_Hinter     hinter,
                         FT_GlyphSlot  slot,
                         FT_Size       size,
                         FT_UInt       glyph_index,
@@ -51,20 +51,20 @@
 
   /* finalize a hinter object */
   FT_LOCAL( void )
-  ah_hinter_done( AH_Hinter*  hinter );
+  ah_hinter_done( AH_Hinter  hinter );
 
   FT_LOCAL( void )
-  ah_hinter_done_face_globals( AH_Face_Globals*  globals );
+  ah_hinter_done_face_globals( AH_Face_Globals   globals );
 
   FT_LOCAL( void )
-  ah_hinter_get_global_hints( AH_Hinter*  hinter,
+  ah_hinter_get_global_hints( AH_Hinter   hinter,
                               FT_Face     face,
                               void**      global_hints,
                               long*       global_len );
 
   FT_LOCAL( void )
-  ah_hinter_done_global_hints( AH_Hinter*  hinter,
-                               void*       global_hints );
+  ah_hinter_done_global_hints( AH_Hinter  hinter,
+                               void*      global_hints );
 
 
 FT_END_HEADER
diff --git a/src/autohint/ahmodule.c b/src/autohint/ahmodule.c
index 8c148af..c44e396 100644
--- a/src/autohint/ahmodule.c
+++ b/src/autohint/ahmodule.c
@@ -25,7 +25,7 @@
 
 
 #ifdef  DEBUG_HINTER
-   AH_Hinter*  ah_debug_hinter       = NULL;
+   AH_Hinter   ah_debug_hinter       = NULL;
    FT_Bool     ah_debug_disable_horz = 0;
    FT_Bool     ah_debug_disable_vert = 0;
 #endif
@@ -33,7 +33,7 @@
   typedef struct  FT_AutoHinterRec_
   {
     FT_ModuleRec  root;
-    AH_Hinter*    hinter;
+    AH_Hinter    hinter;
 
   } FT_AutoHinterRec;
 
@@ -83,7 +83,7 @@
     FT_UNUSED( module );
 
     if ( face->autohint.data )
-      ah_hinter_done_face_globals( (AH_Face_Globals*)(face->autohint.data) );
+      ah_hinter_done_face_globals( (AH_Face_Globals )(face->autohint.data) );
   }
 
 
diff --git a/src/autohint/ahoptim.c b/src/autohint/ahoptim.c
index d06b1bf..fb2a000 100644
--- a/src/autohint/ahoptim.c
+++ b/src/autohint/ahoptim.c
@@ -157,8 +157,8 @@
 
 
   static int
-  valid_stem_segments( AH_Segment*  seg1,
-                       AH_Segment*  seg2 )
+  valid_stem_segments( AH_Segment   seg1,
+                       AH_Segment   seg2 )
   {
     return seg1->serif == 0                   &&
            seg2                               &&
@@ -173,13 +173,13 @@
   static int
   optim_compute_stems( AH_Optimizer*  optimizer )
   {
-    AH_Outline*  outline = optimizer->outline;
+    AH_Outline   outline = optimizer->outline;
     FT_Fixed     scale;
     FT_Memory    memory  = optimizer->memory;
     FT_Error     error   = 0;
     FT_Int       dimension;
-    AH_Edge*     edges;
-    AH_Edge*     edge_limit;
+    AH_Edge      edges;
+    AH_Edge      edge_limit;
     AH_Stem**    p_stems;
     FT_Int*      p_num_stems;
 
@@ -195,13 +195,13 @@
     {
       AH_Stem*  stems     = 0;
       FT_Int    num_stems = 0;
-      AH_Edge*  edge;
+      AH_Edge   edge;
 
 
       /* first of all, count the number of stems in this direction */
       for ( edge = edges; edge < edge_limit; edge++ )
       {
-        AH_Segment*  seg = edge->first;
+        AH_Segment   seg = edge->first;
 
 
         do
@@ -226,8 +226,8 @@
         stem = stems;
         for ( edge = edges; edge < edge_limit; edge++ )
         {
-          AH_Segment*  seg = edge->first;
-          AH_Segment*  seg2;
+          AH_Segment   seg = edge->first;
+          AH_Segment   seg2;
 
 
           do
@@ -235,8 +235,8 @@
             seg2 = seg->link;
             if ( valid_stem_segments( seg, seg2 ) )
             {
-              AH_Edge*  edge1 = seg->edge;
-              AH_Edge*  edge2 = seg2->edge;
+              AH_Edge   edge1 = seg->edge;
+              AH_Edge   edge2 = seg2->edge;
 
 
               stem->edge1  = edge1;
@@ -721,8 +721,8 @@
       stem->edge1->pos = pos;
       stem->edge2->pos = pos + stem->width;
 
-      stem->edge1->flags |= ah_edge_done;
-      stem->edge2->flags |= ah_edge_done;
+      stem->edge1->flags |= AH_EDGE_DONE;
+      stem->edge2->flags |= AH_EDGE_DONE;
     }
   }
 
@@ -768,8 +768,8 @@
       stem->edge1->pos = pos;
       stem->edge2->pos = pos + stem->width;
 
-      stem->edge1->flags |= ah_edge_done;
-      stem->edge2->flags |= ah_edge_done;
+      stem->edge1->flags |= AH_EDGE_DONE;
+      stem->edge2->flags |= AH_EDGE_DONE;
     }
   }
 
@@ -808,7 +808,7 @@
   /* loads the outline into the optimizer */
   int
   AH_Optimizer_Init( AH_Optimizer*  optimizer,
-                     AH_Outline*    outline,
+                     AH_Outline     outline,
                      FT_Memory      memory )
   {
     FT_Error  error;
diff --git a/src/autohint/ahoptim.h b/src/autohint/ahoptim.h
index c3e927d..5d79fde 100644
--- a/src/autohint/ahoptim.h
+++ b/src/autohint/ahoptim.h
@@ -45,8 +45,8 @@
     FT_Pos    min_pos;   /* minimum grid position */
     FT_Pos    max_pos;   /* maximum grid position */
 
-    AH_Edge*  edge1;     /* left/bottom edge */
-    AH_Edge*  edge2;     /* right/top edge   */
+    AH_Edge   edge1;     /* left/bottom edge */
+    AH_Edge   edge2;     /* right/top edge   */
 
     FT_Pos    opos;      /* original position */
     FT_Pos    owidth;    /* original width    */
@@ -81,7 +81,7 @@
   typedef struct  AH_Optimizer_
   {
     FT_Memory         memory;
-    AH_Outline*       outline;
+    AH_Outline        outline;
 
     FT_Int            num_hstems;
     AH_Stem*          horz_stems;
@@ -115,7 +115,7 @@
   /* loads the outline into the optimizer */
   int
   AH_Optimizer_Init( AH_Optimizer*  optimizer,
-                     AH_Outline*    outline,
+                     AH_Outline     outline,
                      FT_Memory      memory );
 
 
diff --git a/src/autohint/ahtypes.h b/src/autohint/ahtypes.h
index 4c91655..de053e9 100644
--- a/src/autohint/ahtypes.h
+++ b/src/autohint/ahtypes.h
@@ -126,64 +126,64 @@
 
 
   /* hint flags */
-#define ah_flag_none       0
+#define AH_FLAG_NONE       0
 
   /* bezier control points flags */
-#define ah_flag_conic                 1
-#define ah_flag_cubic                 2
-#define ah_flag_control               ( ah_flag_conic | ah_flag_cubic )
+#define AH_FLAG_CONIC                 1
+#define AH_FLAG_CUBIC                 2
+#define AH_FLAG_CONTROL               ( AH_FLAG_CONIC | AH_FLAG_CUBIC )
 
   /* extrema flags */
-#define ah_flag_extrema_x             4
-#define ah_flag_extrema_y             8
+#define AH_FLAG_EXTREMA_X             4
+#define AH_FLAG_EXTREMA_Y             8
 
   /* roundness */
-#define ah_flag_round_x              16
-#define ah_flag_round_y              32
+#define AH_FLAG_ROUND_X              16
+#define AH_FLAG_ROUND_Y              32
 
   /* touched */
-#define ah_flag_touch_x              64
-#define ah_flag_touch_y             128
+#define AH_FLAG_TOUCH_X              64
+#define AH_FLAG_TOUCH_Y             128
 
   /* weak interpolation */
-#define ah_flag_weak_interpolation  256
-#define ah_flag_inflection          512
+#define AH_FLAG_WEAK_INTERPOLATION  256
+#define AH_FLAG_INFLECTION          512
 
   typedef FT_Int AH_Flags;
 
 
   /* edge hint flags */
-#define ah_edge_normal  0
-#define ah_edge_round   1
-#define ah_edge_serif   2
-#define ah_edge_done    4
+#define AH_EDGE_NORMAL  0
+#define AH_EDGE_ROUND   1
+#define AH_EDGE_SERIF   2
+#define AH_EDGE_DONE    4
 
   typedef FT_Int  AH_Edge_Flags;
 
 
   /* hint directions -- the values are computed so that two vectors are */
   /* in opposite directions iff `dir1+dir2 == 0'                        */
-#define ah_dir_none    4
-#define ah_dir_right   1
-#define ah_dir_left   -1
-#define ah_dir_up      2
-#define ah_dir_down   -2
+#define AH_DIR_NONE    4
+#define AH_DIR_RIGHT   1
+#define AH_DIR_LEFT   -1
+#define AH_DIR_UP      2
+#define AH_DIR_DOWN   -2
 
   typedef FT_Int  AH_Direction;
 
 
-  typedef struct AH_Point    AH_Point;
-  typedef struct AH_Segment  AH_Segment;
-  typedef struct AH_Edge     AH_Edge;
+  typedef struct AH_PointRec_*    AH_Point;
+  typedef struct AH_SegmentRec_*  AH_Segment;
+  typedef struct AH_EdgeRec_*     AH_Edge;
 
 
   /*************************************************************************/
   /*                                                                       */
   /* <Struct>                                                              */
-  /*    AH_Point                                                           */
+  /*    AH_PointRec                                                        */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A structure used to model an outline point to the AH_Outline type. */
+  /*    A structure used to model an outline point to the AH_OutlineRec type. */
   /*                                                                       */
   /* <Fields>                                                              */
   /*    flags     :: The current point hint flags.                         */
@@ -208,7 +208,7 @@
   /*                                                                       */
   /*    prev      :: The previous point in same contour.                   */
   /*                                                                       */
-  struct  AH_Point
+  typedef struct  AH_PointRec_
   {
     AH_Flags      flags;    /* point flags used by hinter */
     FT_Pos        ox, oy;
@@ -222,15 +222,16 @@
     AH_Angle      in_angle;
     AH_Angle      out_angle;
 
-    AH_Point*     next;     /* next point in contour     */
-    AH_Point*     prev;     /* previous point in contour */
-  };
+    AH_Point      next;     /* next point in contour     */
+    AH_Point      prev;     /* previous point in contour */
+
+  } AH_PointRec;
 
 
   /*************************************************************************/
   /*                                                                       */
   /* <Struct>                                                              */
-  /*    AH_Segment                                                         */
+  /*    AH_SegmentRec                                                      */
   /*                                                                       */
   /* <Description>                                                         */
   /*    A structure used to describe an edge segment to the auto-hinter.   */
@@ -265,33 +266,34 @@
   /*                                                                       */
   /*    score      :: Used to score the segment when selecting them.       */
   /*                                                                       */
-  struct AH_Segment
+  typedef struct AH_SegmentRec_
   {
     AH_Edge_Flags  flags;
     AH_Direction   dir;
 
-    AH_Point*      first;       /* first point in edge segment             */
-    AH_Point*      last;        /* last point in edge segment              */
-    AH_Point**     contour;     /* ptr to first point of segment's contour */
+    AH_Point       first;       /* first point in edge segment             */
+    AH_Point       last;        /* last point in edge segment              */
+    AH_Point *     contour;     /* ptr to first point of segment's contour */
 
     FT_Pos         pos;         /* position of segment           */
     FT_Pos         min_coord;   /* minimum coordinate of segment */
     FT_Pos         max_coord;   /* maximum coordinate of segment */
 
-    AH_Edge*       edge;
-    AH_Segment*    edge_next;
+    AH_Edge        edge;
+    AH_Segment     edge_next;
 
-    AH_Segment*    link;        /* link segment               */
-    AH_Segment*    serif;       /* primary segment for serifs */
+    AH_Segment     link;        /* link segment               */
+    AH_Segment     serif;       /* primary segment for serifs */
     FT_Pos         num_linked;  /* number of linked segments  */
     FT_Int         score;
-  };
+
+  } AH_SegmentRec;
 
 
   /*************************************************************************/
   /*                                                                       */
   /* <Struct>                                                              */
-  /*    AH_Edge                                                            */
+  /*    AH_EdgeRec                                                         */
   /*                                                                       */
   /* <Description>                                                         */
   /*    A structure used to describe an edge, which really is a horizontal */
@@ -325,29 +327,30 @@
   /*                  Only set for some of the horizontal edges in a Latin */
   /*                  font.                                                */
   /*                                                                       */
-  struct AH_Edge
+  typedef struct AH_EdgeRec_
   {
     AH_Edge_Flags  flags;
     AH_Direction   dir;
 
-    AH_Segment*    first;
-    AH_Segment*    last;
+    AH_Segment     first;
+    AH_Segment     last;
 
     FT_Pos         fpos;
     FT_Pos         opos;
     FT_Pos         pos;
 
-    AH_Edge*       link;
-    AH_Edge*       serif;
+    AH_Edge        link;
+    AH_Edge        serif;
     FT_Int         num_linked;
 
     FT_Int         score;
     FT_Pos*        blue_edge;
-  };
+
+  } AH_EdgeRec;
 
 
   /* an outline as seen by the hinter */
-  typedef struct  AH_Outline_
+  typedef struct  AH_OutlineRec_
   {
     FT_Memory     memory;
 
@@ -360,39 +363,39 @@
 
     FT_Int        max_points;
     FT_Int        num_points;
-    AH_Point*     points;
+    AH_Point      points;
 
     FT_Int        max_contours;
     FT_Int        num_contours;
-    AH_Point**    contours;
+    AH_Point *    contours;
 
     FT_Int        num_hedges;
-    AH_Edge*      horz_edges;
+    AH_Edge       horz_edges;
 
     FT_Int        num_vedges;
-    AH_Edge*      vert_edges;
+    AH_Edge       vert_edges;
 
     FT_Int        num_hsegments;
-    AH_Segment*   horz_segments;
+    AH_Segment    horz_segments;
 
     FT_Int        num_vsegments;
-    AH_Segment*   vert_segments;
+    AH_Segment    vert_segments;
 
-  } AH_Outline;
+  } AH_OutlineRec, *AH_Outline;
 
 
-#define ah_blue_capital_top     0                              /* THEZOCQS */
-#define ah_blue_capital_bottom  ( ah_blue_capital_top + 1 )    /* HEZLOCUS */
-#define ah_blue_small_top       ( ah_blue_capital_bottom + 1 ) /* xzroesc  */
-#define ah_blue_small_bottom    ( ah_blue_small_top + 1 )      /* xzroesc  */
-#define ah_blue_small_minor     ( ah_blue_small_bottom + 1 )   /* pqgjy    */
-#define ah_blue_max             ( ah_blue_small_minor + 1 )
+#define AH_BLUE_CAPITAL_TOP     0                              /* THEZOCQS */
+#define AH_BLUE_CAPITAL_BOTTOM  ( AH_BLUE_CAPITAL_TOP + 1 )    /* HEZLOCUS */
+#define AH_BLUE_SMALL_TOP       ( AH_BLUE_CAPITAL_BOTTOM + 1 ) /* xzroesc  */
+#define AH_BLUE_SMALL_BOTTOM    ( AH_BLUE_SMALL_TOP + 1 )      /* xzroesc  */
+#define AH_BLUE_SMALL_MINOR     ( AH_BLUE_SMALL_BOTTOM + 1 )   /* pqgjy    */
+#define AH_BLUE_MAX             ( AH_BLUE_SMALL_MINOR + 1 )
 
   typedef FT_Int  AH_Blue;
 
 
-#define ah_hinter_monochrome  1
-#define ah_hinter_optimize    2
+#define AH_HINTER_MONOCHROME  1
+#define AH_HINTER_OPTIMIZE    2
 
   typedef FT_Int  AH_Hinter_Flags;
 
@@ -400,7 +403,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Struct>                                                              */
-  /*    AH_Globals                                                         */
+  /*    AH_GlobalsRec                                                      */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Holds the global metrics for a given font face (be it in design    */
@@ -419,7 +422,7 @@
   /*                                                                       */
   /*    blue_shoots :: The overshoot positions of blue zones.              */
   /*                                                                       */
-  typedef struct  AH_Globals_
+  typedef struct  AH_GlobalsRec_
   {
     FT_Int  num_widths;
     FT_Int  num_heights;
@@ -429,16 +432,16 @@
     FT_Pos  widths [AH_MAX_WIDTHS];
     FT_Pos  heights[AH_MAX_HEIGHTS];
 
-    FT_Pos  blue_refs  [ah_blue_max];
-    FT_Pos  blue_shoots[ah_blue_max];
+    FT_Pos  blue_refs  [AH_BLUE_MAX];
+    FT_Pos  blue_shoots[AH_BLUE_MAX];
 
-  } AH_Globals;
+  } AH_GlobalsRec, *AH_Globals;
 
 
   /*************************************************************************/
   /*                                                                       */
   /* <Struct>                                                              */
-  /*    AH_Face_Globals                                                    */
+  /*    AH_Face_GlobalsRec                                                 */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Holds the complete global metrics for a given font face (i.e., the */
@@ -456,19 +459,19 @@
   /*                                                                       */
   /*    y_scale :: The current vertical scale.                             */
   /*                                                                       */
-  typedef struct  AH_Face_Globals_
+  typedef struct  AH_Face_GlobalsRec_
   {
     FT_Face     face;
-    AH_Globals  design;
-    AH_Globals  scaled;
+    AH_GlobalsRec  design;
+    AH_GlobalsRec  scaled;
     FT_Fixed    x_scale;
     FT_Fixed    y_scale;
     FT_Bool     control_overshoot;
 
-  } AH_Face_Globals;
+  } AH_Face_GlobalsRec, *AH_Face_Globals;
 
 
-  typedef struct  AH_Hinter
+  typedef struct  AH_HinterRec
   {
     FT_Memory         memory;
     AH_Hinter_Flags   flags;
@@ -476,9 +479,9 @@
     FT_Int            algorithm;
     FT_Face           face;
 
-    AH_Face_Globals*  globals;
+    AH_Face_Globals   globals;
 
-    AH_Outline*       glyph;
+    AH_Outline        glyph;
 
     AH_Loader         loader;
     FT_Vector         pp1;
@@ -488,11 +491,11 @@
     FT_Vector         trans_delta;
     FT_Matrix         trans_matrix;
 
-  } AH_Hinter;
+  } AH_HinterRec, *AH_Hinter;
 
 
 #ifdef  DEBUG_HINTER
-  extern AH_Hinter*  ah_debug_hinter;
+  extern AH_Hinter   ah_debug_hinter;
   extern FT_Bool     ah_debug_disable_horz;
   extern FT_Bool     ah_debug_disable_vert;
 #else
diff --git a/src/base/ftbbox.c b/src/base/ftbbox.c
index 2e08051..dd445d8 100644
--- a/src/base/ftbbox.c
+++ b/src/base/ftbbox.c
@@ -602,7 +602,7 @@
       if ( y < cbox.yMin ) cbox.yMin = y;
       if ( y > cbox.yMax ) cbox.yMax = y;
 
-      if ( FT_CURVE_TAG( outline->tags[n] ) == FT_Curve_Tag_On )
+      if ( FT_CURVE_TAG( outline->tags[n] ) == FT_CURVE_TAG_ON )
       {
         /* update bbox for `on' points only */
         if ( x < bbox.xMin ) bbox.xMin = x;
diff --git a/src/base/ftglyph.c b/src/base/ftglyph.c
index f7c7068..a52ef29 100644
--- a/src/base/ftglyph.c
+++ b/src/base/ftglyph.c
@@ -147,7 +147,7 @@
     FT_Memory   memory  = library->memory;
 
 
-    if ( slot->format != ft_glyph_format_bitmap )
+    if ( slot->format != FT_GLYPH_FORMAT_BITMAP )
     {
       error = FT_Err_Invalid_Glyph_Format;
       goto Exit;
@@ -209,14 +209,14 @@
   const FT_Glyph_Class  ft_bitmap_glyph_class =
   {
     sizeof( FT_BitmapGlyphRec ),
-    ft_glyph_format_bitmap,
+    FT_GLYPH_FORMAT_BITMAP,
 
-    (FT_Glyph_Init_Func)     ft_bitmap_glyph_init,
-    (FT_Glyph_Done_Func)     ft_bitmap_glyph_done,
-    (FT_Glyph_Copy_Func)     ft_bitmap_glyph_copy,
-    (FT_Glyph_Transform_Func)0,
-    (FT_Glyph_BBox_Func)     ft_bitmap_glyph_bbox,
-    (FT_Glyph_Prepare_Func)  0
+    (FT_Glyph_InitFunc)     ft_bitmap_glyph_init,
+    (FT_Glyph_DoneFunc)     ft_bitmap_glyph_done,
+    (FT_Glyph_CopyFunc)     ft_bitmap_glyph_copy,
+    (FT_Glyph_TransformFunc)0,
+    (FT_Glyph_GetBBoxFunc)     ft_bitmap_glyph_bbox,
+    (FT_Glyph_PrepareFunc)  0
   };
 
 
@@ -240,7 +240,7 @@
 
 
     /* check format in glyph slot */
-    if ( slot->format != ft_glyph_format_outline )
+    if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
     {
       error = FT_Err_Invalid_Glyph_Format;
       goto Exit;
@@ -262,8 +262,8 @@
     FT_MEM_COPY( target->contours, source->contours,
               source->n_contours * sizeof ( FT_Short ) );
 
-    /* copy all flags, except the `ft_outline_owner' one */
-    target->flags = source->flags | ft_outline_owner;
+    /* copy all flags, except the `FT_OUTLINE_OWNER' one */
+    target->flags = source->flags | FT_OUTLINE_OWNER;
 
   Exit:
     return error;
@@ -319,9 +319,9 @@
   ft_outline_glyph_prepare( FT_OutlineGlyph  glyph,
                             FT_GlyphSlot     slot )
   {
-    slot->format         = ft_glyph_format_outline;
+    slot->format         = FT_GLYPH_FORMAT_OUTLINE;
     slot->outline        = glyph->outline;
-    slot->outline.flags &= ~ft_outline_owner;
+    slot->outline.flags &= ~FT_OUTLINE_OWNER;
 
     return FT_Err_Ok;
   }
@@ -330,14 +330,14 @@
   const FT_Glyph_Class  ft_outline_glyph_class =
   {
     sizeof( FT_OutlineGlyphRec ),
-    ft_glyph_format_outline,
+    FT_GLYPH_FORMAT_OUTLINE,
 
-    (FT_Glyph_Init_Func)     ft_outline_glyph_init,
-    (FT_Glyph_Done_Func)     ft_outline_glyph_done,
-    (FT_Glyph_Copy_Func)     ft_outline_glyph_copy,
-    (FT_Glyph_Transform_Func)ft_outline_glyph_transform,
-    (FT_Glyph_BBox_Func)     ft_outline_glyph_bbox,
-    (FT_Glyph_Prepare_Func)  ft_outline_glyph_prepare
+    (FT_Glyph_InitFunc)     ft_outline_glyph_init,
+    (FT_Glyph_DoneFunc)     ft_outline_glyph_done,
+    (FT_Glyph_CopyFunc)     ft_outline_glyph_copy,
+    (FT_Glyph_TransformFunc)ft_outline_glyph_transform,
+    (FT_Glyph_GetBBoxFunc)     ft_outline_glyph_bbox,
+    (FT_Glyph_PrepareFunc)  ft_outline_glyph_prepare
   };
 
 
@@ -435,11 +435,11 @@
       return FT_Err_Invalid_Argument;
 
     /* if it is a bitmap, that's easy :-) */
-    if ( slot->format == ft_glyph_format_bitmap )
+    if ( slot->format == FT_GLYPH_FORMAT_BITMAP )
       clazz = &ft_bitmap_glyph_class;
 
     /* it it is an outline too */
-    else if ( slot->format == ft_glyph_format_outline )
+    else if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
       clazz = &ft_outline_glyph_class;
 
     else
diff --git a/src/base/ftmac.c b/src/base/ftmac.c
index d433992..2d37d39 100644
--- a/src/base/ftmac.c
+++ b/src/base/ftmac.c
@@ -530,11 +530,11 @@
       return error;
     }
 
-    args.flags = ft_open_stream;
+    args.flags = FT_OPEN_STREAM;
     args.stream = stream;
     if ( driver_name )
     {
-      args.flags = args.flags | ft_open_driver;
+      args.flags = args.flags | FT_OPEN_DRIVER;
       args.driver = FT_Get_Module( library, driver_name );
     }
 
@@ -910,7 +910,7 @@
 #endif
 
     /* let it fall through to normal loader (.ttf, .otf, etc.) */
-    args.flags    = ft_open_pathname;
+    args.flags    = FT_OPEN_PATHNAME;
     args.pathname = (char*)pathname;
     return FT_Open_Face( library, &args, face_index, aface );
   }
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index 59ac1b8..f9a2f61 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -98,20 +98,20 @@
 
     stream->memory = memory;
 
-    if ( args->flags & ft_open_memory )
+    if ( args->flags & FT_OPEN_MEMORY )
     {
       /* create a memory-based stream */
       FT_Stream_OpenMemory( stream,
                             (const FT_Byte*)args->memory_base,
                             args->memory_size );
     }
-    else if ( args->flags & ft_open_pathname )
+    else if ( args->flags & FT_OPEN_PATHNAME )
     {
       /* create a normal system stream */
       error = FT_Stream_Open( stream, args->pathname );
       stream->pathname.pointer = args->pathname;
     }
-    else if ( ( args->flags & ft_open_stream ) && args->stream )
+    else if ( ( args->flags & FT_OPEN_STREAM ) && args->stream )
     {
       /* use an existing, user-provided stream */
 
@@ -222,7 +222,7 @@
     slot->control_data  = 0;
     slot->control_len   = 0;
     slot->other         = 0;
-    slot->format        = ft_glyph_format_none;
+    slot->format        = FT_GLYPH_FORMAT_NONE;
 
     slot->linearHoriAdvance = 0;
     slot->linearVertAdvance = 0;
@@ -472,7 +472,7 @@
                                            glyph_index,
                                            load_flags | FT_LOAD_SBITS_ONLY );
 
-        if ( !error && slot->format == ft_glyph_format_bitmap )
+        if ( !error && slot->format == FT_GLYPH_FORMAT_BITMAP )
           goto Load_Ok;
       }
 
@@ -549,14 +549,14 @@
 
     /* do we need to render the image now? */
     if ( !error                                    &&
-         slot->format != ft_glyph_format_bitmap    &&
-         slot->format != ft_glyph_format_composite &&
+         slot->format != FT_GLYPH_FORMAT_BITMAP    &&
+         slot->format != FT_GLYPH_FORMAT_COMPOSITE &&
          load_flags & FT_LOAD_RENDER )
     {
       error = FT_Render_Glyph( slot,
                                ( load_flags & FT_LOAD_MONOCHROME )
-                                  ? ft_render_mode_mono
-                                  : ft_render_mode_normal );
+                                  ? FT_RENDER_MODE_MONO
+                                  : FT_RENDER_MODE_NORMAL );
     }
 
   Exit:
@@ -758,7 +758,7 @@
       {
         cmap = face->charmaps[nn];
 
-        if ( cmap->encoding == ft_encoding_unicode )
+        if ( cmap->encoding == FT_ENCODING_UNICODE )
         {
           unicmap = cmap;
           break;
@@ -804,7 +804,7 @@
     if ( !pathname )
       return FT_Err_Invalid_Argument;
 
-    args.flags    = ft_open_pathname;
+    args.flags    = FT_OPEN_PATHNAME;
     args.pathname = (char*)pathname;
 
     return FT_Open_Face( library, &args, face_index, aface );
@@ -829,7 +829,7 @@
     if ( !file_base )
       return FT_Err_Invalid_Argument;
 
-    args.flags       = ft_open_memory;
+    args.flags       = FT_OPEN_MEMORY;
     args.memory_base = file_base;
     args.memory_size = file_size;
 
@@ -862,7 +862,7 @@
 
     *aface = 0;
 
-    external_stream = FT_BOOL( ( args->flags & ft_open_stream ) &&
+    external_stream = FT_BOOL( ( args->flags & FT_OPEN_STREAM ) &&
                                args->stream                     );
 
     /* create input stream */
@@ -874,7 +874,7 @@
 
     /* If the font driver is specified in the `args' structure, use */
     /* it.  Otherwise, we scan the list of registered drivers.      */
-    if ( ( args->flags & ft_open_driver ) && args->driver )
+    if ( ( args->flags & FT_OPEN_DRIVER ) && args->driver )
     {
       driver = FT_DRIVER( args->driver );
 
@@ -885,7 +885,7 @@
         FT_Parameter*  params     = 0;
 
 
-        if ( args->flags & ft_open_params )
+        if ( args->flags & FT_OPEN_PARAMS )
         {
           num_params = args->num_params;
           params     = args->params;
@@ -920,7 +920,7 @@
 
           driver = FT_DRIVER( cur[0] );
 
-          if ( args->flags & ft_open_params )
+          if ( args->flags & FT_OPEN_PARAMS )
           {
             num_params = args->num_params;
             params     = args->params;
@@ -1029,7 +1029,7 @@
     if ( !filepathname )
       return FT_Err_Invalid_Argument;
 
-    open.flags    = ft_open_pathname;
+    open.flags    = FT_OPEN_PATHNAME;
     open.pathname = (char*)filepathname;
 
     return FT_Attach_Stream( face, &open );
@@ -1073,7 +1073,7 @@
     /* close the attached stream */
     ft_input_stream_free( stream,
                     (FT_Bool)( parameters->stream &&
-                               ( parameters->flags & ft_open_stream ) ) );
+                               ( parameters->flags & FT_OPEN_STREAM ) ) );
 
   Exit:
     return error;
@@ -1399,12 +1399,12 @@
                                           akerning );
       if ( !error )
       {
-        if ( kern_mode != ft_kerning_unscaled )
+        if ( kern_mode != FT_KERNING_UNSCALED )
         {
           akerning->x = FT_MulFix( akerning->x, face->size->metrics.x_scale );
           akerning->y = FT_MulFix( akerning->y, face->size->metrics.y_scale );
 
-          if ( kern_mode != ft_kerning_unfitted )
+          if ( kern_mode != FT_KERNING_UNFITTED )
           {
             akerning->x = ( akerning->x + 32 ) & -64;
             akerning->y = ( akerning->y + 32 ) & -64;
@@ -1853,7 +1853,7 @@
     FT_Renderer  renderer;
 
 
-    renderer = FT_Lookup_Renderer( library, ft_glyph_format_outline, 0 );
+    renderer = FT_Lookup_Renderer( library, FT_GLYPH_FORMAT_OUTLINE, 0 );
     library->cur_renderer = renderer;
   }
 
@@ -1879,7 +1879,7 @@
       render->glyph_format = clazz->glyph_format;
 
       /* allocate raster object if needed */
-      if ( clazz->glyph_format == ft_glyph_format_outline &&
+      if ( clazz->glyph_format == FT_GLYPH_FORMAT_OUTLINE &&
            clazz->raster_class->raster_new )
       {
         error = clazz->raster_class->raster_new( memory, &render->raster );
@@ -1972,12 +1972,12 @@
 
     FT_List_Up( &library->renderers, node );
 
-    if ( renderer->glyph_format == ft_glyph_format_outline )
+    if ( renderer->glyph_format == FT_GLYPH_FORMAT_OUTLINE )
       library->cur_renderer = renderer;
 
     if ( num_params > 0 )
     {
-      FTRenderer_setMode  set_mode = renderer->clazz->set_mode;
+      FT_Renderer_SetModeFunc  set_mode = renderer->clazz->set_mode;
 
 
       for ( ; num_params > 0; num_params-- )
@@ -2005,7 +2005,7 @@
     /* if it is already a bitmap, no need to do anything */
     switch ( slot->format )
     {
-    case ft_glyph_format_bitmap:   /* already a bitmap, don't do anything */
+    case FT_GLYPH_FORMAT_BITMAP:   /* already a bitmap, don't do anything */
       break;
 
     default:
@@ -2015,7 +2015,7 @@
 
 
         /* small shortcut for the very common case */
-        if ( slot->format == ft_glyph_format_outline )
+        if ( slot->format == FT_GLYPH_FORMAT_OUTLINE )
         {
           renderer = library->cur_renderer;
           node     = library->renderers.head;
diff --git a/src/base/ftoutln.c b/src/base/ftoutln.c
index 62b0cd9..c59043b 100644
--- a/src/base/ftoutln.c
+++ b/src/base/ftoutln.c
@@ -98,14 +98,14 @@
       tag   = FT_CURVE_TAG( tags[0] );
 
       /* A contour cannot start with a cubic control point! */
-      if ( tag == FT_Curve_Tag_Cubic )
+      if ( tag == FT_CURVE_TAG_CUBIC )
         goto Invalid_Outline;
 
       /* check first point to determine origin */
-      if ( tag == FT_Curve_Tag_Conic )
+      if ( tag == FT_CURVE_TAG_CONIC )
       {
         /* first point is conic control.  Yes, this happens. */
-        if ( FT_CURVE_TAG( outline->tags[last] ) == FT_Curve_Tag_On )
+        if ( FT_CURVE_TAG( outline->tags[last] ) == FT_CURVE_TAG_ON )
         {
           /* start at last point if it is on the curve */
           v_start = v_last;
@@ -137,7 +137,7 @@
         tag = FT_CURVE_TAG( tags[0] );
         switch ( tag )
         {
-        case FT_Curve_Tag_On:  /* emit a single line_to */
+        case FT_CURVE_TAG_ON:  /* emit a single line_to */
           {
             FT_Vector  vec;
 
@@ -151,7 +151,7 @@
             continue;
           }
 
-        case FT_Curve_Tag_Conic:  /* consume conic arcs */
+        case FT_CURVE_TAG_CONIC:  /* consume conic arcs */
           v_control.x = SCALED( point->x );
           v_control.y = SCALED( point->y );
 
@@ -169,7 +169,7 @@
             vec.x = SCALED( point->x );
             vec.y = SCALED( point->y );
 
-            if ( tag == FT_Curve_Tag_On )
+            if ( tag == FT_CURVE_TAG_ON )
             {
               error = func_interface->conic_to( &v_control, &vec, user );
               if ( error )
@@ -177,7 +177,7 @@
               continue;
             }
 
-            if ( tag != FT_Curve_Tag_Conic )
+            if ( tag != FT_CURVE_TAG_CONIC )
               goto Invalid_Outline;
 
             v_middle.x = ( v_control.x + vec.x ) / 2;
@@ -194,13 +194,13 @@
           error = func_interface->conic_to( &v_control, &v_start, user );
           goto Close;
 
-        default:  /* FT_Curve_Tag_Cubic */
+        default:  /* FT_CURVE_TAG_CUBIC */
           {
             FT_Vector  vec1, vec2;
 
 
             if ( point + 1 > limit                             ||
-                 FT_CURVE_TAG( tags[1] ) != FT_Curve_Tag_Cubic )
+                 FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )
               goto Invalid_Outline;
 
             point += 2;
@@ -270,12 +270,12 @@
 
     anoutline->n_points    = (FT_UShort)numPoints;
     anoutline->n_contours  = (FT_Short)numContours;
-    anoutline->flags      |= ft_outline_owner;
+    anoutline->flags      |= FT_OUTLINE_OWNER;
 
     return FT_Err_Ok;
 
   Fail:
-    anoutline->flags |= ft_outline_owner;
+    anoutline->flags |= FT_OUTLINE_OWNER;
     FT_Outline_Done_Internal( memory, anoutline );
 
     return error;
@@ -366,11 +366,11 @@
     FT_MEM_COPY( target->contours, source->contours,
                  source->n_contours * sizeof ( FT_Short ) );
 
-    /* copy all flags, except the `ft_outline_owner' one */
-    is_owner      = target->flags & ft_outline_owner;
+    /* copy all flags, except the `FT_OUTLINE_OWNER' one */
+    is_owner      = target->flags & FT_OUTLINE_OWNER;
     target->flags = source->flags;
 
-    target->flags &= ~ft_outline_owner;
+    target->flags &= ~FT_OUTLINE_OWNER;
     target->flags |= is_owner;
 
     return FT_Err_Ok;
@@ -383,7 +383,7 @@
   {
     if ( outline )
     {
-      if ( outline->flags & ft_outline_owner )
+      if ( outline->flags & FT_OUTLINE_OWNER )
       {
         FT_FREE( outline->points   );
         FT_FREE( outline->tags     );
@@ -535,7 +535,7 @@
       first = last + 1;
     }
 
-    outline->flags ^= ft_outline_reverse_fill;
+    outline->flags ^= FT_OUTLINE_REVERSE_FILL;
   }
 
 
@@ -576,7 +576,7 @@
 
       /* now, look for another renderer that supports the same */
       /* format                                                */
-      renderer = FT_Lookup_Renderer( library, ft_glyph_format_outline,
+      renderer = FT_Lookup_Renderer( library, FT_GLYPH_FORMAT_OUTLINE,
                                      &node );
       update   = 1;
     }
@@ -608,8 +608,10 @@
     params.target = abitmap;
     params.flags  = 0;
 
-    if ( abitmap->pixel_mode == ft_pixel_mode_grays )
-      params.flags |= ft_raster_flag_aa;
+    if ( abitmap->pixel_mode == FT_PIXEL_MODE_GRAY  ||
+         abitmap->pixel_mode == FT_PIXEL_MODE_LCD   ||
+         abitmap->pixel_mode == FT_PIXEL_MODE_LCD_V )
+      params.flags |= FT_RASTER_FLAG_AA;
 
     return FT_Outline_Render( library, outline, &params );
   }
diff --git a/src/base/ftstroker.c b/src/base/ftstroker.c
index 7f6b3de..c019be7 100644
--- a/src/base/ftstroker.c
+++ b/src/base/ftstroker.c
@@ -79,7 +79,7 @@
     }
 
     theta = ft_pos_abs( FT_Angle_Diff( *angle_in, *angle_out ) );
-    
+
     return FT_BOOL( theta < FT_SMALL_CONIC_THRESHOLD );
   }
 
@@ -523,11 +523,11 @@
      for ( ; count > 0; count--, read++, write++ )
      {
        if ( *read & FT_STROKE_TAG_ON )
-         *write = FT_Curve_Tag_On;
+         *write = FT_CURVE_TAG_ON;
        else if ( *read & FT_STROKE_TAG_CUBIC )
-         *write = FT_Curve_Tag_Cubic;
+         *write = FT_CURVE_TAG_CUBIC;
        else
-         *write = FT_Curve_Tag_Conic;
+         *write = FT_CURVE_TAG_CONIC;
      }
    }
 
@@ -1008,9 +1008,9 @@
     while ( arc >= bez_stack )
     {
       FT_Angle  angle_in, angle_out;
-      
+
       angle_in = angle_out = 0;  /* remove compiler warnings */
-      
+
       if ( arc < limit &&
            !ft_conic_is_small_enough( arc, &angle_in, &angle_out ) )
       {
diff --git a/src/base/ftsynth.c b/src/base/ftsynth.c
index 437ea03..35b52e3 100644
--- a/src/base/ftsynth.c
+++ b/src/base/ftsynth.c
@@ -43,7 +43,7 @@
 
 
     /* only oblique outline glyphs */
-    if ( slot->format != ft_glyph_format_outline )
+    if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
       return;
 
     /* we don't touch the advance width */
@@ -116,7 +116,7 @@
 
 
   /* Compute the orientation of path filling.  It differs between TrueType */
-  /* and Type1 formats.  We could use the `ft_outline_reverse_fill' flag,  */
+  /* and Type1 formats.  We could use the `FT_OUTLINE_REVERSE_FILL' flag,  */
   /* but it is better to re-compute it directly (it seems that this flag   */
   /* isn't correctly set for some weird composite glyphs currently).       */
   /*                                                                       */
@@ -212,7 +212,7 @@
 
 
     /* only embolden outline glyph images */
-    if ( slot->format != ft_glyph_format_outline )
+    if ( slot->format != FT_GLYPH_FORMAT_OUTLINE )
       return;
 
     /* compute control distance */
diff --git a/src/bdf/bdfdrivr.c b/src/bdf/bdfdrivr.c
index 967ceca..b379a98 100644
--- a/src/bdf/bdfdrivr.c
+++ b/src/bdf/bdfdrivr.c
@@ -398,13 +398,13 @@
 
 
               charmap.face        = FT_FACE( face );
-              charmap.encoding    = ft_encoding_none;
+              charmap.encoding    = FT_ENCODING_NONE;
               charmap.platform_id = 0;
               charmap.encoding_id = 0;
 
               if ( unicode_charmap )
               {
-                charmap.encoding    = ft_encoding_unicode;
+                charmap.encoding    = FT_ENCODING_UNICODE;
                 charmap.platform_id = 3;
                 charmap.encoding_id = 1;
               }
@@ -429,7 +429,7 @@
 
 
           charmap.face        = FT_FACE( face );
-          charmap.encoding    = ft_encoding_adobe_standard;
+          charmap.encoding    = FT_ENCODING_ADOBE_STANDARD;
           charmap.platform_id = 7;
           charmap.encoding_id = 0;
 
@@ -510,7 +510,7 @@
 
     if ( bpp == 1 )
     {
-      bitmap->pixel_mode = ft_pixel_mode_mono;
+      bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
       bitmap->pitch      = glyph.bpr;
 
       if ( FT_NEW_ARRAY( bitmap->buffer, glyph.bytes ) )
@@ -520,7 +520,7 @@
     else
     {
       /* blow up pixmap to have 8 bits per pixel */
-      bitmap->pixel_mode = ft_pixel_mode_grays;
+      bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
       bitmap->pitch      = bitmap->width;
 
       if ( FT_NEW_ARRAY( bitmap->buffer, bitmap->rows * bitmap->pitch ) )
@@ -623,7 +623,7 @@
     slot->metrics.height       = bitmap->rows << 6;
 
     slot->linearHoriAdvance = (FT_Fixed)glyph.dwidth << 16;
-    slot->format            = ft_glyph_format_bitmap;
+    slot->format            = FT_GLYPH_FORMAT_BITMAP;
     slot->flags             = FT_GLYPH_OWN_BITMAP;
 
   Exit:
diff --git a/src/cache/ftcimage.c b/src/cache/ftcimage.c
index 101db85..57915dd 100644
--- a/src/cache/ftcimage.c
+++ b/src/cache/ftcimage.c
@@ -143,8 +143,8 @@
       error = FT_Load_Glyph( face, gindex, load_flags );
       if ( !error )
       {
-        if ( face->glyph->format == ft_glyph_format_bitmap  ||
-             face->glyph->format == ft_glyph_format_outline )
+        if ( face->glyph->format == FT_GLYPH_FORMAT_BITMAP  ||
+             face->glyph->format == FT_GLYPH_FORMAT_OUTLINE )
         {
           /* ok, copy it */
           FT_Glyph  glyph;
@@ -179,7 +179,7 @@
 
     switch ( glyph->format )
     {
-    case ft_glyph_format_bitmap:
+    case FT_GLYPH_FORMAT_BITMAP:
       {
         FT_BitmapGlyph  bitg;
 
@@ -190,7 +190,7 @@
       }
       break;
 
-    case ft_glyph_format_outline:
+    case FT_GLYPH_FORMAT_OUTLINE:
       {
         FT_OutlineGlyph  outg;
 
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 9fd8968..c9098fc 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -423,7 +423,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;
     }
@@ -525,7 +525,7 @@
       /* `delete' last point only if it coincides with the first    */
       /* point and if it is not a control point (which can happen). */
       if ( p1->x == p2->x && p1->y == p2->y )
-        if ( *control == FT_Curve_Tag_On )
+        if ( *control == FT_CURVE_TAG_ON )
           outline->n_points--;
     }
 
@@ -692,7 +692,7 @@
       /* set up remaining glyph fields */
       glyph->num_subglyphs = 2;
       glyph->subglyphs     = loader->base.subglyphs;
-      glyph->format        = ft_glyph_format_composite;
+      glyph->format        = FT_GLYPH_FORMAT_COMPOSITE;
 
       loader->current.num_subglyphs = 2;
     }
@@ -2291,7 +2291,7 @@
     hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE   ) == 0 &&
                        ( load_flags & FT_LOAD_NO_HINTING ) == 0 );
 
-    glyph->root.format = ft_glyph_format_outline;  /* by default */
+    glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;  /* by default */
 
     {
       FT_Byte*  charstring;
@@ -2381,13 +2381,13 @@
 
         glyph->root.linearVertAdvance = 0;
 
-        glyph->root.format = ft_glyph_format_outline;
+        glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
 
         glyph->root.outline.flags = 0;
         if ( size && size->metrics.y_ppem < 24 )
-          glyph->root.outline.flags |= ft_outline_high_precision;
+          glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION;
 
-        glyph->root.outline.flags |= ft_outline_reverse_fill;
+        glyph->root.outline.flags |= FT_OUTLINE_REVERSE_FILL;
 
         /* apply the font matrix */
         FT_Outline_Transform( &glyph->root.outline, &font_matrix );
diff --git a/src/cff/cffobjs.c b/src/cff/cffobjs.c
index a1b6166..cc321ef 100644
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -480,7 +480,7 @@
         cmaprec.face        = root;
         cmaprec.platform_id = 3;
         cmaprec.encoding_id = 1;
-        cmaprec.encoding    = ft_encoding_unicode;
+        cmaprec.encoding    = FT_ENCODING_UNICODE;
 
         nn = (FT_UInt) root->num_charmaps;
 
@@ -503,19 +503,19 @@
           {
             case 0:
               cmaprec.encoding_id = 0;
-              cmaprec.encoding    = ft_encoding_adobe_standard;
+              cmaprec.encoding    = FT_ENCODING_ADOBE_STANDARD;
               clazz               = &cff_cmap_encoding_class_rec;
               break;
 
             case 1:
               cmaprec.encoding_id = 1;
-              cmaprec.encoding    = ft_encoding_adobe_expert;
+              cmaprec.encoding    = FT_ENCODING_ADOBE_EXPERT;
               clazz               = &cff_cmap_encoding_class_rec;
               break;
 
             default:
               cmaprec.encoding_id = 3;
-              cmaprec.encoding    = ft_encoding_adobe_custom;
+              cmaprec.encoding    = FT_ENCODING_ADOBE_CUSTOM;
               clazz               = &cff_cmap_encoding_class_rec;
           }
 
diff --git a/src/cid/cidgload.c b/src/cid/cidgload.c
index 04a66c2..b5b58f1 100644
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -206,8 +206,8 @@
 
 
   FT_LOCAL_DEF( FT_Error )
-  CID_Compute_Max_Advance( CID_Face  face,
-                           FT_Int*   max_advance )
+  cid_face_compute_max_advance( CID_Face  face,
+                                FT_Int*   max_advance )
   {
     FT_Error       error;
     T1_DecoderRec  decoder;
@@ -269,10 +269,10 @@
 
 
   FT_LOCAL_DEF( FT_Error )
-  CID_Load_Glyph( CID_GlyphSlot  glyph,
-                  CID_Size       size,
-                  FT_Int         glyph_index,
-                  FT_Int         load_flags )
+  cid_slot_load_glyph( CID_GlyphSlot  glyph,
+                       CID_Size       size,
+                       FT_Int         glyph_index,
+                       FT_Int         load_flags )
   {
     FT_Error       error;
     T1_DecoderRec  decoder;
@@ -296,7 +296,7 @@
     hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE   ) == 0 &&
                        ( load_flags & FT_LOAD_NO_HINTING ) == 0 );
 
-    glyph->root.format = ft_glyph_format_outline;
+    glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
 
     {
       error = psaux->t1_decoder_funcs->init( &decoder,
@@ -326,8 +326,8 @@
     /* bearing the yMax                                    */
     if ( !error )
     {
-      glyph->root.outline.flags &= ft_outline_owner;
-      glyph->root.outline.flags |= ft_outline_reverse_fill;
+      glyph->root.outline.flags &= FT_OUTLINE_OWNER;
+      glyph->root.outline.flags |= FT_OUTLINE_REVERSE_FILL;
 
       /* for composite glyphs, return only left side bearing and */
       /* advance width                                           */
@@ -360,10 +360,10 @@
         metrics->vertAdvance  = 0;
 
         glyph->root.linearVertAdvance = 0;
-        glyph->root.format = ft_glyph_format_outline;
+        glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
 
         if ( size && size->root.metrics.y_ppem < 24 )
-          glyph->root.outline.flags |= ft_outline_high_precision;
+          glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION;
 
         /* apply the font matrix */
         FT_Outline_Transform( &glyph->root.outline, &font_matrix );
diff --git a/src/cid/cidgload.h b/src/cid/cidgload.h
index 20cdba1..578b7c4 100644
--- a/src/cid/cidgload.h
+++ b/src/cid/cidgload.h
@@ -31,16 +31,16 @@
 
   /* Compute the maximum advance width of a font through quick parsing */
   FT_LOCAL( FT_Error )
-  CID_Compute_Max_Advance( CID_Face  face,
-                           FT_Int*   max_advance );
+  cid_face_compute_max_advance( CID_Face  face,
+                                FT_Int*   max_advance );
 
 #endif /* 0 */
 
   FT_LOCAL( FT_Error )
-  CID_Load_Glyph( CID_GlyphSlot  glyph,
-                  CID_Size       size,
-                  FT_Int         glyph_index,
-                  FT_Int         load_flags );
+  cid_slot_load_glyph( CID_GlyphSlot  glyph,
+                       CID_Size       size,
+                       FT_Int         glyph_index,
+                       FT_Int         load_flags );
 
 
 FT_END_HEADER
diff --git a/src/cid/cidload.c b/src/cid/cidload.c
index fe9d724..66a3cbe 100644
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -146,10 +146,10 @@
     /* now, load the keyword data in the object's field(s) */
     if ( keyword->type == T1_FIELD_TYPE_INTEGER_ARRAY ||
          keyword->type == T1_FIELD_TYPE_FIXED_ARRAY   )
-      error = CID_Load_Field_Table( &loader->parser, keyword,
+      error = cid_parser_load_field_table( &loader->parser, keyword,
                                     &dummy_object );
     else
-      error = CID_Load_Field( &loader->parser, keyword, &dummy_object );
+      error = cid_parser_load_field( &loader->parser, keyword, &dummy_object );
   Exit:
     return error;
   }
@@ -163,7 +163,7 @@
     FT_BBox*  bbox = &face->cid.font_bbox;
 
 
-    (void)CID_ToFixedArray( parser, 4, temp, 0 );
+    (void)cid_parser_to_fixed_array( parser, 4, temp, 0 );
     bbox->xMin = FT_RoundFix( temp[0] );
     bbox->yMin = FT_RoundFix( temp[1] );
     bbox->xMax = FT_RoundFix( temp[2] );
@@ -192,7 +192,7 @@
       matrix = &dict->font_matrix;
       offset = &dict->font_offset;
 
-      (void)CID_ToFixedArray( parser, 6, temp, 3 );
+      (void)cid_parser_to_fixed_array( parser, 6, temp, 3 );
 
       temp_scale = ABS( temp[3] );
 
@@ -238,7 +238,7 @@
     FT_Long       num_dicts;
 
 
-    num_dicts = CID_ToInt( parser );
+    num_dicts = cid_parser_to_int( parser );
 
     if ( !cid->font_dicts )
     {
@@ -362,7 +362,7 @@
                 {
                   /* we found it - run the parsing callback */
                   parser->root.cursor = cur2;
-                  CID_Skip_Spaces( parser );
+                  cid_parser_skip_spaces( parser );
                   parser->root.error = cid_load_keyword( face,
                                                          loader,
                                                          keyword );
@@ -508,12 +508,12 @@
 
 
     /* finalize parser */
-    CID_Done_Parser( parser );
+    cid_parser_done( parser );
   }
 
 
   FT_LOCAL_DEF( FT_Error )
-  CID_Open_Face( CID_Face  face )
+  cid_face_open( CID_Face  face )
   {
     CID_Loader   loader;
     CID_Parser*  parser;
@@ -523,7 +523,7 @@
     t1_init_loader( &loader, face );
 
     parser = &loader.parser;
-    error = CID_New_Parser( parser, face->root.stream, face->root.memory,
+    error = cid_parser_new( parser, face->root.stream, face->root.memory,
                             (PSAux_Service)face->psaux );
     if ( error )
       goto Exit;
diff --git a/src/cid/cidload.h b/src/cid/cidload.h
index 66e6d2f..8fc577d 100644
--- a/src/cid/cidload.h
+++ b/src/cid/cidload.h
@@ -46,7 +46,7 @@
                FT_UShort  seed );
 
   FT_LOCAL( FT_Error )
-  CID_Open_Face( CID_Face  face );
+  cid_face_open( CID_Face  face );
 
 
 FT_END_HEADER
diff --git a/src/cid/cidobjs.c b/src/cid/cidobjs.c
index f003a28..b839fbf 100644
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -45,14 +45,14 @@
   /*************************************************************************/
 
   FT_LOCAL_DEF( void )
-  CID_GlyphSlot_Done( CID_GlyphSlot  slot )
+  cid_slot_done( CID_GlyphSlot  slot )
   {
     slot->root.internal->glyph_hints = 0;
   }
 
 
   FT_LOCAL_DEF( FT_Error )
-  CID_GlyphSlot_Init( CID_GlyphSlot  slot )
+  cid_slot_init( CID_GlyphSlot  slot )
   {
     CID_Face          face;
     PSHinter_Service  pshinter;
@@ -90,7 +90,7 @@
 
 
   static PSH_Globals_Funcs
-  CID_Size_Get_Globals_Funcs( CID_Size  size )
+  cid_size_get_globals_funcs( CID_Size  size )
   {
     CID_Face          face     = (CID_Face)size->root.face;
     PSHinter_Service  pshinter = (PSHinter_Service)face->pshinter;
@@ -106,14 +106,14 @@
 
 
   FT_LOCAL_DEF( void )
-  CID_Size_Done( CID_Size  size )
+  cid_size_done( CID_Size  size )
   {
     if ( size->root.internal )
     {
       PSH_Globals_Funcs  funcs;
 
 
-      funcs = CID_Size_Get_Globals_Funcs( size );
+      funcs = cid_size_get_globals_funcs( size );
       if ( funcs )
         funcs->destroy( (PSH_Globals)size->root.internal );
 
@@ -126,7 +126,7 @@
   CID_Size_Init( CID_Size  size )
   {
     FT_Error           error = 0;
-    PSH_Globals_Funcs  funcs = CID_Size_Get_Globals_Funcs( size );
+    PSH_Globals_Funcs  funcs = cid_size_get_globals_funcs( size );
 
 
     if ( funcs )
@@ -147,9 +147,9 @@
 
 
   FT_LOCAL_DEF( FT_Error )
-  CID_Size_Reset( CID_Size  size )
+  cid_size_reset( CID_Size  size )
   {
-    PSH_Globals_Funcs  funcs = CID_Size_Get_Globals_Funcs( size );
+    PSH_Globals_Funcs  funcs = cid_size_get_globals_funcs( size );
     FT_Error           error = 0;
 
 
@@ -171,7 +171,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    CID_Face_Done                                                      */
+  /*    cid_face_done                                                      */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Finalizes a given face object.                                     */
@@ -180,7 +180,7 @@
   /*    face :: A pointer to the face object to destroy.                   */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  CID_Face_Done( CID_Face  face )
+  cid_face_done( CID_Face  face )
   {
     FT_Memory  memory;
 
@@ -239,7 +239,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    CID_Face_Init                                                      */
+  /*    cid_face_init                                                      */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Initializes a given CID face object.                               */
@@ -260,7 +260,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  CID_Face_Init( FT_Stream      stream,
+  cid_face_init( FT_Stream      stream,
                  CID_Face       face,
                  FT_Int         face_index,
                  FT_Int         num_params,
@@ -310,7 +310,7 @@
     if ( FT_STREAM_SEEK( 0 ) )
       goto Exit;
 
-    error = CID_Open_Face( face );
+    error = cid_face_open( face );
     if ( error )
       goto Exit;
 
@@ -321,7 +321,7 @@
     /* check the face index */
     if ( face_index != 0 )
     {
-      FT_ERROR(( "CID_Face_Init: invalid face index\n" ));
+      FT_ERROR(( "cid_face_init: invalid face index\n" ));
       error = CID_Err_Invalid_Argument;
       goto Exit;
     }
@@ -407,7 +407,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    CID_Driver_Init                                                    */
+  /*    cid_driver_init                                                    */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Initializes a given CID driver object.                             */
@@ -419,7 +419,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  CID_Driver_Init( CID_Driver  driver )
+  cid_driver_init( CID_Driver  driver )
   {
     FT_UNUSED( driver );
 
@@ -430,7 +430,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    CID_Driver_Done                                                    */
+  /*    cid_driver_done                                                    */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Finalizes a given CID driver.                                      */
@@ -439,7 +439,7 @@
   /*    driver :: A handle to the target CID driver.                       */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  CID_Driver_Done( CID_Driver  driver )
+  cid_driver_done( CID_Driver  driver )
   {
     FT_UNUSED( driver );
   }
diff --git a/src/cid/cidobjs.h b/src/cid/cidobjs.h
index e8d6653..527eb3f 100644
--- a/src/cid/cidobjs.h
+++ b/src/cid/cidobjs.h
@@ -112,14 +112,14 @@
 
 
   FT_LOCAL( void )
-  CID_GlyphSlot_Done( CID_GlyphSlot  slot );
+  cid_slot_done( CID_GlyphSlot  slot );
 
   FT_LOCAL( FT_Error )
-  CID_GlyphSlot_Init( CID_GlyphSlot   slot );
+  cid_slot_init( CID_GlyphSlot   slot );
 
 
   FT_LOCAL( void )
-  CID_Size_Done( CID_Size  size );
+  cid_size_done( CID_Size  size );
 
 
   FT_LOCAL( FT_Error )
@@ -127,11 +127,11 @@
 
 
   FT_LOCAL( FT_Error )
-  CID_Size_Reset( CID_Size  size );
+  cid_size_reset( CID_Size  size );
 
 
   FT_LOCAL( FT_Error )
-  CID_Face_Init( FT_Stream      stream,
+  cid_face_init( FT_Stream      stream,
                  CID_Face       face,
                  FT_Int         face_index,
                  FT_Int         num_params,
@@ -139,15 +139,15 @@
 
 
   FT_LOCAL( void )
-  CID_Face_Done( CID_Face  face );
+  cid_face_done( CID_Face  face );
 
 
   FT_LOCAL( FT_Error )
-  CID_Driver_Init( CID_Driver  driver );
+  cid_driver_init( CID_Driver  driver );
 
 
   FT_LOCAL( void )
-  CID_Driver_Done( CID_Driver  driver );
+  cid_driver_done( CID_Driver  driver );
 
 
 FT_END_HEADER
diff --git a/src/cid/cidparse.c b/src/cid/cidparse.c
index ab4c06a..397a66f 100644
--- a/src/cid/cidparse.c
+++ b/src/cid/cidparse.c
@@ -49,7 +49,7 @@
 
 
   FT_LOCAL_DEF( FT_Error )
-  CID_New_Parser( CID_Parser*    parser,
+  cid_parser_new( CID_Parser*    parser,
                   FT_Stream      stream,
                   FT_Memory      memory,
                   PSAux_Service  psaux )
@@ -138,7 +138,7 @@
 
 
   FT_LOCAL_DEF( void )
-  CID_Done_Parser( CID_Parser*  parser )
+  cid_parser_done( CID_Parser*  parser )
   {
     /* always free the private dictionary */
     if ( parser->postscript )
diff --git a/src/cid/cidparse.h b/src/cid/cidparse.h
index 7cf255c..eb56a48 100644
--- a/src/cid/cidparse.h
+++ b/src/cid/cidparse.h
@@ -72,13 +72,13 @@
 
 
   FT_LOCAL( FT_Error )
-  CID_New_Parser( CID_Parser*    parser,
+  cid_parser_new( CID_Parser*    parser,
                   FT_Stream      stream,
                   FT_Memory      memory,
                   PSAux_Service  psaux );
 
   FT_LOCAL( void )
-  CID_Done_Parser( CID_Parser*  parser );
+  cid_parser_done( CID_Parser*  parser );
 
 
   /*************************************************************************/
@@ -87,24 +87,24 @@
   /*                                                                       */
   /*************************************************************************/
 
-#define CID_Skip_Spaces( p )  (p)->root.funcs.skip_spaces( &(p)->root )
-#define CID_Skip_Alpha( p )   (p)->root.funcs.skip_alpha ( &(p)->root )
+#define cid_parser_skip_spaces( p )  (p)->root.funcs.skip_spaces( &(p)->root )
+#define cid_parser_skip_alpha( p )   (p)->root.funcs.skip_alpha ( &(p)->root )
 
-#define CID_ToInt( p )        (p)->root.funcs.to_int( &(p)->root )
-#define CID_ToFixed( p, t )   (p)->root.funcs.to_fixed( &(p)->root, t )
+#define cid_parser_to_int( p )        (p)->root.funcs.to_int( &(p)->root )
+#define cid_parser_to_fixed( p, t )   (p)->root.funcs.to_fixed( &(p)->root, t )
 
-#define CID_ToCoordArray( p, m, c )                          \
+#define cid_parser_to_coord_array( p, m, c )                          \
           (p)->root.funcs.to_coord_array( &(p)->root, m, c )
-#define CID_ToFixedArray( p, m, f, t )                          \
+#define cid_parser_to_fixed_array( p, m, f, t )                          \
           (p)->root.funcs.to_fixed_array( &(p)->root, m, f, t )
-#define CID_ToToken( p, t )                         \
+#define cid_parser_to_token( p, t )                         \
           (p)->root.funcs.to_token( &(p)->root, t )
-#define CID_ToTokenArray( p, t, m, c )                          \
+#define cid_parser_to_token_array( p, t, m, c )                          \
           (p)->root.funcs.to_token_array( &(p)->root, t, m, c )
 
-#define CID_Load_Field( p, f, o )                              \
+#define cid_parser_load_field( p, f, o )                              \
           (p)->root.funcs.load_field( &(p)->root, f, o, 0, 0 )
-#define CID_Load_Field_Table( p, f, o )                              \
+#define cid_parser_load_field_table( p, f, o )                              \
           (p)->root.funcs.load_field_table( &(p)->root, f, o, 0, 0 )
 
 
diff --git a/src/cid/cidriver.c b/src/cid/cidriver.c
index 9ab86a4..e5b28ba 100644
--- a/src/cid/cidriver.c
+++ b/src/cid/cidriver.c
@@ -50,7 +50,7 @@
 
 
   static FT_Module_Interface
-  CID_Get_Interface( FT_Driver         driver,
+  cid_get_interface( FT_Driver         driver,
                      const FT_String*  cid_interface )
   {
     FT_UNUSED( driver );
@@ -80,9 +80,9 @@
 
       0,
 
-      (FT_Module_Constructor)CID_Driver_Init,
-      (FT_Module_Destructor) CID_Driver_Done,
-      (FT_Module_Requester)  CID_Get_Interface
+      (FT_Module_Constructor)cid_driver_init,
+      (FT_Module_Destructor) cid_driver_done,
+      (FT_Module_Requester)  cid_get_interface
     },
 
     /* then the other font drivers fields */
@@ -90,18 +90,18 @@
     sizeof( CID_SizeRec ),
     sizeof( CID_GlyphSlotRec ),
 
-    (FT_Face_InitFunc)       CID_Face_Init,
-    (FT_Face_DoneFunc)       CID_Face_Done,
+    (FT_Face_InitFunc)       cid_face_init,
+    (FT_Face_DoneFunc)       cid_face_done,
 
     (FT_Size_InitFunc)       CID_Size_Init,
-    (FT_Size_DoneFunc)       CID_Size_Done,
-    (FT_Slot_InitFunc)       CID_GlyphSlot_Init,
-    (FT_Slot_DoneFunc)       CID_GlyphSlot_Done,
+    (FT_Size_DoneFunc)       cid_size_done,
+    (FT_Slot_InitFunc)       cid_slot_init,
+    (FT_Slot_DoneFunc)       cid_slot_done,
 
-    (FT_Size_ResetPointsFunc)CID_Size_Reset,
-    (FT_Size_ResetPixelsFunc)CID_Size_Reset,
+    (FT_Size_ResetPointsFunc)cid_size_reset,
+    (FT_Size_ResetPixelsFunc)cid_size_reset,
 
-    (FT_Slot_LoadFunc)       CID_Load_Glyph,
+    (FT_Slot_LoadFunc)       cid_slot_load_glyph,
 
     (FT_Face_GetKerningFunc) 0,
     (FT_Face_AttachFunc)     0,
diff --git a/src/pcf/pcfdriver.c b/src/pcf/pcfdriver.c
index ac9dda3..cdaadb5 100644
--- a/src/pcf/pcfdriver.c
+++ b/src/pcf/pcfdriver.c
@@ -253,13 +253,13 @@
 
 
         charmap.face        = FT_FACE( face );
-        charmap.encoding    = ft_encoding_none;
+        charmap.encoding    = FT_ENCODING_NONE;
         charmap.platform_id = 0;
         charmap.encoding_id = 0;
 
         if ( unicode_charmap )
         {
-          charmap.encoding    = ft_encoding_unicode;
+          charmap.encoding    = FT_ENCODING_UNICODE;
           charmap.platform_id = 3;
           charmap.encoding_id = 1;
         }
@@ -348,7 +348,7 @@
     bitmap->rows       = metric->ascent + metric->descent;
     bitmap->width      = metric->rightSideBearing - metric->leftSideBearing;
     bitmap->num_grays  = 1;
-    bitmap->pixel_mode = ft_pixel_mode_mono;
+    bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
 
     FT_TRACE6(( "BIT_ORDER %d ; BYTE_ORDER %d ; GLYPH_PAD %d\n",
                   PCF_BIT_ORDER( face->bitmapsFormat ),
@@ -418,7 +418,7 @@
     slot->metrics.height       = bitmap->rows << 6;
 
     slot->linearHoriAdvance = (FT_Fixed)bitmap->width << 16;
-    slot->format            = ft_glyph_format_bitmap;
+    slot->format            = FT_GLYPH_FORMAT_BITMAP;
     slot->flags             = FT_GLYPH_OWN_BITMAP;
 
     FT_TRACE4(( " --- ok\n" ));
diff --git a/src/pfr/pfrgload.c b/src/pfr/pfrgload.c
index 192f0e0..dd8e114 100644
--- a/src/pfr/pfrgload.c
+++ b/src/pfr/pfrgload.c
@@ -139,7 +139,7 @@
 
 
       outline->points[n] = *to;
-      outline->tags  [n] = FT_Curve_Tag_On;
+      outline->tags  [n] = FT_CURVE_TAG_ON;
 
       outline->n_points++;
     }
@@ -172,9 +172,9 @@
       vec[0] = *control1;
       vec[1] = *control2;
       vec[2] = *to;
-      tag[0] = FT_Curve_Tag_Cubic;
-      tag[1] = FT_Curve_Tag_Cubic;
-      tag[2] = FT_Curve_Tag_On;
+      tag[0] = FT_CURVE_TAG_CUBIC;
+      tag[1] = FT_CURVE_TAG_CUBIC;
+      tag[2] = FT_CURVE_TAG_ON;
 
       outline->n_points = (FT_Short)( outline->n_points + 3 );
     }
diff --git a/src/pfr/pfrobjs.c b/src/pfr/pfrobjs.c
index 3134e41..30ba5e2 100644
--- a/src/pfr/pfrobjs.c
+++ b/src/pfr/pfrobjs.c
@@ -172,7 +172,7 @@
          charmap.face        = root;
          charmap.platform_id = 3;
          charmap.encoding_id = 1;
-         charmap.encoding    = ft_encoding_unicode;
+         charmap.encoding    = FT_ENCODING_UNICODE;
 
          FT_CMap_New( &pfr_cmap_class_rec, NULL, &charmap, NULL );
 
@@ -238,7 +238,7 @@
     FT_ASSERT( gindex < face->phy_font.num_chars );
 
     gchar               = face->phy_font.chars + gindex;
-    slot->root.format   = ft_glyph_format_outline;
+    slot->root.format   = FT_GLYPH_FORMAT_OUTLINE;
     outline->n_points   = 0;
     outline->n_contours = 0;
     gps_offset          = face->header.gps_section_offset;
@@ -261,11 +261,11 @@
       /* copy outline data */
       *outline = slot->glyph.loader->base.outline;
 
-      outline->flags &= ~ft_outline_owner;
-      outline->flags |= ft_outline_reverse_fill;
+      outline->flags &= ~FT_OUTLINE_OWNER;
+      outline->flags |= FT_OUTLINE_REVERSE_FILL;
 
       if ( size && size->root.metrics.y_ppem < 24 )
-        outline->flags |= ft_outline_high_precision;
+        outline->flags |= FT_OUTLINE_HIGH_PRECISION;
 
       /* compute the advance vector */
       metrics->horiAdvance = 0;
diff --git a/src/psaux/psauxmod.c b/src/psaux/psauxmod.c
index f2f935a..37a126c 100644
--- a/src/psaux/psauxmod.c
+++ b/src/psaux/psauxmod.c
@@ -26,51 +26,51 @@
   FT_CALLBACK_TABLE_DEF
   const PS_Table_FuncsRec  ps_table_funcs =
   {
-    PS_Table_New,
-    PS_Table_Done,
-    PS_Table_Add,
-    PS_Table_Release
+    ps_table_new,
+    ps_table_done,
+    ps_table_add,
+    ps_table_release
   };
 
 
   FT_CALLBACK_TABLE_DEF
   const PS_Parser_FuncsRec  ps_parser_funcs =
   {
-    PS_Parser_Init,
-    PS_Parser_Done,
-    PS_Parser_SkipSpaces,
-    PS_Parser_SkipAlpha,
-    PS_Parser_ToInt,
-    PS_Parser_ToFixed,
-    PS_Parser_ToCoordArray,
-    PS_Parser_ToFixedArray,
-    PS_Parser_ToToken,
-    PS_Parser_ToTokenArray,
-    PS_Parser_LoadField,
-    PS_Parser_LoadFieldTable
+    ps_parser_init,
+    ps_parser_done,
+    ps_parser_skip_spaces,
+    ps_parser_skip_alpha,
+    ps_parser_to_int,
+    ps_parser_to_fixed,
+    ps_parser_to_coord_array,
+    ps_parser_to_fixed_array,
+    ps_parser_to_token,
+    ps_parser_to_token_array,
+    ps_parser_load_field,
+    ps_parser_load_field_table
   };
 
 
   FT_CALLBACK_TABLE_DEF
   const T1_Builder_FuncsRec  t1_builder_funcs =
   {
-    T1_Builder_Init,
-    T1_Builder_Done,
-    T1_Builder_Check_Points,
-    T1_Builder_Add_Point,
+    t1_builder_init,
+    t1_builder_done,
+    t1_builder_check_points,
+    t1_builder_add_point,
     T1_Builder_Add_Point1,
-    T1_Builder_Add_Contour,
-    T1_Builder_Start_Point,
-    T1_Builder_Close_Contour
+    t1_builder_add_contour,
+    t1_builder_start_point,
+    t1_builder_close_contour
   };
 
 
   FT_CALLBACK_TABLE_DEF
   const T1_Decoder_FuncsRec  t1_decoder_funcs =
   {
-    T1_Decoder_Init,
-    T1_Decoder_Done,
-    T1_Decoder_Parse_Charstrings
+    t1_decoder_init,
+    t1_decoder_done,
+    t1_decoder_parse_charstrings
   };
 
 
@@ -92,7 +92,7 @@
     &t1_builder_funcs,
     &t1_decoder_funcs,
 
-    T1_Decrypt,
+    t1_decrypt,
     
     (const T1_CMap_ClassesRec*) &t1_cmap_classes,
   };
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 7f7373d..245d9b7 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -36,7 +36,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    PS_Table_New                                                       */
+  /*    ps_table_new                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Initializes a PS_Table.                                            */
@@ -54,7 +54,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  PS_Table_New( PS_Table   table,
+  ps_table_new( PS_Table   table,
                 FT_Int     count,
                 FT_Memory  memory )
   {
@@ -72,7 +72,7 @@
     table->block     = 0;
     table->capacity  = 0;
     table->cursor    = 0;
-    
+
     *(PS_Table_FuncsRec*)&table->funcs = ps_table_funcs;
 
   Exit:
@@ -130,7 +130,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    PS_Table_Add                                                       */
+  /*    ps_table_add                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Adds an object to a PS_Table, possibly growing its memory block.   */
@@ -150,14 +150,14 @@
   /*    reallocation fails.                                                */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  PS_Table_Add( PS_Table  table,
+  ps_table_add( PS_Table  table,
                 FT_Int    idx,
                 void*     object,
                 FT_Int    length )
   {
     if ( idx < 0 || idx > table->max_elems )
     {
-      FT_ERROR(( "PS_Table_Add: invalid index\n" ));
+      FT_ERROR(( "ps_table_add: invalid index\n" ));
       return PSaux_Err_Invalid_Argument;
     }
 
@@ -197,7 +197,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    PS_Table_Done                                                      */
+  /*    ps_table_done                                                      */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Finalizes a PS_TableRec (i.e., reallocate it to its current        */
@@ -211,7 +211,7 @@
   /*    to the caller to clean it, or reference it in its own structures.  */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  PS_Table_Done( PS_Table  table )
+  ps_table_done( PS_Table  table )
   {
     FT_Memory  memory = table->memory;
     FT_Error   error;
@@ -235,7 +235,7 @@
 
 
   FT_LOCAL_DEF( void )
-  PS_Table_Release( PS_Table  table )
+  ps_table_release( PS_Table  table )
   {
     FT_Memory  memory = table->memory;
 
@@ -266,7 +266,7 @@
 
 
   FT_LOCAL_DEF( void )
-  PS_Parser_SkipSpaces( PS_Parser  parser )
+  ps_parser_skip_spaces( PS_Parser  parser )
   {
     FT_Byte* cur   = parser->cursor;
     FT_Byte* limit = parser->limit;
@@ -286,7 +286,7 @@
 
 
   FT_LOCAL_DEF( void )
-  PS_Parser_SkipAlpha( PS_Parser  parser )
+  ps_parser_skip_alpha( PS_Parser  parser )
   {
     FT_Byte* cur   = parser->cursor;
     FT_Byte* limit = parser->limit;
@@ -306,8 +306,8 @@
 
 
   FT_LOCAL_DEF( void )
-  PS_Parser_ToToken( PS_Parser  parser,
-                     T1_Token   token )
+  ps_parser_to_token( PS_Parser  parser,
+                      T1_Token   token )
   {
     FT_Byte*  cur;
     FT_Byte*  limit;
@@ -320,7 +320,7 @@
     token->limit = 0;
 
     /* first of all, skip space */
-    PS_Parser_SkipSpaces( parser );
+    ps_parser_skip_spaces( parser );
 
     cur   = parser->cursor;
     limit = parser->limit;
@@ -389,17 +389,17 @@
 
 
   FT_LOCAL_DEF( void )
-  PS_Parser_ToTokenArray( PS_Parser  parser,
-                          T1_Token   tokens,
-                          FT_UInt    max_tokens,
-                          FT_Int*    pnum_tokens )
+  ps_parser_to_token_array( PS_Parser  parser,
+                            T1_Token   tokens,
+                            FT_UInt    max_tokens,
+                            FT_Int*    pnum_tokens )
   {
     T1_TokenRec  master;
 
 
     *pnum_tokens = -1;
 
-    PS_Parser_ToToken( parser, &master );
+    ps_parser_to_token( parser, &master );
     if ( master.type == T1_TOKEN_TYPE_ARRAY )
     {
       FT_Byte*  old_cursor = parser->cursor;
@@ -416,7 +416,7 @@
         T1_TokenRec  token;
 
 
-        PS_Parser_ToToken( parser, &token );
+        ps_parser_to_token( parser, &token );
         if ( !token.type )
           break;
 
@@ -829,11 +829,11 @@
 
   /* Load a simple field (i.e. non-table) into the current list of objects */
   FT_LOCAL_DEF( FT_Error )
-  PS_Parser_LoadField( PS_Parser       parser,
-                       const T1_Field  field,
-                       void**          objects,
-                       FT_UInt         max_objects,
-                       FT_ULong*       pflags )
+  ps_parser_load_field( PS_Parser       parser,
+                        const T1_Field  field,
+                        void**          objects,
+                        FT_UInt         max_objects,
+                        FT_ULong*       pflags )
   {
     T1_TokenRec  token;
     FT_Byte*     cur;
@@ -843,7 +843,7 @@
     FT_Error     error;
 
 
-    PS_Parser_ToToken( parser, &token );
+    ps_parser_to_token( parser, &token );
     if ( !token.type )
       goto Fail;
 
@@ -858,15 +858,15 @@
       T1_TokenRec  token2;
       FT_Byte*     old_cur   = parser->cursor;
       FT_Byte*     old_limit = parser->limit;
-      
+
 
       parser->cursor = token.start;
       parser->limit  = token.limit;
-      
-      PS_Parser_ToToken( parser, &token2 );
+
+      ps_parser_to_token( parser, &token2 );
       parser->cursor = old_cur;
       parser->limit  = old_limit;
-      
+
       if ( token2.type == T1_TOKEN_TYPE_ARRAY )
         goto FieldArray;
     }
@@ -945,7 +945,7 @@
         {
           FT_Fixed  temp[4];
           FT_BBox*  bbox = (FT_BBox*)q;
-          
+
 
           /* we need the '[' and ']' delimiters */
           token.start--;
@@ -987,11 +987,11 @@
 
 
   FT_LOCAL_DEF( FT_Error )
-  PS_Parser_LoadFieldTable( PS_Parser       parser,
-                            const T1_Field  field,
-                            void**          objects,
-                            FT_UInt         max_objects,
-                            FT_ULong*       pflags )
+  ps_parser_load_field_table( PS_Parser       parser,
+                              const T1_Field  field,
+                              void**          objects,
+                              FT_UInt         max_objects,
+                              FT_ULong*       pflags )
   {
     T1_TokenRec  elements[T1_MAX_TABLE_ELEMENTS];
     T1_Token     token;
@@ -1008,7 +1008,7 @@
       fieldrec.type = T1_FIELD_TYPE_FIXED;
 #endif
 
-    PS_Parser_ToTokenArray( parser, elements, 32, &num_elements );
+    ps_parser_to_token_array( parser, elements, 32, &num_elements );
     if ( num_elements < 0 )
       goto Fail;
 
@@ -1028,7 +1028,7 @@
     {
       parser->cursor = token->start;
       parser->limit  = token->limit;
-      PS_Parser_LoadField( parser, &fieldrec, objects, max_objects, 0 );
+      ps_parser_load_field( parser, &fieldrec, objects, max_objects, 0 );
       fieldrec.offset += fieldrec.size;
     }
 
@@ -1052,24 +1052,24 @@
 
 
   FT_LOCAL_DEF( FT_Long )
-  PS_Parser_ToInt( PS_Parser  parser )
+  ps_parser_to_int( PS_Parser  parser )
   {
     return t1_toint( &parser->cursor, parser->limit );
   }
 
 
   FT_LOCAL_DEF( FT_Fixed )
-  PS_Parser_ToFixed( PS_Parser  parser,
-                     FT_Int     power_ten )
+  ps_parser_to_fixed( PS_Parser  parser,
+                      FT_Int     power_ten )
   {
     return t1_tofixed( &parser->cursor, parser->limit, power_ten );
   }
 
 
   FT_LOCAL_DEF( FT_Int )
-  PS_Parser_ToCoordArray( PS_Parser  parser,
-                          FT_Int     max_coords,
-                          FT_Short*  coords )
+  ps_parser_to_coord_array( PS_Parser  parser,
+                            FT_Int     max_coords,
+                            FT_Short*  coords )
   {
     return t1_tocoordarray( &parser->cursor, parser->limit,
                             max_coords, coords );
@@ -1077,10 +1077,10 @@
 
 
   FT_LOCAL_DEF( FT_Int )
-  PS_Parser_ToFixedArray( PS_Parser  parser,
-                          FT_Int     max_values,
-                          FT_Fixed*  values,
-                          FT_Int     power_ten )
+  ps_parser_to_fixed_array( PS_Parser  parser,
+                            FT_Int     max_values,
+                            FT_Fixed*  values,
+                            FT_Int     power_ten )
   {
     return t1_tofixedarray( &parser->cursor, parser->limit,
                             max_values, values, power_ten );
@@ -1106,7 +1106,7 @@
 
 
   FT_LOCAL_DEF( void )
-  PS_Parser_Init( PS_Parser  parser,
+  ps_parser_init( PS_Parser  parser,
                   FT_Byte*   base,
                   FT_Byte*   limit,
                   FT_Memory  memory )
@@ -1121,7 +1121,7 @@
 
 
   FT_LOCAL_DEF( void )
-  PS_Parser_Done( PS_Parser  parser )
+  ps_parser_done( PS_Parser  parser )
   {
     FT_UNUSED( parser );
   }
@@ -1138,7 +1138,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    T1_Builder_Init                                                    */
+  /*    t1_builder_init                                                    */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Initializes a given glyph builder.                                 */
@@ -1156,7 +1156,7 @@
   /*    hinting :: Whether hinting should be applied.                      */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  T1_Builder_Init( T1_Builder    builder,
+  t1_builder_init( T1_Builder    builder,
                    FT_Face       face,
                    FT_Size       size,
                    FT_GlyphSlot  glyph,
@@ -1207,7 +1207,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    T1_Builder_Done                                                    */
+  /*    t1_builder_done                                                    */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Finalizes a given glyph builder.  Its contents can still be used   */
@@ -1218,7 +1218,7 @@
   /*    builder :: A pointer to the glyph builder to finalize.             */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  T1_Builder_Done( T1_Builder  builder )
+  t1_builder_done( T1_Builder  builder )
   {
     FT_GlyphSlot  glyph = builder->glyph;
 
@@ -1230,7 +1230,7 @@
 
   /* check that there is enough space for `count' more points */
   FT_LOCAL_DEF( FT_Error )
-  T1_Builder_Check_Points( T1_Builder  builder,
+  t1_builder_check_points( T1_Builder  builder,
                            FT_Int      count )
   {
     return FT_GlyphLoader_CheckPoints( builder->loader, count, 0 );
@@ -1239,7 +1239,7 @@
 
   /* add a new point, do not check space */
   FT_LOCAL_DEF( void )
-  T1_Builder_Add_Point( T1_Builder  builder,
+  t1_builder_add_point( T1_Builder  builder,
                         FT_Pos      x,
                         FT_Pos      y,
                         FT_Byte     flag )
@@ -1260,7 +1260,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;
     }
@@ -1277,9 +1277,9 @@
     FT_Error  error;
 
 
-    error = T1_Builder_Check_Points( builder, 1 );
+    error = t1_builder_check_points( builder, 1 );
     if ( !error )
-      T1_Builder_Add_Point( builder, x, y, 1 );
+      t1_builder_add_point( builder, x, y, 1 );
 
     return error;
   }
@@ -1287,7 +1287,7 @@
 
   /* check room for a new contour, then add it */
   FT_LOCAL_DEF( FT_Error )
-  T1_Builder_Add_Contour( T1_Builder  builder )
+  t1_builder_add_contour( T1_Builder  builder )
   {
     FT_Outline*  outline = builder->current;
     FT_Error     error;
@@ -1315,7 +1315,7 @@
 
   /* if a path was begun, add its first on-curve point */
   FT_LOCAL_DEF( FT_Error )
-  T1_Builder_Start_Point( T1_Builder  builder,
+  t1_builder_start_point( T1_Builder  builder,
                           FT_Pos      x,
                           FT_Pos      y )
   {
@@ -1326,7 +1326,7 @@
     if ( !builder->path_begun )
     {
       builder->path_begun = 1;
-      error = T1_Builder_Add_Contour( builder );
+      error = t1_builder_add_contour( builder );
       if ( !error )
         error = T1_Builder_Add_Point1( builder, x, y );
     }
@@ -1336,7 +1336,7 @@
 
   /* close the current contour */
   FT_LOCAL_DEF( void )
-  T1_Builder_Close_Contour( T1_Builder  builder )
+  t1_builder_close_contour( T1_Builder  builder )
   {
     FT_Outline*  outline = builder->current;
 
@@ -1360,7 +1360,7 @@
       /* `delete' last point only if it coincides with the first */
       /* point and it is not a control point (which can happen). */
       if ( p1->x == p2->x && p1->y == p2->y )
-        if ( *control == FT_Curve_Tag_On )
+        if ( *control == FT_CURVE_TAG_ON )
           outline->n_points--;
     }
 
@@ -1379,7 +1379,7 @@
   /*************************************************************************/
 
   FT_LOCAL_DEF( void )
-  T1_Decrypt( FT_Byte*   buffer,
+  t1_decrypt( FT_Byte*   buffer,
               FT_Offset  length,
               FT_UShort  seed )
   {
diff --git a/src/psaux/psobjs.h b/src/psaux/psobjs.h
index f748085..6400b58 100644
--- a/src/psaux/psobjs.h
+++ b/src/psaux/psobjs.h
@@ -47,22 +47,22 @@
 
 
   FT_LOCAL( FT_Error )
-  PS_Table_New( PS_Table   table,
+  ps_table_new( PS_Table   table,
                 FT_Int     count,
                 FT_Memory  memory );
 
   FT_LOCAL( FT_Error )
-  PS_Table_Add( PS_Table  table,
+  ps_table_add( PS_Table  table,
                 FT_Int    idx,
                 void*     object,
                 FT_Int    length );
 
   FT_LOCAL( void )
-  PS_Table_Done( PS_Table  table );
+  ps_table_done( PS_Table  table );
 
 
   FT_LOCAL( void )
-  PS_Table_Release( PS_Table  table );
+  ps_table_release( PS_Table  table );
 
 
   /*************************************************************************/
@@ -75,64 +75,64 @@
 
 
   FT_LOCAL( void )
-  PS_Parser_SkipSpaces( PS_Parser  parser );
+  ps_parser_skip_spaces( PS_Parser  parser );
 
   FT_LOCAL( void )
-  PS_Parser_SkipAlpha( PS_Parser  parser );
+  ps_parser_skip_alpha( PS_Parser  parser );
 
   FT_LOCAL( void )
-  PS_Parser_ToToken( PS_Parser  parser,
-                     T1_Token   token );
+  ps_parser_to_token( PS_Parser  parser,
+                      T1_Token   token );
 
   FT_LOCAL( void )
-  PS_Parser_ToTokenArray( PS_Parser  parser,
-                          T1_Token   tokens,
-                          FT_UInt    max_tokens,
-                          FT_Int*    pnum_tokens );
+  ps_parser_to_token_array( PS_Parser  parser,
+                            T1_Token   tokens,
+                            FT_UInt    max_tokens,
+                            FT_Int*    pnum_tokens );
 
   FT_LOCAL( FT_Error )
-  PS_Parser_LoadField( PS_Parser       parser,
-                       const T1_Field  field,
-                       void**          objects,
-                       FT_UInt         max_objects,
-                       FT_ULong*       pflags );
+  ps_parser_load_field( PS_Parser       parser,
+                        const T1_Field  field,
+                        void**          objects,
+                        FT_UInt         max_objects,
+                        FT_ULong*       pflags );
 
   FT_LOCAL( FT_Error )
-  PS_Parser_LoadFieldTable( PS_Parser       parser,
-                            const T1_Field  field,
-                            void**          objects,
-                            FT_UInt         max_objects,
-                            FT_ULong*       pflags );
+  ps_parser_load_field_table( PS_Parser       parser,
+                              const T1_Field  field,
+                              void**          objects,
+                              FT_UInt         max_objects,
+                              FT_ULong*       pflags );
 
   FT_LOCAL( FT_Long )
-  PS_Parser_ToInt( PS_Parser  parser );
+  ps_parser_to_int( PS_Parser  parser );
 
 
   FT_LOCAL( FT_Fixed )
-  PS_Parser_ToFixed( PS_Parser  parser,
-                     FT_Int     power_ten );
+  ps_parser_to_fixed( PS_Parser  parser,
+                      FT_Int     power_ten );
 
 
   FT_LOCAL( FT_Int )
-  PS_Parser_ToCoordArray( PS_Parser  parser,
-                          FT_Int     max_coords,
-                          FT_Short*  coords );
+  ps_parser_to_coord_array( PS_Parser  parser,
+                            FT_Int     max_coords,
+                            FT_Short*  coords );
 
   FT_LOCAL( FT_Int )
-  PS_Parser_ToFixedArray( PS_Parser  parser,
-                          FT_Int     max_values,
-                          FT_Fixed*  values,
-                          FT_Int     power_ten );
+  ps_parser_to_fixed_array( PS_Parser  parser,
+                            FT_Int     max_values,
+                            FT_Fixed*  values,
+                            FT_Int     power_ten );
 
 
   FT_LOCAL( void )
-  PS_Parser_Init( PS_Parser  parser,
+  ps_parser_init( PS_Parser  parser,
                   FT_Byte*   base,
                   FT_Byte*   limit,
                   FT_Memory  memory );
 
   FT_LOCAL( void )
-  PS_Parser_Done( PS_Parser  parser );
+  ps_parser_done( PS_Parser  parser );
 
 
   /*************************************************************************/
@@ -144,21 +144,21 @@
   /*************************************************************************/
 
   FT_LOCAL( void )
-  T1_Builder_Init( T1_Builder    builder,
+  t1_builder_init( T1_Builder    builder,
                    FT_Face       face,
                    FT_Size       size,
                    FT_GlyphSlot  glyph,
                    FT_Bool       hinting );
 
   FT_LOCAL( void )
-  T1_Builder_Done( T1_Builder  builder );
+  t1_builder_done( T1_Builder  builder );
 
   FT_LOCAL( FT_Error )
-  T1_Builder_Check_Points( T1_Builder  builder,
+  t1_builder_check_points( T1_Builder  builder,
                            FT_Int      count );
 
   FT_LOCAL( void )
-  T1_Builder_Add_Point( T1_Builder  builder,
+  t1_builder_add_point( T1_Builder  builder,
                         FT_Pos      x,
                         FT_Pos      y,
                         FT_Byte     flag );
@@ -169,17 +169,17 @@
                          FT_Pos      y );
 
   FT_LOCAL( FT_Error )
-  T1_Builder_Add_Contour( T1_Builder  builder );
+  t1_builder_add_contour( T1_Builder  builder );
 
 
   FT_LOCAL( FT_Error )
-  T1_Builder_Start_Point( T1_Builder  builder,
+  t1_builder_start_point( T1_Builder  builder,
                           FT_Pos      x,
                           FT_Pos      y );
 
 
   FT_LOCAL( void )
-  T1_Builder_Close_Contour( T1_Builder  builder );
+  t1_builder_close_contour( T1_Builder  builder );
 
 
   /*************************************************************************/
@@ -191,7 +191,7 @@
   /*************************************************************************/
 
   FT_LOCAL( void )
-  T1_Decrypt( FT_Byte*   buffer,
+  t1_decrypt( FT_Byte*   buffer,
               FT_Offset  length,
               FT_UShort  seed );
 
diff --git a/src/psaux/t1decode.c b/src/psaux/t1decode.c
index 9615e1b..5abc8cf 100644
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -247,7 +247,7 @@
       /* set up remaining glyph fields */
       glyph->num_subglyphs = 2;
       glyph->subglyphs     = loader->base.subglyphs;
-      glyph->format        = ft_glyph_format_composite;
+      glyph->format        = FT_GLYPH_FORMAT_COMPOSITE;
 
       loader->current.num_subglyphs = 2;
       goto Exit;
@@ -258,7 +258,7 @@
 
     FT_GlyphLoader_Prepare( decoder->builder.loader );  /* prepare loader */
 
-    error = T1_Decoder_Parse_Glyph( decoder, bchar_index );
+    error = t1_decoder_parse_glyph( decoder, bchar_index );
     if ( error )
       goto Exit;
 
@@ -280,7 +280,7 @@
 
     /* Now load `achar' on top of */
     /* the base outline           */
-    error = T1_Decoder_Parse_Glyph( decoder, achar_index );
+    error = t1_decoder_parse_glyph( decoder, achar_index );
     if ( error )
       goto Exit;
 
@@ -316,7 +316,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    T1_Decoder_Parse_Charstrings                                       */
+  /*    t1_decoder_parse_charstrings                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Parses a given Type 1 charstrings program.                         */
@@ -332,7 +332,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  T1_Decoder_Parse_Charstrings( T1_Decoder  decoder,
+  t1_decoder_parse_charstrings( T1_Decoder  decoder,
                                 FT_Byte*    charstring_base,
                                 FT_UInt     charstring_len )
   {
@@ -347,12 +347,12 @@
 
 
     /* we don't want to touch the source code -- use macro trick */
-#define start_point    T1_Builder_Start_Point
-#define check_points   T1_Builder_Check_Points
-#define add_point      T1_Builder_Add_Point
+#define start_point    t1_builder_start_point
+#define check_points   t1_builder_check_points
+#define add_point      t1_builder_add_point
 #define add_point1     T1_Builder_Add_Point1
-#define add_contour    T1_Builder_Add_Contour
-#define close_contour  T1_Builder_Close_Contour
+#define add_contour    t1_builder_add_contour
+#define close_contour  t1_builder_close_contour
 
     /* First of all, initialize the decoder */
     decoder->top  = decoder->stack;
@@ -453,7 +453,7 @@
       case 12:
         if ( ip > limit )
         {
-          FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+          FT_ERROR(( "t1_decoder_parse_charstrings: "
                      "invalid escape (12+EOF)\n" ));
           goto Syntax_Error;
         }
@@ -489,7 +489,7 @@
           break;
 
         default:
-          FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+          FT_ERROR(( "t1_decoder_parse_charstrings: "
                      "invalid escape (12+%d)\n",
                      ip[-1] ));
           goto Syntax_Error;
@@ -499,7 +499,7 @@
       case 255:    /* four bytes integer */
         if ( ip + 4 > limit )
         {
-          FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+          FT_ERROR(( "t1_decoder_parse_charstrings: "
                      "unexpected EOF in integer\n" ));
           goto Syntax_Error;
         }
@@ -520,7 +520,7 @@
           {
             if ( ++ip > limit )
             {
-              FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+              FT_ERROR(( "t1_decoder_parse_charstrings: " ));
               FT_ERROR(( "unexpected EOF in integer\n" ));
               goto Syntax_Error;
             }
@@ -533,7 +533,7 @@
         }
         else
         {
-          FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+          FT_ERROR(( "t1_decoder_parse_charstrings: "
                      "invalid byte (%d)\n", ip[-1] ));
           goto Syntax_Error;
         }
@@ -548,7 +548,7 @@
       {
         if ( top - decoder->stack >= T1_MAX_CHARSTRINGS_OPERANDS )
         {
-          FT_ERROR(( "T1_Decoder_Parse_Charstrings: stack overflow!\n" ));
+          FT_ERROR(( "t1_decoder_parse_charstrings: stack overflow!\n" ));
           goto Syntax_Error;
         }
 
@@ -605,7 +605,7 @@
           if ( decoder->flex_state       == 0 ||
                decoder->num_flex_vectors != 7 )
           {
-            FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+            FT_ERROR(( "t1_decoder_parse_charstrings: "
                        "unexpected flex end\n" ));
             goto Syntax_Error;
           }
@@ -616,7 +616,7 @@
                ip[2] != 12 || ip[3] != 17 || /* pop */
                ip[4] != 12 || ip[5] != 33 )  /* setcurpoint */
           {
-            FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+            FT_ERROR(( "t1_decoder_parse_charstrings: "
                        "invalid flex charstring\n" ));
             goto Syntax_Error;
           }
@@ -632,14 +632,14 @@
           /* eat the following `pop' */
           if ( ip + 2 > limit )
           {
-            FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+            FT_ERROR(( "t1_decoder_parse_charstrings: "
                        "invalid escape (12+%d)\n", ip[-1] ));
             goto Syntax_Error;
           }
 
           if ( ip[0] != 12 || ip[1] != 17 )
           {
-            FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+            FT_ERROR(( "t1_decoder_parse_charstrings: " ));
             FT_ERROR(( "`pop' expected, found (%d %d)\n", ip[0], ip[1] ));
             goto Syntax_Error;
           }
@@ -670,7 +670,7 @@
 
             if ( !blend )
             {
-              FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+              FT_ERROR(( "t1_decoder_parse_charstrings: " ));
               FT_ERROR(( "unexpected multiple masters operator!\n" ));
               goto Syntax_Error;
             }
@@ -678,7 +678,7 @@
             num_points = top[1] - 13 + ( top[1] == 18 );
             if ( top[0] != (FT_Int)( num_points * blend->num_designs ) )
             {
-              FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+              FT_ERROR(( "t1_decoder_parse_charstrings: " ));
               FT_ERROR(( "incorrect number of mm arguments\n" ));
               goto Syntax_Error;
             }
@@ -720,7 +720,7 @@
 
         default:
         Unexpected_OtherSubr:
-          FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+          FT_ERROR(( "t1_decoder_parse_charstrings: "
                      "invalid othersubr [%d %d]!\n", top[0], top[1] ));
           goto Syntax_Error;
         }
@@ -933,7 +933,7 @@
           }
           else
           {
-            FT_ERROR(( "T1_Decoder_Parse_Charstrings: division by 0\n" ));
+            FT_ERROR(( "t1_decoder_parse_charstrings: division by 0\n" ));
             goto Syntax_Error;
           }
           break;
@@ -948,14 +948,14 @@
             idx = top[0];
             if ( idx < 0 || idx >= (FT_Int)decoder->num_subrs )
             {
-              FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+              FT_ERROR(( "t1_decoder_parse_charstrings: "
                          "invalid subrs index\n" ));
               goto Syntax_Error;
             }
 
             if ( zone - decoder->zones >= T1_MAX_SUBRS_CALLS )
             {
-              FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+              FT_ERROR(( "t1_decoder_parse_charstrings: "
                          "too many nested subrs\n" ));
               goto Syntax_Error;
             }
@@ -983,7 +983,7 @@
 
             if ( !zone->base )
             {
-              FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+              FT_ERROR(( "t1_decoder_parse_charstrings: "
                          "invoking empty subrs!\n" ));
               goto Syntax_Error;
             }
@@ -1006,7 +1006,7 @@
 
           if ( zone <= decoder->zones )
           {
-            FT_ERROR(( "T1_Decoder_Parse_Charstrings: unexpected return\n" ));
+            FT_ERROR(( "t1_decoder_parse_charstrings: unexpected return\n" ));
             goto Syntax_Error;
           }
 
@@ -1073,12 +1073,12 @@
         case op_setcurrentpoint:
           FT_TRACE4(( " setcurrentpoint" ));
 
-          FT_ERROR(( "T1_Decoder_Parse_Charstrings: " ));
+          FT_ERROR(( "t1_decoder_parse_charstrings: " ));
           FT_ERROR(( "unexpected `setcurrentpoint'\n" ));
           goto Syntax_Error;
 
         default:
-          FT_ERROR(( "T1_Decoder_Parse_Charstrings: "
+          FT_ERROR(( "t1_decoder_parse_charstrings: "
                      "unhandled opcode %d\n", op ));
           goto Syntax_Error;
         }
@@ -1106,7 +1106,7 @@
 
   /* parse a single Type 1 glyph */
   FT_LOCAL_DEF( FT_Error )
-  T1_Decoder_Parse_Glyph( T1_Decoder  decoder,
+  t1_decoder_parse_glyph( T1_Decoder  decoder,
                           FT_UInt     glyph )
   {
     return decoder->parse_callback( decoder, glyph );
@@ -1115,7 +1115,7 @@
 
   /* initialize T1 decoder */
   FT_LOCAL_DEF( FT_Error )
-  T1_Decoder_Init( T1_Decoder           decoder,
+  t1_decoder_init( T1_Decoder           decoder,
                    FT_Face              face,
                    FT_Size              size,
                    FT_GlyphSlot         slot,
@@ -1135,7 +1135,7 @@
                   FT_FACE_LIBRARY(face), "psnames" );
       if ( !psnames )
       {
-        FT_ERROR(( "T1_Decoder_Init: " ));
+        FT_ERROR(( "t1_decoder_init: " ));
         FT_ERROR(( "the `psnames' module is not available\n" ));
         return PSaux_Err_Unimplemented_Feature;
       }
@@ -1143,7 +1143,7 @@
       decoder->psnames = psnames;
     }
 
-    T1_Builder_Init( &decoder->builder, face, size, slot, hinting );
+    t1_builder_init( &decoder->builder, face, size, slot, hinting );
 
     decoder->num_glyphs     = face->num_glyphs;
     decoder->glyph_names    = glyph_names;
@@ -1159,9 +1159,9 @@
 
   /* finalize T1 decoder */
   FT_LOCAL_DEF( void )
-  T1_Decoder_Done( T1_Decoder  decoder )
+  t1_decoder_done( T1_Decoder  decoder )
   {
-    T1_Builder_Done( &decoder->builder );
+    t1_builder_done( &decoder->builder );
   }
 
 
diff --git a/src/psaux/t1decode.h b/src/psaux/t1decode.h
index 70fe647..4540d4a 100644
--- a/src/psaux/t1decode.h
+++ b/src/psaux/t1decode.h
@@ -34,16 +34,16 @@
 
 
   FT_LOCAL( FT_Error )
-  T1_Decoder_Parse_Glyph( T1_Decoder  decoder,
+  t1_decoder_parse_glyph( T1_Decoder  decoder,
                           FT_UInt     glyph_index );
 
   FT_LOCAL( FT_Error )
-  T1_Decoder_Parse_Charstrings( T1_Decoder  decoder,
+  t1_decoder_parse_charstrings( T1_Decoder  decoder,
                                 FT_Byte*    base,
                                 FT_UInt     len );
 
   FT_LOCAL( FT_Error )
-  T1_Decoder_Init( T1_Decoder           decoder,
+  t1_decoder_init( T1_Decoder           decoder,
                    FT_Face              face,
                    FT_Size              size,
                    FT_GlyphSlot         slot,
@@ -53,7 +53,7 @@
                    T1_Decoder_Callback  parse_glyph );
 
   FT_LOCAL( void )
-  T1_Decoder_Done( T1_Decoder  decoder );
+  t1_decoder_done( T1_Decoder  decoder );
 
 
 FT_END_HEADER
diff --git a/src/pshinter/pshalgo2.c b/src/pshinter/pshalgo2.c
index 8de30a4..65ff454 100644
--- a/src/pshinter/pshalgo2.c
+++ b/src/pshinter/pshalgo2.c
@@ -927,7 +927,7 @@
         FT_Pos  dxi, dyi, dxo, dyo;
 
 
-        if ( !( outline->tags[n] & FT_Curve_Tag_On ) )
+        if ( !( outline->tags[n] & FT_CURVE_TAG_ON ) )
           point->flags = PSH2_POINT_OFF;
 
         dxi = vec[n].x - vec[n_prev].x;
diff --git a/src/pshinter/pshalgo3.c b/src/pshinter/pshalgo3.c
index 4bb4958..90009a5 100644
--- a/src/pshinter/pshalgo3.c
+++ b/src/pshinter/pshalgo3.c
@@ -968,7 +968,7 @@
         FT_Pos  dxi, dyi, dxo, dyo;
 
 
-        if ( !( outline->tags[n] & FT_Curve_Tag_On ) )
+        if ( !( outline->tags[n] & FT_CURVE_TAG_ON ) )
           point->flags = PSH3_POINT_OFF;
 
         dxi = vec[n].x - vec[n_prev].x;
@@ -1374,7 +1374,7 @@
         {
           FT_Pos  delta;
 
-  
+
           if ( psh3_point_is_edge_min( point ) )
           {
             point->cur_u = hint->cur_pos;
@@ -1714,7 +1714,7 @@
     {
       /* load outline coordinates into glyph */
       psh3_glyph_load_points( glyph, dimension );
-      
+
       /* compute local extrema */
       psh3_glyph_compute_extrema( glyph );
 
diff --git a/src/psnames/psmodule.c b/src/psnames/psmodule.c
index a0e0386..758de2c 100644
--- a/src/psnames/psmodule.c
+++ b/src/psnames/psmodule.c
@@ -37,7 +37,7 @@
   /* the name, as in `A.swash' or `e.final', etc.                        */
   /*                                                                     */
   static FT_ULong
-  PS_Unicode_Value( const char*  glyph_name )
+  ps_unicode_value( const char*  glyph_name )
   {
     FT_Int  n;
     char    first = glyph_name[0];
@@ -139,7 +139,7 @@
 
   /* Builds a table that maps Unicode values to glyph indices */
   static FT_Error
-  PS_Build_Unicode_Table( FT_Memory     memory,
+  ps_build_unicode_table( FT_Memory     memory,
                           FT_UInt       num_glyphs,
                           const char**  glyph_names,
                           PS_Unicodes*  table )
@@ -168,7 +168,7 @@
 
         if ( gname )
         {
-          uni_char = PS_Unicode_Value( gname );
+          uni_char = ps_unicode_value( gname );
 
           if ( uni_char != 0 && uni_char != 0xFFFF )
           {
@@ -205,7 +205,7 @@
 
 
   static FT_UInt
-  PS_Lookup_Unicode( PS_Unicodes*  table,
+  ps_lookup_unicode( PS_Unicodes*  table,
                      FT_ULong      unicode )
   {
     PS_UniMap  *min, *max, *mid;
@@ -236,7 +236,7 @@
 
 
   static FT_ULong
-  PS_Next_Unicode( PS_Unicodes*  table,
+  ps_next_unicode( PS_Unicodes*  table,
                    FT_ULong      unicode )
   {
     PS_UniMap  *min, *max, *mid;
@@ -265,7 +265,7 @@
 
     if ( max < table->maps )
       max = table->maps;
-    
+
     while ( max < table->maps + table->num_maps )
     {
       if ( unicode < max->unicode )
@@ -281,7 +281,7 @@
 
 
   static const char*
-  PS_Macintosh_Name( FT_UInt  name_index )
+  ps_get_macintosh_name( FT_UInt  name_index )
   {
     if ( name_index >= 258 )
       name_index = 0;
@@ -291,7 +291,7 @@
 
 
   static const char*
-  PS_Standard_Strings( FT_UInt  sid )
+  ps_get_standard_strings( FT_UInt  sid )
   {
     return ( sid < NUM_SID_GLYPHS ? sid_standard_names[sid] : 0 );
   }
@@ -302,9 +302,9 @@
   {
 #ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
 
-    (PS_Unicode_Value_Func)    PS_Unicode_Value,
-    (PS_Build_Unicodes_Func)   PS_Build_Unicode_Table,
-    (PS_Lookup_Unicode_Func)   PS_Lookup_Unicode,
+    (PS_Unicode_Value_Func)    ps_unicode_value,
+    (PS_Build_Unicodes_Func)   ps_build_unicode_table,
+    (PS_Lookup_Unicode_Func)   ps_lookup_unicode,
 
 #else
 
@@ -314,14 +314,14 @@
 
 #endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
 
-    (PS_Macintosh_Name_Func)   PS_Macintosh_Name,
-    (PS_Adobe_Std_Strings_Func)PS_Standard_Strings,
+    (PS_Macintosh_Name_Func)    ps_get_macintosh_name,
+    (PS_Adobe_Std_Strings_Func) ps_get_standard_strings,
 
     t1_standard_encoding,
     t1_expert_encoding,
 
 #ifdef FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
-    (PS_Next_Unicode_Func)     PS_Next_Unicode
+    (PS_Next_Unicode_Func)     ps_next_unicode
 #else
     0
 #endif /* FT_CONFIG_OPTION_ADOBE_GLYPH_LIST */
diff --git a/src/raster/ftraster.c b/src/raster/ftraster.c
index a897b28..0967947 100644
--- a/src/raster/ftraster.c
+++ b/src/raster/ftraster.c
@@ -1635,14 +1635,14 @@
     tag   = FT_CURVE_TAG( tags[0] );
 
     /* A contour cannot start with a cubic control point! */
-    if ( tag == FT_Curve_Tag_Cubic )
+    if ( tag == FT_CURVE_TAG_CUBIC )
       goto Invalid_Outline;
 
     /* check first point to determine origin */
-    if ( tag == FT_Curve_Tag_Conic )
+    if ( tag == FT_CURVE_TAG_CONIC )
     {
       /* first point is conic control.  Yes, this happens. */
-      if ( FT_CURVE_TAG( ras.outline.tags[last] ) == FT_Curve_Tag_On )
+      if ( FT_CURVE_TAG( ras.outline.tags[last] ) == FT_CURVE_TAG_ON )
       {
         /* start at last point if it is on the curve */
         v_start = v_last;
@@ -1674,7 +1674,7 @@
 
       switch ( tag )
       {
-      case FT_Curve_Tag_On:  /* emit a single line_to */
+      case FT_CURVE_TAG_ON:  /* emit a single line_to */
         {
           Long  x, y;
 
@@ -1689,7 +1689,7 @@
           continue;
         }
 
-      case FT_Curve_Tag_Conic:  /* consume conic arcs */
+      case FT_CURVE_TAG_CONIC:  /* consume conic arcs */
         v_control.x = SCALED( point[0].x );
         v_control.y = SCALED( point[0].y );
 
@@ -1713,14 +1713,14 @@
           if ( flipped )
             SWAP_( x, y );
 
-          if ( tag == FT_Curve_Tag_On )
+          if ( tag == FT_CURVE_TAG_ON )
           {
             if ( Conic_To( RAS_VARS v_control.x, v_control.y, x, y ) )
               goto Fail;
             continue;
           }
 
-          if ( tag != FT_Curve_Tag_Conic )
+          if ( tag != FT_CURVE_TAG_CONIC )
             goto Invalid_Outline;
 
           v_middle.x = ( v_control.x + x ) / 2;
@@ -1742,13 +1742,13 @@
 
         goto Close;
 
-      default:  /* FT_Curve_Tag_Cubic */
+      default:  /* FT_CURVE_TAG_CUBIC */
         {
           Long  x1, y1, x2, y2, x3, y3;
 
 
           if ( point + 1 > limit                             ||
-               FT_CURVE_TAG( tags[1] ) != FT_Curve_Tag_Cubic )
+               FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )
             goto Invalid_Outline;
 
           point += 2;
@@ -2972,11 +2972,11 @@
 
 
     Set_High_Precision( RAS_VARS ras.outline.flags &
-                        ft_outline_high_precision );
+                        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 ) );
+                                       FT_OUTLINE_SINGLE_PASS ) );
 
     /* Vertical Sweep */
     ras.Proc_Sweep_Init = Vertical_Sweep_Init;
@@ -3036,10 +3036,10 @@
 
 
     Set_High_Precision( RAS_VARS ras.outline.flags &
-                        ft_outline_high_precision );
+                        FT_OUTLINE_HIGH_PRECISION );
     ras.scale_shift    = ras.precision_shift + 1;
     ras.dropOutControl = 2;
-    ras.second_pass    = !( ras.outline.flags & ft_outline_single_pass );
+    ras.second_pass    = !( ras.outline.flags & FT_OUTLINE_SINGLE_PASS );
 
     /* Vertical Sweep */
 
@@ -3259,7 +3259,7 @@
       return Raster_Err_Invalid;
 
     /* this version of the raster does not support direct rendering, sorry */
-    if ( params->flags & ft_raster_flag_direct )
+    if ( params->flags & FT_RASTER_FLAG_DIRECT )
       return Raster_Err_Unsupported;
 
     if ( !target_map || !target_map->buffer )
@@ -3268,7 +3268,7 @@
     ras.outline  = *outline;
     ras.target   = *target_map;
 
-    return ( ( params->flags & ft_raster_flag_aa )
+    return ( ( params->flags & FT_RASTER_FLAG_AA )
                ? Render_Gray_Glyph( raster )
                : Render_Glyph( raster ) );
   }
@@ -3276,7 +3276,7 @@
 
   const FT_Raster_Funcs  ft_standard_raster =
   {
-    ft_glyph_format_outline,
+    FT_GLYPH_FORMAT_OUTLINE,
     (FT_Raster_New_Func)     ft_black_new,
     (FT_Raster_Reset_Func)   ft_black_reset,
     (FT_Raster_Set_Mode_Func)ft_black_set_mode,
diff --git a/src/raster/ftrend1.c b/src/raster/ftrend1.c
index 83c22d2..c375d58 100644
--- a/src/raster/ftrend1.c
+++ b/src/raster/ftrend1.c
@@ -118,7 +118,7 @@
     }
 
     /* check rendering mode */
-    if ( mode != ft_render_mode_mono )
+    if ( mode != FT_RENDER_MODE_MONO )
     {
       /* raster1 is only capable of producing monochrome bitmaps */
       if ( render->clazz == &ft_raster1_renderer_class )
@@ -158,17 +158,17 @@
     }
 
     /* allocate new one, depends on pixel format */
-    if ( !( mode & ft_render_mode_mono ) )
+    if ( !( mode & FT_RENDER_MODE_MONO ) )
     {
       /* we pad to 32 bits, only for backwards compatibility with FT 1.x */
       pitch = ( width + 3 ) & -4;
-      bitmap->pixel_mode = ft_pixel_mode_grays;
+      bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
       bitmap->num_grays  = 256;
     }
     else
     {
       pitch = ( ( width + 15 ) >> 4 ) << 1;
-      bitmap->pixel_mode = ft_pixel_mode_mono;
+      bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
     }
 
     bitmap->width = width;
@@ -188,8 +188,8 @@
     params.source = outline;
     params.flags  = 0;
 
-    if ( bitmap->pixel_mode == ft_pixel_mode_grays )
-      params.flags |= ft_raster_flag_aa;
+    if ( bitmap->pixel_mode == FT_PIXEL_MODE_GRAY )
+      params.flags |= FT_RASTER_FLAG_AA;
 
     /* render outline into the bitmap */
     error = render->raster_render( render->raster, &params );
@@ -199,7 +199,7 @@
     if ( error )
       goto Exit;
 
-    slot->format      = ft_glyph_format_bitmap;
+    slot->format      = FT_GLYPH_FORMAT_BITMAP;
     slot->bitmap_left = cbox.xMin >> 6;
     slot->bitmap_top  = cbox.yMax >> 6;
 
@@ -226,12 +226,12 @@
       (FT_Module_Requester)  0
     },
 
-    ft_glyph_format_outline,
+    FT_GLYPH_FORMAT_OUTLINE,
 
-    (FTRenderer_render)   ft_raster1_render,
-    (FTRenderer_transform)ft_raster1_transform,
-    (FTRenderer_getCBox)  ft_raster1_get_cbox,
-    (FTRenderer_setMode)  ft_raster1_set_mode,
+    (FT_Renderer_RenderFunc)   ft_raster1_render,
+    (FT_Renderer_TransformFunc)ft_raster1_transform,
+    (FT_Renderer_GetCBoxFunc)  ft_raster1_get_cbox,
+    (FT_Renderer_SetModeFunc)  ft_raster1_set_mode,
 
     (FT_Raster_Funcs*)    &ft_standard_raster
   };
@@ -259,12 +259,12 @@
       (FT_Module_Requester)  0
     },
 
-    ft_glyph_format_outline,
+    FT_GLYPH_FORMAT_OUTLINE,
 
-    (FTRenderer_render)   ft_raster1_render,
-    (FTRenderer_transform)ft_raster1_transform,
-    (FTRenderer_getCBox)  ft_raster1_get_cbox,
-    (FTRenderer_setMode)  ft_raster1_set_mode,
+    (FT_Renderer_RenderFunc)   ft_raster1_render,
+    (FT_Renderer_TransformFunc)ft_raster1_transform,
+    (FT_Renderer_GetCBoxFunc)  ft_raster1_get_cbox,
+    (FT_Renderer_SetModeFunc)  ft_raster1_set_mode,
 
     (FT_Raster_Funcs*)    &ft_standard_raster
   };
diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c
index 6411d91..f2fa7b4 100644
--- a/src/sfnt/sfdriver.c
+++ b/src/sfnt/sfdriver.c
@@ -92,7 +92,7 @@
     FT_Error    error;
 
 
-    error = TT_Get_PS_Name( face, glyph_index, &gname );
+    error = tt_face_get_ps_name( face, glyph_index, &gname );
     if ( !error && buffer_max > 0 )
     {
       FT_UInt  len = (FT_UInt)( ft_strlen( gname ) );
@@ -220,7 +220,7 @@
 
 
   FT_CALLBACK_DEF( FT_Module_Interface )
-  SFNT_Get_Interface( FT_Module    module,
+  sfnt_get_interface( FT_Module    module,
                       const char*  module_interface )
   {
     FT_UNUSED( module );
@@ -243,44 +243,44 @@
   static
   const SFNT_Interface  sfnt_interface =
   {
-    TT_Goto_Table,
+    tt_face_goto_table,
 
-    SFNT_Init_Face,
-    SFNT_Load_Face,
-    SFNT_Done_Face,
-    SFNT_Get_Interface,
+    sfnt_init_face,
+    sfnt_load_face,
+    sfnt_done_face,
+    sfnt_get_interface,
 
-    TT_Load_Any,
-    TT_Load_SFNT_Header,
-    TT_Load_Directory,
+    tt_face_load_any,
+    tt_face_load_sfnt_header,
+    tt_face_load_directory,
 
-    TT_Load_Header,
-    TT_Load_Metrics_Header,
-    TT_Load_CMap,
-    TT_Load_MaxProfile,
-    TT_Load_OS2,
-    TT_Load_PostScript,
+    tt_face_load_header,
+    tt_face_load_metrics_header,
+    tt_face_load_cmap,
+    tt_face_load_max_profile,
+    tt_face_load_os2,
+    tt_face_load_postscript,
 
-    TT_Load_Names,
-    TT_Free_Names,
+    tt_face_load_names,
+    tt_face_free_names,
 
-    TT_Load_Hdmx,
-    TT_Free_Hdmx,
+    tt_face_load_hdmx,
+    tt_face_free_hdmx,
 
-    TT_Load_Kern,
-    TT_Load_Gasp,
-    TT_Load_PCLT,
+    tt_face_load_kern,
+    tt_face_load_gasp,
+    tt_face_load_pclt,
 
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
 
     /* see `ttload.h' */
-    TT_Load_Bitmap_Header,
+    tt_face_load_bitmap_header,
 
     /* see `ttsbit.h' */
-    TT_Set_SBit_Strike,
-    TT_Load_SBit_Strikes,
-    TT_Load_SBit_Image,
-    TT_Free_SBit_Strikes,
+    tt_face_set_sbit_strike,
+    tt_face_load_sbit_strikes,
+    tt_face_load_sbit_image,
+    tt_face_free_sbit_strikes,
 
 #else /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
 
@@ -295,8 +295,8 @@
 #ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
 
     /* see `ttpost.h' */
-    TT_Get_PS_Name,
-    TT_Free_Post_Names,
+    tt_face_get_ps_name,
+    tt_face_free_ps_names,
 
 #else /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
 
@@ -306,8 +306,8 @@
 #endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
 
     /* see `ttcmap.h' */
-    TT_CharMap_Load,
-    TT_CharMap_Free,
+    tt_face_load_charmap,
+    tt_face_free_charmap,
   };
 
 
@@ -325,7 +325,7 @@
 
     (FT_Module_Constructor)0,
     (FT_Module_Destructor) 0,
-    (FT_Module_Requester)  SFNT_Get_Interface
+    (FT_Module_Requester)  sfnt_get_interface
   };
 
 
diff --git a/src/sfnt/sfobjs.c b/src/sfnt/sfobjs.c
index ff7a5d8..dac6c18 100644
--- a/src/sfnt/sfobjs.c
+++ b/src/sfnt/sfobjs.c
@@ -296,20 +296,20 @@
     static
     const TEncoding  tt_encodings[] =
     {
-      { TT_PLATFORM_ISO,           -1,                  ft_encoding_unicode },
+      { TT_PLATFORM_ISO,           -1,                  FT_ENCODING_UNICODE },
 
-      { TT_PLATFORM_APPLE_UNICODE, -1,                  ft_encoding_unicode },
+      { TT_PLATFORM_APPLE_UNICODE, -1,                  FT_ENCODING_UNICODE },
 
-      { TT_PLATFORM_MACINTOSH,     TT_MAC_ID_ROMAN,     ft_encoding_apple_roman },
+      { TT_PLATFORM_MACINTOSH,     TT_MAC_ID_ROMAN,     FT_ENCODING_APPLE_ROMAN },
 
-      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_SYMBOL_CS,  ft_encoding_symbol },
-      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_UCS_4,      ft_encoding_unicode },
-      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_UNICODE_CS, ft_encoding_unicode },
-      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_SJIS,       ft_encoding_sjis },
-      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_GB2312,     ft_encoding_gb2312 },
-      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_BIG_5,      ft_encoding_big5 },
-      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_WANSUNG,    ft_encoding_wansung },
-      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_JOHAB,      ft_encoding_johab }
+      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_SYMBOL_CS,  FT_ENCODING_MS_SYMBOL },
+      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_UCS_4,      FT_ENCODING_UNICODE },
+      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_UNICODE_CS, FT_ENCODING_UNICODE },
+      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_SJIS,       FT_ENCODING_MS_SJIS },
+      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_GB2312,     FT_ENCODING_MS_GB2312 },
+      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_BIG_5,      FT_ENCODING_MS_BIG5 },
+      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_WANSUNG,    FT_ENCODING_MS_WANSUNG },
+      { TT_PLATFORM_MICROSOFT,     TT_MS_ID_JOHAB,      FT_ENCODING_MS_JOHAB }
     };
 
     const TEncoding  *cur, *limit;
@@ -328,12 +328,12 @@
       }
     }
 
-    return ft_encoding_none;
+    return FT_ENCODING_NONE;
   }
 
 
   FT_LOCAL_DEF( FT_Error )
-  SFNT_Init_Face( FT_Stream      stream,
+  sfnt_init_face( FT_Stream      stream,
                   TT_Face        face,
                   FT_Int         face_index,
                   FT_Int         num_params,
@@ -397,7 +397,7 @@
 
 
   FT_LOCAL_DEF( FT_Error )
-  SFNT_Load_Face( FT_Stream      stream,
+  sfnt_load_face( FT_Stream      stream,
                   TT_Face        face,
                   FT_Int         face_index,
                   FT_Int         num_params,
@@ -434,11 +434,11 @@
     /* do we have outlines in there? */
 #ifdef FT_CONFIG_OPTION_INCREMENTAL
     has_outline   = FT_BOOL( face->root.internal->incremental_interface != 0 ||
-                             TT_LookUp_Table( face, TTAG_glyf ) != 0         ||
-                             TT_LookUp_Table( face, TTAG_CFF ) != 0          );
+                             tt_face_lookup_table( face, TTAG_glyf ) != 0         ||
+                             tt_face_lookup_table( face, TTAG_CFF ) != 0          );
 #else
-    has_outline   = FT_BOOL( TT_LookUp_Table( face, TTAG_glyf ) != 0 ||
-                             TT_LookUp_Table( face, TTAG_CFF ) != 0  );
+    has_outline   = FT_BOOL( tt_face_lookup_table( face, TTAG_glyf ) != 0 ||
+                             tt_face_lookup_table( face, TTAG_CFF ) != 0  );
 #endif
 
     is_apple_sbit = 0;
@@ -585,7 +585,7 @@
       /*   encoding ID of each charmap.                                    */
       /*                                                                   */
 
-      TT_Build_CMaps( face );  /* ignore errors */
+      tt_face_build_cmaps( face );  /* ignore errors */
 
 
       /* set the encoding fields */
@@ -603,7 +603,7 @@
 
 #if 0
           if ( root->charmap     == NULL &&
-               charmap->encoding == ft_encoding_unicode )
+               charmap->encoding == FT_ENCODING_UNICODE )
           {
             /* set 'root->charmap' to the first Unicode encoding we find */
             root->charmap = charmap;
@@ -753,7 +753,7 @@
 
 
   FT_LOCAL_DEF( void )
-  SFNT_Done_Face( TT_Face  face )
+  sfnt_done_face( TT_Face  face )
   {
     FT_Memory     memory = face->root.memory;
     SFNT_Service  sfnt   = (SFNT_Service)face->sfnt;
diff --git a/src/sfnt/sfobjs.h b/src/sfnt/sfobjs.h
index f30c198..6241c93 100644
--- a/src/sfnt/sfobjs.h
+++ b/src/sfnt/sfobjs.h
@@ -29,21 +29,21 @@
 
 
   FT_LOCAL( FT_Error )
-  SFNT_Init_Face( FT_Stream      stream,
+  sfnt_init_face( FT_Stream      stream,
                   TT_Face        face,
                   FT_Int         face_index,
                   FT_Int         num_params,
                   FT_Parameter*  params );
 
   FT_LOCAL( FT_Error )
-  SFNT_Load_Face( FT_Stream      stream,
+  sfnt_load_face( FT_Stream      stream,
                   TT_Face        face,
                   FT_Int         face_index,
                   FT_Int         num_params,
                   FT_Parameter*  params );
 
   FT_LOCAL( void )
-  SFNT_Done_Face( TT_Face  face );
+  sfnt_done_face( TT_Face  face );
 
 
 FT_END_HEADER
diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c
index 5d0a61a..a5f9cd1 100644
--- a/src/sfnt/ttcmap.c
+++ b/src/sfnt/ttcmap.c
@@ -86,7 +86,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_CharMap_Load                                                    */
+  /*    tt_face_load_charmap                                               */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads a given TrueType character map into memory.                  */
@@ -108,9 +108,9 @@
   /*    released.                                                          */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_CharMap_Load( TT_Face       face,
-                   TT_CMapTable  cmap,
-                   FT_Stream     stream )
+  tt_face_load_charmap( TT_Face       face,
+                        TT_CMapTable  cmap,
+                        FT_Stream     stream )
   {
     FT_Error     error;
     FT_Memory    memory;
@@ -391,7 +391,7 @@
     return SFNT_Err_Ok;
 
   Fail:
-    TT_CharMap_Free( face, cmap );
+    tt_face_free_charmap( face, cmap );
     return error;
   }
 
@@ -399,7 +399,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_CharMap_Free                                                    */
+  /*    tt_face_free_charmap                                               */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Destroys a character mapping table.                                */
@@ -413,8 +413,8 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_CharMap_Free( TT_Face       face,
-                   TT_CMapTable  cmap )
+  tt_face_free_charmap( TT_Face       face,
+                        TT_CMapTable  cmap )
   {
     FT_Memory  memory;
 
@@ -633,7 +633,7 @@
     {
       char_lo = (FT_UInt)( charCode & 0xFF );
       char_hi = charCode >> 8;
-  
+
       if ( char_hi == 0 )
       {
         /* an 8-bit character code -- we use the subHeader 0 in this case */
@@ -655,16 +655,16 @@
           continue;
         }
       }
-  
+
       sh2      = cmap2->subHeaders + index1;
       char_lo -= sh2->firstCode;
-  
+
       if ( char_lo > (FT_UInt)sh2->entryCount )
       {
         charCode = ( char_hi + 1 ) << 8;
         continue;
       }
-      
+
       offset = sh2->idRangeOffset / 2 + char_lo;
       if ( offset >= (FT_UInt)cmap2->numGlyphId ||
            cmap2->glyphIdArray[offset] == 0     )
@@ -672,7 +672,7 @@
         charCode++;
         continue;
       }
-      
+
       return charCode;
     }
     return 0;
@@ -813,7 +813,7 @@
 
     if ( seg4->idRangeOffset == 0 )
       return ( charCode );
-    
+
     while ( charCode <= (FT_UInt) seg4->endCount )
     {
       /* otherwise, we must use the glyphIdArray to do it */
@@ -890,12 +890,12 @@
 
 
     charCode++;
-    
+
     cmap6 = &cmap->c.cmap6;
-    
+
     if ( charCode < (FT_ULong) cmap6->firstCode )
       charCode = cmap6->firstCode;
-    
+
     charCode -= cmap6->firstCode;
 
     while ( charCode < (FT_UInt)cmap6->entryCount )
@@ -1016,7 +1016,7 @@
   Found:
     if ( charCode < group->startCharCode )
       charCode = group->startCharCode;
-    
+
     return charCode;
   }
 
@@ -1085,10 +1085,10 @@
 
     charCode++;
     cmap10 = &cmap->c.cmap10;
-    
+
     if ( charCode < cmap10->startCharCode )
       charCode = cmap10->startCharCode;
-    
+
     charCode -= cmap10->startCharCode;
 
     /* the overflow trick for comparison works here also since the number */
diff --git a/src/sfnt/ttcmap.h b/src/sfnt/ttcmap.h
index 6ddb79e..cd19a6b 100644
--- a/src/sfnt/ttcmap.h
+++ b/src/sfnt/ttcmap.h
@@ -28,13 +28,13 @@
 
 
   FT_LOCAL( FT_Error )
-  TT_CharMap_Load( TT_Face       face,
-                   TT_CMapTable  cmap,
-                   FT_Stream     input );
+  tt_face_load_charmap( TT_Face       face,
+                        TT_CMapTable  cmap,
+                        FT_Stream     input );
 
   FT_LOCAL( FT_Error )
-  TT_CharMap_Free( TT_Face       face,
-                   TT_CMapTable  cmap );
+  tt_face_free_charmap( TT_Face       face,
+                        TT_CMapTable  cmap );
 
 
 FT_END_HEADER
diff --git a/src/sfnt/ttcmap0.c b/src/sfnt/ttcmap0.c
index 2940ac3..3d0f0aa 100644
--- a/src/sfnt/ttcmap0.c
+++ b/src/sfnt/ttcmap0.c
@@ -1666,7 +1666,7 @@
   /* in the current face                                                */
   /*                                                                    */
   FT_LOCAL_DEF( FT_Error )
-  TT_Build_CMaps( TT_Face  face )
+  tt_face_build_cmaps( TT_Face  face )
   {
     FT_Byte*           table = face->cmap_table;
     FT_Byte*           limit = table + face->cmap_size;
@@ -1681,7 +1681,7 @@
     if ( TT_NEXT_USHORT( p ) != 0 )
     {
       p -= 2;
-      FT_ERROR(( "TT_Build_CMaps: unsupported `cmap' table format = %d\n",
+      FT_ERROR(( "tt_face_build_cmaps: unsupported `cmap' table format = %d\n",
                  TT_PEEK_USHORT( p ) ));
       return FT_Err_Invalid_Table;
     }
@@ -1697,7 +1697,7 @@
       charmap.platform_id = TT_NEXT_USHORT( p );
       charmap.encoding_id = TT_NEXT_USHORT( p );
       charmap.face        = FT_FACE( face );
-      charmap.encoding    = ft_encoding_none;  /* will be filled later */
+      charmap.encoding    = FT_ENCODING_NONE;  /* will be filled later */
       offset              = TT_NEXT_ULONG( p );
 
       if ( offset && table + offset + 2 < limit )
@@ -1731,7 +1731,7 @@
               (void)FT_CMap_New( (FT_CMap_Class)clazz, cmap, &charmap, NULL );
             else
             {
-              FT_ERROR(( "TT_Build_CMaps:" ));
+              FT_ERROR(( "tt_face_build_cmaps:" ));
               FT_ERROR(( " broken cmap sub-table ignored!\n" ));
             }
           }
diff --git a/src/sfnt/ttcmap0.h b/src/sfnt/ttcmap0.h
index efead24..ff1276e 100644
--- a/src/sfnt/ttcmap0.h
+++ b/src/sfnt/ttcmap0.h
@@ -63,7 +63,7 @@
 
 
   FT_LOCAL( FT_Error )
-  TT_Build_CMaps( TT_Face  face );
+  tt_face_build_cmaps( TT_Face  face );
 
 
 FT_END_HEADER
diff --git a/src/sfnt/ttload.c b/src/sfnt/ttload.c
index 3e39a49..5a828f0 100644
--- a/src/sfnt/ttload.c
+++ b/src/sfnt/ttload.c
@@ -40,7 +40,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_LookUp_Table                                                    */
+  /*    tt_face_lookup_table                                               */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Looks for a TrueType table by name.                                */
@@ -54,14 +54,14 @@
   /*    A pointer to the table directory entry.  0 if not found.           */
   /*                                                                       */
   FT_LOCAL_DEF( TT_Table  )
-  TT_LookUp_Table( TT_Face   face,
-                   FT_ULong  tag  )
+  tt_face_lookup_table( TT_Face   face,
+                        FT_ULong  tag  )
   {
     TT_Table  entry;
     TT_Table  limit;
 
 
-    FT_TRACE3(( "TT_LookUp_Table: %08p, `%c%c%c%c' -- ",
+    FT_TRACE3(( "tt_face_lookup_table: %08p, `%c%c%c%c' -- ",
                 face,
                 (FT_Char)( tag >> 24 ),
                 (FT_Char)( tag >> 16 ),
@@ -90,7 +90,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Goto_Table                                                      */
+  /*    tt_face_goto_table                                                 */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Looks for a TrueType table by name, then seek a stream to it.      */
@@ -109,16 +109,16 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Goto_Table( TT_Face    face,
-                 FT_ULong   tag,
-                 FT_Stream  stream,
-                 FT_ULong*  length )
+  tt_face_goto_table( TT_Face    face,
+                      FT_ULong   tag,
+                      FT_Stream  stream,
+                      FT_ULong*  length )
   {
     TT_Table  table;
     FT_Error  error;
 
 
-    table = TT_LookUp_Table( face, tag );
+    table = tt_face_lookup_table( face, tag );
     if ( table )
     {
       if ( length )
@@ -239,7 +239,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_SFNT_Header                                                */
+  /*    tt_face_load_sfnt_header                                           */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the header of a SFNT font file.  Supports collections.       */
@@ -267,10 +267,10 @@
   /*    values of `search_range', `entry_selector', and `range_shift'.     */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_SFNT_Header( TT_Face      face,
-                       FT_Stream    stream,
-                       FT_Long      face_index,
-                       SFNT_Header  sfnt )
+  tt_face_load_sfnt_header( TT_Face      face,
+                            FT_Stream    stream,
+                            FT_Long      face_index,
+                            SFNT_Header  sfnt )
   {
     FT_Error   error;
     FT_ULong   format_tag, offset;
@@ -301,7 +301,7 @@
     };
 
 
-    FT_TRACE2(( "TT_Load_SFNT_Header: %08p, %ld\n",
+    FT_TRACE2(( "tt_face_load_sfnt_header: %08p, %ld\n",
                 face, face_index ));
 
     face->ttc_header.tag     = 0;
@@ -324,7 +324,7 @@
       FT_Int  n;
 
 
-      FT_TRACE3(( "TT_Load_SFNT_Header: file is a collection\n" ));
+      FT_TRACE3(( "tt_face_load_sfnt_header: file is a collection\n" ));
 
       /* It is a TrueType collection, i.e. a file containing several */
       /* font files.  Read the font directory now                    */
@@ -367,7 +367,7 @@
     error = sfnt_dir_check( stream, offset, sfnt->num_tables );
     if ( error )
     {
-      FT_TRACE2(( "TT_Load_SFNT_Header: file is not SFNT!\n" ));
+      FT_TRACE2(( "tt_face_load_sfnt_header: file is not SFNT!\n" ));
       error = SFNT_Err_Unknown_File_Format;
     }
 
@@ -379,7 +379,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_Directory                                                  */
+  /*    tt_face_load_directory                                             */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the table directory into a face object.                      */
@@ -399,9 +399,9 @@
   /*    The stream cursor must be at the font file's origin.               */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_Directory( TT_Face      face,
-                     FT_Stream    stream,
-                     SFNT_Header  sfnt )
+  tt_face_load_directory( TT_Face      face,
+                          FT_Stream    stream,
+                          SFNT_Header  sfnt )
   {
     FT_Error     error;
     FT_Memory    memory = stream->memory;
@@ -409,7 +409,7 @@
     TT_TableRec  *entry, *limit;
 
 
-    FT_TRACE2(( "TT_Load_Directory: %08p\n", face ));
+    FT_TRACE2(( "tt_face_load_directory: %08p\n", face ));
 
     FT_TRACE2(( "-- Tables count:   %12u\n",  sfnt->num_tables ));
     FT_TRACE2(( "-- Format version: %08lx\n", sfnt->format_tag ));
@@ -454,7 +454,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_Any                                                        */
+  /*    tt_face_load_any                                                   */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads any font table into client memory.                           */
@@ -492,11 +492,11 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_Any( TT_Face    face,
-               FT_ULong   tag,
-               FT_Long    offset,
-               FT_Byte*   buffer,
-               FT_ULong*  length )
+  tt_face_load_any( TT_Face    face,
+                    FT_ULong   tag,
+                    FT_Long    offset,
+                    FT_Byte*   buffer,
+                    FT_ULong*  length )
   {
     FT_Error   error;
     FT_Stream  stream;
@@ -507,7 +507,7 @@
     if ( tag != 0 )
     {
       /* look for tag in font directory */
-      table = TT_LookUp_Table( face, tag );
+      table = tt_face_lookup_table( face, tag );
       if ( !table )
       {
         error = SFNT_Err_Table_Missing;
@@ -544,7 +544,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_Generic_Header                                             */
+  /*    tt_face_load_generic_header                                        */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the TrueType table `head' or `bhed'.                         */
@@ -558,7 +558,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   static FT_Error
-  TT_Load_Generic_Header( TT_Face    face,
+  tt_face_load_generic_header( TT_Face    face,
                           FT_Stream  stream,
                           FT_ULong   tag )
   {
@@ -594,7 +594,7 @@
     };
 
 
-    FT_TRACE2(( "TT_Load_Generic_Header: "
+    FT_TRACE2(( "tt_face_load_generic_header: "
                 "%08p, looking up font table `%c%c%c%c'.\n",
                 face,
                 (FT_Char)( tag >> 24 ),
@@ -605,7 +605,7 @@
     error = face->goto_table( face, tag, stream, 0 );
     if ( error )
     {
-      FT_TRACE2(( "TT_Load_Generic_Header: Font table is missing!\n" ));
+      FT_TRACE2(( "tt_face_load_generic_header: Font table is missing!\n" ));
       goto Exit;
     }
 
@@ -616,7 +616,7 @@
 
     FT_TRACE2(( "    Units per EM: %8u\n", header->Units_Per_EM ));
     FT_TRACE2(( "    IndexToLoc:   %8d\n", header->Index_To_Loc_Format ));
-    FT_TRACE2(( "TT_Load_Generic_Header: Font table loaded.\n" ));
+    FT_TRACE2(( "tt_face_load_generic_header: Font table loaded.\n" ));
 
   Exit:
     return error;
@@ -624,20 +624,20 @@
 
 
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_Header( TT_Face    face,
-                  FT_Stream  stream )
+  tt_face_load_header( TT_Face    face,
+                       FT_Stream  stream )
   {
-    return TT_Load_Generic_Header( face, stream, TTAG_head );
+    return tt_face_load_generic_header( face, stream, TTAG_head );
   }
 
 
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
 
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_Bitmap_Header( TT_Face    face,
-                         FT_Stream  stream )
+  tt_face_load_bitmap_header( TT_Face    face,
+                              FT_Stream  stream )
   {
-    return TT_Load_Generic_Header( face, stream, TTAG_bhed );
+    return tt_face_load_generic_header( face, stream, TTAG_bhed );
   }
 
 #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
@@ -646,7 +646,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_MaxProfile                                                 */
+  /*    tt_face_load_max_profile                                           */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the maximum profile into a face object.                      */
@@ -660,8 +660,8 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_MaxProfile( TT_Face    face,
-                      FT_Stream  stream )
+  tt_face_load_max_profile( TT_Face    face,
+                            FT_Stream  stream )
   {
     FT_Error        error;
     TT_MaxProfile*  maxProfile = &face->max_profile;
@@ -768,7 +768,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_Metrics                                                    */
+  /*    tt_face_load_metrics                                               */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the horizontal or vertical metrics table into a face object. */
@@ -784,9 +784,9 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   static FT_Error
-  TT_Load_Metrics( TT_Face    face,
-                   FT_Stream  stream,
-                   FT_Bool    vertical )
+  tt_face_load_metrics( TT_Face    face,
+                        FT_Stream  stream,
+                        FT_Bool    vertical )
   {
     FT_Error   error;
     FT_Memory  memory = stream->memory;
@@ -911,7 +911,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_Metrics_Header                                             */
+  /*    tt_face_load_metrics_header                                        */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the horizontal or vertical header in a face object.          */
@@ -927,9 +927,9 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_Metrics_Header( TT_Face    face,
-                          FT_Stream  stream,
-                          FT_Bool    vertical )
+  tt_face_load_metrics_header( TT_Face    face,
+                               FT_Stream  stream,
+                               FT_Bool    vertical )
   {
     FT_Error        error;
     TT_HoriHeader*  header;
@@ -1003,7 +1003,7 @@
 
     /* Now try to load the corresponding metrics */
 
-    error = TT_Load_Metrics( face, stream, vertical );
+    error = tt_face_load_metrics( face, stream, vertical );
 
   Exit:
     return error;
@@ -1013,7 +1013,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_Names                                                      */
+  /*    tt_face_load_names                                                 */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the name records.                                            */
@@ -1027,8 +1027,8 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_Names( TT_Face    face,
-                 FT_Stream  stream )
+  tt_face_load_names( TT_Face    face,
+                      FT_Stream  stream )
   {
     FT_Error      error;
     FT_Memory     memory = stream->memory;
@@ -1097,7 +1097,7 @@
 
     if ( storage_start > storage_limit )
     {
-      FT_ERROR(( "TT_Load_Names: invalid `name' table\n" ));
+      FT_ERROR(( "tt_face_load_names: invalid `name' table\n" ));
       error = SFNT_Err_Name_Table_Missing;
       goto Exit;
     }
@@ -1157,7 +1157,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Free_Names                                                      */
+  /*    tt_face_free_names                                                 */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Frees the name records.                                            */
@@ -1166,7 +1166,7 @@
   /*    face :: A handle to the target face object.                        */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  TT_Free_Names( TT_Face  face )
+  tt_face_free_names( TT_Face  face )
   {
     FT_Memory     memory = face->root.driver->root.memory;
     TT_NameTable  table  = &face->name_table;
@@ -1192,7 +1192,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_CMap                                                       */
+  /*    tt_face_load_cmap                                                  */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the cmap directory in a face object.  The cmaps itselves are */
@@ -1208,8 +1208,8 @@
   /*                                                                       */
 
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_CMap( TT_Face    face,
-                FT_Stream  stream )
+  tt_face_load_cmap( TT_Face    face,
+                     FT_Stream  stream )
   {
     FT_Error  error;
 
@@ -1239,7 +1239,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_OS2                                                        */
+  /*    tt_face_load_os2                                                   */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the OS2 table.                                               */
@@ -1253,8 +1253,8 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_OS2( TT_Face    face,
-               FT_Stream  stream )
+  tt_face_load_os2( TT_Face    face,
+                    FT_Stream  stream )
   {
     FT_Error  error;
     TT_OS2*   os2;
@@ -1382,7 +1382,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_Postscript                                                 */
+  /*    tt_face_load_postscript                                            */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the Postscript table.                                        */
@@ -1396,8 +1396,8 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_PostScript( TT_Face    face,
-                      FT_Stream  stream )
+  tt_face_load_postscript( TT_Face    face,
+                           FT_Stream  stream )
   {
     FT_Error        error;
     TT_Postscript*  post = &face->postscript;
@@ -1441,7 +1441,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_PCLT                                                       */
+  /*    tt_face_load_pclt                                                  */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the PCL 5 Table.                                             */
@@ -1455,8 +1455,8 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_PCLT( TT_Face    face,
-                FT_Stream  stream )
+  tt_face_load_pclt( TT_Face    face,
+                     FT_Stream  stream )
   {
     static const FT_Frame_Field  pclt_fields[] =
     {
@@ -1509,7 +1509,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_Gasp                                                       */
+  /*    tt_face_load_gasp                                                  */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the `gasp' table into a face object.                         */
@@ -1523,8 +1523,8 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_Gasp( TT_Face    face,
-                FT_Stream  stream )
+  tt_face_load_gasp( TT_Face    face,
+                     FT_Stream  stream )
   {
     FT_Error   error;
     FT_Memory  memory = stream->memory;
@@ -1533,7 +1533,7 @@
     TT_GaspRange   gaspranges;
 
 
-    FT_TRACE2(( "TT_Load_Gasp: %08p\n", face ));
+    FT_TRACE2(( "tt_face_load_gasp: %08p\n", face ));
 
     /* the gasp table is optional */
     error = face->goto_table( face, TTAG_gasp, stream, 0 );
@@ -1584,7 +1584,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_Kern                                                       */
+  /*    tt_face_load_kern                                                  */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the first kerning table with format 0 in the font.  Only     */
@@ -1601,8 +1601,8 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_Kern( TT_Face    face,
-                FT_Stream  stream )
+  tt_face_load_kern( TT_Face    face,
+                     FT_Stream  stream )
   {
     FT_Error   error;
     FT_Memory  memory = stream->memory;
@@ -1737,7 +1737,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_Hdmx                                                       */
+  /*    tt_face_load_hdmx                                                  */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the horizontal device metrics table.                         */
@@ -1751,8 +1751,8 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_Hdmx( TT_Face    face,
-                FT_Stream  stream )
+  tt_face_load_hdmx( TT_Face    face,
+                     FT_Stream  stream )
   {
     FT_Error   error;
     FT_Memory  memory = stream->memory;
@@ -1820,7 +1820,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Free_Hdmx                                                       */
+  /*    tt_face_free_hdmx                                                  */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Frees the horizontal device metrics table.                         */
@@ -1829,7 +1829,7 @@
   /*    face :: A handle to the target face object.                        */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  TT_Free_Hdmx( TT_Face  face )
+  tt_face_free_hdmx( TT_Face  face )
   {
     if ( face )
     {
diff --git a/src/sfnt/ttload.h b/src/sfnt/ttload.h
index ca38f6c..27c41b5 100644
--- a/src/sfnt/ttload.h
+++ b/src/sfnt/ttload.h
@@ -30,101 +30,101 @@
 
 
   FT_LOCAL( TT_Table  )
-  TT_LookUp_Table( TT_Face   face,
-                   FT_ULong  tag );
+  tt_face_lookup_table( TT_Face   face,
+                        FT_ULong  tag );
 
   FT_LOCAL( FT_Error )
-  TT_Goto_Table( TT_Face    face,
-                 FT_ULong   tag,
-                 FT_Stream  stream,
-                 FT_ULong*  length );
+  tt_face_goto_table( TT_Face    face,
+                      FT_ULong   tag,
+                      FT_Stream  stream,
+                      FT_ULong*  length );
 
 
   FT_LOCAL( FT_Error )
-  TT_Load_SFNT_Header( TT_Face      face,
-                       FT_Stream    stream,
-                       FT_Long      face_index,
-                       SFNT_Header  sfnt );
+  tt_face_load_sfnt_header( TT_Face      face,
+                            FT_Stream    stream,
+                            FT_Long      face_index,
+                            SFNT_Header  sfnt );
 
   FT_LOCAL( FT_Error )
-  TT_Load_Directory( TT_Face      face,
-                     FT_Stream    stream,
-                     SFNT_Header  sfnt );
+  tt_face_load_directory( TT_Face      face,
+                          FT_Stream    stream,
+                          SFNT_Header  sfnt );
 
   FT_LOCAL( FT_Error )
-  TT_Load_Any( TT_Face    face,
-               FT_ULong   tag,
-               FT_Long    offset,
-               FT_Byte*   buffer,
-               FT_ULong*  length );
+  tt_face_load_any( TT_Face    face,
+                    FT_ULong   tag,
+                    FT_Long    offset,
+                    FT_Byte*   buffer,
+                    FT_ULong*  length );
 
 
   FT_LOCAL( FT_Error )
-  TT_Load_Header( TT_Face    face,
-                  FT_Stream  stream );
+  tt_face_load_header( TT_Face    face,
+                       FT_Stream  stream );
 
 
   FT_LOCAL( FT_Error )
-  TT_Load_Metrics_Header( TT_Face    face,
-                          FT_Stream  stream,
-                          FT_Bool    vertical );
+  tt_face_load_metrics_header( TT_Face    face,
+                               FT_Stream  stream,
+                               FT_Bool    vertical );
 
 
   FT_LOCAL( FT_Error )
-  TT_Load_CMap( TT_Face    face,
-                FT_Stream  stream );
+  tt_face_load_cmap( TT_Face    face,
+                     FT_Stream  stream );
 
 
   FT_LOCAL( FT_Error )
-  TT_Load_MaxProfile( TT_Face    face,
+  tt_face_load_max_profile( TT_Face    face,
+                            FT_Stream  stream );
+
+
+  FT_LOCAL( FT_Error )
+  tt_face_load_names( TT_Face    face,
                       FT_Stream  stream );
 
 
   FT_LOCAL( FT_Error )
-  TT_Load_Names( TT_Face    face,
-                 FT_Stream  stream );
+  tt_face_load_os2( TT_Face    face,
+                    FT_Stream  stream );
 
 
   FT_LOCAL( FT_Error )
-  TT_Load_OS2( TT_Face    face,
-               FT_Stream  stream );
+  tt_face_load_postscript( TT_Face    face,
+                           FT_Stream  stream );
 
 
   FT_LOCAL( FT_Error )
-  TT_Load_PostScript( TT_Face    face,
-                      FT_Stream  stream );
-
+  tt_face_load_hdmx( TT_Face    face,
+                     FT_Stream  stream );
 
   FT_LOCAL( FT_Error )
-  TT_Load_Hdmx( TT_Face    face,
-                FT_Stream  stream );
-
-  FT_LOCAL( FT_Error )
-  TT_Load_PCLT( TT_Face    face,
-                FT_Stream  stream );
+  tt_face_load_pclt( TT_Face    face,
+                     FT_Stream  stream );
 
   FT_LOCAL( void )
-  TT_Free_Names( TT_Face  face );
+  tt_face_free_names( TT_Face  face );
 
 
   FT_LOCAL( void )
-  TT_Free_Hdmx ( TT_Face  face );
+  tt_face_free_hdmx ( TT_Face  face );
 
 
   FT_LOCAL( FT_Error )
-  TT_Load_Kern( TT_Face    face,
-                FT_Stream  stream );
+  tt_face_load_kern( TT_Face    face,
+                     FT_Stream  stream );
 
 
   FT_LOCAL( FT_Error )
-  TT_Load_Gasp( TT_Face    face,
-                FT_Stream  stream );
+  tt_face_load_gasp( TT_Face    face,
+                     FT_Stream  stream );
 
 #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
 
   FT_LOCAL( FT_Error )
-  TT_Load_Bitmap_Header( TT_Face    face,
-                         FT_Stream  stream );
+  tt_face_load_bitmap_header( TT_Face    face,
+                              FT_Stream  stream );
 
 #endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
 
diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c
index 686a987..a548849 100644
--- a/src/sfnt/ttpost.c
+++ b/src/sfnt/ttpost.c
@@ -62,11 +62,11 @@
    /* table of Mac names.  Thus, it is possible to build a version of */
    /* FreeType without the Type 1 driver & PSNames module.            */
 
-#define MAC_NAME( x )  TT_Post_Default_Names[x]
+#define MAC_NAME( x )  tt_post_default_names[x]
 
   /* the 258 default Mac PS glyph names */
 
-  FT_String*  TT_Post_Default_Names[258] =
+  static const FT_String*  tt_post_default_names[258] =
   {
     /*   0 */
     ".notdef", ".null", "CR", "space", "exclam",
@@ -153,7 +153,7 @@
 
 
   static FT_Error
-  Load_Format_20( TT_Face    face,
+  load_format_20( TT_Face    face,
                   FT_Stream  stream )
   {
     FT_Memory   memory = stream->memory;
@@ -271,7 +271,7 @@
 
 
   static FT_Error
-  Load_Format_25( TT_Face    face,
+  load_format_25( TT_Face    face,
                   FT_Stream  stream )
   {
     FT_Memory  memory = stream->memory;
@@ -334,7 +334,7 @@
 
 
   static FT_Error
-  Load_Post_Names( TT_Face  face )
+  load_post_names( TT_Face  face )
   {
     FT_Stream  stream;
     FT_Error   error;
@@ -359,11 +359,11 @@
     switch ( format )
     {
     case 0x00020000L:
-      error = Load_Format_20( face, stream );
+      error = load_format_20( face, stream );
       break;
 
     case 0x00028000L:
-      error = Load_Format_25( face, stream );
+      error = load_format_25( face, stream );
       break;
 
     default:
@@ -378,7 +378,7 @@
 
 
   FT_LOCAL_DEF( void )
-  TT_Free_Post_Names( TT_Face  face )
+  tt_face_free_ps_names( TT_Face  face )
   {
     FT_Memory      memory = face->root.memory;
     TT_Post_Names  names  = &face->postscript_names;
@@ -423,7 +423,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Get_PS_Name                                                     */
+  /*    tt_face_get_ps_name                                                */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Gets the PostScript glyph name of a glyph.                         */
@@ -442,9 +442,9 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Get_PS_Name( TT_Face      face,
-                  FT_UInt      idx,
-                  FT_String**  PSname )
+  tt_face_get_ps_name( TT_Face      face,
+                       FT_UInt      idx,
+                       FT_String**  PSname )
   {
     FT_Error         error;
     TT_Post_Names    names;
@@ -485,7 +485,7 @@
 
         if ( !names->loaded )
         {
-          error = Load_Post_Names( face );
+          error = load_post_names( face );
           if ( error )
             break;
         }
@@ -510,7 +510,7 @@
 
         if ( !names->loaded )
         {
-          error = Load_Post_Names( face );
+          error = load_post_names( face );
           if ( error )
             break;
         }
diff --git a/src/sfnt/ttpost.h b/src/sfnt/ttpost.h
index 57b1c8c..6f06d75 100644
--- a/src/sfnt/ttpost.h
+++ b/src/sfnt/ttpost.h
@@ -30,12 +30,12 @@
 
 
   FT_LOCAL( FT_Error )
-  TT_Get_PS_Name( TT_Face      face,
-                  FT_UInt      idx,
-                  FT_String**  PSname );
+  tt_face_get_ps_name( TT_Face      face,
+                       FT_UInt      idx,
+                       FT_String**  PSname );
 
   FT_LOCAL( void )
-  TT_Free_Post_Names( TT_Face  face );
+  tt_face_free_ps_names( TT_Face  face );
 
 
 FT_END_HEADER
diff --git a/src/sfnt/ttsbit.c b/src/sfnt/ttsbit.c
index d72c83d..695105e 100644
--- a/src/sfnt/ttsbit.c
+++ b/src/sfnt/ttsbit.c
@@ -377,7 +377,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_SBit_Strikes                                               */
+  /*    tt_face_load_sbit_strikes                                          */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the table of embedded bitmap sizes for this face.            */
@@ -391,8 +391,8 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_SBit_Strikes( TT_Face    face,
-                        FT_Stream  stream )
+  tt_face_load_sbit_strikes( TT_Face    face,
+                             FT_Stream  stream )
   {
     FT_Error   error  = 0;
     FT_Memory  memory = stream->memory;
@@ -471,7 +471,7 @@
     if ( version     != 0x00020000L ||
          num_strikes >= 0x10000L    )
     {
-      FT_ERROR(( "TT_Load_SBit_Strikes: invalid table version!\n" ));
+      FT_ERROR(( "tt_face_load_sbit_strikes: invalid table version!\n" ));
       error = SFNT_Err_Invalid_File_Format;
 
       goto Exit;
@@ -577,7 +577,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Free_SBit_Strikes                                               */
+  /*    tt_face_free_sbit_strikes                                          */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Releases the embedded bitmap tables.                               */
@@ -586,7 +586,7 @@
   /*    face :: The target face object.                                    */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  TT_Free_SBit_Strikes( TT_Face  face )
+  tt_face_free_sbit_strikes( TT_Face  face )
   {
     FT_Memory       memory       = face->root.memory;
     TT_SBit_Strike  strike       = face->sbit_strikes;
@@ -621,7 +621,7 @@
 
 
   FT_LOCAL_DEF( FT_Error )
-  TT_Set_SBit_Strike( TT_Face    face,
+  tt_face_set_sbit_strike( TT_Face    face,
                       FT_Int     x_ppem,
                       FT_Int     y_ppem,
                       FT_ULong  *astrike_index )
@@ -651,7 +651,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    Find_SBit_Range                                                    */
+  /*    find_sbit_range                                                    */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Scans a given strike's ranges and return, for a given glyph        */
@@ -671,7 +671,7 @@
   /*    FreeType error code.  0 means the glyph index was found.           */
   /*                                                                       */
   static FT_Error
-  Find_SBit_Range( FT_UInt          glyph_index,
+  find_sbit_range( FT_UInt          glyph_index,
                    TT_SBit_Strike   strike,
                    TT_SBit_Range   *arange,
                    FT_ULong        *aglyph_offset )
@@ -754,7 +754,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    Find_SBit_Image                                                    */
+  /*    find_sbit_image                                                    */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Checks whether an embedded bitmap (an `sbit') exists for a given   */
@@ -780,7 +780,7 @@
   /*    glyph.                                                             */
   /*                                                                       */
   static FT_Error
-  Find_SBit_Image( TT_Face          face,
+  find_sbit_image( TT_Face          face,
                    FT_UInt          glyph_index,
                    FT_ULong         strike_index,
                    TT_SBit_Range   *arange,
@@ -797,7 +797,7 @@
 
     strike = &face->sbit_strikes[strike_index];
 
-    error = Find_SBit_Range( glyph_index, strike,
+    error = find_sbit_range( glyph_index, strike,
                              arange, aglyph_offset );
     if ( error )
       goto Fail;
@@ -819,7 +819,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    Load_SBit_Metrics                                                  */
+  /*    load_sbit_metrics                                                  */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Gets the big metrics for a given SBit.                             */
@@ -844,7 +844,7 @@
   /*    function exit.                                                     */
   /*                                                                       */
   static FT_Error
-  Load_SBit_Metrics( FT_Stream        stream,
+  load_sbit_metrics( FT_Stream        stream,
                      TT_SBit_Range    range,
                      TT_SBit_Metrics  metrics )
   {
@@ -918,7 +918,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    Crop_Bitmap                                                        */
+  /*    crop_bitmap                                                        */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Crops a bitmap to its tightest bounding box, and adjusts its       */
@@ -930,7 +930,7 @@
   /*    metrics :: The corresponding metrics structure.                    */
   /*                                                                       */
   static void
-  Crop_Bitmap( FT_Bitmap*       map,
+  crop_bitmap( FT_Bitmap*       map,
                TT_SBit_Metrics  metrics )
   {
     /***********************************************************************/
@@ -1116,7 +1116,7 @@
     map->width      = 0;
     map->rows       = 0;
     map->pitch      = 0;
-    map->pixel_mode = ft_pixel_mode_mono;
+    map->pixel_mode = FT_PIXEL_MODE_MONO;
   }
 
 
@@ -1226,7 +1226,7 @@
     if ( FT_STREAM_SEEK( ebdt_pos + glyph_offset ) )
       goto Exit;
 
-    error = Load_SBit_Metrics( stream, range, metrics );
+    error = load_sbit_metrics( stream, range, metrics );
     if ( error )
       goto Exit;
 
@@ -1245,22 +1245,22 @@
       switch ( strike->bit_depth )
       {
       case 1:
-        map->pixel_mode = ft_pixel_mode_mono;
+        map->pixel_mode = FT_PIXEL_MODE_MONO;
         map->pitch      = ( map->width + 7 ) >> 3;
         break;
 
       case 2:
-        map->pixel_mode = ft_pixel_mode_pal2;
+        map->pixel_mode = FT_PIXEL_MODE_GRAY2;
         map->pitch      = ( map->width + 3 ) >> 2;
         break;
 
       case 4:
-        map->pixel_mode = ft_pixel_mode_pal4;
+        map->pixel_mode = FT_PIXEL_MODE_GRAY4;
         map->pitch      = ( map->width + 1 ) >> 1;
         break;
 
       case 8:
-        map->pixel_mode = ft_pixel_mode_grays;
+        map->pixel_mode = FT_PIXEL_MODE_GRAY;
         map->pitch      = map->width;
         break;
 
@@ -1336,7 +1336,7 @@
 
 
         /* find the range for this element */
-        error = Find_SBit_Range( comp->glyph_code,
+        error = find_sbit_range( comp->glyph_code,
                                  strike,
                                  &elem_range,
                                  &elem_offset );
@@ -1369,7 +1369,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_SBit_Image                                                 */
+  /*    tt_face_load_sbit_image                                            */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads a given glyph sbit image from the font resource.  This also  */
@@ -1400,13 +1400,13 @@
   /*    The `map.buffer' field is always freed before the glyph is loaded. */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_SBit_Image( TT_Face              face,
-                      FT_ULong             strike_index,
-                      FT_UInt              glyph_index,
-                      FT_UInt              load_flags,
-                      FT_Stream            stream,
-                      FT_Bitmap           *map,
-                      TT_SBit_MetricsRec  *metrics )
+  tt_face_load_sbit_image( TT_Face              face,
+                           FT_ULong             strike_index,
+                           FT_UInt              glyph_index,
+                           FT_UInt              load_flags,
+                           FT_Stream            stream,
+                           FT_Bitmap           *map,
+                           TT_SBit_MetricsRec  *metrics )
   {
     FT_Error        error;
     FT_Memory       memory = stream->memory;
@@ -1417,7 +1417,7 @@
 
 
     /* Check whether there is a glyph sbit for the current index */
-    error = Find_SBit_Image( face, glyph_index, strike_index,
+    error = find_sbit_image( face, glyph_index, strike_index,
                              &range, &strike, &glyph_offset );
     if ( error )
       goto Exit;
@@ -1464,7 +1464,7 @@
 
     /* Crop the bitmap now, unless specified otherwise */
     if ( load_flags & FT_LOAD_CROP_BITMAP )
-      Crop_Bitmap( map, metrics );
+      crop_bitmap( map, metrics );
 
   Exit:
     return error;
diff --git a/src/sfnt/ttsbit.h b/src/sfnt/ttsbit.h
index f38123d..edc858a 100644
--- a/src/sfnt/ttsbit.h
+++ b/src/sfnt/ttsbit.h
@@ -28,27 +28,27 @@
 
 
   FT_LOCAL( FT_Error )
-  TT_Load_SBit_Strikes( TT_Face    face,
-                        FT_Stream  stream );
+  tt_face_load_sbit_strikes( TT_Face    face,
+                             FT_Stream  stream );
 
   FT_LOCAL( void )
-  TT_Free_SBit_Strikes( TT_Face  face );
+  tt_face_free_sbit_strikes( TT_Face  face );
 
 
   FT_LOCAL( FT_Error )
-  TT_Set_SBit_Strike( TT_Face    face,
-                      FT_Int     x_ppem,
-                      FT_Int     y_ppem,
-                      FT_ULong  *astrike_index );
+  tt_face_set_sbit_strike( TT_Face    face,
+                           FT_Int     x_ppem,
+                           FT_Int     y_ppem,
+                           FT_ULong  *astrike_index );
 
   FT_LOCAL( FT_Error )
-  TT_Load_SBit_Image( TT_Face              face,
-                      FT_ULong             strike_index,
-                      FT_UInt              glyph_index,
-                      FT_UInt              load_flags,
-                      FT_Stream            stream,
-                      FT_Bitmap           *map,
-                      TT_SBit_MetricsRec  *metrics );
+  tt_face_load_sbit_image( TT_Face              face,
+                           FT_ULong             strike_index,
+                           FT_UInt              glyph_index,
+                           FT_UInt              load_flags,
+                           FT_Stream            stream,
+                           FT_Bitmap           *map,
+                           TT_SBit_MetricsRec  *metrics );
 
 
 FT_END_HEADER
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 08edd20..3d6dad8 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -1357,7 +1357,7 @@
     if ( coverage < 0 )
       coverage = -coverage;
 
-    if ( ras.outline.flags & ft_outline_even_odd_fill )
+    if ( ras.outline.flags & FT_OUTLINE_EVEN_ODD_FILL )
     {
       coverage &= 511;
 
@@ -1618,14 +1618,14 @@
       tag   = FT_CURVE_TAG( tags[0] );
 
       /* A contour cannot start with a cubic control point! */
-      if ( tag == FT_Curve_Tag_Cubic )
+      if ( tag == FT_CURVE_TAG_CUBIC )
         goto Invalid_Outline;
 
       /* check first point to determine origin */
-      if ( tag == FT_Curve_Tag_Conic )
+      if ( tag == FT_CURVE_TAG_CONIC )
       {
         /* first point is conic control.  Yes, this happens. */
-        if ( FT_CURVE_TAG( outline->tags[last] ) == FT_Curve_Tag_On )
+        if ( FT_CURVE_TAG( outline->tags[last] ) == FT_CURVE_TAG_ON )
         {
           /* start at last point if it is on the curve */
           v_start = v_last;
@@ -1657,7 +1657,7 @@
         tag = FT_CURVE_TAG( tags[0] );
         switch ( tag )
         {
-        case FT_Curve_Tag_On:  /* emit a single line_to */
+        case FT_CURVE_TAG_ON:  /* emit a single line_to */
           {
             FT_Vector  vec;
 
@@ -1671,7 +1671,7 @@
             continue;
           }
 
-        case FT_Curve_Tag_Conic:  /* consume conic arcs */
+        case FT_CURVE_TAG_CONIC:  /* consume conic arcs */
           {
             v_control.x = SCALED( point->x );
             v_control.y = SCALED( point->y );
@@ -1690,7 +1690,7 @@
               vec.x = SCALED( point->x );
               vec.y = SCALED( point->y );
 
-              if ( tag == FT_Curve_Tag_On )
+              if ( tag == FT_CURVE_TAG_ON )
               {
                 error = func_interface->conic_to( &v_control, &vec, user );
                 if ( error )
@@ -1698,7 +1698,7 @@
                 continue;
               }
 
-              if ( tag != FT_Curve_Tag_Conic )
+              if ( tag != FT_CURVE_TAG_CONIC )
                 goto Invalid_Outline;
 
               v_middle.x = ( v_control.x + vec.x ) / 2;
@@ -1716,13 +1716,13 @@
             goto Close;
           }
 
-        default:  /* FT_Curve_Tag_Cubic */
+        default:  /* FT_CURVE_TAG_CUBIC */
           {
             FT_Vector  vec1, vec2;
 
 
             if ( point + 1 > limit                             ||
-                 FT_CURVE_TAG( tags[1] ) != FT_Curve_Tag_Cubic )
+                 FT_CURVE_TAG( tags[1] ) != FT_CURVE_TAG_CUBIC )
               goto Invalid_Outline;
 
             point += 2;
@@ -1969,16 +1969,16 @@
       return ErrRaster_Invalid_Outline;
 
     /* if direct mode is not set, we must have a target bitmap */
-    if ( ( params->flags & ft_raster_flag_direct ) == 0 &&
+    if ( ( params->flags & FT_RASTER_FLAG_DIRECT ) == 0 &&
          ( !target_map || !target_map->buffer )         )
       return -1;
 
     /* this version does not support monochrome rendering */
-    if ( !( params->flags & ft_raster_flag_aa ) )
+    if ( !( params->flags & FT_RASTER_FLAG_AA ) )
       return ErrRaster_Invalid_Mode;
 
     /* compute clipping box */
-    if ( ( params->flags & ft_raster_flag_direct ) == 0 )
+    if ( ( params->flags & FT_RASTER_FLAG_DIRECT ) == 0 )
     {
       /* compute clip box from target pixmap */
       ras.clip_box.xMin = 0;
@@ -1986,7 +1986,7 @@
       ras.clip_box.xMax = target_map->width;
       ras.clip_box.yMax = target_map->rows;
     }
-    else if ( params->flags & ft_raster_flag_clip )
+    else if ( params->flags & FT_RASTER_FLAG_CLIP )
     {
       ras.clip_box = params->clip_box;
     }
@@ -2008,7 +2008,7 @@
     ras.render_span      = (FT_Raster_Span_Func)gray_render_span;
     ras.render_span_data = &ras;
 
-    if ( params->flags & ft_raster_flag_direct )
+    if ( params->flags & FT_RASTER_FLAG_DIRECT )
     {
       ras.render_span      = (FT_Raster_Span_Func)params->gray_spans;
       ras.render_span_data = params->user;
@@ -2133,7 +2133,7 @@
 
   const FT_Raster_Funcs  ft_grays_raster =
   {
-    ft_glyph_format_outline,
+    FT_GLYPH_FORMAT_OUTLINE,
 
     (FT_Raster_New_Func)     gray_raster_new,
     (FT_Raster_Reset_Func)   gray_raster_reset,
diff --git a/src/smooth/ftsmooth.c b/src/smooth/ftsmooth.c
index 85a4b86..f827da7 100644
--- a/src/smooth/ftsmooth.c
+++ b/src/smooth/ftsmooth.c
@@ -94,10 +94,13 @@
 
   /* convert a slot's glyph image into a bitmap */
   static FT_Error
-  ft_smooth_render( FT_Renderer   render,
-                    FT_GlyphSlot  slot,
-                    FT_UInt       mode,
-                    FT_Vector*    origin )
+  ft_smooth_render_generic( FT_Renderer   render,
+                            FT_GlyphSlot  slot,
+                            FT_UInt       mode,
+                            FT_Vector*    origin,
+                            FT_UInt       required_mode,
+                            FT_Int        hmul,
+                            FT_Int        vmul )
   {
     FT_Error     error;
     FT_Outline*  outline = NULL;
@@ -117,7 +120,7 @@
     }
 
     /* check mode */
-    if ( mode != ft_render_mode_normal )
+    if ( mode != required_mode )
       return Smooth_Err_Cannot_Render_Glyph;
 
     outline = &slot->outline;
@@ -148,7 +151,16 @@
 
     /* allocate new one, depends on pixel format */
     pitch = width;
-    bitmap->pixel_mode = ft_pixel_mode_grays;
+    if ( hmul )
+    {
+      width = width*hmul;
+      pitch = ( width + 3 ) & -4;
+    }
+
+    if ( vmul )
+      height *= vmul;
+
+    bitmap->pixel_mode = FT_PIXEL_MODE_GRAY;
     bitmap->num_grays  = 256;
     bitmap->width      = width;
     bitmap->rows       = height;
@@ -165,17 +177,46 @@
     /* set up parameters */
     params.target = bitmap;
     params.source = outline;
-    params.flags  = ft_raster_flag_aa;
+    params.flags  = FT_RASTER_FLAG_AA;
+
+    /* implode outline if needed */
+    {
+      FT_Int      n;
+      FT_Vector*  vec;
+
+      if ( hmul )
+        for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ )
+          vec->x *= hmul;
+
+      if ( vmul )
+        for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ )
+          vec->y *= vmul;
+    }
 
     /* render outline into the bitmap */
     error = render->raster_render( render->raster, &params );
-    
+
+    /* deflate outline if needed */
+    {
+      FT_Int      n;
+      FT_Vector*  vec;
+
+      if ( hmul )
+        for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ )
+          vec->x /= hmul;
+
+      if ( vmul )
+        for ( vec = outline->points, n = 0; n < outline->n_points; n++, vec++ )
+          vec->y /= vmul;
+    }
+
+
     FT_Outline_Translate( outline, cbox.xMin, cbox.yMin );
 
     if ( error )
       goto Exit;
 
-    slot->format      = ft_glyph_format_bitmap;
+    slot->format      = FT_GLYPH_FORMAT_BITMAP;
     slot->bitmap_left = cbox.xMin >> 6;
     slot->bitmap_top  = cbox.yMax >> 6;
 
@@ -187,6 +228,47 @@
   }
 
 
+
+  /* convert a slot's glyph image into a bitmap */
+  static FT_Error
+  ft_smooth_render( FT_Renderer   render,
+                    FT_GlyphSlot  slot,
+                    FT_UInt       mode,
+                    FT_Vector*    origin )
+  {
+    return ft_smooth_render_generic( render, slot, mode, origin,
+                                     FT_RENDER_MODE_NORMAL,
+                                     0, 0 );
+  }
+
+
+  /* convert a slot's glyph image into a horizontal LCD bitmap */
+  static FT_Error
+  ft_smooth_render_lcd( FT_Renderer   render,
+                        FT_GlyphSlot  slot,
+                        FT_UInt       mode,
+                        FT_Vector*    origin )
+  {
+    return ft_smooth_render_generic( render, slot, mode, origin,
+                                     FT_RENDER_MODE_LCD,
+                                     3, 0 );
+  }
+
+
+  /* convert a slot's glyph image into a vertical LCD bitmap */
+  static FT_Error
+  ft_smooth_render_lcd_v( FT_Renderer   render,
+                          FT_GlyphSlot  slot,
+                          FT_UInt       mode,
+                          FT_Vector*    origin )
+  {
+    return ft_smooth_render_generic( render, slot, mode, origin,
+                                     FT_RENDER_MODE_LCD_V,
+                                     0, 3 );
+  }
+
+
+
   FT_CALLBACK_TABLE_DEF
   const FT_Renderer_Class  ft_smooth_renderer_class =
   {
@@ -205,12 +287,71 @@
       (FT_Module_Requester)  0
     },
 
-    ft_glyph_format_outline,
+    FT_GLYPH_FORMAT_OUTLINE,
 
-    (FTRenderer_render)   ft_smooth_render,
-    (FTRenderer_transform)ft_smooth_transform,
-    (FTRenderer_getCBox)  ft_smooth_get_cbox,
-    (FTRenderer_setMode)  ft_smooth_set_mode,
+    (FT_Renderer_RenderFunc)   ft_smooth_render,
+    (FT_Renderer_TransformFunc)ft_smooth_transform,
+    (FT_Renderer_GetCBoxFunc)  ft_smooth_get_cbox,
+    (FT_Renderer_SetModeFunc)  ft_smooth_set_mode,
+
+    (FT_Raster_Funcs*)    &ft_grays_raster
+  };
+
+
+  FT_CALLBACK_TABLE_DEF
+  const FT_Renderer_Class  ft_smooth_lcd_renderer_class =
+  {
+    {
+      ft_module_renderer,
+      sizeof( FT_RendererRec ),
+
+      "smooth-lcd",
+      0x10000L,
+      0x20000L,
+
+      0,    /* module specific interface */
+
+      (FT_Module_Constructor)ft_smooth_init,
+      (FT_Module_Destructor) 0,
+      (FT_Module_Requester)  0
+    },
+
+    FT_GLYPH_FORMAT_OUTLINE,
+
+    (FT_Renderer_RenderFunc)   ft_smooth_render_lcd,
+    (FT_Renderer_TransformFunc)ft_smooth_transform,
+    (FT_Renderer_GetCBoxFunc)  ft_smooth_get_cbox,
+    (FT_Renderer_SetModeFunc)  ft_smooth_set_mode,
+
+    (FT_Raster_Funcs*)    &ft_grays_raster
+  };
+
+
+
+  FT_CALLBACK_TABLE_DEF
+  const FT_Renderer_Class  ft_smooth_lcdv_renderer_class =
+  {
+    {
+      ft_module_renderer,
+      sizeof( FT_RendererRec ),
+
+      "smooth-lcdv",
+      0x10000L,
+      0x20000L,
+
+      0,    /* module specific interface */
+
+      (FT_Module_Constructor)ft_smooth_init,
+      (FT_Module_Destructor) 0,
+      (FT_Module_Requester)  0
+    },
+
+    FT_GLYPH_FORMAT_OUTLINE,
+
+    (FT_Renderer_RenderFunc)   ft_smooth_render_lcd_v,
+    (FT_Renderer_TransformFunc)ft_smooth_transform,
+    (FT_Renderer_GetCBoxFunc)  ft_smooth_get_cbox,
+    (FT_Renderer_SetModeFunc)  ft_smooth_set_mode,
 
     (FT_Raster_Funcs*)    &ft_grays_raster
   };
diff --git a/src/smooth/ftsmooth.h b/src/smooth/ftsmooth.h
index ec01121..62cced4 100644
--- a/src/smooth/ftsmooth.h
+++ b/src/smooth/ftsmooth.h
@@ -33,9 +33,14 @@
 
 #ifndef FT_CONFIG_OPTION_NO_SMOOTH_RASTER
   FT_EXPORT_VAR( const FT_Renderer_Class )  ft_smooth_renderer_class;
+
+  FT_EXPORT_VAR( const FT_Renderer_Class )  ft_smooth_lcd_renderer_class;
+
+  FT_EXPORT_VAR( const FT_Renderer_Class )  ft_smooth_lcd_v_renderer_class;
 #endif
 
 
+
 FT_END_HEADER
 
 #endif /* __FTSMOOTH_H__ */
diff --git a/src/tools/test_bbox.c b/src/tools/test_bbox.c
index 5ac9894..e085c5b 100644
--- a/src/tools/test_bbox.c
+++ b/src/tools/test_bbox.c
@@ -46,10 +46,10 @@
 
   static char  dummy_tag_1[4] =
   {
-    FT_Curve_Tag_On,
-    FT_Curve_Tag_Cubic,
-    FT_Curve_Tag_Cubic,
-    FT_Curve_Tag_On
+    FT_CURVE_TAG_ON,
+    FT_CURVE_TAG_CUBIC,
+    FT_CURVE_TAG_CUBIC,
+    FT_CURVE_TAG_ON
   };
 
   static short  dummy_contour_1[1] =
diff --git a/src/truetype/ttdriver.c b/src/truetype/ttdriver.c
index d07427d..1e7bf31 100644
--- a/src/truetype/ttdriver.c
+++ b/src/truetype/ttdriver.c
@@ -222,7 +222,7 @@
     size->strike_index    = 0xFFFF;
 #endif
 
-    return TT_Size_Reset( size );
+    return tt_size_reset( size );
   }
 
 
@@ -261,7 +261,7 @@
     size->strike_index    = 0xFFFF;
 #endif
 
-    return TT_Size_Reset( size );
+    return tt_size_reset( size );
   }
 
 
@@ -319,7 +319,7 @@
 
       if ( !size->ttmetrics.valid )
       {
-        if ( FT_SET_ERROR( TT_Size_Reset( size ) ) )
+        if ( FT_SET_ERROR( tt_size_reset( size ) ) )
           return error;
       }
     }
@@ -390,8 +390,8 @@
 
       (void*)0,        /* driver specific interface */
 
-      (FT_Module_Constructor)TT_Driver_Init,
-      (FT_Module_Destructor) TT_Driver_Done,
+      (FT_Module_Constructor)tt_driver_init,
+      (FT_Module_Destructor) tt_driver_done,
       (FT_Module_Requester)  tt_get_interface,
     },
 
@@ -400,10 +400,10 @@
     sizeof ( FT_GlyphSlotRec ),
 
 
-    (FT_Face_InitFunc)        TT_Face_Init,
-    (FT_Face_DoneFunc)        TT_Face_Done,
-    (FT_Size_InitFunc)        TT_Size_Init,
-    (FT_Size_DoneFunc)        TT_Size_Done,
+    (FT_Face_InitFunc)        tt_face_init,
+    (FT_Face_DoneFunc)        tt_face_done,
+    (FT_Size_InitFunc)        tt_size_init,
+    (FT_Size_DoneFunc)        tt_size_done,
     (FT_Slot_InitFunc)        0,
     (FT_Slot_DoneFunc)        0,
 
diff --git a/src/truetype/ttgload.c b/src/truetype/ttgload.c
index 526dbbc..5eff015 100644
--- a/src/truetype/ttgload.c
+++ b/src/truetype/ttgload.c
@@ -458,7 +458,7 @@
 
     /* clear the touch tags */
     for ( n = 0; n < n_points; n++ )
-      outline->tags[n] &= FT_Curve_Tag_On;
+      outline->tags[n] &= FT_CURVE_TAG_ON;
 
     outline->n_points   = (FT_UShort)n_points;
     outline->n_contours = (FT_Short) n_contours;
@@ -1021,7 +1021,7 @@
         FT_GlyphLoader_Add( gloader );
 
         glyph->num_subglyphs = gloader->base.num_subglyphs;
-        glyph->format        = ft_glyph_format_composite;
+        glyph->format        = FT_GLYPH_FORMAT_COMPOSITE;
         glyph->subglyphs     = gloader->base.subglyphs;
 
         goto Exit;
@@ -1299,7 +1299,7 @@
 
 
             for ( k = 0; k < num_points; k++ )
-              pts->tags[k] &= FT_Curve_Tag_On;
+              pts->tags[k] &= FT_CURVE_TAG_ON;
           }
 
           cur_to_org( num_points + 2, pts );
@@ -1363,9 +1363,9 @@
     if ( ( loader->load_flags & FT_LOAD_NO_SCALE ) == 0 )
       y_scale = size->root.metrics.y_scale;
 
-    if ( glyph->format != ft_glyph_format_composite )
+    if ( glyph->format != FT_GLYPH_FORMAT_COMPOSITE )
     {
-      glyph->outline.flags &= ~ft_outline_single_pass;
+      glyph->outline.flags &= ~FT_OUTLINE_SINGLE_PASS;
 
       /* copy outline to our glyph slot */
       FT_GlyphLoader_CopyPoints( glyph->internal->loader, loader->gloader );
@@ -1647,7 +1647,7 @@
         glyph->metrics.vertBearingY = (FT_Pos)metrics.vertBearingY << 6;
         glyph->metrics.vertAdvance  = (FT_Pos)metrics.vertAdvance  << 6;
 
-        glyph->format = ft_glyph_format_bitmap;
+        glyph->format = FT_GLYPH_FORMAT_BITMAP;
         if ( load_flags & FT_LOAD_VERTICAL_LAYOUT )
         {
           glyph->bitmap_left = metrics.vertBearingX;
@@ -1754,7 +1754,7 @@
 #endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
 
     /* Main loading loop */
-    glyph->format        = ft_glyph_format_outline;
+    glyph->format        = FT_GLYPH_FORMAT_OUTLINE;
     glyph->num_subglyphs = 0;
 
     error = load_truetype_glyph( &loader, glyph_index );
@@ -1773,7 +1773,7 @@
     /* TrueType glyphs at all sizes using the bytecode interpreter. */
     /*                                                              */
     if ( size && size->root.metrics.y_ppem < 24 )
-      glyph->outline.flags |= ft_outline_high_precision;
+      glyph->outline.flags |= FT_OUTLINE_HIGH_PRECISION;
 
   Exit:
     return error;
diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c
index 28587e6..cee0f78 100644
--- a/src/truetype/ttinterp.c
+++ b/src/truetype/ttinterp.c
@@ -1175,15 +1175,15 @@
   {
     FT_Int32   m, s, hi;
     FT_UInt32  l, lo;
-    
+
 
     /* compute ax*bx as 64-bit value */
     l  = (FT_UInt32)( ( a & 0xFFFFU ) * b );
     m  = ( a >> 16 ) * b;
-    
+
     lo = l + (FT_UInt32)( m << 16 );
     hi = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo < l );
-    
+
     /* divide the result by 2^14 with rounding */
     s   = hi >> 31;
     l   = lo + (FT_UInt32)s;
@@ -1192,7 +1192,7 @@
 
     l   = lo + 0x2000U;
     hi += (l < lo);
-    
+
     return ( hi << 18 ) | ( l >> 14 );
   }
 
@@ -1206,26 +1206,26 @@
   {
     FT_Int32   m, s, hi1, hi2, hi;
     FT_UInt32  l, lo1, lo2, lo;
-    
+
 
     /* compute ax*bx as 64-bit value */
     l = (FT_UInt32)( ( ax & 0xFFFFU ) * bx );
     m = ( ax >> 16 ) * bx;
-    
+
     lo1 = l + (FT_UInt32)( m << 16 );
     hi1 = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo1 < l );
-    
+
     /* compute ay*by as 64-bit value */
     l = (FT_UInt32)( ( ay & 0xFFFFU ) * by );
     m = ( ay >> 16 ) * by;
-    
+
     lo2 = l + (FT_UInt32)( m << 16 );
     hi2 = ( m >> 16 ) + ( (FT_Int32)l >> 31 ) + ( lo2 < l );
-    
+
     /* add them */
     lo = lo1 + lo2;
     hi = hi1 + hi2 + ( lo < lo1 );
-    
+
     /* divide the result by 2^14 with rounding */
     s   = hi >> 31;
     l   = lo + (FT_UInt32)s;
@@ -1234,7 +1234,7 @@
 
     l   = lo + 0x2000U;
     hi += ( l < lo );
-    
+
     return ( hi << 18 ) | ( l >> 14 );
   }
 
@@ -1250,33 +1250,33 @@
     FT_Int32   m, hi1, hi2, hi;
     FT_UInt32  l, lo1, lo2, lo;
 
-    
+
     /* compute x*x as 64-bit value */
     lo = (FT_UInt32)( x & 0xFFFFU );
     hi = x >> 16;
-    
+
     l  = lo * lo;
     m  = hi * lo;
     hi = hi * hi;
-    
+
     lo1 = l + (FT_UInt32)( m << 17 );
     hi1 = hi + ( m >> 15 ) + ( lo1 < l );
-    
+
     /* compute y*y as 64-bit value */
     lo = (FT_UInt32)( y & 0xFFFFU );
     hi = y >> 16;
-    
+
     l  = lo * lo;
     m  = hi * lo;
     hi = hi * hi;
-    
+
     lo2 = l + (FT_UInt32)( m << 17 );
     hi2 = hi + ( m >> 15 ) + ( lo2 < l );
-    
+
     /* add them to get 'x*x+y*y' as 64-bit value */
     lo = lo1 + lo2;
     hi = hi1 + hi2 + ( lo < lo1 );
-    
+
     /* compute the square root of this value */
     {
       FT_UInt32  root, rem, test_div;
@@ -1303,13 +1303,13 @@
           }
         } while ( --count );
       }
-      
+
       return (FT_Int32)root;
     }
   }
 
 #else
- 
+
   /* this version uses FT_Vector_Length which computes the same value */
   /* much, much faster..                                              */
   /*                                                                  */
@@ -1325,7 +1325,7 @@
 
     return FT_Vector_Length( &v );
   }
-  
+
 #endif
 
 
@@ -1550,7 +1550,7 @@
 
 #endif
 
-      zone->tags[point] |= FT_Curve_Tag_Touch_X;
+      zone->tags[point] |= FT_CURVE_TAG_TOUCH_X;
     }
 
     v = CUR.GS.freeVector.y;
@@ -1571,7 +1571,7 @@
 
 #endif
 
-      zone->tags[point] |= FT_Curve_Tag_Touch_Y;
+      zone->tags[point] |= FT_CURVE_TAG_TOUCH_Y;
     }
   }
 
@@ -1594,7 +1594,7 @@
     FT_UNUSED_EXEC;
 
     zone->cur[point].x += distance;
-    zone->tags[point]  |= FT_Curve_Tag_Touch_X;
+    zone->tags[point]  |= FT_CURVE_TAG_TOUCH_X;
   }
 
 
@@ -1606,7 +1606,7 @@
     FT_UNUSED_EXEC;
 
     zone->cur[point].y += distance;
-    zone->tags[point]  |= FT_Curve_Tag_Touch_Y;
+    zone->tags[point]  |= FT_CURVE_TAG_TOUCH_Y;
   }
 
 
@@ -5023,7 +5023,7 @@
         }
       }
       else
-        CUR.pts.tags[point] ^= FT_Curve_Tag_On;
+        CUR.pts.tags[point] ^= FT_CURVE_TAG_ON;
 
       CUR.GS.loop--;
     }
@@ -5057,7 +5057,7 @@
     }
 
     for ( I = L; I <= K; I++ )
-      CUR.pts.tags[I] |= FT_Curve_Tag_On;
+      CUR.pts.tags[I] |= FT_CURVE_TAG_ON;
   }
 
 
@@ -5085,7 +5085,7 @@
     }
 
     for ( I = L; I <= K; I++ )
-      CUR.pts.tags[I] &= ~FT_Curve_Tag_On;
+      CUR.pts.tags[I] &= ~FT_CURVE_TAG_ON;
   }
 
 
@@ -5153,14 +5153,14 @@
     {
       CUR.zp2.cur[point].x += dx;
       if ( touch )
-        CUR.zp2.tags[point] |= FT_Curve_Tag_Touch_X;
+        CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_X;
     }
 
     if ( CUR.GS.freeVector.y != 0 )
     {
       CUR.zp2.cur[point].y += dy;
       if ( touch )
-        CUR.zp2.tags[point] |= FT_Curve_Tag_Touch_Y;
+        CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_Y;
     }
   }
 
@@ -5828,7 +5828,7 @@
     dx = CUR.zp0.cur[b0].x - CUR.zp1.cur[a0].x;
     dy = CUR.zp0.cur[b0].y - CUR.zp1.cur[a0].y;
 
-    CUR.zp2.tags[point] |= FT_Curve_Tag_Touch_Both;
+    CUR.zp2.tags[point] |= FT_CURVE_TAG_TOUCH_BOTH;
 
     discriminant = TT_MULDIV( dax, -dby, 0x40 ) +
                    TT_MULDIV( day, dbx, 0x40 );
@@ -6006,10 +6006,10 @@
     mask = 0xFF;
 
     if ( CUR.GS.freeVector.x != 0 )
-      mask &= ~FT_Curve_Tag_Touch_X;
+      mask &= ~FT_CURVE_TAG_TOUCH_X;
 
     if ( CUR.GS.freeVector.y != 0 )
-      mask &= ~FT_Curve_Tag_Touch_Y;
+      mask &= ~FT_CURVE_TAG_TOUCH_Y;
 
     CUR.zp0.tags[point] &= mask;
   }
@@ -6149,13 +6149,13 @@
 
     if ( CUR.opcode & 1 )
     {
-      mask   = FT_Curve_Tag_Touch_X;
+      mask   = FT_CURVE_TAG_TOUCH_X;
       V.orgs = CUR.pts.org;
       V.curs = CUR.pts.cur;
     }
     else
     {
-      mask   = FT_Curve_Tag_Touch_Y;
+      mask   = FT_CURVE_TAG_TOUCH_Y;
       V.orgs = (FT_Vector*)( (FT_Pos*)CUR.pts.org + 1 );
       V.curs = (FT_Vector*)( (FT_Pos*)CUR.pts.cur + 1 );
     }
diff --git a/src/truetype/ttobjs.c b/src/truetype/ttobjs.c
index 39653e1..e982c53 100644
--- a/src/truetype/ttobjs.c
+++ b/src/truetype/ttobjs.c
@@ -57,7 +57,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Done_GlyphZone                                                  */
+  /*    tt_glyphzone_done                                                  */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Deallocates a glyph zone.                                          */
@@ -66,7 +66,7 @@
   /*    zone :: A pointer to the target glyph zone.                        */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  TT_Done_GlyphZone( TT_GlyphZone  zone )
+  tt_glyphzone_done( TT_GlyphZone  zone )
   {
     FT_Memory  memory = zone->memory;
 
@@ -84,7 +84,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_New_GlyphZone                                                   */
+  /*    tt_glyphzone_new                                                   */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Allocates a new glyph zone.                                        */
@@ -103,7 +103,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_New_GlyphZone( FT_Memory     memory,
+  tt_glyphzone_new( FT_Memory     memory,
                     FT_UShort     maxPoints,
                     FT_Short      maxContours,
                     TT_GlyphZone  zone )
@@ -122,7 +122,7 @@
          FT_NEW_ARRAY( zone->tags,     maxPoints     ) ||
          FT_NEW_ARRAY( zone->contours, maxContours   ) )
     {
-      TT_Done_GlyphZone( zone );
+      tt_glyphzone_done( zone );
     }
 
     return error;
@@ -133,7 +133,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Face_Init                                                       */
+  /*    tt_face_init                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Initializes a given TrueType face object.                          */
@@ -154,7 +154,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Face_Init( FT_Stream      stream,
+  tt_face_init( FT_Stream      stream,
                 TT_Face        face,
                 FT_Int         face_index,
                 FT_Int         num_params,
@@ -202,17 +202,17 @@
 #ifdef FT_CONFIG_OPTION_INCREMENTAL
 
         if ( !face->root.internal->incremental_interface )
-          error = TT_Load_Locations( face, stream );
+          error = tt_face_load_loca( face, stream );
         if ( !error )
-          error = TT_Load_CVT      ( face, stream ) ||
-                  TT_Load_Programs ( face, stream );
+          error = tt_face_load_cvt      ( face, stream ) ||
+                  tt_face_load_fpgm ( face, stream );
 
 #else
 
         if ( !error )
-          error = TT_Load_Locations( face, stream ) ||
-                  TT_Load_CVT      ( face, stream ) ||
-                  TT_Load_Programs ( face, stream );
+          error = tt_face_load_loca( face, stream ) ||
+                  tt_face_load_cvt      ( face, stream ) ||
+                  tt_face_load_fpgm ( face, stream );
 
 #endif
 
@@ -233,7 +233,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Face_Done                                                       */
+  /*    tt_face_done                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Finalizes a given face object.                                     */
@@ -242,7 +242,7 @@
   /*    face :: A pointer to the face object to destroy.                   */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  TT_Face_Done( TT_Face  face )
+  tt_face_done( TT_Face  face )
   {
     FT_Memory     memory = face->root.memory;
     FT_Stream     stream = face->root.stream;
@@ -283,7 +283,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Size_Init                                                       */
+  /*    tt_size_init                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Initializes a new TrueType size object.                            */
@@ -295,7 +295,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Size_Init( TT_Size  size )
+  tt_size_init( TT_Size  size )
   {
     FT_Error  error = TT_Err_Ok;
 
@@ -352,7 +352,7 @@
 
     /* reserve twilight zone */
     n_twilight = maxp->maxTwilightPoints;
-    error = TT_New_GlyphZone( memory, n_twilight, 0, &size->twilight );
+    error = tt_glyphzone_new( memory, n_twilight, 0, &size->twilight );
     if ( error )
       goto Fail_Memory;
 
@@ -453,7 +453,7 @@
 
   Fail_Memory:
 
-    TT_Size_Done( size );
+    tt_size_done( size );
     return error;
 
 #endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
@@ -464,7 +464,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Size_Done                                                       */
+  /*    tt_size_done                                                       */
   /*                                                                       */
   /* <Description>                                                         */
   /*    The TrueType size object finalizer.                                */
@@ -473,7 +473,7 @@
   /*    size :: A handle to the target size object.                        */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  TT_Size_Done( TT_Size  size )
+  tt_size_done( TT_Size  size )
   {
 
 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
@@ -496,7 +496,7 @@
     size->storage_size = 0;
 
     /* twilight zone */
-    TT_Done_GlyphZone( &size->twilight );
+    tt_glyphzone_done( &size->twilight );
 
     FT_FREE( size->function_defs );
     FT_FREE( size->instruction_defs );
@@ -755,7 +755,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Size_Reset                                                      */
+  /*    tt_size_reset                                                      */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Resets a TrueType size when resolutions and character dimensions   */
@@ -765,7 +765,7 @@
   /*    size :: A handle to the target size object.                        */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Size_Reset( TT_Size  size )
+  tt_size_reset( TT_Size  size )
   {
     FT_Face   face;
     FT_Error  error = TT_Err_Ok;
@@ -805,7 +805,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Driver_Init                                                     */
+  /*    tt_driver_init                                                     */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Initializes a given TrueType driver object.                        */
@@ -817,7 +817,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Driver_Init( TT_Driver  driver )
+  tt_driver_init( TT_Driver  driver )
   {
     FT_Error  error;
 
@@ -832,7 +832,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Driver_Done                                                     */
+  /*    tt_driver_done                                                     */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Finalizes a given TrueType driver.                                 */
@@ -841,7 +841,7 @@
   /*    driver :: A handle to the target TrueType driver.                  */
   /*                                                                       */
   FT_LOCAL_DEF( void )
-  TT_Driver_Done( TT_Driver  driver )
+  tt_driver_done( TT_Driver  driver )
   {
 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 
diff --git a/src/truetype/ttobjs.h b/src/truetype/ttobjs.h
index 4fb48d0..28bcdc4 100644
--- a/src/truetype/ttobjs.h
+++ b/src/truetype/ttobjs.h
@@ -108,10 +108,10 @@
 #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
 
   FT_LOCAL( void )
-  TT_Done_GlyphZone( TT_GlyphZone  zone );
+  tt_glyphzone_done( TT_GlyphZone  zone );
 
   FT_LOCAL( FT_Error )
-  TT_New_GlyphZone( FT_Memory     memory,
+  tt_glyphzone_new( FT_Memory     memory,
                     FT_UShort     maxPoints,
                     FT_Short      maxContours,
                     TT_GlyphZone  zone );
@@ -379,14 +379,14 @@
   /* Face functions                                                        */
   /*                                                                       */
   FT_LOCAL( FT_Error )
-  TT_Face_Init( FT_Stream      stream,
+  tt_face_init( FT_Stream      stream,
                 TT_Face        face,
                 FT_Int         face_index,
                 FT_Int         num_params,
                 FT_Parameter*  params );
 
   FT_LOCAL( void )
-  TT_Face_Done( TT_Face  face );
+  tt_face_done( TT_Face  face );
 
 
   /*************************************************************************/
@@ -394,13 +394,13 @@
   /* Size functions                                                        */
   /*                                                                       */
   FT_LOCAL( FT_Error )
-  TT_Size_Init( TT_Size  size );
+  tt_size_init( TT_Size  size );
 
   FT_LOCAL( void )
-  TT_Size_Done( TT_Size  size );
+  tt_size_done( TT_Size  size );
 
   FT_LOCAL( FT_Error )
-  TT_Size_Reset( TT_Size  size );
+  tt_size_reset( TT_Size  size );
 
 
   /*************************************************************************/
@@ -408,10 +408,10 @@
   /* Driver functions                                                      */
   /*                                                                       */
   FT_LOCAL( FT_Error )
-  TT_Driver_Init( TT_Driver  driver );
+  tt_driver_init( TT_Driver  driver );
 
   FT_LOCAL( void )
-  TT_Driver_Done( TT_Driver  driver );
+  tt_driver_done( TT_Driver  driver );
 
 
 FT_END_HEADER
diff --git a/src/truetype/ttpload.c b/src/truetype/ttpload.c
index 19bd0f8..4066cd7 100644
--- a/src/truetype/ttpload.c
+++ b/src/truetype/ttpload.c
@@ -40,7 +40,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_Locations                                                  */
+  /*    tt_face_load_loca                                                  */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the locations table.                                         */
@@ -55,7 +55,7 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_Locations( TT_Face    face,
+  tt_face_load_loca( TT_Face    face,
                      FT_Stream  stream )
   {
     FT_Error   error;
@@ -129,7 +129,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_CVT                                                        */
+  /*    tt_face_load_cvt                                                   */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the control value table into a face object.                  */
@@ -144,8 +144,8 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_CVT( TT_Face    face,
-               FT_Stream  stream )
+  tt_face_load_cvt( TT_Face    face,
+                    FT_Stream  stream )
   {
     FT_Error   error;
     FT_Memory  memory = stream->memory;
@@ -194,7 +194,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
-  /*    TT_Load_Progams                                                    */
+  /*    tt_face_load_fpgm                                                  */
   /*                                                                       */
   /* <Description>                                                         */
   /*    Loads the font program and the cvt program.                        */
@@ -209,8 +209,8 @@
   /*    FreeType error code.  0 means success.                             */
   /*                                                                       */
   FT_LOCAL_DEF( FT_Error )
-  TT_Load_Programs( TT_Face    face,
-                    FT_Stream  stream )
+  tt_face_load_fpgm( TT_Face    face,
+                     FT_Stream  stream )
   {
     FT_Error   error;
     FT_ULong   table_len;
diff --git a/src/truetype/ttpload.h b/src/truetype/ttpload.h
index c83b2f2..3f8cd64 100644
--- a/src/truetype/ttpload.h
+++ b/src/truetype/ttpload.h
@@ -28,16 +28,16 @@
 
 
   FT_LOCAL( FT_Error )
-  TT_Load_Locations( TT_Face    face,
+  tt_face_load_loca( TT_Face    face,
                      FT_Stream  stream );
 
   FT_LOCAL( FT_Error )
-  TT_Load_CVT( TT_Face    face,
-               FT_Stream  stream );
+  tt_face_load_cvt( TT_Face    face,
+                    FT_Stream  stream );
 
   FT_LOCAL( FT_Error )
-  TT_Load_Programs( TT_Face    face,
-                    FT_Stream  stream );
+  tt_face_load_fpgm( TT_Face    face,
+                     FT_Stream  stream );
 
 
 FT_END_HEADER
diff --git a/src/type1/t1gload.c b/src/type1/t1gload.c
index 0625caf..ecf85f6 100644
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -242,7 +242,7 @@
     hinting = FT_BOOL( ( load_flags & FT_LOAD_NO_SCALE   ) == 0 &&
                        ( load_flags & FT_LOAD_NO_HINTING ) == 0 );
 
-    glyph->root.format = ft_glyph_format_outline;
+    glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
 
     error = decoder_funcs->init( &decoder,
                                  (FT_Face)face,
@@ -280,8 +280,8 @@
     /* bearing the yMax                                    */
     if ( !error )
     {
-      glyph->root.outline.flags &= ft_outline_owner;
-      glyph->root.outline.flags |= ft_outline_reverse_fill;
+      glyph->root.outline.flags &= FT_OUTLINE_OWNER;
+      glyph->root.outline.flags |= FT_OUTLINE_REVERSE_FILL;
 
       /* for composite glyphs, return only left side bearing and */
       /* advance width                                           */
@@ -314,10 +314,10 @@
 
         glyph->root.linearVertAdvance = 0;
 
-        glyph->root.format = ft_glyph_format_outline;
+        glyph->root.format = FT_GLYPH_FORMAT_OUTLINE;
 
         if ( size && size->root.metrics.y_ppem < 24 )
-          glyph->root.outline.flags |= ft_outline_high_precision;
+          glyph->root.outline.flags |= FT_OUTLINE_HIGH_PRECISION;
 
 #if 1
         /* apply the font matrix, if any */
diff --git a/src/type1/t1objs.c b/src/type1/t1objs.c
index 51131ff..59e7cb6 100644
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -443,7 +443,7 @@
         /* first of all, try to synthetize a Unicode charmap */
         charmap.platform_id = 3;
         charmap.encoding_id = 1;
-        charmap.encoding    = ft_encoding_unicode;
+        charmap.encoding    = FT_ENCODING_UNICODE;
 
         FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
 
@@ -454,25 +454,25 @@
         switch ( face->type1.encoding_type )
         {
         case T1_ENCODING_TYPE_STANDARD:
-          charmap.encoding    = ft_encoding_adobe_standard;
+          charmap.encoding    = FT_ENCODING_ADOBE_STANDARD;
           charmap.encoding_id = 0;
           clazz               = cmap_classes->standard;
           break;
 
         case T1_ENCODING_TYPE_EXPERT:
-          charmap.encoding    = ft_encoding_adobe_expert;
+          charmap.encoding    = FT_ENCODING_ADOBE_EXPERT;
           charmap.encoding_id = 1;
           clazz               = cmap_classes->expert;
           break;
 
         case T1_ENCODING_TYPE_ARRAY:
-          charmap.encoding    = ft_encoding_adobe_custom;
+          charmap.encoding    = FT_ENCODING_ADOBE_CUSTOM;
           charmap.encoding_id = 2;
           clazz               = cmap_classes->custom;
           break;
 
         case T1_ENCODING_TYPE_ISOLATIN1:
-          charmap.encoding    = ft_encoding_latin_1;
+          charmap.encoding    = FT_ENCODING_ADOBE_LATIN_1;
           charmap.encoding_id = 3;
           clazz               = cmap_classes->unicode;
           break;
diff --git a/src/type42/t42objs.c b/src/type42/t42objs.c
index ae1d542..d3abb38 100644
--- a/src/type42/t42objs.c
+++ b/src/type42/t42objs.c
@@ -296,7 +296,7 @@
         /* first of all, try to synthetize a Unicode charmap */
         charmap.platform_id = 3;
         charmap.encoding_id = 1;
-        charmap.encoding    = ft_encoding_unicode;
+        charmap.encoding    = FT_ENCODING_UNICODE;
 
         FT_CMap_New( cmap_classes->unicode, NULL, &charmap, NULL );
 
@@ -307,25 +307,25 @@
         switch ( face->type1.encoding_type )
         {
         case T1_ENCODING_TYPE_STANDARD:
-          charmap.encoding    = ft_encoding_adobe_standard;
+          charmap.encoding    = FT_ENCODING_ADOBE_STANDARD;
           charmap.encoding_id = 0;
           clazz               = cmap_classes->standard;
           break;
 
         case T1_ENCODING_TYPE_EXPERT:
-          charmap.encoding    = ft_encoding_adobe_expert;
+          charmap.encoding    = FT_ENCODING_ADOBE_EXPERT;
           charmap.encoding_id = 1;
           clazz               = cmap_classes->expert;
           break;
 
         case T1_ENCODING_TYPE_ARRAY:
-          charmap.encoding    = ft_encoding_adobe_custom;
+          charmap.encoding    = FT_ENCODING_ADOBE_CUSTOM;
           charmap.encoding_id = 2;
           clazz               = cmap_classes->custom;
           break;
 
         case T1_ENCODING_TYPE_ISOLATIN1:
-          charmap.encoding    = ft_encoding_latin_1;
+          charmap.encoding    = FT_ENCODING_ADOBE_LATIN_1;
           charmap.encoding_id = 3;
           clazz               = cmap_classes->unicode;
           break;
@@ -584,7 +584,7 @@
     slot->control_data  = 0;
     slot->control_len   = 0;
     slot->other         = 0;
-    slot->format        = ft_glyph_format_none;
+    slot->format        = FT_GLYPH_FORMAT_NONE;
 
     slot->linearHoriAdvance = 0;
     slot->linearVertAdvance = 0;
diff --git a/src/winfonts/winfnt.c b/src/winfonts/winfnt.c
index 48153a4..d54eecc 100644
--- a/src/winfonts/winfnt.c
+++ b/src/winfonts/winfnt.c
@@ -484,7 +484,7 @@
       {
         FT_CharMapRec  charmap;
 
-        charmap.encoding    = ft_encoding_unicode;
+        charmap.encoding    = FT_ENCODING_UNICODE;
         charmap.platform_id = 3;
         charmap.encoding_id = 1;
         charmap.face        = root;
@@ -614,7 +614,7 @@
 
       bitmap->pitch      = pitch;
       bitmap->rows       = font->header.pixel_height;
-      bitmap->pixel_mode = ft_pixel_mode_mono;
+      bitmap->pixel_mode = FT_PIXEL_MODE_MONO;
 
       if ( FT_ALLOC( bitmap->buffer, pitch * bitmap->rows ) )
         goto Exit;
@@ -634,7 +634,7 @@
     slot->flags       = FT_GLYPH_OWN_BITMAP;
     slot->bitmap_left = 0;
     slot->bitmap_top  = font->header.ascent;
-    slot->format      = ft_glyph_format_bitmap;
+    slot->format      = FT_GLYPH_FORMAT_BITMAP;
 
     /* now set up metrics */
     slot->metrics.horiAdvance  = bitmap->width << 6;
@@ -642,7 +642,7 @@
     slot->metrics.horiBearingY = slot->bitmap_top << 6;
 
     slot->linearHoriAdvance    = (FT_Fixed)bitmap->width << 16;
-    slot->format               = ft_glyph_format_bitmap;
+    slot->format               = FT_GLYPH_FORMAT_BITMAP;
 
   Exit:
     return error;