freetype-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[freetype2] ewaldhew-refactor-cf2 dc31e36 7/8: Link CFF struct defs


From: Hew Yih Shiuan Ewald
Subject: [freetype2] ewaldhew-refactor-cf2 dc31e36 7/8: Link CFF struct defs
Date: Mon, 5 Jun 2017 03:20:42 -0400 (EDT)

branch: ewaldhew-refactor-cf2
commit dc31e3669705521285bcfa60d599d78572317e32
Author: Ewald Hew <address@hidden>
Commit: Ewald Hew <address@hidden>

    Link CFF struct defs
    
    Move definition of CFF_Builder_Funcs
    Move psaux pointer from CFF_Font to TT_Face
    Move cfftypes.h to internal
    fix typos
---
 .../freetype/internal/cffotypes.h                  |  80 +--------------
 {src/cff => include/freetype/internal}/cfftypes.h  |   4 -
 include/freetype/internal/internal.h               |   3 +
 include/freetype/internal/psaux.h                  | 108 +++++++++++----------
 include/freetype/internal/services/svcfftl.h       |   1 +
 include/freetype/internal/tttypes.h                |   3 +
 src/cff/cff.c                                      |  11 ---
 src/cff/cffcmap.h                                  |   2 +-
 src/cff/cffdrivr.c                                 |   1 +
 src/cff/cffgload.c                                 |  10 +-
 src/cff/cffgload.h                                 |   2 +-
 src/cff/cffload.h                                  |   4 +-
 src/cff/cffobjs.h                                  | 100 -------------------
 src/cff/cffparse.h                                 |   2 +-
 src/cff/rules.mk                                   |   3 +-
 src/psaux/cf2ft.h                                  |   2 +-
 src/psaux/cffdecode.c                              |   4 +
 src/psaux/cffdecode.h                              |  22 +++--
 src/psaux/psaux.c                                  |  10 ++
 src/psaux/psauxmod.c                               |   2 +-
 src/psaux/psobjs.c                                 |   4 +-
 src/psaux/psobjs.h                                 |   1 +
 22 files changed, 109 insertions(+), 270 deletions(-)

diff --git a/src/cff/cffobjs.h b/include/freetype/internal/cffotypes.h
similarity index 58%
copy from src/cff/cffobjs.h
copy to include/freetype/internal/cffotypes.h
index 1dba694..6cabaff 100644
--- a/src/cff/cffobjs.h
+++ b/include/freetype/internal/cffotypes.h
@@ -1,28 +1,9 @@
-/***************************************************************************/
-/*                                                                         */
-/*  cffobjs.h                                                              */
-/*                                                                         */
-/*    OpenType objects manager (specification).                            */
-/*                                                                         */
-/*  Copyright 1996-2017 by                                                 */
-/*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
-/*                                                                         */
-/*  This file is part of the FreeType project, and may only be used,       */
-/*  modified, and distributed under the terms of the FreeType project      */
-/*  license, LICENSE.TXT.  By continuing to use, modify, or distribute     */
-/*  this file you indicate that you have read the license and              */
-/*  understand and accept it fully.                                        */
-/*                                                                         */
-/***************************************************************************/
-
-
-#ifndef CFFOBJS_H_
-#define CFFOBJS_H_
-
+#ifndef CFFOTYPES_H_
+#define CFFOTYPES_H_
 
 #include <ft2build.h>
 #include FT_INTERNAL_OBJECTS_H
-#include "cfftypes.h"
+#include FT_INTERNAL_CFF_TYPES_H
 #include FT_INTERNAL_TRUETYPE_TYPES_H
 #include FT_SERVICE_POSTSCRIPT_CMAPS_H
 #include FT_INTERNAL_POSTSCRIPT_HINTS_H
@@ -126,60 +107,7 @@ FT_BEGIN_HEADER
   } CFF_DriverRec;
 
 
-  FT_LOCAL( FT_Error )
-  cff_size_init( FT_Size  size );           /* CFF_Size */
-
-  FT_LOCAL( void )
-  cff_size_done( FT_Size  size );           /* CFF_Size */
-
-  FT_LOCAL( FT_Error )
-  cff_size_request( FT_Size          size,
-                    FT_Size_Request  req );
-
-#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
-
-  FT_LOCAL( FT_Error )
-  cff_size_select( FT_Size   size,
-                   FT_ULong  strike_index );
-
-#endif
-
-  FT_LOCAL( void )
-  cff_slot_done( FT_GlyphSlot  slot );
-
-  FT_LOCAL( FT_Error )
-  cff_slot_init( FT_GlyphSlot  slot );
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Face functions                                                        */
-  /*                                                                       */
-  FT_LOCAL( FT_Error )
-  cff_face_init( FT_Stream      stream,
-                 FT_Face        face,           /* CFF_Face */
-                 FT_Int         face_index,
-                 FT_Int         num_params,
-                 FT_Parameter*  params );
-
-  FT_LOCAL( void )
-  cff_face_done( FT_Face  face );               /* CFF_Face */
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Driver functions                                                      */
-  /*                                                                       */
-  FT_LOCAL( FT_Error )
-  cff_driver_init( FT_Module  module );         /* CFF_Driver */
-
-  FT_LOCAL( void )
-  cff_driver_done( FT_Module  module );         /* CFF_Driver */
-
-
 FT_END_HEADER
 
-#endif /* CFFOBJS_H_ */
-
 
-/* END */
+#endif
diff --git a/src/cff/cfftypes.h b/include/freetype/internal/cfftypes.h
similarity index 99%
rename from src/cff/cfftypes.h
rename to include/freetype/internal/cfftypes.h
index c2b9176..d6de1f3 100644
--- a/src/cff/cfftypes.h
+++ b/include/freetype/internal/cfftypes.h
@@ -397,10 +397,6 @@ FT_BEGIN_HEADER
     /* since version 2.7.1 */
     CFF_VStoreRec    vstore;        /* parsed vstore structure */
 
-    /* interface to PostScript Aux service */
-    //TODO(ewaldhew): should this be in ttface?
-    PSAux_Service    psaux;
-
   } CFF_FontRec;
 
 
diff --git a/include/freetype/internal/internal.h 
b/include/freetype/internal/internal.h
index 0204681..23f84b4 100644
--- a/include/freetype/internal/internal.h
+++ b/include/freetype/internal/internal.h
@@ -47,6 +47,9 @@
 
 #define FT_INTERNAL_AUTOHINT_H            <freetype/internal/autohint.h>
 
+#define FT_INTERNAL_CFF_TYPES_H           <freetype/internal/cfftypes.h>
+#define FT_INTERNAL_CFF_OBJECTS_TYPES_H   <freetype/internal/cffotypes.h>
+
 
 #if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
 
diff --git a/include/freetype/internal/psaux.h 
b/include/freetype/internal/psaux.h
index f015c88..3f710ae 100644
--- a/include/freetype/internal/psaux.h
+++ b/include/freetype/internal/psaux.h
@@ -27,7 +27,9 @@
 #include FT_INTERNAL_HASH_H
 #include FT_INTERNAL_TRUETYPE_TYPES_H
 #include FT_SERVICE_POSTSCRIPT_CMAPS_H
-/*TODO(ewaldhew): link cffobjs.h: move it to freetype/internal? */
+#include FT_INTERNAL_CFF_TYPES_H
+#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
+
 
 FT_BEGIN_HEADER
 
@@ -712,7 +714,57 @@ FT_BEGIN_HEADER
   /*************************************************************************/
 
 
-  typedef struct  CFF_Builder_FuncsRec_ CFF_Builder_FuncsRec;
+  typedef struct  CFF_Builder_ CFF_Builder;
+
+
+  typedef FT_Error
+  (*CFF_Builder_Check_Points_Func)( CFF_Builder*  builder,
+                                    FT_Int        count );
+
+  typedef void
+  (*CFF_Builder_Add_Point_Func)( CFF_Builder*  builder,
+                                 FT_Pos        x,
+                                 FT_Pos        y,
+                                 FT_Byte       flag );
+  typedef FT_Error
+  (*CFF_Builder_Add_Point1_Func)( CFF_Builder*  builder,
+                                  FT_Pos        x,
+                                  FT_Pos        y );
+  typedef FT_Error
+  (*CFF_Builder_Start_Point_Func)( CFF_Builder*  builder,
+                                   FT_Pos        x,
+                                   FT_Pos        y );
+  typedef void
+  (*CFF_Builder_Close_Contour_Func)( CFF_Builder*  builder );
+
+  /* static */
+  typedef FT_Error
+  (*CFF_Builder_Add_Contour_Func)( CFF_Builder*  builder );
+
+  typedef const struct CFF_Builder_FuncsRec_*  CFF_Builder_Funcs;
+
+  typedef struct  CFF_Builder_FuncsRec_
+  {
+    /* static */
+    void
+    (*init)( CFF_Builder*   builder,
+             TT_Face        face,
+             CFF_Size       size,
+             CFF_GlyphSlot  glyph,
+             FT_Bool        hinting );
+
+    /* static */
+    void
+    (*done)( CFF_Builder*  builder );
+
+    CFF_Builder_Check_Points_Func   check_points;
+    CFF_Builder_Add_Point_Func      add_point;
+    CFF_Builder_Add_Point1_Func     add_point1;
+    CFF_Builder_Add_Contour_Func    add_contour;
+    CFF_Builder_Start_Point_Func    start_point;
+    CFF_Builder_Close_Contour_Func  close_contour;
+
+  } CFF_Builder_FuncsRec;
 
 
   /*************************************************************************/
@@ -760,7 +812,7 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*    hints_globals :: Auxiliary pointer for hinting.                    */
   /*                                                                       */
-  typedef struct  CFF_Builder_
+  struct  CFF_Builder_
   {
     FT_Memory       memory;
     TT_Face         face;
@@ -787,56 +839,6 @@ FT_BEGIN_HEADER
 
     CFF_Builder_FuncsRec  funcs;
 
-  } CFF_Builder;
-
-
-  typedef FT_Error
-  (*CFF_Builder_Check_Points_Func)( CFF_Builder*  builder,
-                                    FT_Int        count );
-
-  typedef void
-  (*CFF_Builder_Add_Point_Func)( CFF_Builder*  builder,
-                                 FT_Pos        x,
-                                 FT_Pos        y,
-                                 FT_Byte       flag );
-  typedef FT_Error
-  (*CFF_Builder_Add_Point1_Func)( CFF_Builder*  builder,
-                                  FT_Pos        x,
-                                  FT_Pos        y );
-  typedef FT_Error
-  (*CFF_Builder_Start_Point_Func)( CFF_Builder*  builder,
-                                   FT_Pos        x,
-                                   FT_Pos        y );
-  typedef void
-  (*CFF_Builder_Close_Contour_Func)( CFF_Builder*  builder );
-
-  /* static */
-  typedef FT_Error
-  (*CFF_Builder_Add_Contour_Func)( CFF_Builder*  builder );
-
-  typedef const struct CFF_Builder_FuncsRec_*  CFF_Builder_Funcs;
-
-  struct  CFF_Builder_FuncsRec_
-  {
-    /* static */
-    void
-    (*init)( CFF_Builder*   builder,
-             TT_Face        face,
-             CFF_Size       size,
-             CFF_GlyphSlot  glyph,
-             FT_Bool        hinting );
-
-    /* static */
-    void
-    (*done)( CFF_Builder*  builder );
-
-    CFF_Builder_Check_Points_Func   check_points;
-    CFF_Builder_Add_Point_Func      add_point;
-    CFF_Builder_Add_Point1_Func     add_point1;
-    CFF_Builder_Start_Point_Func    start_point;
-    CFF_Builder_Close_Contour_Func  close_contour;
-    CFF_Builder_Add_Contour_Func    add_contour;
-
   };
 
 
diff --git a/include/freetype/internal/services/svcfftl.h 
b/include/freetype/internal/services/svcfftl.h
index 6270bcf..4629cbc 100644
--- a/include/freetype/internal/services/svcfftl.h
+++ b/include/freetype/internal/services/svcfftl.h
@@ -2,6 +2,7 @@
 #define SVCFFTL_H_
 
 #include FT_INTERNAL_SERVICE_H
+#include FT_INTERNAL_CFF_TYPES_H
 
 
 FT_BEGIN_HEADER
diff --git a/include/freetype/internal/tttypes.h 
b/include/freetype/internal/tttypes.h
index c0758e2..0fcc6b0 100644
--- a/include/freetype/internal/tttypes.h
+++ b/include/freetype/internal/tttypes.h
@@ -1445,6 +1445,9 @@ FT_BEGIN_HEADER
     void*                 var;
 #endif
 
+    /* a typeless pointer to the PostScript Aux service */
+    void*                 psaux;
+
 
     /***********************************************************************/
     /*                                                                     */
diff --git a/src/cff/cff.c b/src/cff/cff.c
index 397f6df..e9b3264 100644
--- a/src/cff/cff.c
+++ b/src/cff/cff.c
@@ -27,15 +27,4 @@
 #include "cffload.c"
 #include "cffobjs.c"
 
-#include "cf2arrst.c"
-#include "cf2blues.c"
-#include "cf2error.c"
-#include "cf2font.c"
-#include "cf2ft.c"
-#include "cf2hints.c"
-#include "cf2intrp.c"
-#include "cf2read.c"
-#include "cf2stack.c"
-
-
 /* END */
diff --git a/src/cff/cffcmap.h b/src/cff/cffcmap.h
index 7792e04..227c91a 100644
--- a/src/cff/cffcmap.h
+++ b/src/cff/cffcmap.h
@@ -19,7 +19,7 @@
 #ifndef CFFCMAP_H_
 #define CFFCMAP_H_
 
-#include "cffobjs.h"
+#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
 
 FT_BEGIN_HEADER
 
diff --git a/src/cff/cffdrivr.c b/src/cff/cffdrivr.c
index 689f229..4c9b1cd 100644
--- a/src/cff/cffdrivr.c
+++ b/src/cff/cffdrivr.c
@@ -32,6 +32,7 @@
 #include "cffload.h"
 #include "cffcmap.h"
 #include "cffparse.h"
+#include "cffobjs.h"
 
 #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
 #include FT_SERVICE_MULTIPLE_MASTERS_H
diff --git a/src/cff/cffgload.c b/src/cff/cffgload.c
index 4047391..c27f74c 100644
--- a/src/cff/cffgload.c
+++ b/src/cff/cffgload.c
@@ -25,10 +25,10 @@
 #include FT_OUTLINE_H
 #include FT_CFF_DRIVER_H
 
-#include "cffobjs.h"
 #include "cffload.h"
 #include "cffgload.h"
 
+#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
 #include "cfferrs.h"
 
 
@@ -143,7 +143,7 @@
     FT_Int       glyph_index;
     CFF_Font     cff = (CFF_Font)face->other;
 
-    PSAux_Service            psaux         = cff->psaux;
+    PSAux_Service            psaux         = (PSAux_Service)face->psaux;
     const CFF_Decoder_Funcs  decoder_funcs = psaux->cff_decoder_funcs;
 
     *max_advance = 0;
@@ -203,7 +203,7 @@
     FT_Bool      hinting, scaled, force_scaling;
     CFF_Font     cff  = (CFF_Font)face->extra.data;
 
-    PSAux_Service            psaux         = cff->psaux;
+    PSAux_Service            psaux         = face->psaux;
     const CFF_Decoder_Funcs  decoder_funcs = psaux->cff_decoder_funcs;
 
     FT_Matrix    font_matrix;
@@ -404,7 +404,7 @@
 
 
       decoder_funcs->init( &decoder, face, size, glyph, hinting,
-                           FT_LOAD_TARGET_MODE( load_flags )
+                           FT_LOAD_TARGET_MODE( load_flags ),
                            cff_get_glyph_data,
                            cff_free_glyph_data );
 
@@ -490,7 +490,7 @@
   Glyph_Build_Finished:
       /* save new glyph tables, if no error */
       if ( !error )
-        cff_builder_done( &decoder.builder );
+        decoder.builder.funcs.done( &decoder.builder );
       /* XXX: anything to do for broken glyph entry? */
     }
 
diff --git a/src/cff/cffgload.h b/src/cff/cffgload.h
index b2e945d..ed291b8 100644
--- a/src/cff/cffgload.h
+++ b/src/cff/cffgload.h
@@ -22,7 +22,7 @@
 
 #include <ft2build.h>
 #include FT_FREETYPE_H
-#include "cffobjs.h"
+#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
 
 
 FT_BEGIN_HEADER
diff --git a/src/cff/cffload.h b/src/cff/cffload.h
index e079cef..5e35e43 100644
--- a/src/cff/cffload.h
+++ b/src/cff/cffload.h
@@ -21,9 +21,9 @@
 
 
 #include <ft2build.h>
-#include "cfftypes.h"
+#include FT_INTERNAL_CFF_TYPES_H
 #include "cffparse.h"
-#include "cffobjs.h"  /* for CFF_Face */
+#include FT_INTERNAL_CFF_OBJECTS_TYPES_H  /* for CFF_Face */
 
 
 FT_BEGIN_HEADER
diff --git a/src/cff/cffobjs.h b/src/cff/cffobjs.h
index 1dba694..839a61c 100644
--- a/src/cff/cffobjs.h
+++ b/src/cff/cffobjs.h
@@ -21,111 +21,11 @@
 
 
 #include <ft2build.h>
-#include FT_INTERNAL_OBJECTS_H
-#include "cfftypes.h"
-#include FT_INTERNAL_TRUETYPE_TYPES_H
-#include FT_SERVICE_POSTSCRIPT_CMAPS_H
-#include FT_INTERNAL_POSTSCRIPT_HINTS_H
 
 
 FT_BEGIN_HEADER
 
 
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    CFF_Driver                                                         */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to an OpenType driver object.                             */
-  /*                                                                       */
-  typedef struct CFF_DriverRec_*  CFF_Driver;
-
-  typedef TT_Face  CFF_Face;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    CFF_Size                                                           */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to an OpenType size object.                               */
-  /*                                                                       */
-  typedef struct  CFF_SizeRec_
-  {
-    FT_SizeRec  root;
-    FT_ULong    strike_index;    /* 0xFFFFFFFF to indicate invalid */
-
-  } CFF_SizeRec, *CFF_Size;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    CFF_GlyphSlot                                                      */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    A handle to an OpenType glyph slot object.                         */
-  /*                                                                       */
-  typedef struct  CFF_GlyphSlotRec_
-  {
-    FT_GlyphSlotRec  root;
-
-    FT_Bool          hint;
-    FT_Bool          scaled;
-
-    FT_Fixed         x_scale;
-    FT_Fixed         y_scale;
-
-  } CFF_GlyphSlotRec, *CFF_GlyphSlot;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* <Type>                                                                */
-  /*    CFF_Internal                                                       */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    The interface to the `internal' field of `FT_Size'.                */
-  /*                                                                       */
-  typedef struct  CFF_InternalRec_
-  {
-    PSH_Globals  topfont;
-    PSH_Globals  subfonts[CFF_MAX_CID_FONTS];
-
-  } CFF_InternalRec, *CFF_Internal;
-
-
-  /*************************************************************************/
-  /*                                                                       */
-  /* Subglyph transformation record.                                       */
-  /*                                                                       */
-  typedef struct  CFF_Transform_
-  {
-    FT_Fixed    xx, xy;     /* transformation matrix coefficients */
-    FT_Fixed    yx, yy;
-    FT_F26Dot6  ox, oy;     /* offsets        */
-
-  } CFF_Transform;
-
-
-  /***********************************************************************/
-  /*                                                                     */
-  /* CFF driver class.                                                   */
-  /*                                                                     */
-  typedef struct  CFF_DriverRec_
-  {
-    FT_DriverRec  root;
-
-    FT_UInt   hinting_engine;
-    FT_Bool   no_stem_darkening;
-    FT_Int    darken_params[8];
-    FT_Int32  random_seed;
-
-  } CFF_DriverRec;
-
-
   FT_LOCAL( FT_Error )
   cff_size_init( FT_Size  size );           /* CFF_Size */
 
diff --git a/src/cff/cffparse.h b/src/cff/cffparse.h
index 83d1bba..961c265 100644
--- a/src/cff/cffparse.h
+++ b/src/cff/cffparse.h
@@ -21,7 +21,7 @@
 
 
 #include <ft2build.h>
-#include "cfftypes.h"
+#include FT_INTERNAL_CFF_TYPES_H
 #include FT_INTERNAL_OBJECTS_H
 
 
diff --git a/src/cff/rules.mk b/src/cff/rules.mk
index feecf46..8cf99b2 100644
--- a/src/cff/rules.mk
+++ b/src/cff/rules.mk
@@ -39,8 +39,7 @@ CFF_DRV_SRC := $(CFF_DIR)/cffcmap.c  \
 #
 CFF_DRV_H := $(CFF_DRV_SRC:%.c=%.h) \
              $(CFF_DIR)/cfferrs.h   \
-             $(CFF_DIR)/cfftoken.h  \
-             $(CFF_DIR)/cfftypes.h 
+             $(CFF_DIR)/cfftoken.h 
 
 
 # CFF driver object(s)
diff --git a/src/psaux/cf2ft.h b/src/psaux/cf2ft.h
index 19644ec..772fb07 100644
--- a/src/psaux/cf2ft.h
+++ b/src/psaux/cf2ft.h
@@ -50,7 +50,7 @@
 #include FT_SYSTEM_H
 
 #include "cf2glue.h"
-#include "psaux.h"    /* for CFF_Decoder */
+#include FT_INTERNAL_POSTSCRIPT_AUX_H    /* for CFF_Decoder */
 
 
 FT_BEGIN_HEADER
diff --git a/src/psaux/cffdecode.c b/src/psaux/cffdecode.c
index 854d651..d3af3db 100644
--- a/src/psaux/cffdecode.c
+++ b/src/psaux/cffdecode.c
@@ -430,6 +430,8 @@
     return -1;
   }
 
+#ifdef CFF_CONFIG_OPTION_OLD_ENGINE
+
   /*************************************************************************/
   /*                                                                       */
   /* <Function>                                                            */
@@ -2216,6 +2218,8 @@
     return FT_THROW( Stack_Overflow );
   }
 
+#endif /* CFF_CONFIG_OPTION_OLD_ENGINE */
+
 
   /*************************************************************************/
   /*                                                                       */
diff --git a/src/psaux/cffdecode.h b/src/psaux/cffdecode.h
index 5542c09..e708040 100644
--- a/src/psaux/cffdecode.h
+++ b/src/psaux/cffdecode.h
@@ -10,16 +10,18 @@ FT_BEGIN_HEADER
 
   FT_LOCAL( void )
   cff_decoder_init( CFF_Decoder*    decoder,
-                   TT_Face         face,
-                   CFF_Size        size,
-                   CFF_GlyphSlot   slot,
-                   FT_Bool         hinting,
-                   FT_Render_Mode  hint_mode );
+                    TT_Face         face,
+                    CFF_Size        size,
+                    CFF_GlyphSlot   slot,
+                    FT_Bool         hinting,
+                    FT_Render_Mode  hint_mode,
+                    CFF_Decoder_Get_Glyph_Callback   get_callback,
+                    CFF_Decoder_Free_Glyph_Callback  free_callback);
 
   FT_LOCAL( FT_Error )
   cff_decoder_prepare( CFF_Decoder*  decoder,
-                      CFF_Size      size,
-                      FT_UInt       glyph_index );
+                       CFF_Size      size,
+                       FT_UInt       glyph_index );
 
 
   FT_LOCAL( FT_Int )
@@ -30,9 +32,9 @@ FT_BEGIN_HEADER
   #ifdef CFF_CONFIG_OPTION_OLD_ENGINE
     FT_LOCAL( FT_Error )
     cff_decoder_parse_charstrings( CFF_Decoder*  decoder,
-                                  FT_Byte*      charstring_base,
-                                  FT_ULong      charstring_len,
-                                  FT_Bool       in_dict );
+                                   FT_Byte*      charstring_base,
+                                   FT_ULong      charstring_len,
+                                   FT_Bool       in_dict );
   #endif
 
   
diff --git a/src/psaux/psaux.c b/src/psaux/psaux.c
index ffbaec7..f99884a 100644
--- a/src/psaux/psaux.c
+++ b/src/psaux/psaux.c
@@ -27,5 +27,15 @@
 #include "t1decode.c"
 #include "cffdecode.c"
 
+#include "cf2arrst.c"
+#include "cf2blues.c"
+#include "cf2error.c"
+#include "cf2font.c"
+#include "cf2ft.c"
+#include "cf2hints.c"
+#include "cf2intrp.c"
+#include "cf2read.c"
+#include "cf2stack.c"
+
 
 /* END */
diff --git a/src/psaux/psauxmod.c b/src/psaux/psauxmod.c
index a37ac74..9e6a915 100644
--- a/src/psaux/psauxmod.c
+++ b/src/psaux/psauxmod.c
@@ -122,7 +122,7 @@
 #endif
 
   FT_CALLBACK_TABLE_DEF
-  const CFF_Decoder_Funcs  cff_decoder_funcs =
+  const CFF_Decoder_FuncsRec  cff_decoder_funcs =
   {
     cff_decoder_init,              /* init              */
     cff_decoder_prepare,           /* prepare           */
diff --git a/src/psaux/psobjs.c b/src/psaux/psobjs.c
index 37ea6fe..2fe55f8 100644
--- a/src/psaux/psobjs.c
+++ b/src/psaux/psobjs.c
@@ -20,6 +20,7 @@
 #include FT_INTERNAL_POSTSCRIPT_AUX_H
 #include FT_INTERNAL_DEBUG_H
 #include FT_INTERNAL_CALC_H
+#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
 
 #include "psobjs.h"
 #include "psconv.h"
@@ -1816,8 +1817,7 @@
 
       if ( hinting && size )
       {
-        FT_Size       ftsize   = FT_SIZE( size );
-        CFF_Internal  internal = (CFF_Internal)ftsize->internal->module_data;
+        CFF_Internal  internal = 
(CFF_Internal)size->root.internal->module_data;
 
 
         if ( internal )
diff --git a/src/psaux/psobjs.h b/src/psaux/psobjs.h
index 73cd905..c06bb28 100644
--- a/src/psaux/psobjs.h
+++ b/src/psaux/psobjs.h
@@ -22,6 +22,7 @@
 
 #include <ft2build.h>
 #include FT_INTERNAL_POSTSCRIPT_AUX_H
+#include FT_INTERNAL_CFF_OBJECTS_TYPES_H
 
 
 FT_BEGIN_HEADER



reply via email to

[Prev in Thread] Current Thread [Next in Thread]