shithub: freetype+ttf2subf

Download patch

ref: 29644179cc2cb733289ff31899243189d0da19c5
parent: 4e7eeeec7b24ac1b9f6f84e2f4a5b2ea3bce5fe7
author: David Turner <[email protected]>
date: Thu Feb 28 13:59:37 EST 2002

still more logical transformations. This time, some public API headers have
been touched, while keeping everything backwards-compatible..

        * include/freetype/t1tables.h: re-naming structure types. This done
        basically:

          typedef T1_Struct_
          {
          } T1_Struct;

        becomes:

          typedef PS_StructRec_
          {
          } PS_StructRec, *PS_Struct;

          typedef PS_StructRec  T1_Struct;  /* backwards-compatibility */


        hence, we increase the coherency of the source code by effectuively
        using the 'Rec' prefix for structure types..

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,27 @@
 2002-02-28  David Turner   <[email protected]>
 
+        * include/freetype/t1tables.h: re-naming structure types. This done
+        basically:
+        
+          typedef T1_Struct_
+          {
+          } T1_Struct;
+          
+        becomes:
+        
+          typedef PS_StructRec_
+          {
+          } PS_StructRec, *PS_Struct;
+          
+          typedef PS_StructRec  T1_Struct;  /* backwards-compatibility */
+
+
+        hence, we increase the coherency of the source code by effectuively
+        using the 'Rec' prefix for structure types..
+
+
+2002-02-27  David Turner   <[email protected]>
+
         * src/sfnt/ttload.c (TT_Load_Names): simplifying and securing the
         names table loader. Invalid individual name entries are now handled
         correctly. This allows the loading of very buggy fonts like
--- a/include/freetype/internal/cfftypes.h
+++ b/include/freetype/internal/cfftypes.h
@@ -31,7 +31,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Struct>                                                              */
-  /*    CFF_Index                                                          */
+  /*    CFF_IndexRec                                                          */
   /*                                                                       */
   /* <Description>                                                         */
   /*    A structure used to model a CFF Index table.                       */
@@ -50,7 +50,7 @@
   /*                                                                       */
   /*    bytes       :: If the index is loaded in memory, its bytes.        */
   /*                                                                       */
-  typedef struct  CFF_Index_
+  typedef struct  CFF_IndexRec_
   {
     FT_Stream  stream;
     FT_UInt    count;
@@ -60,10 +60,10 @@
     FT_ULong*  offsets;
     FT_Byte*   bytes;
 
-  } CFF_Index;
+  } CFF_IndexRec, *CFF_Index;
 
 
-  typedef struct  CFF_Encoding_
+  typedef struct  CFF_EncodingRec_
   {
     FT_UInt     format;
     FT_ULong    offset;
@@ -71,7 +71,7 @@
     FT_UShort*  sids;
     FT_UShort*  codes;
 
-  } CFF_Encoding;
+  } CFF_EncodingRec, *CFF_Encoding;
 
 
   typedef struct  CFF_Charset_
@@ -132,7 +132,7 @@
   } CFF_Font_Dict;
 
 
-  typedef struct  CFF_Private_
+  typedef struct  CFF_PrivateRec_
   {
     FT_Byte   num_blue_values;
     FT_Byte   num_other_blues;
@@ -164,7 +164,7 @@
     FT_Pos    default_width;
     FT_Pos    nominal_width;
 
-  } CFF_Private;
+  } CFF_PrivateRec, *CFF_Private;
 
 
   typedef struct  CFF_FD_Select_
@@ -189,9 +189,9 @@
   typedef struct  CFF_SubFont_
   {
     CFF_Font_Dict  font_dict;
-    CFF_Private    private_dict;
+    CFF_PrivateRec    private_dict;
 
-    CFF_Index      local_subrs_index;
+    CFF_IndexRec      local_subrs_index;
     FT_UInt        num_local_subrs;
     FT_Byte**      local_subrs;
 
@@ -215,18 +215,18 @@
     FT_Byte        absolute_offsize;
 
 
-    CFF_Index      name_index;
-    CFF_Index      top_dict_index;
-    CFF_Index      string_index;
-    CFF_Index      global_subrs_index;
+    CFF_IndexRec      name_index;
+    CFF_IndexRec      top_dict_index;
+    CFF_IndexRec      string_index;
+    CFF_IndexRec      global_subrs_index;
 
-    CFF_Encoding   encoding;
+    CFF_EncodingRec   encoding;
     CFF_Charset    charset;
 
-    CFF_Index      charstrings_index;
-    CFF_Index      font_dict_index;
-    CFF_Index      private_index;
-    CFF_Index      local_subrs_index;
+    CFF_IndexRec      charstrings_index;
+    CFF_IndexRec      font_dict_index;
+    CFF_IndexRec      private_index;
+    CFF_IndexRec      local_subrs_index;
 
     FT_String*     font_name;
     FT_UInt        num_global_subrs;
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -602,7 +602,7 @@
               FT_Size              size,
               FT_GlyphSlot         slot,
               FT_Byte**            glyph_names,
-              T1_Blend*            blend,
+              PS_Blend            blend,
               FT_Bool              hinting,
               T1_Decoder_Callback  callback );
 
@@ -643,7 +643,7 @@
     FT_Int               num_flex_vectors;
     FT_Vector            flex_vectors[7];
 
-    T1_Blend*            blend;       /* for multiple master support */
+    PS_Blend            blend;       /* for multiple master support */
 
     T1_Decoder_Callback  parse_callback;
     T1_Decoder_FuncsRec  funcs;
--- a/include/freetype/internal/t1types.h
+++ b/include/freetype/internal/t1types.h
@@ -46,7 +46,7 @@
   /*************************************************************************/
   /*                                                                       */
   /* <Struct>                                                              */
-  /*    T1_Encoding                                                        */
+  /*    T1_EncodingRec                                                     */
   /*                                                                       */
   /* <Description>                                                         */
   /*    A structure modeling a custom encoding.                            */
@@ -63,7 +63,7 @@
   /*                                                                       */
   /*    char_name  :: An array of corresponding glyph names.               */
   /*                                                                       */
-  typedef struct  T1_Encoding_
+  typedef struct  T1_EncodingRecRec_
   {
     FT_Int       num_chars;
     FT_Int       code_first;
@@ -72,33 +72,33 @@
     FT_UShort*   char_index;
     FT_String**  char_name;
 
-  } T1_Encoding;
+  } T1_EncodingRec, *T1_Encoding;
 
 
   typedef enum  T1_EncodingType_
   {
-    t1_encoding_none = 0,
-    t1_encoding_array,
-    t1_encoding_standard,
-    t1_encoding_isolatin1,
-    t1_encoding_expert
+    T1_ENCODING_TYPE_NONE = 0,
+    T1_ENCODING_TYPE_ARRAY,
+    T1_ENCODING_TYPE_STANDARD,
+    T1_ENCODING_TYPE_ISOLATIN1,
+    T1_ENCODING_TYPE_EXPORT
 
   } T1_EncodingType;
 
 
-  typedef struct  T1_Font_
+  typedef struct  T1_FontRec_
   {
     /* font info dictionary */
-    T1_FontInfo      font_info;
+    PS_FontInfoRec   font_info;
 
     /* private dictionary */
-    T1_Private       private_dict;
+    PS_PrivateRec    private_dict;
 
     /* top-level dictionary */
     FT_String*       font_name;
 
     T1_EncodingType  encoding_type;
-    T1_Encoding      encoding;
+    T1_EncodingRec   encoding;
 
     FT_Byte*         subrs_block;
     FT_Byte*         charstrings_block;
@@ -122,15 +122,15 @@
 
     FT_Int           stroke_width;
 
-  } T1_Font;
+  } T1_FontRec, *T1_Font;
 
 
-  typedef struct  CID_Subrs_
+  typedef struct  CID_SubrsRec_
   {
     FT_UInt    num_subrs;
     FT_Byte**  code;
 
-  } CID_Subrs;
+  } CID_SubrsRec, *CID_Subrs;
 
 
   /*************************************************************************/
@@ -164,7 +164,7 @@
   typedef struct  T1_FaceRec_
   {
     FT_FaceRec     root;
-    T1_Font        type1;
+    T1_FontRec     type1;
     void*          psnames;
     void*          psaux;
     void*          afm_data;
@@ -173,7 +173,7 @@
     PS_Unicodes    unicode_map;
 
     /* support for Multiple Masters fonts */
-    T1_Blend*      blend;
+    PS_Blend      blend;
     
     /* since FT 2.1 - interface to PostScript hinter */
     void*          pshinter;
@@ -183,15 +183,15 @@
 
   typedef struct  CID_FaceRec_
   {
-    FT_FaceRec  root;
-    void*       psnames;
-    void*       psaux;
-    CID_Info    cid;
-    void*       afm_data;
-    CID_Subrs*  subrs;
+    FT_FaceRec        root;
+    void*             psnames;
+    void*             psaux;
+    CID_FaceInfoRec   cid;
+    void*             afm_data;
+    CID_Subrs         subrs;
     
     /* since FT 2.1 - interface to PostScript hinter */
-    void*       pshinter;
+    void*             pshinter;
 
   } CID_FaceRec;
 
--- a/include/freetype/t1tables.h
+++ b/include/freetype/t1tables.h
@@ -46,14 +46,14 @@
   /*************************************************************************/
 
 
-  /* Note that we separate font data in T1_FontInfo and T1_Private */
-  /* structures in order to support Multiple Master fonts.         */
+  /* Note that we separate font data in PS_FontInfoRec and PS_PrivateRec */
+  /* structures in order to support Multiple Master fonts.               */
 
 
   /*************************************************************************/
   /*                                                                       */
   /* <Struct>                                                              */
-  /*    T1_FontInfo                                                        */
+  /*    PS_FontInfoRec                                                     */
   /*                                                                       */
   /* <Description>                                                         */
   /*    A structure used to model a Type1/Type2 FontInfo dictionary.  Note */
@@ -60,7 +60,7 @@
   /*    that for Multiple Master fonts, each instance has its own          */
   /*    FontInfo.                                                          */
   /*                                                                       */
-  typedef struct  T1_FontInfo
+  typedef struct  PS_FontInfoRec
   {
     FT_String*  version;
     FT_String*  notice;
@@ -72,20 +72,33 @@
     FT_Short    underline_position;
     FT_UShort   underline_thickness;
 
-  } T1_FontInfo;
+  } PS_FontInfoRec, *PS_FontInfo;
 
 
   /*************************************************************************/
   /*                                                                       */
   /* <Struct>                                                              */
-  /*    T1_Private                                                         */
+  /*    T1_FontInfo                                                        */
   /*                                                                       */
   /* <Description>                                                         */
-  /*    A structure used to model a Type1/Type2 FontInfo dictionary.  Note */
+  /*    this type is equivalent to @PS_FontInfoRec but has been deprecated */
+  /*    it is kept to maintain source compatibility between various        */
+  /*    versions of FreeType                                               */
+  /*                                                                       */
+  typedef PS_FontInfoRec   T1_FontInfo;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    PS_PrivateRec                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a Type1/Type2 private dictionary. Note   */
   /*    that for Multiple Master fonts, each instance has its own Private  */
   /*    dict.                                                              */
   /*                                                                       */
-  typedef struct  T1_Private
+  typedef struct  PS_PrivateRec_
   {
     FT_Int     unique_id;
     FT_Int     lenIV;
@@ -121,11 +134,24 @@
 
     FT_Short   min_feature[2];
 
-  } T1_Private;
+  } PS_PrivateRec, *PS_Private;
 
 
   /*************************************************************************/
   /*                                                                       */
+  /* <Struct>                                                              */
+  /*    T1_Private                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   this type is equivalent to @PS_PrivateRec but has been deprecated   */
+  /*   it is kept to maintain source compatibility between various         */
+  /*   versions of FreeType                                                */
+  /*                                                                       */
+  typedef PS_PrivateRec  T1_Private;
+
+
+  /*************************************************************************/
+  /*                                                                       */
   /* <Enum>                                                                */
   /*    T1_Blend_Flags                                                     */
   /*                                                                       */
@@ -137,29 +163,47 @@
   typedef enum
   {
     /*# required fields in a FontInfo blend dictionary */
-    t1_blend_underline_position = 0,
-    t1_blend_underline_thickness,
-    t1_blend_italic_angle,
+    T1_BLEND_UNDERLINE_POSITION = 0,
+    T1_BLEND_UNDERLINE_THICKNESS,
+    T1_BLEND_ITALIC_ANGLE,
 
     /*# required fields in a Private blend dictionary */
-    t1_blend_blue_values,
-    t1_blend_other_blues,
-    t1_blend_standard_width,
-    t1_blend_standard_height,
-    t1_blend_stem_snap_widths,
-    t1_blend_stem_snap_heights,
-    t1_blend_blue_scale,
-    t1_blend_blue_shift,
-    t1_blend_family_blues,
-    t1_blend_family_other_blues,
-    t1_blend_force_bold,
+    T1_BLEND_BLUE_VALUES,
+    T1_BLEND_OTHER_BLUES,
+    T1_BLEND_STANDARD_WIDTH,
+    T1_BLEND_STANDARD_HEIGHT,
+    T1_BLEND_STEM_SNAP_WIDTHS,
+    T1_BLEND_STEM_SNAP_HEIGHTS,
+    T1_BLEND_BLUE_SCALE,
+    T1_BLEND_BLUE_SHIFT,
+    T1_BLEND_FAMILY_BLUES,
+    T1_BLEND_FAMILY_OTHER_BLUES,
+    T1_BLEND_FORCE_BOLD,
 
     /*# never remove */
-    t1_blend_max
+    T1_BLEND_MAX
 
   } T1_Blend_Flags;
 
 
+ /* backwards compatible definitions */
+#define  t1_blend_underline_position   T1_BLEND_UNDERLINE_POSITION
+#define  t1_blend_underline_thickness  T1_BLEND_UNDERLINE_THICKNESS
+#define  t1_blend_italic_angle         T1_BLEND_ITALIC_ANGLE
+#define  t1_blend_blue_values          T1_BLEND_BLUE_VALUES
+#define  t1_blend_other_blues          T1_BLEND_OTHER_BLUES
+#define  t1_blend_standard_widths      T1_BLEND_STANDARD_WIDTH
+#define  t1_blend_standard_height      T1_BLEND_STANDARD_HEIGHT
+#define  t1_blend_stem_snap_widths     T1_BLEND_STEM_SNAP_WIDTHS
+#define  t1_blend_stem_snap_heights    T1_BLEND_STEM_SNAP_HEIGHTS
+#define  t1_blend_blue_scale           T1_BLEND_BLUE_SCALE
+#define  t1_blend_blue_shift           T1_BLEND_BLUE_SHIFT
+#define  t1_blend_family_blues         T1_BLEND_FAMILY_BLUES
+#define  t1_blend_family_other_blues   T1_BLEND_FAMILY_OTHER_BLUES
+#define  t1_blend_force_bold           T1_BLEND_FORCE_BOLD
+#define  t1_blend_max                  T1_BELND_MAX
+
+
   /* maximum number of Multiple Masters designs, as defined in the spec */
 #define T1_MAX_MM_DESIGNS     16
 
@@ -171,87 +215,110 @@
 
 
   /* this structure is used to store the BlendDesignMap entry for an axis */
-  typedef struct  T1_DesignMap_
+  typedef struct  PS_DesignMap_
   {
     FT_Byte    num_points;
     FT_Fixed*  design_points;
     FT_Fixed*  blend_points;
 
-  } T1_DesignMap;
+  } PS_DesignMapRec, *PS_DesignMap;
 
+ /* backwards-compatible definition */
+  typedef PS_DesignMapRec   T1_DesignMap;
 
-  typedef struct  T1_Blend_
+
+  typedef struct  PS_BlendRec_
   {
-    FT_UInt       num_designs;
-    FT_UInt       num_axis;
+    FT_UInt          num_designs;
+    FT_UInt          num_axis;
 
-    FT_String*    axis_names[T1_MAX_MM_AXIS];
-    FT_Fixed*     design_pos[T1_MAX_MM_DESIGNS];
-    T1_DesignMap  design_map[T1_MAX_MM_AXIS];
+    FT_String*       axis_names[T1_MAX_MM_AXIS];
+    FT_Fixed*        design_pos[T1_MAX_MM_DESIGNS];
+    PS_DesignMapRec  design_map[T1_MAX_MM_AXIS];
 
-    FT_Fixed*     weight_vector;
-    FT_Fixed*     default_weight_vector;
+    FT_Fixed*        weight_vector;
+    FT_Fixed*        default_weight_vector;
 
-    T1_FontInfo*  font_infos[T1_MAX_MM_DESIGNS + 1];
-    T1_Private*   privates  [T1_MAX_MM_DESIGNS + 1];
+    PS_FontInfo      font_infos[T1_MAX_MM_DESIGNS + 1];
+    PS_Private       privates  [T1_MAX_MM_DESIGNS + 1];
 
-    FT_ULong      blend_bitflags;
+    FT_ULong         blend_bitflags;
 
-  } T1_Blend;
+  } PS_BlendRec, *PS_Blend;
 
 
-  typedef struct  CID_FontDict_
+ /* backwards-compatible definition */
+  typedef PS_BlendRec   T1_Blend;
+
+
+  typedef struct  CID_FaceDictRec_
   {
-    T1_Private  private_dict;
+    PS_PrivateRec  private_dict;
 
-    FT_UInt     len_buildchar;
-    FT_Fixed    forcebold_threshold;
-    FT_Pos      stroke_width;
-    FT_Fixed    expansion_factor;
+    FT_UInt        len_buildchar;
+    FT_Fixed       forcebold_threshold;
+    FT_Pos         stroke_width;
+    FT_Fixed       expansion_factor;
 
-    FT_Byte     paint_type;
-    FT_Byte     font_type;
-    FT_Matrix   font_matrix;
-    FT_Vector   font_offset;
+    FT_Byte        paint_type;
+    FT_Byte        font_type;
+    FT_Matrix      font_matrix;
+    FT_Vector      font_offset;
 
-    FT_UInt     num_subrs;
-    FT_ULong    subrmap_offset;
-    FT_Int      sd_bytes;
+    FT_UInt        num_subrs;
+    FT_ULong       subrmap_offset;
+    FT_Int         sd_bytes;
 
-  } CID_FontDict;
+  } CID_FaceDictRec, *CID_FaceDict;
 
 
-  typedef struct  CID_Info_
+ /* backwards-compatible definition */
+  typedef CID_FaceDictRec   CID_FontDict;
+
+
+  typedef struct  CID_FaceInfoRec_
   {
-    FT_String*     cid_font_name;
-    FT_Fixed       cid_version;
-    FT_Int         cid_font_type;
+    FT_String*      cid_font_name;
+    FT_Fixed        cid_version;
+    FT_Int          cid_font_type;
 
-    FT_String*     registry;
-    FT_String*     ordering;
-    FT_Int         supplement;
+    FT_String*      registry;
+    FT_String*      ordering;
+    FT_Int          supplement;
 
-    T1_FontInfo    font_info;
-    FT_BBox        font_bbox;
-    FT_ULong       uid_base;
+    PS_FontInfoRec  font_info;
+    FT_BBox         font_bbox;
+    FT_ULong        uid_base;
 
-    FT_Int         num_xuid;
-    FT_ULong       xuid[16];
+    FT_Int          num_xuid;
+    FT_ULong        xuid[16];
 
 
-    FT_ULong       cidmap_offset;
-    FT_Int         fd_bytes;
-    FT_Int         gd_bytes;
-    FT_ULong       cid_count;
+    FT_ULong        cidmap_offset;
+    FT_Int          fd_bytes;
+    FT_Int          gd_bytes;
+    FT_ULong        cid_count;
 
-    FT_Int         num_dicts;
-    CID_FontDict*  font_dicts;
+    FT_Int          num_dicts;
+    CID_FaceDict    font_dicts;
 
-    FT_ULong       data_offset;
+    FT_ULong        data_offset;
 
-  } CID_Info;
+  } CID_FaceInfoRec, *CID_FaceInfo;
 
 
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    CID_Info                                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*   this type is equivalent to @CID_FaceInfoRec but has been deprecated */
+  /*   it is kept to maintain source compatibility between various         */
+  /*   versions of FreeType                                                */
+  /*                                                                       */
+  typedef CID_FaceInfoRec   CID_Info;
+  
   /* */
 
 
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -2225,7 +2225,7 @@
                                   &charstring, &charstring_len );
       if ( !error )
       {
-        CFF_Index csindex = cff->charstrings_index;
+        CFF_IndexRec csindex = cff->charstrings_index;
 
 
         CFF_Prepare_Decoder( &decoder, glyph_index );
--- a/src/cff/cffload.c
+++ b/src/cff/cffload.c
@@ -1082,7 +1082,7 @@
 
 
   static FT_Error
-  cff_new_index( CFF_Index*  index,
+  cff_new_index( CFF_Index  index,
                  FT_Stream   stream,
                  FT_Bool     load )
   {
@@ -1155,7 +1155,7 @@
 
 
   static void
-  cff_done_index( CFF_Index*  index )
+  cff_done_index( CFF_Index  index )
   {
     if ( index->stream )
     {
@@ -1173,7 +1173,7 @@
 
 
   static FT_Error
-  cff_explicit_index( CFF_Index*  index,
+  cff_explicit_index( CFF_Index  index,
                       FT_Byte***  table )
   {
     FT_Error   error  = 0;
@@ -1205,7 +1205,7 @@
 
 
   FT_LOCAL_DEF FT_Error
-  CFF_Access_Element( CFF_Index*  index,
+  CFF_Access_Element( CFF_Index  index,
                       FT_UInt     element,
                       FT_Byte**   pbytes,
                       FT_ULong*   pbyte_len )
@@ -1270,7 +1270,7 @@
 
 
   FT_LOCAL_DEF void
-  CFF_Forget_Element( CFF_Index*  index,
+  CFF_Forget_Element( CFF_Index  index,
                       FT_Byte**   pbytes )
   {
     if ( index->bytes == 0 )
@@ -1284,7 +1284,7 @@
 
 
   FT_LOCAL_DEF FT_String*
-  CFF_Get_Name( CFF_Index*  index,
+  CFF_Get_Name( CFF_Index  index,
                 FT_UInt     element )
   {
     FT_Memory   memory = index->stream->memory;
@@ -1311,7 +1311,7 @@
 
 
   FT_LOCAL_DEF FT_String*
-  CFF_Get_String( CFF_Index*          index,
+  CFF_Get_String( CFF_Index          index,
                   FT_UInt             sid,
                   PSNames_Service  interface )
   {
@@ -1484,7 +1484,7 @@
   /*************************************************************************/
 
   static void
-  CFF_Done_Encoding( CFF_Encoding*  encoding,
+  CFF_Done_Encoding( CFF_Encoding  encoding,
                      FT_Stream      stream )
   {
     FT_Memory  memory = stream->memory;
@@ -1693,7 +1693,7 @@
 
 
   static FT_Error
-  CFF_Load_Encoding( CFF_Encoding*  encoding,
+  CFF_Load_Encoding( CFF_Encoding  encoding,
                      CFF_Charset*   charset,
                      FT_UInt        num_glyphs,
                      FT_Stream      stream,
@@ -1958,7 +1958,7 @@
 
   static FT_Error
   CFF_Load_SubFont( CFF_SubFont*  font,
-                    CFF_Index*    index,
+                    CFF_Index    index,
                     FT_UInt       font_index,
                     FT_Stream     stream,
                     FT_ULong      base_offset )
@@ -1968,7 +1968,7 @@
     FT_Byte*        dict;
     FT_ULong        dict_len;
     CFF_Font_Dict*  top  = &font->font_dict;
-    CFF_Private*    priv = &font->private_dict;
+    CFF_Private    priv = &font->private_dict;
 
 
     CFF_Parser_Init( &parser, CFF_CODE_TOPDICT, &font->font_dict );
@@ -2137,7 +2137,7 @@
     /* now, check for a CID font */
     if ( dict->cid_registry )
     {
-      CFF_Index     fd_index;
+      CFF_IndexRec     fd_index;
       CFF_SubFont*  sub;
       FT_UInt       index;
 
--- a/src/cff/cffload.h
+++ b/src/cff/cffload.h
@@ -32,23 +32,23 @@
 
 
   FT_LOCAL FT_String*
-  CFF_Get_Name( CFF_Index*  index,
+  CFF_Get_Name( CFF_Index  index,
                 FT_UInt     element );
 
   FT_LOCAL FT_String*
-  CFF_Get_String( CFF_Index*          index,
+  CFF_Get_String( CFF_Index          index,
                   FT_UInt             sid,
                   PSNames_Service  interface );
 
 
   FT_LOCAL FT_Error
-  CFF_Access_Element( CFF_Index*  index,
+  CFF_Access_Element( CFF_Index  index,
                       FT_UInt     element,
                       FT_Byte**   pbytes,
                       FT_ULong*   pbyte_len );
 
   FT_LOCAL void
-  CFF_Forget_Element( CFF_Index*  index,
+  CFF_Forget_Element( CFF_Index  index,
                       FT_Byte**   pbytes );
 
 
--- a/src/cff/cffobjs.c
+++ b/src/cff/cffobjs.c
@@ -99,13 +99,13 @@
 
     if ( funcs )
     {
-      PSH_Globals   globals;
-      CFF_Face      face    = (CFF_Face)size->face;
-      CFF_Font*     font    = face->extra.data;
-      CFF_SubFont*  subfont = &font->top_font;
+      PSH_Globals    globals;
+      CFF_Face       face    = (CFF_Face)size->face;
+      CFF_Font*      font    = face->extra.data;
+      CFF_SubFont*   subfont = &font->top_font;
 
-      CFF_Private*  cpriv   = &subfont->private_dict;
-      T1_Private    priv;
+      CFF_Private   cpriv   = &subfont->private_dict;
+      PS_PrivateRec  priv;
 
 
       /* IMPORTANT: The CFF and Type1 private dictionaries have    */
--- a/src/cff/cfftoken.h
+++ b/src/cff/cfftoken.h
@@ -68,7 +68,7 @@
 
 
 #undef  FT_STRUCTURE
-#define FT_STRUCTURE  CFF_Private
+#define FT_STRUCTURE  CFF_PrivateRec
 #undef  CFFCODE
 #define CFFCODE       CFFCODE_PRIVATE
 
--- a/src/cid/cidgload.c
+++ b/src/cid/cidgload.c
@@ -41,7 +41,7 @@
                   FT_UInt     glyph_index )
   {
     CID_Face   face = (CID_Face)decoder->builder.face;
-    CID_Info*  cid  = &face->cid;
+    CID_FaceInfo  cid  = &face->cid;
     FT_Byte*   p;
     FT_UInt    entry_len = cid->fd_bytes + cid->gd_bytes;
     FT_UInt    fd_select;
@@ -68,8 +68,8 @@
     /* the charstrings                                                   */
     if ( glyph_len > 0 )
     {
-      CID_FontDict*  dict;
-      CID_Subrs*     cid_subrs = face->subrs + fd_select;
+      CID_FaceDict   dict;
+      CID_Subrs      cid_subrs = face->subrs + fd_select;
       FT_Byte*       charstring;
       FT_Memory      memory = face->root.memory;
 
--- a/src/cid/cidload.c
+++ b/src/cid/cidload.c
@@ -96,7 +96,7 @@
     CID_Parser*  parser = &loader->parser;
     FT_Byte*     object;
     void*        dummy_object;
-    CID_Info*    cid = &face->cid;
+    CID_FaceInfo    cid = &face->cid;
 
 
     /* if the keyword has a dedicated callback, call it */
@@ -120,7 +120,7 @@
 
     default:
       {
-        CID_FontDict*  dict;
+        CID_FaceDict  dict;
 
 
         if ( parser->num_dict < 0 )
@@ -183,7 +183,7 @@
   {
     FT_Matrix*     matrix;
     FT_Vector*     offset;
-    CID_FontDict*  dict;
+    CID_FaceDict  dict;
     FT_Face        root = (FT_Face)&face->root;
     FT_Fixed       temp[6];
     FT_Fixed       temp_scale;
@@ -235,7 +235,7 @@
   parse_fd_array( CID_Face     face,
                   CID_Parser*  parser )
   {
-    CID_Info*  cid    = &face->cid;
+    CID_FaceInfo  cid    = &face->cid;
     FT_Memory  memory = face->root.memory;
     FT_Error   error  = CID_Err_Ok;
     FT_Long    num_dicts;
@@ -256,7 +256,7 @@
       /* don't forget to set a few defaults */
       for ( n = 0; n < cid->num_dicts; n++ )
       {
-        CID_FontDict*  dict = cid->font_dicts + n;
+        CID_FaceDict  dict = cid->font_dicts + n;
 
 
         /* default value for lenIV */
@@ -390,23 +390,23 @@
   static FT_Error
   cid_read_subrs( CID_Face  face )
   {
-    CID_Info*   cid    = &face->cid;
+    CID_FaceInfo   cid    = &face->cid;
     FT_Memory   memory = face->root.memory;
     FT_Stream   stream = face->root.stream;
     FT_Error    error;
     FT_Int      n;
-    CID_Subrs*  subr;
+    CID_Subrs  subr;
     FT_UInt     max_offsets = 0;
     FT_ULong*   offsets = 0;
 
 
-    if ( ALLOC_ARRAY( face->subrs, cid->num_dicts, CID_Subrs ) )
+    if ( ALLOC_ARRAY( face->subrs, cid->num_dicts, CID_SubrsRec ) )
       goto Exit;
 
     subr = face->subrs;
     for ( n = 0; n < cid->num_dicts; n++, subr++ )
     {
-      CID_FontDict*  dict  = cid->font_dicts + n;
+      CID_FaceDict  dict  = cid->font_dicts + n;
       FT_Int         lenIV = dict->private_dict.lenIV;
       FT_UInt        count, num_subrs = dict->num_subrs;
       FT_ULong       data_len;
--- a/src/cid/cidobjs.c
+++ b/src/cid/cidobjs.c
@@ -133,8 +133,8 @@
     {
       PSH_Globals    globals;
       CID_Face       face = (CID_Face)size->root.face;
-      CID_FontDict*  dict = face->cid.font_dicts + face->root.face_index;
-      T1_Private*    priv = &dict->private_dict;
+      CID_FaceDict  dict = face->cid.font_dicts + face->root.face_index;
+      PS_Private     priv = &dict->private_dict;
 
 
       error = funcs->create( size->root.face->memory, priv, &globals );
@@ -190,8 +190,8 @@
 
     if ( face )
     {
-      CID_Info*     cid  = &face->cid;
-      T1_FontInfo*  info = &cid->font_info;
+      CID_FaceInfo  cid  = &face->cid;
+      PS_FontInfo   info = &cid->font_info;
 
 
       memory = face->root.memory;
@@ -204,7 +204,7 @@
 
         for ( n = 0; n < cid->num_dicts; n++ )
         {
-          CID_Subrs*  subr = face->subrs + n;
+          CID_Subrs  subr = face->subrs + n;
           
 
           if ( subr->code )
@@ -468,12 +468,12 @@
 
       switch ( face->type1.encoding_type )
       {
-      case t1_encoding_standard:
+      case T1_ENCODING_TYPE_STANDARD:
         charmap->encoding    = ft_encoding_adobe_standard;
         charmap->encoding_id = 0;
         break;
 
-      case t1_encoding_expert:
+      case T1_ENCODING_TYPE_EXPORT:
         charmap->encoding    = ft_encoding_adobe_expert;
         charmap->encoding_id = 1;
         break;
--- a/src/cid/cidparse.h
+++ b/src/cid/cidparse.h
@@ -65,7 +65,7 @@
 
     FT_ULong      data_offset;
 
-    CID_Info*     cid;
+    CID_FaceInfo     cid;
     FT_Int        num_dict;
 
   } CID_Parser;
--- a/src/cid/cidriver.c
+++ b/src/cid/cidriver.c
@@ -136,7 +136,7 @@
         /*                                                                 */
       case ft_encoding_adobe_custom:
         {
-          T1_Encoding*  encoding = &face->type1.encoding;
+          T1_Encoding  encoding = &face->type1.encoding;
 
 
           if ( charcode >= encoding->code_first &&
@@ -230,7 +230,7 @@
         /*                                                                 */
       case ft_encoding_adobe_custom:
         {
-          T1_Encoding*  encoding = &face->type1.encoding;
+          T1_Encoding  encoding = &face->type1.encoding;
 
 
           charcode++;
--- a/src/cid/cidtoken.h
+++ b/src/cid/cidtoken.h
@@ -17,7 +17,7 @@
 
 
 #undef  FT_STRUCTURE
-#define FT_STRUCTURE  CID_Info
+#define FT_STRUCTURE  CID_FaceInfoRec
 #undef  T1CODE
 #define T1CODE        t1_field_cid_info
 
@@ -35,7 +35,7 @@
 
 
 #undef  FT_STRUCTURE
-#define FT_STRUCTURE  T1_FontInfo
+#define FT_STRUCTURE  PS_FontInfoRec
 #undef  T1CODE
 #define T1CODE        t1_field_font_info
 
@@ -51,7 +51,7 @@
 
 
 #undef  FT_STRUCTURE
-#define FT_STRUCTURE  CID_FontDict
+#define FT_STRUCTURE  CID_FaceDictRec
 #undef  T1CODE
 #define T1CODE        t1_field_font_dict
 
@@ -67,7 +67,7 @@
 
 
 #undef  FT_STRUCTURE
-#define FT_STRUCTURE  T1_Private
+#define FT_STRUCTURE  PS_PrivateRec
 #undef  T1CODE
 #define T1CODE        t1_field_private
 
--- a/src/otlayout/otlcommn.h
+++ b/src/otlayout/otlcommn.h
@@ -168,7 +168,8 @@
   OTL_LOCALDEF( OTL_UInt )
   otl_feature_get_count( OTL_Bytes   table );
 
- /* get several lookups from a feature. returns the number of lookups grabbed */
+ /* get several lookups indices from a feature. returns the number of lookups */
+ /* grabbed                                                                   */
   OTL_LOCALDEF( OTL_UInt )
   otl_feature_get_lookups( OTL_Bytes   table,
                            OTL_UInt    start,
--- a/src/psaux/t1decode.c
+++ b/src/psaux/t1decode.c
@@ -656,7 +656,7 @@
         case 17:
         case 18:                    /* multiple masters */
           {
-            T1_Blend*  blend = decoder->blend;
+            PS_Blend  blend = decoder->blend;
             FT_UInt    num_points, nn, mm;
             FT_Long*   delta;
             FT_Long*   values;
@@ -1112,7 +1112,7 @@
                    FT_Size              size,
                    FT_GlyphSlot         slot,
                    FT_Byte**            glyph_names,
-                   T1_Blend*            blend,
+                   PS_Blend            blend,
                    FT_Bool              hinting,
                    T1_Decoder_Callback  parse_callback )
   {
--- a/src/psaux/t1decode.h
+++ b/src/psaux/t1decode.h
@@ -48,7 +48,7 @@
                    FT_Size              size,
                    FT_GlyphSlot         slot,
                    FT_Byte**            glyph_names,
-                   T1_Blend*            blend,
+                   PS_Blend            blend,
                    FT_Bool              hinting,
                    T1_Decoder_Callback  parse_glyph );
 
--- a/src/type1/t1afm.c
+++ b/src/type1/t1afm.c
@@ -57,7 +57,7 @@
   static FT_UInt
   afm_atoindex( FT_Byte**  start,
                 FT_Byte*   limit,
-                T1_Font*   type1 )
+                T1_Font    type1 )
   {
     FT_Byte*  p = *start;
     FT_Int    len;
@@ -167,7 +167,7 @@
     FT_Byte*       p;
     FT_Int         count = 0;
     T1_Kern_Pair*  pair;
-    T1_Font*       type1 = &((T1_Face)t1_face)->type1;
+    T1_Font       type1 = &((T1_Face)t1_face)->type1;
     T1_AFM*        afm   = 0;
 
 
--- a/src/type1/t1cmap.c
+++ b/src/type1/t1cmap.c
@@ -12,7 +12,7 @@
   t1_cmap_std_init( T1_CMapStd   cmap,
                     FT_Int       is_expert )
   {
-    T1_Face             face    = (T1_Face) FT_CMAP_FACE(cmap);
+    T1_Face          face    = (T1_Face) FT_CMAP_FACE(cmap);
     PSNames_Service  psnames = face->psnames;
 
     cmap->num_glyphs  = face->type1.num_glyphs;
@@ -155,7 +155,7 @@
   t1_cmap_custom_init( T1_CMapCustom  cmap )
   {
     T1_Face       face     = (T1_Face) FT_CMAP_FACE(cmap);
-    T1_Encoding*  encoding = face->type1.encoding;
+    T1_Encoding  encoding = face->type1.encoding;
 
     cmap->first   = encoding->code_first;
     cmap->count   = (FT_UInt)(encoding->code_last - cmap->first + 1);
--- a/src/type1/t1driver.c
+++ b/src/type1/t1driver.c
@@ -297,7 +297,7 @@
         /*                                                                 */
       case ft_encoding_adobe_custom:
         {
-          T1_Encoding*  encoding = &face->type1.encoding;
+          T1_Encoding  encoding = &face->type1.encoding;
 
 
           if ( charcode >= encoding->code_first &&
@@ -406,7 +406,7 @@
         /*                                                                 */
       case ft_encoding_adobe_custom:
         {
-          T1_Encoding*  encoding = &face->type1.encoding;
+          T1_Encoding  encoding = &face->type1.encoding;
 
 
           charcode++;
--- a/src/type1/t1gload.c
+++ b/src/type1/t1gload.c
@@ -60,7 +60,7 @@
                   FT_UInt      glyph_index )
   {
     T1_Face   face  = (T1_Face)decoder->builder.face;
-    T1_Font*  type1 = &face->type1;
+    T1_Font  type1 = &face->type1;
 
 
     decoder->font_matrix = type1->font_matrix;
@@ -80,7 +80,7 @@
     FT_Error          error;
     T1_DecoderRec        decoder;
     FT_Int            glyph_index;
-    T1_Font*          type1 = &face->type1;
+    T1_Font          type1 = &face->type1;
     PSAux_Service  psaux = (PSAux_Service)face->psaux;
 
 
@@ -146,7 +146,7 @@
     T1_DecoderRec           decoder;
     T1_Face                 face = (T1_Face)glyph->root.face;
     FT_Bool                 hinting;
-    T1_Font*                type1         = &face->type1;
+    T1_Font                type1         = &face->type1;
     PSAux_Service           psaux         = (PSAux_Service)face->psaux;
     const T1_Decoder_Funcs  decoder_funcs = psaux->t1_decoder_funcs;
 
--- a/src/type1/t1load.c
+++ b/src/type1/t1load.c
@@ -101,7 +101,7 @@
                      FT_UInt  num_designs,
                      FT_UInt  num_axis )
   {
-    T1_Blend*  blend;
+    PS_Blend  blend;
     FT_Memory  memory = face->root.memory;
     FT_Error   error  = 0;
 
@@ -124,8 +124,8 @@
 
 
         /* allocate the blend `private' and `font_info' dictionaries */
-        if ( ALLOC_ARRAY( blend->font_infos[1], num_designs, T1_FontInfo )  ||
-             ALLOC_ARRAY( blend->privates[1], num_designs, T1_Private )     ||
+        if ( ALLOC_ARRAY( blend->font_infos[1], num_designs, PS_FontInfoRec ) ||
+             ALLOC_ARRAY( blend->privates[1], num_designs, PS_PrivateRec )    ||
              ALLOC_ARRAY( blend->weight_vector, num_designs * 2, FT_Fixed ) )
           goto Exit;
 
@@ -184,7 +184,7 @@
   T1_Get_Multi_Master( T1_Face           face,
                        FT_Multi_Master*  master )
   {
-    T1_Blend*  blend = face->blend;
+    PS_Blend  blend = face->blend;
     FT_UInt    n;
     FT_Error   error;
 
@@ -198,8 +198,8 @@
 
       for ( n = 0; n < blend->num_axis; n++ )
       {
-        FT_MM_Axis*    axis = master->axis + n;
-        T1_DesignMap*  map = blend->design_map + n;
+        FT_MM_Axis*   axis = master->axis + n;
+        PS_DesignMap  map = blend->design_map + n;
 
 
         axis->name    = blend->axis_names[n];
@@ -217,7 +217,7 @@
                    FT_UInt    num_coords,
                    FT_Fixed*  coords )
   {
-    T1_Blend*  blend = face->blend;
+    PS_Blend  blend = face->blend;
     FT_Error   error;
     FT_UInt    n, m;
 
@@ -263,7 +263,7 @@
                     FT_UInt   num_coords,
                     FT_Long*  coords )
   {
-    T1_Blend*  blend = face->blend;
+    PS_Blend  blend = face->blend;
     FT_Error   error;
     FT_UInt    n, p;
 
@@ -279,7 +279,7 @@
       {
         FT_Long        design  = coords[n];
         FT_Fixed       the_blend;
-        T1_DesignMap*  map     = blend->design_map + n;
+        PS_DesignMap  map     = blend->design_map + n;
         FT_Fixed*      designs = map->design_points;
         FT_Fixed*      blends  = map->blend_points;
         FT_Int         before  = -1, after = -1;
@@ -332,7 +332,7 @@
   T1_Done_Blend( T1_Face  face )
   {
     FT_Memory  memory = face->root.memory;
-    T1_Blend*  blend  = face->blend;
+    PS_Blend  blend  = face->blend;
 
 
     if ( blend )
@@ -368,7 +368,7 @@
       /* release design map */
       for ( n = 0; n < num_axis; n++ )
       {
-        T1_DesignMap*  dmap = blend->design_map + n;
+        PS_DesignMap  dmap = blend->design_map + n;
 
 
         FREE( dmap->design_points );
@@ -387,7 +387,7 @@
     T1_TokenRec   axis_tokens[ T1_MAX_MM_AXIS ];
     FT_Int        n, num_axis;
     FT_Error      error = 0;
-    T1_Blend*     blend;
+    PS_Blend     blend;
     FT_Memory     memory;
 
 
@@ -451,7 +451,7 @@
     T1_Parser  parser = &loader->parser;
 
     FT_Error       error = 0;
-    T1_Blend*      blend;
+    PS_Blend      blend;
 
 
     /* get the array of design tokens - compute number of designs */
@@ -529,7 +529,7 @@
   {
     FT_Error       error  = 0;
     T1_Parser  parser = &loader->parser;
-    T1_Blend*      blend;
+    PS_Blend      blend;
     T1_TokenRec       axis_tokens[ T1_MAX_MM_AXIS ];
     FT_Int         n, num_axis;
     FT_Byte*       old_cursor;
@@ -556,7 +556,7 @@
     /* now, read each axis design map */
     for ( n = 0; n < num_axis; n++ )
     {
-      T1_DesignMap* map = blend->design_map + n;
+      PS_DesignMap map = blend->design_map + n;
       T1_Token     token;
       FT_Int        p, num_points;
 
@@ -610,7 +610,7 @@
   {
     FT_Error       error  = 0;
     T1_Parser  parser = &loader->parser;
-    T1_Blend*      blend  = face->blend;
+    PS_Blend      blend  = face->blend;
     T1_TokenRec       master;
     FT_UInt        n;
     FT_Byte*       old_cursor;
@@ -698,7 +698,7 @@
     void*      dummy_object;
     void**     objects;
     FT_UInt    max_objects;
-    T1_Blend*  blend = face->blend;
+    PS_Blend  blend = face->blend;
 
 
     /* if the keyword has a dedicated callback, call it */
@@ -954,7 +954,7 @@
     /* and we must load it now                             */
     if ( (FT_Byte)( *cur - '0' ) < 10 )
     {
-      T1_Encoding*  encode     = &face->type1.encoding;
+      T1_Encoding  encode     = &face->type1.encoding;
       FT_Int        count, n;
       PS_Table      char_table = &loader->encoding_table;
       FT_Memory     memory     = parser->root.memory;
@@ -1067,7 +1067,7 @@
           cur++;
       }
 
-      face->type1.encoding_type = t1_encoding_array;
+      face->type1.encoding_type = T1_ENCODING_TYPE_ARRAY;
       parser->root.cursor       = cur;
     }
     /* Otherwise, we should have either `StandardEncoding' or */
@@ -1076,15 +1076,15 @@
     {
       if ( cur + 17 < limit &&
            strncmp( (const char*)cur, "StandardEncoding", 16 ) == 0 )
-        face->type1.encoding_type = t1_encoding_standard;
+        face->type1.encoding_type = T1_ENCODING_TYPE_STANDARD;
 
       else if ( cur + 15 < limit &&
                 strncmp( (const char*)cur, "ExpertEncoding", 14 ) == 0 )
-        face->type1.encoding_type = t1_encoding_expert;
+        face->type1.encoding_type = T1_ENCODING_TYPE_EXPORT;
 
       else if ( cur + 18 < limit &&
                 strncmp( (const char*)cur, "ISOLatin1Encoding", 17 ) == 0 )
-        face->type1.encoding_type = t1_encoding_isolatin1;
+        face->type1.encoding_type = T1_ENCODING_TYPE_ISOLATIN1;
 
       else
       {
@@ -1642,7 +1642,7 @@
   {
     T1_Loader  loader;
     T1_Parser  parser;
-    T1_Font*   type1 = &face->type1;
+    T1_Font   type1 = &face->type1;
     FT_Error   error;
 
     PSAux_Service  psaux = (PSAux_Service)face->psaux;
@@ -1707,7 +1707,7 @@
 
     /* we must now build type1.encoding when we have a custom */
     /* array..                                                */
-    if ( type1->encoding_type == t1_encoding_array )
+    if ( type1->encoding_type == T1_ENCODING_TYPE_ARRAY )
     {
       FT_Int    charcode, index, min_char, max_char;
       FT_Byte*  char_name;
--- a/src/type1/t1objs.c
+++ b/src/type1/t1objs.c
@@ -187,7 +187,7 @@
   T1_Face_Done( T1_Face  face )
   {
     FT_Memory  memory;
-    T1_Font*   type1 = &face->type1;
+    T1_Font   type1 = &face->type1;
 
 
     if ( face )
@@ -202,7 +202,7 @@
 
       /* release font info strings */
       {
-        T1_FontInfo*  info = &type1->font_info;
+        PS_FontInfo   info = &type1->font_info;
 
 
         FREE( info->version );
@@ -479,22 +479,22 @@
 
       switch ( face->type1.encoding_type )
       {
-      case t1_encoding_standard:
+      case T1_ENCODING_TYPE_STANDARD:
         charmap->encoding    = ft_encoding_adobe_standard;
         charmap->encoding_id = 0;
         break;
 
-      case t1_encoding_expert:
+      case T1_ENCODING_TYPE_EXPORT:
         charmap->encoding    = ft_encoding_adobe_expert;
         charmap->encoding_id = 1;
         break;
 
-      case t1_encoding_array:
+      case T1_ENCODING_TYPE_ARRAY:
         charmap->encoding    = ft_encoding_adobe_custom;
         charmap->encoding_id = 2;
         break;
 
-      case t1_encoding_isolatin1:
+      case T1_ENCODING_TYPE_ISOLATIN1:
         charmap->encoding    = ft_encoding_latin_1;
         charmap->encoding_id = 3;
         break;
--- a/src/type1/t1tokens.h
+++ b/src/type1/t1tokens.h
@@ -17,7 +17,7 @@
 
 
 #undef  FT_STRUCTURE
-#define FT_STRUCTURE  T1_FontInfo
+#define FT_STRUCTURE  PS_FontInfoRec
 #undef  T1CODE
 #define T1CODE        t1_field_font_info
 
@@ -34,7 +34,7 @@
 
 
 #undef  FT_STRUCTURE
-#define FT_STRUCTURE  T1_Private
+#define FT_STRUCTURE  PS_PrivateRec
 #undef  T1CODE
 #define T1CODE        t1_field_private
 
@@ -61,7 +61,7 @@
 
 
 #undef  FT_STRUCTURE
-#define FT_STRUCTURE  T1_Font
+#define FT_STRUCTURE  T1_FontRec
 #undef  T1CODE
 #define T1CODE        t1_field_font_dict