Remerge fix for bug 1543
authorWilliam Roberts <williamr@symbian.org>
Mon, 23 Aug 2010 13:09:42 +0100
changeset 52 23d001107cf3
parent 51 a7c938434754 (current diff)
parent 48 294f83a8e6de (diff)
child 58 876d950bc52d
Remerge fix for bug 1543
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/autohint.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,205 @@
+/***************************************************************************/
+/*                                                                         */
+/*  autohint.h                                                             */
+/*                                                                         */
+/*    High-level `autohint' module-specific interface (specification).     */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002 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, FTL.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* The auto-hinter is used to load and automatically hint glyphs if a    */
+  /* format-specific hinter isn't available.                               */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __AUTOHINT_H__
+#define __AUTOHINT_H__
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* A small technical note regarding automatic hinting in order to        */
+  /* clarify this module interface.                                        */
+  /*                                                                       */
+  /* An automatic hinter might compute two kinds of data for a given face: */
+  /*                                                                       */
+  /* - global hints: Usually some metrics that describe global properties  */
+  /*                 of the face.  It is computed by scanning more or less */
+  /*                 agressively the glyphs in the face, and thus can be   */
+  /*                 very slow to compute (even if the size of global      */
+  /*                 hints is really small).                               */
+  /*                                                                       */
+  /* - glyph hints:  These describe some important features of the glyph   */
+  /*                 outline, as well as how to align them.  They are      */
+  /*                 generally much faster to compute than global hints.   */
+  /*                                                                       */
+  /* The current FreeType auto-hinter does a pretty good job while         */
+  /* performing fast computations for both global and glyph hints.         */
+  /* However, we might be interested in introducing more complex and       */
+  /* powerful algorithms in the future, like the one described in the John */
+  /* D. Hobby paper, which unfortunately requires a lot more horsepower.   */
+  /*                                                                       */
+  /* Because a sufficiently sophisticated font management system would     */
+  /* typically implement an LRU cache of opened face objects to reduce     */
+  /* memory usage, it is a good idea to be able to avoid recomputing       */
+  /* global hints every time the same face is re-opened.                   */
+  /*                                                                       */
+  /* We thus provide the ability to cache global hints outside of the face */
+  /* object, in order to speed up font re-opening time.  Of course, this   */
+  /* feature is purely optional, so most client programs won't even notice */
+  /* it.                                                                   */
+  /*                                                                       */
+  /* I initially thought that it would be a good idea to cache the glyph   */
+  /* hints too.  However, my general idea now is that if you really need   */
+  /* to cache these too, you are simply in need of a new font format,      */
+  /* where all this information could be stored within the font file and   */
+  /* decoded on the fly.                                                   */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
+FT_BEGIN_HEADER
+
+
+  typedef struct FT_AutoHinterRec_  *FT_AutoHinter;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_AutoHinter_GlobalGetFunc                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Retrieves the global hints computed for a given face object the    */
+  /*    resulting data is dissociated from the face and will survive a     */
+  /*    call to FT_Done_Face().  It must be discarded through the API      */
+  /*    FT_AutoHinter_GlobalDoneFunc().                                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    hinter        :: A handle to the source auto-hinter.               */
+  /*                                                                       */
+  /*    face          :: A handle to the source face object.               */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    global_hints  :: A typeless pointer to the global hints.           */
+  /*                                                                       */
+  /*    global_len    :: The size in bytes of the global hints.            */
+  /*                                                                       */
+  typedef void
+  (*FT_AutoHinter_GlobalGetFunc)( FT_AutoHinter  hinter,
+                                  FT_Face        face,
+                                  void**         global_hints,
+                                  long*          global_len );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_AutoHinter_GlobalDoneFunc                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Discards the global hints retrieved through                        */
+  /*    FT_AutoHinter_GlobalGetFunc().  This is the only way these hints   */
+  /*    are freed from memory.                                             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    hinter :: A handle to the auto-hinter module.                      */
+  /*                                                                       */
+  /*    global :: A pointer to retrieved global hints to discard.          */
+  /*                                                                       */
+  typedef void
+  (*FT_AutoHinter_GlobalDoneFunc)( FT_AutoHinter  hinter,
+                                   void*          global );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_AutoHinter_GlobalResetFunc                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This function is used to recompute the global metrics in a given   */
+  /*    font.  This is useful when global font data changes (e.g. Multiple */
+  /*    Masters fonts where blend coordinates change).                     */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    hinter :: A handle to the source auto-hinter.                      */
+  /*                                                                       */
+  /*    face   :: A handle to the face.                                    */
+  /*                                                                       */
+  typedef void
+  (*FT_AutoHinter_GlobalResetFunc)( FT_AutoHinter  hinter,
+                                    FT_Face        face );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    FT_AutoHinter_GlyphLoadFunc                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This function is used to load, scale, and automatically hint a     */
+  /*    glyph from a given face.                                           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face        :: A handle to the face.                               */
+  /*                                                                       */
+  /*    glyph_index :: The glyph index.                                    */
+  /*                                                                       */
+  /*    load_flags  :: The load flags.                                     */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function is capable of loading composite glyphs by hinting    */
+  /*    each sub-glyph independently (which improves quality).             */
+  /*                                                                       */
+  /*    It will call the font driver with FT_Load_Glyph(), with            */
+  /*    FT_LOAD_NO_SCALE set.                                              */
+  /*                                                                       */
+  typedef FT_Error
+  (*FT_AutoHinter_GlyphLoadFunc)( FT_AutoHinter  hinter,
+                                  FT_GlyphSlot   slot,
+                                  FT_Size        size,
+                                  FT_UInt        glyph_index,
+                                  FT_Int32       load_flags );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_AutoHinter_ServiceRec                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The auto-hinter module's interface.                                */
+  /*                                                                       */
+  typedef struct  FT_AutoHinter_ServiceRec_
+  {
+    FT_AutoHinter_GlobalResetFunc  reset_face;
+    FT_AutoHinter_GlobalGetFunc    get_global_hints;
+    FT_AutoHinter_GlobalDoneFunc   done_global_hints;
+    FT_AutoHinter_GlyphLoadFunc    load_glyph;
+
+  } FT_AutoHinter_ServiceRec, *FT_AutoHinter_Service;
+
+
+FT_END_HEADER
+
+#endif /* __AUTOHINT_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/ftcalc.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,129 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftcalc.h                                                               */
+/*                                                                         */
+/*    Arithmetic computations (specification).                             */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 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, FTL.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 __FTCALC_H__
+#define __FTCALC_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_FixedSqrt                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Computes the square root of a 16.16 fixed point value.             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    x :: The value to compute the root for.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result of `sqrt(x)'.                                           */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function is not very fast.                                    */
+  /*                                                                       */
+  FT_BASE( FT_Int32 )
+  FT_SqrtFixed( FT_Int32  x );
+
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Sqrt32                                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Computes the square root of an Int32 integer (which will be        */
+  /*    handled as an unsigned long value).                                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    x :: The value to compute the root for.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result of `sqrt(x)'.                                           */
+  /*                                                                       */
+  FT_EXPORT( FT_Int32 )
+  FT_Sqrt32( FT_Int32  x );
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* FT_MulDiv() and FT_MulFix() are declared in freetype.h.               */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_MulDiv_No_Round                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A very simple function used to perform the computation `(a*b)/c'   */
+  /*    (without rounding) with maximal accuracy (it uses a 64-bit         */
+  /*    intermediate integer whenever necessary).                          */
+  /*                                                                       */
+  /*    This function isn't necessarily as fast as some processor specific */
+  /*    operations, but is at least completely portable.                   */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    a :: The first multiplier.                                         */
+  /*    b :: The second multiplier.                                        */
+  /*    c :: The divisor.                                                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The result of `(a*b)/c'.  This function never traps when trying to */
+  /*    divide by zero; it simply returns `MaxInt' or `MinInt' depending   */
+  /*    on the signs of `a' and `b'.                                       */
+  /*                                                                       */
+  FT_BASE( FT_Long )
+  FT_MulDiv_No_Round( FT_Long  a,
+                      FT_Long  b,
+                      FT_Long  c );
+
+#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
+
+
+#define INT_TO_F26DOT6( x )    ( (FT_Long)(x) << 6  )
+#define INT_TO_F2DOT14( x )    ( (FT_Long)(x) << 14 )
+#define INT_TO_FIXED( x )      ( (FT_Long)(x) << 16 )
+#define F2DOT14_TO_FIXED( x )  ( (FT_Long)(x) << 2  )
+#define FLOAT_TO_FIXED( x )    ( (FT_Long)( x * 65536.0 ) )
+
+#define ROUND_F26DOT6( x )     ( x >= 0 ? (    ( (x) + 32 ) & -64 )     \
+                                        : ( -( ( 32 - (x) ) & -64 ) ) )
+
+
+FT_END_HEADER
+
+#endif /* __FTCALC_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/ftdebug.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,244 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftdebug.h                                                              */
+/*                                                                         */
+/*    Debugging and logging component (specification).                     */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2004, 2006 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, FTL.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/*                                                                         */
+/*  IMPORTANT: A description of FreeType's debugging support can be        */
+/*             found in `docs/DEBUG.TXT'.  Read it if you need to use or   */
+/*             understand this code.                                       */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __FTDEBUG_H__
+#define __FTDEBUG_H__
+
+
+#include <ft2build.h>
+#include FT_CONFIG_CONFIG_H
+#include FT_FREETYPE_H
+
+
+FT_BEGIN_HEADER
+
+
+  /* force the definition of FT_DEBUG_LEVEL_ERROR if FT_DEBUG_LEVEL_TRACE */
+  /* is already defined; this simplifies the following #ifdefs            */
+  /*                                                                      */
+#ifdef FT_DEBUG_LEVEL_TRACE
+#undef  FT_DEBUG_LEVEL_ERROR
+#define FT_DEBUG_LEVEL_ERROR
+#endif
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define the trace enums as well as the trace levels array when they    */
+  /* are needed.                                                           */
+  /*                                                                       */
+  /*************************************************************************/
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+
+#define FT_TRACE_DEF( x )  trace_ ## x ,
+
+  /* defining the enumeration */
+  typedef enum
+  {
+#include FT_INTERNAL_TRACE_H
+    trace_count
+
+  } FT_Trace;
+
+
+  /* defining the array of trace levels, provided by `src/base/ftdebug.c' */
+  extern int  ft_trace_levels[trace_count];
+
+#undef FT_TRACE_DEF
+
+#endif /* FT_DEBUG_LEVEL_TRACE */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define the FT_TRACE macro                                             */
+  /*                                                                       */
+  /* IMPORTANT!                                                            */
+  /*                                                                       */
+  /* Each component must define the macro FT_COMPONENT to a valid FT_Trace */
+  /* value before using any TRACE macro.                                   */
+  /*                                                                       */
+  /*************************************************************************/
+
+#ifdef FT_DEBUG_LEVEL_TRACE
+
+#define FT_TRACE( level, varformat )                      \
+          do                                              \
+          {                                               \
+            if ( ft_trace_levels[FT_COMPONENT] >= level ) \
+              FT_Message varformat;                       \
+          } while ( 0 )
+
+#else /* !FT_DEBUG_LEVEL_TRACE */
+
+#define FT_TRACE( level, varformat )  do ; while ( 0 )      /* nothing */
+
+#endif /* !FT_DEBUG_LEVEL_TRACE */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Trace_Get_Count                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return the number of available trace components.                   */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The number of trace components.  0 if FreeType 2 is not built with */
+  /*    FT_DEBUG_LEVEL_TRACE definition.                                   */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function may be useful if you want to access elements of      */
+  /*    the internal `ft_trace_levels' array by an index.                  */
+  /*                                                                       */
+  FT_BASE( FT_Int )
+  FT_Trace_Get_Count( void );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Trace_Get_Name                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Return the name of a trace component.                              */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    The index of the trace component.                                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    The name of the trace component.  This is a statically allocated   */
+  /*    C string, so do not free it after use.  NULL if FreeType 2 is not  */
+  /*    built with FT_DEBUG_LEVEL_TRACE definition.                        */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Use @FT_Trace_Get_Count to get the number of available trace       */
+  /*    components.                                                        */
+  /*                                                                       */
+  /*    This function may be useful if you want to control FreeType 2's    */
+  /*    debug level in your appliaciton.                                   */
+  /*                                                                       */
+  FT_BASE( const char * )
+  FT_Trace_Get_Name( FT_Int  idx );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* You need two opening resp. closing parentheses!                       */
+  /*                                                                       */
+  /* Example: FT_TRACE0(( "Value is %i", foo ))                            */
+  /*                                                                       */
+  /*************************************************************************/
+
+#define FT_TRACE0( varformat )  FT_TRACE( 0, varformat )
+#define FT_TRACE1( varformat )  FT_TRACE( 1, varformat )
+#define FT_TRACE2( varformat )  FT_TRACE( 2, varformat )
+#define FT_TRACE3( varformat )  FT_TRACE( 3, varformat )
+#define FT_TRACE4( varformat )  FT_TRACE( 4, varformat )
+#define FT_TRACE5( varformat )  FT_TRACE( 5, varformat )
+#define FT_TRACE6( varformat )  FT_TRACE( 6, varformat )
+#define FT_TRACE7( varformat )  FT_TRACE( 7, varformat )
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*  Define the FT_ERROR macro                                            */
+  /*                                                                       */
+  /*************************************************************************/
+
+#ifdef FT_DEBUG_LEVEL_ERROR
+
+#define FT_ERROR( varformat )  FT_Message  varformat
+
+#else  /* !FT_DEBUG_LEVEL_ERROR */
+
+#define FT_ERROR( varformat )  do ; while ( 0 )      /* nothing */
+
+#endif /* !FT_DEBUG_LEVEL_ERROR */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Define the FT_ASSERT macro                                            */
+  /*                                                                       */
+  /*************************************************************************/
+
+#ifdef FT_DEBUG_LEVEL_ERROR
+
+#define FT_ASSERT( condition )                                      \
+          do                                                        \
+          {                                                         \
+            if ( !( condition ) )                                   \
+              FT_Panic( "assertion failed on line %d of file %s\n", \
+                        __LINE__, __FILE__ );                       \
+          } while ( 0 )
+
+#else /* !FT_DEBUG_LEVEL_ERROR */
+
+#define FT_ASSERT( condition )  do ; while ( 0 )
+
+#endif /* !FT_DEBUG_LEVEL_ERROR */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*  Define `FT_Message' and `FT_Panic' when needed                       */
+  /*                                                                       */
+  /*************************************************************************/
+
+#ifdef FT_DEBUG_LEVEL_ERROR
+
+#include "stdio.h"  /* for vprintf() */
+
+  /* print a message */
+  FT_BASE( void )
+  FT_Message( const char*  fmt, ... );
+
+  /* print a message and exit */
+  FT_BASE( void )
+  FT_Panic( const char*  fmt, ... );
+
+#endif /* FT_DEBUG_LEVEL_ERROR */
+
+
+  FT_BASE( void )
+  ft_debug_init( void );
+
+
+#if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
+
+  /* we disable the warning `conditional expression is constant' here */
+  /* in order to compile cleanly with the maximum level of warnings   */
+#pragma warning( disable : 4127 )
+
+#endif /* _MSC_VER */
+
+
+FT_END_HEADER
+
+#endif /* __FTDEBUG_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/ftdriver.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,252 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftdriver.h                                                             */
+/*                                                                         */
+/*    FreeType font driver interface (specification).                      */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2006 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, FTL.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 __FTDRIVER_H__
+#define __FTDRIVER_H__
+
+
+#include <ft2build.h>
+#include FT_MODULE_H
+
+
+FT_BEGIN_HEADER
+
+
+  typedef FT_Error
+  (*FT_Face_InitFunc)( FT_Stream      stream,
+                       FT_Face        face,
+                       FT_Int         typeface_index,
+                       FT_Int         num_params,
+                       FT_Parameter*  parameters );
+
+  typedef void
+  (*FT_Face_DoneFunc)( FT_Face  face );
+
+
+  typedef FT_Error
+  (*FT_Size_InitFunc)( FT_Size  size );
+
+  typedef void
+  (*FT_Size_DoneFunc)( FT_Size  size );
+
+
+  typedef FT_Error
+  (*FT_Slot_InitFunc)( FT_GlyphSlot  slot );
+
+  typedef void
+  (*FT_Slot_DoneFunc)( FT_GlyphSlot  slot );
+
+
+  typedef FT_Error
+  (*FT_Size_RequestFunc)( FT_Size          size,
+                          FT_Size_Request  req );
+
+  typedef FT_Error
+  (*FT_Size_SelectFunc)( FT_Size   size,
+                         FT_ULong  size_index );
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+  typedef FT_Error
+  (*FT_Size_ResetPointsFunc)( FT_Size     size,
+                              FT_F26Dot6  char_width,
+                              FT_F26Dot6  char_height,
+                              FT_UInt     horz_resolution,
+                              FT_UInt     vert_resolution );
+
+  typedef FT_Error
+  (*FT_Size_ResetPixelsFunc)( FT_Size  size,
+                              FT_UInt  pixel_width,
+                              FT_UInt  pixel_height );
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
+  typedef FT_Error
+  (*FT_Slot_LoadFunc)( FT_GlyphSlot  slot,
+                       FT_Size       size,
+                       FT_UInt       glyph_index,
+                       FT_Int32      load_flags );
+
+
+  typedef FT_UInt
+  (*FT_CharMap_CharIndexFunc)( FT_CharMap  charmap,
+                               FT_Long     charcode );
+
+  typedef FT_Long
+  (*FT_CharMap_CharNextFunc)( FT_CharMap  charmap,
+                              FT_Long     charcode );
+
+  typedef FT_Error
+  (*FT_Face_GetKerningFunc)( FT_Face     face,
+                             FT_UInt     left_glyph,
+                             FT_UInt     right_glyph,
+                             FT_Vector*  kerning );
+
+
+  typedef FT_Error
+  (*FT_Face_AttachFunc)( FT_Face    face,
+                         FT_Stream  stream );
+
+
+  typedef FT_Error
+  (*FT_Face_GetAdvancesFunc)( FT_Face     face,
+                              FT_UInt     first,
+                              FT_UInt     count,
+                              FT_Bool     vertical,
+                              FT_UShort*  advances );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Driver_ClassRec                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The font driver class.  This structure mostly contains pointers to */
+  /*    driver methods.                                                    */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    root             :: The parent module.                             */
+  /*                                                                       */
+  /*    face_object_size :: The size of a face object in bytes.            */
+  /*                                                                       */
+  /*    size_object_size :: The size of a size object in bytes.            */
+  /*                                                                       */
+  /*    slot_object_size :: The size of a glyph object in bytes.           */
+  /*                                                                       */
+  /*    init_face        :: The format-specific face constructor.          */
+  /*                                                                       */
+  /*    done_face        :: The format-specific face destructor.           */
+  /*                                                                       */
+  /*    init_size        :: The format-specific size constructor.          */
+  /*                                                                       */
+  /*    done_size        :: The format-specific size destructor.           */
+  /*                                                                       */
+  /*    init_slot        :: The format-specific slot constructor.          */
+  /*                                                                       */
+  /*    done_slot        :: The format-specific slot destructor.           */
+  /*                                                                       */
+  /*                                                                       */
+  /*    load_glyph       :: A function handle to load a glyph to a slot.   */
+  /*                        This field is mandatory!                       */
+  /*                                                                       */
+  /*    get_char_index   :: A function handle to return the glyph index of */
+  /*                        a given character for a given charmap.  This   */
+  /*                        field is mandatory!                            */
+  /*                                                                       */
+  /*    get_kerning      :: A function handle to return the unscaled       */
+  /*                        kerning for a given pair of glyphs.  Can be    */
+  /*                        set to 0 if the format doesn't support         */
+  /*                        kerning.                                       */
+  /*                                                                       */
+  /*    attach_file      :: This function handle is used to read           */
+  /*                        additional data for a face from another        */
+  /*                        file/stream.  For example, this can be used to */
+  /*                        add data from AFM or PFM files on a Type 1     */
+  /*                        face, or a CIDMap on a CID-keyed face.         */
+  /*                                                                       */
+  /*    get_advances     :: A function handle used to return advance       */
+  /*                        widths of `count' glyphs (in font units),      */
+  /*                        starting at `first'.  The `vertical' flag must */
+  /*                        be set to get vertical advance heights.  The   */
+  /*                        `advances' buffer is caller-allocated.         */
+  /*                        Currently not implemented.  The idea of this   */
+  /*                        function is to be able to perform              */
+  /*                        device-independent text layout without loading */
+  /*                        a single glyph image.                          */
+  /*                                                                       */
+  /*    request_size     :: A handle to a function used to request the new */
+  /*                        character size.  Can be set to 0 if the        */
+  /*                        scaling done in the base layer suffices.       */
+  /*                                                                       */
+  /*    select_size      :: A handle to a function used to select a new    */
+  /*                        fixed size.  It is used only if                */
+  /*                        @FT_FACE_FLAG_FIXED_SIZES is set.  Can be set  */
+  /*                        to 0 if the scaling done in the base layer     */
+  /*                        suffices.                                      */
+  /* <Note>                                                                */
+  /*    Most function pointers, with the exception of `load_glyph' and     */
+  /*    `get_char_index' can be set to 0 to indicate a default behaviour.  */
+  /*                                                                       */
+  typedef struct  FT_Driver_ClassRec_
+  {
+    FT_Module_Class           root;
+
+    FT_Long                   face_object_size;
+    FT_Long                   size_object_size;
+    FT_Long                   slot_object_size;
+
+    FT_Face_InitFunc          init_face;
+    FT_Face_DoneFunc          done_face;
+
+    FT_Size_InitFunc          init_size;
+    FT_Size_DoneFunc          done_size;
+
+    FT_Slot_InitFunc          init_slot;
+    FT_Slot_DoneFunc          done_slot;
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+    FT_Size_ResetPointsFunc   set_char_sizes;
+    FT_Size_ResetPixelsFunc   set_pixel_sizes;
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
+    FT_Slot_LoadFunc          load_glyph;
+
+    FT_Face_GetKerningFunc    get_kerning;
+    FT_Face_AttachFunc        attach_file;
+    FT_Face_GetAdvancesFunc   get_advances;
+
+    /* since version 2.2 */
+    FT_Size_RequestFunc       request_size;
+    FT_Size_SelectFunc        select_size;
+
+  } FT_Driver_ClassRec, *FT_Driver_Class;
+
+
+  /*
+   *  The following functions are used as stubs for `set_char_sizes' and
+   *  `set_pixel_sizes'; the code uses `request_size' and `select_size'
+   *  functions instead.
+   *
+   *  Implementation is in `src/base/ftobjs.c'.
+   */
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+  FT_BASE( FT_Error )
+  ft_stub_set_char_sizes( FT_Size     size,
+                          FT_F26Dot6  width,
+                          FT_F26Dot6  height,
+                          FT_UInt     horz_res,
+                          FT_UInt     vert_res );
+
+  FT_BASE( FT_Error )
+  ft_stub_set_pixel_sizes( FT_Size  size,
+                           FT_UInt  width,
+                           FT_UInt  height );
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
+
+FT_END_HEADER
+
+#endif /* __FTDRIVER_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/ftgloadr.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,167 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftgloadr.h                                                             */
+/*                                                                         */
+/*    The FreeType glyph loader (specification).                           */
+/*                                                                         */
+/*  Copyright 2002, 2003, 2005, 2006 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, FTL.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 __FTGLOADR_H__
+#define __FTGLOADR_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_GlyphLoader                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The glyph loader is an internal object used to load several glyphs */
+  /*    together (for example, in the case of composites).                 */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The glyph loader implementation is not part of the high-level API, */
+  /*    hence the forward structure declaration.                           */
+  /*                                                                       */
+  typedef struct FT_GlyphLoaderRec_*  FT_GlyphLoader ;
+
+
+#if 0  /* moved to freetype.h in version 2.2 */
+#define FT_SUBGLYPH_FLAG_ARGS_ARE_WORDS          1
+#define FT_SUBGLYPH_FLAG_ARGS_ARE_XY_VALUES      2
+#define FT_SUBGLYPH_FLAG_ROUND_XY_TO_GRID        4
+#define FT_SUBGLYPH_FLAG_SCALE                   8
+#define FT_SUBGLYPH_FLAG_XY_SCALE             0x40
+#define FT_SUBGLYPH_FLAG_2X2                  0x80
+#define FT_SUBGLYPH_FLAG_USE_MY_METRICS      0x200
+#endif
+
+
+  typedef struct  FT_SubGlyphRec_
+  {
+    FT_Int     index;
+    FT_UShort  flags;
+    FT_Int     arg1;
+    FT_Int     arg2;
+    FT_Matrix  transform;
+
+  } FT_SubGlyphRec;
+
+
+  typedef struct  FT_GlyphLoadRec_
+  {
+    FT_Outline   outline;       /* outline             */
+    FT_Vector*   extra_points;  /* extra points table  */
+    FT_UInt      num_subglyphs; /* number of subglyphs */
+    FT_SubGlyph  subglyphs;     /* subglyphs           */
+
+  } FT_GlyphLoadRec, *FT_GlyphLoad;
+
+
+  typedef struct  FT_GlyphLoaderRec_
+  {
+    FT_Memory        memory;
+    FT_UInt          max_points;
+    FT_UInt          max_contours;
+    FT_UInt          max_subglyphs;
+    FT_Bool          use_extra;
+
+    FT_GlyphLoadRec  base;
+    FT_GlyphLoadRec  current;
+
+    void*            other;            /* for possible future extension? */
+
+  } FT_GlyphLoaderRec;
+
+
+  /* create new empty glyph loader */
+  FT_BASE( FT_Error )
+  FT_GlyphLoader_New( FT_Memory        memory,
+                      FT_GlyphLoader  *aloader );
+
+  /* add an extra points table to a glyph loader */
+  FT_BASE( FT_Error )
+  FT_GlyphLoader_CreateExtra( FT_GlyphLoader  loader );
+
+  /* destroy a glyph loader */
+  FT_BASE( void )
+  FT_GlyphLoader_Done( FT_GlyphLoader  loader );
+
+  /* reset a glyph loader (frees everything int it) */
+  FT_BASE( void )
+  FT_GlyphLoader_Reset( FT_GlyphLoader  loader );
+
+  /* rewind a glyph loader */
+  FT_BASE( void )
+  FT_GlyphLoader_Rewind( FT_GlyphLoader  loader );
+
+  /* check that there is enough space to add `n_points' and `n_contours' */
+  /* to the glyph loader                                                 */
+  FT_BASE( FT_Error )
+  FT_GlyphLoader_CheckPoints( FT_GlyphLoader  loader,
+                              FT_UInt         n_points,
+                              FT_UInt         n_contours );
+
+
+#define FT_GLYPHLOADER_CHECK_P( _loader, _count )                    \
+   ( (_count) == 0 || (int)((_loader)->base.outline.n_points    +    \
+                            (_loader)->current.outline.n_points +    \
+                            (_count)) <= (int)(_loader)->max_points )
+
+#define FT_GLYPHLOADER_CHECK_C( _loader, _count )                     \
+  ( (_count) == 0 || (int)((_loader)->base.outline.n_contours    +    \
+                           (_loader)->current.outline.n_contours +    \
+                           (_count)) <= (int)(_loader)->max_contours )
+
+#define FT_GLYPHLOADER_CHECK_POINTS( _loader, _points,_contours )      \
+  ( ( FT_GLYPHLOADER_CHECK_P( _loader, _points )   &&                  \
+      FT_GLYPHLOADER_CHECK_C( _loader, _contours ) )                   \
+    ? 0                                                                \
+    : FT_GlyphLoader_CheckPoints( (_loader), (_points), (_contours) ) )
+
+
+  /* check that there is enough space to add `n_subs' sub-glyphs to */
+  /* a glyph loader                                                 */
+  FT_BASE( FT_Error )
+  FT_GlyphLoader_CheckSubGlyphs( FT_GlyphLoader  loader,
+                                 FT_UInt         n_subs );
+
+  /* prepare a glyph loader, i.e. empty the current glyph */
+  FT_BASE( void )
+  FT_GlyphLoader_Prepare( FT_GlyphLoader  loader );
+
+  /* add the current glyph to the base glyph */
+  FT_BASE( void )
+  FT_GlyphLoader_Add( FT_GlyphLoader  loader );
+
+  /* copy points from one glyph loader to another */
+  FT_BASE( FT_Error )
+  FT_GlyphLoader_CopyPoints( FT_GlyphLoader  target,
+                             FT_GlyphLoader  source );
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTGLOADR_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/ftmemory.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,333 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftmemory.h                                                             */
+/*                                                                         */
+/*    The FreeType memory management macros (specification).               */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2004, 2005, 2006 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, FTL.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 __FTMEMORY_H__
+#define __FTMEMORY_H__
+
+
+#include <ft2build.h>
+#include FT_CONFIG_CONFIG_H
+#include FT_TYPES_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Macro>                                                               */
+  /*    FT_SET_ERROR                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This macro is used to set an implicit `error' variable to a given  */
+  /*    expression's value (usually a function call), and convert it to a  */
+  /*    boolean which is set whenever the value is != 0.                   */
+  /*                                                                       */
+#undef  FT_SET_ERROR
+#define FT_SET_ERROR( expression ) \
+          ( ( error = (expression) ) != 0 )
+
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /****                           M E M O R Y                           ****/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*
+   *  C++ refuses to handle statements like p = (void*)anything; where `p'
+   *  is a typed pointer.  Since we don't have a `typeof' operator in
+   *  standard C++, we have to use ugly casts.
+   */
+
+#ifdef __cplusplus
+#define FT_ASSIGNP( p, val )  *((void**)&(p)) = (val)
+#else
+#define FT_ASSIGNP( p, val )  (p) = (val)
+#endif
+
+
+
+#ifdef FT_DEBUG_MEMORY
+
+  FT_BASE( const char* )  _ft_debug_file;
+  FT_BASE( long )         _ft_debug_lineno;
+
+#define FT_DEBUG_INNER( exp )  ( _ft_debug_file   = __FILE__, \
+                                 _ft_debug_lineno = __LINE__, \
+                                 (exp) )
+
+#define FT_ASSIGNP_INNER( p, exp )  ( _ft_debug_file   = __FILE__, \
+                                      _ft_debug_lineno = __LINE__, \
+                                      FT_ASSIGNP( p, exp ) )
+
+#else /* !FT_DEBUG_MEMORY */
+
+#define FT_DEBUG_INNER( exp )       (exp)
+#define FT_ASSIGNP_INNER( p, exp )  FT_ASSIGNP( p, exp )
+
+#endif /* !FT_DEBUG_MEMORY */
+
+
+  /*
+   *  The allocation functions return a pointer, and the error code
+   *  is written to through the `p_error' parameter.  See below for
+   *  for documentation.
+   */
+
+  FT_BASE( FT_Pointer )
+  ft_mem_alloc( FT_Memory  memory,
+                FT_Long    size,
+                FT_Error  *p_error );
+
+  FT_BASE( FT_Pointer )
+  ft_mem_qalloc( FT_Memory  memory,
+                 FT_Long    size,
+                 FT_Error  *p_error );
+
+  FT_BASE( FT_Pointer )
+  ft_mem_realloc( FT_Memory  memory,
+                  FT_Long    item_size,
+                  FT_Long    cur_count,
+                  FT_Long    new_count,
+                  void*      block,
+                  FT_Error  *p_error );
+
+  FT_BASE( FT_Pointer )
+  ft_mem_qrealloc( FT_Memory  memory,
+                   FT_Long    item_size,
+                   FT_Long    cur_count,
+                   FT_Long    new_count,
+                   void*      block,
+                   FT_Error  *p_error );
+
+  FT_BASE( void )
+  ft_mem_free( FT_Memory    memory,
+               const void*  P );
+
+
+#define FT_MEM_ALLOC( ptr, size )                                         \
+          FT_ASSIGNP_INNER( ptr, ft_mem_alloc( memory, (size), &error ) )
+
+#define FT_MEM_FREE( ptr )                \
+          FT_BEGIN_STMNT                  \
+            ft_mem_free( memory, (ptr) ); \
+            (ptr) = NULL;                 \
+          FT_END_STMNT
+
+#define FT_MEM_NEW( ptr )                        \
+          FT_MEM_ALLOC( ptr, sizeof ( *(ptr) ) )
+
+#define FT_MEM_REALLOC( ptr, cursz, newsz )                        \
+          FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, 1,        \
+                                                 (cursz), (newsz), \
+                                                 (ptr), &error ) )
+
+#define FT_MEM_QALLOC( ptr, size )                                         \
+          FT_ASSIGNP_INNER( ptr, ft_mem_qalloc( memory, (size), &error ) )
+
+#define FT_MEM_QNEW( ptr )                        \
+          FT_MEM_QALLOC( ptr, sizeof ( *(ptr) ) )
+
+#define FT_MEM_QREALLOC( ptr, cursz, newsz )                         \
+          FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, 1,        \
+                                                  (cursz), (newsz), \
+                                                  (ptr), &error ) )
+
+#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz )                             \
+          FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \
+                                                  (cursz), (newsz),          \
+                                                  (ptr), &error ) )
+
+#define FT_MEM_ALLOC_MULT( ptr, count, item_size )                    \
+          FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, (item_size), \
+                                                 0, (count),          \
+                                                 NULL, &error ) )
+
+#define FT_MEM_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz )            \
+          FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, (itmsz),    \
+                                                 (oldcnt), (newcnt), \
+                                                 (ptr), &error ) )
+
+#define FT_MEM_QALLOC_MULT( ptr, count, item_size )                    \
+          FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, (item_size), \
+                                                  0, (count),          \
+                                                  NULL, &error ) )
+
+#define FT_MEM_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz)             \
+          FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, (itmsz),    \
+                                                  (oldcnt), (newcnt), \
+                                                  (ptr), &error ) )
+
+
+#define FT_MEM_SET_ERROR( cond )  ( (cond), error != 0 )
+
+
+#define FT_MEM_SET( dest, byte, count )     ft_memset( dest, byte, count )
+
+#define FT_MEM_COPY( dest, source, count )  ft_memcpy( dest, source, count )
+
+#define FT_MEM_MOVE( dest, source, count )  ft_memmove( dest, source, count )
+
+
+#define FT_MEM_ZERO( dest, count )  FT_MEM_SET( dest, 0, count )
+
+#define FT_ZERO( p )                FT_MEM_ZERO( p, sizeof ( *(p) ) )
+
+
+#define FT_ARRAY_ZERO( dest, count )                        \
+          FT_MEM_ZERO( dest, (count) * sizeof ( *(dest) ) )
+
+#define FT_ARRAY_COPY( dest, source, count )                        \
+          FT_MEM_COPY( dest, source, (count) * sizeof ( *(dest) ) )
+
+#define FT_ARRAY_MOVE( dest, source, count )                        \
+          FT_MEM_MOVE( dest, source, (count) * sizeof ( *(dest) ) )
+
+
+  /*
+   *  Return the maximum number of adressable elements in an array.
+   *  We limit ourselves to INT_MAX, rather than UINT_MAX, to avoid
+   *  any problems.
+   */
+#define FT_ARRAY_MAX( ptr )           ( FT_INT_MAX / sizeof ( *(ptr) ) )
+
+#define FT_ARRAY_CHECK( ptr, count )  ( (count) <= FT_ARRAY_MAX( ptr ) )
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* The following functions macros expect that their pointer argument is  */
+  /* _typed_ in order to automatically compute array element sizes.        */
+  /*                                                                       */
+
+#define FT_MEM_NEW_ARRAY( ptr, count )                                      \
+          FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, sizeof ( *(ptr) ), \
+                                                 0, (count),                \
+                                                 NULL, &error ) )
+
+#define FT_MEM_RENEW_ARRAY( ptr, cursz, newsz )                             \
+          FT_ASSIGNP_INNER( ptr, ft_mem_realloc( memory, sizeof ( *(ptr) ), \
+                                                 (cursz), (newsz),          \
+                                                 (ptr), &error ) )
+
+#define FT_MEM_QNEW_ARRAY( ptr, count )                                      \
+          FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \
+                                                  0, (count),                \
+                                                  NULL, &error ) )
+
+#define FT_MEM_QRENEW_ARRAY( ptr, cursz, newsz )                             \
+          FT_ASSIGNP_INNER( ptr, ft_mem_qrealloc( memory, sizeof ( *(ptr) ), \
+                                                  (cursz), (newsz),          \
+                                                  (ptr), &error ) )
+
+
+#define FT_ALLOC( ptr, size )                           \
+          FT_MEM_SET_ERROR( FT_MEM_ALLOC( ptr, size ) )
+
+#define FT_REALLOC( ptr, cursz, newsz )                           \
+          FT_MEM_SET_ERROR( FT_MEM_REALLOC( ptr, cursz, newsz ) )
+
+#define FT_ALLOC_MULT( ptr, count, item_size )                           \
+          FT_MEM_SET_ERROR( FT_MEM_ALLOC_MULT( ptr, count, item_size ) )
+
+#define FT_REALLOC_MULT( ptr, oldcnt, newcnt, itmsz )              \
+          FT_MEM_SET_ERROR( FT_MEM_REALLOC_MULT( ptr, oldcnt,      \
+                                                 newcnt, itmsz ) )
+
+#define FT_QALLOC( ptr, size )                           \
+          FT_MEM_SET_ERROR( FT_MEM_QALLOC( ptr, size ) )
+
+#define FT_QREALLOC( ptr, cursz, newsz )                           \
+          FT_MEM_SET_ERROR( FT_MEM_QREALLOC( ptr, cursz, newsz ) )
+
+#define FT_QALLOC_MULT( ptr, count, item_size )                           \
+          FT_MEM_SET_ERROR( FT_MEM_QALLOC_MULT( ptr, count, item_size ) )
+
+#define FT_QREALLOC_MULT( ptr, oldcnt, newcnt, itmsz )              \
+          FT_MEM_SET_ERROR( FT_MEM_QREALLOC_MULT( ptr, oldcnt,      \
+                                                  newcnt, itmsz ) )
+
+#define FT_FREE( ptr )  FT_MEM_FREE( ptr )
+
+#define FT_NEW( ptr )  FT_MEM_SET_ERROR( FT_MEM_NEW( ptr ) )
+
+#define FT_NEW_ARRAY( ptr, count )                           \
+          FT_MEM_SET_ERROR( FT_MEM_NEW_ARRAY( ptr, count ) )
+
+#define FT_RENEW_ARRAY( ptr, curcnt, newcnt )                           \
+          FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) )
+
+#define FT_QNEW( ptr )                           \
+          FT_MEM_SET_ERROR( FT_MEM_QNEW( ptr ) )
+
+#define FT_QNEW_ARRAY( ptr, count )                          \
+          FT_MEM_SET_ERROR( FT_MEM_NEW_ARRAY( ptr, count ) )
+
+#define FT_QRENEW_ARRAY( ptr, curcnt, newcnt )                          \
+          FT_MEM_SET_ERROR( FT_MEM_RENEW_ARRAY( ptr, curcnt, newcnt ) )
+
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+  FT_BASE( FT_Error )
+  FT_Alloc( FT_Memory  memory,
+            FT_Long    size,
+            void*     *P );
+
+  FT_BASE( FT_Error )
+  FT_QAlloc( FT_Memory  memory,
+             FT_Long    size,
+             void*     *p );
+
+  FT_BASE( FT_Error )
+  FT_Realloc( FT_Memory  memory,
+              FT_Long    current,
+              FT_Long    size,
+              void*     *P );
+
+  FT_BASE( FT_Error )
+  FT_QRealloc( FT_Memory  memory,
+               FT_Long    current,
+               FT_Long    size,
+               void*     *p );
+
+  FT_BASE( void )
+  FT_Free( FT_Memory  memory,
+           void*     *P );
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
+
+ /* */
+
+
+FT_END_HEADER
+
+#endif /* __FTMEMORY_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/ftobjs.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,780 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftobjs.h                                                               */
+/*                                                                         */
+/*    The FreeType private base classes (specification).                   */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 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, FTL.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*  This file contains the definition of all internal FreeType classes.  */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FTOBJS_H__
+#define __FTOBJS_H__
+
+#include <ft2build.h>
+#include FT_RENDER_H
+#include FT_SIZES_H
+#include FT_INTERNAL_MEMORY_H
+#include FT_INTERNAL_GLYPH_LOADER_H
+#include FT_INTERNAL_DRIVER_H
+#include FT_INTERNAL_AUTOHINT_H
+#include FT_INTERNAL_SERVICE_H
+
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+#include FT_INCREMENTAL_H
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Some generic definitions.                                             */
+  /*                                                                       */
+#ifndef TRUE
+#define TRUE  1
+#endif
+
+#ifndef FALSE
+#define FALSE  0
+#endif
+
+#ifndef NULL
+#define NULL  (void*)0
+#endif
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* The min and max functions missing in C.  As usual, be careful not to  */
+  /* write things like FT_MIN( a++, b++ ) to avoid side effects.           */
+  /*                                                                       */
+#define FT_MIN( a, b )  ( (a) < (b) ? (a) : (b) )
+#define FT_MAX( a, b )  ( (a) > (b) ? (a) : (b) )
+
+#define FT_ABS( a )     ( (a) < 0 ? -(a) : (a) )
+
+
+#define FT_PAD_FLOOR( x, n )  ( (x) & ~((n)-1) )
+#define FT_PAD_ROUND( x, n )  FT_PAD_FLOOR( (x) + ((n)/2), n )
+#define FT_PAD_CEIL( x, n )   FT_PAD_FLOOR( (x) + ((n)-1), n )
+
+#define FT_PIX_FLOOR( x )     ( (x) & ~63 )
+#define FT_PIX_ROUND( x )     FT_PIX_FLOOR( (x) + 32 )
+#define FT_PIX_CEIL( x )      FT_PIX_FLOOR( (x) + 63 )
+
+
+  /*
+   *  Return the highest power of 2 that is <= value; this correspond to
+   *  the highest bit in a given 32-bit value.
+   */
+  FT_BASE( FT_UInt32 )
+  ft_highpow2( FT_UInt32  value );
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /****                       C H A R M A P S                           ****/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  /* handle to internal charmap object */
+  typedef struct FT_CMapRec_*              FT_CMap;
+
+  /* handle to charmap class structure */
+  typedef const struct FT_CMap_ClassRec_*  FT_CMap_Class;
+
+  /* internal charmap object structure */
+  typedef struct  FT_CMapRec_
+  {
+    FT_CharMapRec  charmap;
+    FT_CMap_Class  clazz;
+
+  } FT_CMapRec;
+
+  /* typecase any pointer to a charmap handle */
+#define FT_CMAP( x )              ((FT_CMap)( x ))
+
+  /* obvious macros */
+#define FT_CMAP_PLATFORM_ID( x )  FT_CMAP( x )->charmap.platform_id
+#define FT_CMAP_ENCODING_ID( x )  FT_CMAP( x )->charmap.encoding_id
+#define FT_CMAP_ENCODING( x )     FT_CMAP( x )->charmap.encoding
+#define FT_CMAP_FACE( x )         FT_CMAP( x )->charmap.face
+
+
+  /* class method definitions */
+  typedef FT_Error
+  (*FT_CMap_InitFunc)( FT_CMap     cmap,
+                       FT_Pointer  init_data );
+
+  typedef void
+  (*FT_CMap_DoneFunc)( FT_CMap  cmap );
+
+  typedef FT_UInt
+  (*FT_CMap_CharIndexFunc)( FT_CMap    cmap,
+                            FT_UInt32  char_code );
+
+  typedef FT_UInt
+  (*FT_CMap_CharNextFunc)( FT_CMap     cmap,
+                           FT_UInt32  *achar_code );
+
+
+  typedef struct  FT_CMap_ClassRec_
+  {
+    FT_ULong               size;
+    FT_CMap_InitFunc       init;
+    FT_CMap_DoneFunc       done;
+    FT_CMap_CharIndexFunc  char_index;
+    FT_CMap_CharNextFunc   char_next;
+
+  } FT_CMap_ClassRec;
+
+
+  /* create a new charmap and add it to charmap->face */
+  FT_BASE( FT_Error )
+  FT_CMap_New( FT_CMap_Class  clazz,
+               FT_Pointer     init_data,
+               FT_CharMap     charmap,
+               FT_CMap       *acmap );
+
+  /* destroy a charmap and remove it from face's list */
+  FT_BASE( void )
+  FT_CMap_Done( FT_CMap  cmap );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Face_InternalRec                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This structure contains the internal fields of each FT_Face        */
+  /*    object.  These fields may change between different releases of     */
+  /*    FreeType.                                                          */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    max_points ::                                                      */
+  /*      The maximal number of points used to store the vectorial outline */
+  /*      of any glyph in this face.  If this value cannot be known in     */
+  /*      advance, or if the face isn't scalable, this should be set to 0. */
+  /*      Only relevant for scalable formats.                              */
+  /*                                                                       */
+  /*    max_contours ::                                                    */
+  /*      The maximal number of contours used to store the vectorial       */
+  /*      outline of any glyph in this face.  If this value cannot be      */
+  /*      known in advance, or if the face isn't scalable, this should be  */
+  /*      set to 0.  Only relevant for scalable formats.                   */
+  /*                                                                       */
+  /*    transform_matrix ::                                                */
+  /*      A 2x2 matrix of 16.16 coefficients used to transform glyph       */
+  /*      outlines after they are loaded from the font.  Only used by the  */
+  /*      convenience functions.                                           */
+  /*                                                                       */
+  /*    transform_delta ::                                                 */
+  /*      A translation vector used to transform glyph outlines after they */
+  /*      are loaded from the font.  Only used by the convenience          */
+  /*      functions.                                                       */
+  /*                                                                       */
+  /*    transform_flags ::                                                 */
+  /*      Some flags used to classify the transform.  Only used by the     */
+  /*      convenience functions.                                           */
+  /*                                                                       */
+  /*    services ::                                                        */
+  /*      A cache for frequently used services.  It should be only         */
+  /*      accessed with the macro `FT_FACE_LOOKUP_SERVICE'.                */
+  /*                                                                       */
+  /*    incremental_interface ::                                           */
+  /*      If non-null, the interface through which glyph data and metrics  */
+  /*      are loaded incrementally for faces that do not provide all of    */
+  /*      this data when first opened.  This field exists only if          */
+  /*      @FT_CONFIG_OPTION_INCREMENTAL is defined.                        */
+  /*                                                                       */
+  typedef struct  FT_Face_InternalRec_
+  {
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+    FT_UShort           reserved1;
+    FT_Short            reserved2;
+#endif
+    FT_Matrix           transform_matrix;
+    FT_Vector           transform_delta;
+    FT_Int              transform_flags;
+
+    FT_ServiceCacheRec  services;
+
+#ifdef FT_CONFIG_OPTION_INCREMENTAL
+    FT_Incremental_InterfaceRec*  incremental_interface;
+#endif
+
+  } FT_Face_InternalRec;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_Slot_InternalRec                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This structure contains the internal fields of each FT_GlyphSlot   */
+  /*    object.  These fields may change between different releases of     */
+  /*    FreeType.                                                          */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    loader            :: The glyph loader object used to load outlines */
+  /*                         into the glyph slot.                          */
+  /*                                                                       */
+  /*    flags             :: Possible values are zero or                   */
+  /*                         FT_GLYPH_OWN_BITMAP.  The latter indicates    */
+  /*                         that the FT_GlyphSlot structure owns the      */
+  /*                         bitmap buffer.                                */
+  /*                                                                       */
+  /*    glyph_transformed :: Boolean.  Set to TRUE when the loaded glyph   */
+  /*                         must be transformed through a specific        */
+  /*                         font transformation.  This is _not_ the same  */
+  /*                         as the face transform set through             */
+  /*                         FT_Set_Transform().                           */
+  /*                                                                       */
+  /*    glyph_matrix      :: The 2x2 matrix corresponding to the glyph     */
+  /*                         transformation, if necessary.                 */
+  /*                                                                       */
+  /*    glyph_delta       :: The 2d translation vector corresponding to    */
+  /*                         the glyph transformation, if necessary.       */
+  /*                                                                       */
+  /*    glyph_hints       :: Format-specific glyph hints management.       */
+  /*                                                                       */
+
+#define FT_GLYPH_OWN_BITMAP  0x1
+
+  typedef struct  FT_Slot_InternalRec_
+  {
+    FT_GlyphLoader  loader;
+    FT_UInt         flags;
+    FT_Bool         glyph_transformed;
+    FT_Matrix       glyph_matrix;
+    FT_Vector       glyph_delta;
+    void*           glyph_hints;
+
+  } FT_GlyphSlot_InternalRec;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /****                         M O D U L E S                           ****/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_ModuleRec                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A module object instance.                                          */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    clazz   :: A pointer to the module's class.                        */
+  /*                                                                       */
+  /*    library :: A handle to the parent library object.                  */
+  /*                                                                       */
+  /*    memory  :: A handle to the memory manager.                         */
+  /*                                                                       */
+  /*    generic :: A generic structure for user-level extensibility (?).   */
+  /*                                                                       */
+  typedef struct  FT_ModuleRec_
+  {
+    FT_Module_Class*  clazz;
+    FT_Library        library;
+    FT_Memory         memory;
+    FT_Generic        generic;
+
+  } FT_ModuleRec;
+
+
+  /* typecast an object to a FT_Module */
+#define FT_MODULE( x )          ((FT_Module)( x ))
+#define FT_MODULE_CLASS( x )    FT_MODULE( x )->clazz
+#define FT_MODULE_LIBRARY( x )  FT_MODULE( x )->library
+#define FT_MODULE_MEMORY( x )   FT_MODULE( x )->memory
+
+
+#define FT_MODULE_IS_DRIVER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
+                                    FT_MODULE_FONT_DRIVER )
+
+#define FT_MODULE_IS_RENDERER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
+                                      FT_MODULE_RENDERER )
+
+#define FT_MODULE_IS_HINTER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
+                                    FT_MODULE_HINTER )
+
+#define FT_MODULE_IS_STYLER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
+                                    FT_MODULE_STYLER )
+
+#define FT_DRIVER_IS_SCALABLE( x )  ( FT_MODULE_CLASS( x )->module_flags & \
+                                      FT_MODULE_DRIVER_SCALABLE )
+
+#define FT_DRIVER_USES_OUTLINES( x )  !( FT_MODULE_CLASS( x )->module_flags & \
+                                         FT_MODULE_DRIVER_NO_OUTLINES )
+
+#define FT_DRIVER_HAS_HINTER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
+                                     FT_MODULE_DRIVER_HAS_HINTER )
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Get_Module_Interface                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Finds a module and returns its specific interface as a typeless    */
+  /*    pointer.                                                           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library     :: A handle to the library object.                     */
+  /*                                                                       */
+  /*    module_name :: The module's name (as an ASCII string).             */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    A module-specific interface if available, 0 otherwise.             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    You should better be familiar with FreeType internals to know      */
+  /*    which module to look for, and what its interface is :-)            */
+  /*                                                                       */
+  FT_BASE( const void* )
+  FT_Get_Module_Interface( FT_Library   library,
+                           const char*  mod_name );
+
+  FT_BASE( FT_Pointer )
+  ft_module_get_service( FT_Module    module,
+                         const char*  service_id );
+
+ /* */
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /****               FACE, SIZE & GLYPH SLOT OBJECTS                   ****/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  /* a few macros used to perform easy typecasts with minimal brain damage */
+
+#define FT_FACE( x )          ((FT_Face)(x))
+#define FT_SIZE( x )          ((FT_Size)(x))
+#define FT_SLOT( x )          ((FT_GlyphSlot)(x))
+
+#define FT_FACE_DRIVER( x )   FT_FACE( x )->driver
+#define FT_FACE_LIBRARY( x )  FT_FACE_DRIVER( x )->root.library
+#define FT_FACE_MEMORY( x )   FT_FACE( x )->memory
+#define FT_FACE_STREAM( x )   FT_FACE( x )->stream
+
+#define FT_SIZE_FACE( x )     FT_SIZE( x )->face
+#define FT_SLOT_FACE( x )     FT_SLOT( x )->face
+
+#define FT_FACE_SLOT( x )     FT_FACE( x )->glyph
+#define FT_FACE_SIZE( x )     FT_FACE( x )->size
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_GlyphSlot                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    It is sometimes useful to have more than one glyph slot for a      */
+  /*    given face object.  This function is used to create additional     */
+  /*    slots.  All of them are automatically discarded when the face is   */
+  /*    destroyed.                                                         */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face  :: A handle to a parent face object.                         */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    aslot :: A handle to a new glyph slot object.                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  FT_BASE( FT_Error )
+  FT_New_GlyphSlot( FT_Face        face,
+                    FT_GlyphSlot  *aslot );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Done_GlyphSlot                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Destroys a given glyph slot.  Remember however that all slots are  */
+  /*    automatically destroyed with its parent.  Using this function is   */
+  /*    not always mandatory.                                              */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    slot :: A handle to a target glyph slot.                           */
+  /*                                                                       */
+  FT_BASE( void )
+  FT_Done_GlyphSlot( FT_GlyphSlot  slot );
+
+ /* */
+
+#define FT_REQUEST_WIDTH( req )                                            \
+          ( (req)->horiResolution                                          \
+              ? (FT_Pos)( (req)->width * (req)->horiResolution + 36 ) / 72 \
+              : (req)->width )
+
+#define FT_REQUEST_HEIGHT( req )                                            \
+          ( (req)->vertResolution                                           \
+              ? (FT_Pos)( (req)->height * (req)->vertResolution + 36 ) / 72 \
+              : (req)->height )
+
+
+  /* Set the metrics according to a bitmap strike. */
+  FT_BASE( void )
+  FT_Select_Metrics( FT_Face   face,
+                     FT_ULong  strike_index );
+
+
+  /* Set the metrics according to a size request. */
+  FT_BASE( void )
+  FT_Request_Metrics( FT_Face          face,
+                      FT_Size_Request  req );
+
+
+  /* Match a size request against `available_sizes'. */
+  FT_BASE( FT_Error )
+  FT_Match_Size( FT_Face          face,
+                 FT_Size_Request  req,
+                 FT_Bool          ignore_width,
+                 FT_ULong*        size_index );
+
+
+  /* Use the horizontal metrics to synthesize the vertical metrics. */
+  /* If `advance' is zero, it is also synthesized.                  */
+  FT_BASE( void )
+  ft_synthesize_vertical_metrics( FT_Glyph_Metrics*  metrics,
+                                  FT_Pos             advance );
+
+
+  /* Free the bitmap of a given glyphslot when needed (i.e., only when it */
+  /* was allocated with ft_glyphslot_alloc_bitmap).                       */
+  FT_BASE( void )
+  ft_glyphslot_free_bitmap( FT_GlyphSlot  slot );
+
+
+  /* Allocate a new bitmap buffer in a glyph slot. */
+  FT_BASE( FT_Error )
+  ft_glyphslot_alloc_bitmap( FT_GlyphSlot  slot,
+                             FT_ULong      size );
+
+
+  /* Set the bitmap buffer in a glyph slot to a given pointer.  The buffer */
+  /* will not be freed by a later call to ft_glyphslot_free_bitmap.        */
+  FT_BASE( void )
+  ft_glyphslot_set_bitmap( FT_GlyphSlot  slot,
+                           FT_Byte*      buffer );
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /****                        R E N D E R E R S                        ****/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+#define FT_RENDERER( x )      ((FT_Renderer)( x ))
+#define FT_GLYPH( x )         ((FT_Glyph)( x ))
+#define FT_BITMAP_GLYPH( x )  ((FT_BitmapGlyph)( x ))
+#define FT_OUTLINE_GLYPH( x ) ((FT_OutlineGlyph)( x ))
+
+
+  typedef struct  FT_RendererRec_
+  {
+    FT_ModuleRec            root;
+    FT_Renderer_Class*      clazz;
+    FT_Glyph_Format         glyph_format;
+    FT_Glyph_Class          glyph_class;
+
+    FT_Raster               raster;
+    FT_Raster_Render_Func   raster_render;
+    FT_Renderer_RenderFunc  render;
+
+  } FT_RendererRec;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /****                    F O N T   D R I V E R S                      ****/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /* typecast a module into a driver easily */
+#define FT_DRIVER( x )        ((FT_Driver)(x))
+
+  /* typecast a module as a driver, and get its driver class */
+#define FT_DRIVER_CLASS( x )  FT_DRIVER( x )->clazz
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_DriverRec                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The root font driver class.  A font driver is responsible for      */
+  /*    managing and loading font files of a given format.                 */
+  /*                                                                       */
+  /*  <Fields>                                                             */
+  /*     root         :: Contains the fields of the root module class.     */
+  /*                                                                       */
+  /*     clazz        :: A pointer to the font driver's class.  Note that  */
+  /*                     this is NOT root.clazz.  `class' wasn't used      */
+  /*                     as it is a reserved word in C++.                  */
+  /*                                                                       */
+  /*     faces_list   :: The list of faces currently opened by this        */
+  /*                     driver.                                           */
+  /*                                                                       */
+  /*     extensions   :: A typeless pointer to the driver's extensions     */
+  /*                     registry, if they are supported through the       */
+  /*                     configuration macro FT_CONFIG_OPTION_EXTENSIONS.  */
+  /*                                                                       */
+  /*     glyph_loader :: The glyph loader for all faces managed by this    */
+  /*                     driver.  This object isn't defined for unscalable */
+  /*                     formats.                                          */
+  /*                                                                       */
+  typedef struct  FT_DriverRec_
+  {
+    FT_ModuleRec     root;
+    FT_Driver_Class  clazz;
+
+    FT_ListRec       faces_list;
+    void*            extensions;
+
+    FT_GlyphLoader   glyph_loader;
+
+  } FT_DriverRec;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /****                       L I B R A R I E S                         ****/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /* This hook is used by the TrueType debugger.  It must be set to an */
+  /* alternate truetype bytecode interpreter function.                 */
+#define FT_DEBUG_HOOK_TRUETYPE            0
+
+
+  /* Set this debug hook to a non-null pointer to force unpatented hinting */
+  /* for all faces when both TT_CONFIG_OPTION_BYTECODE_INTERPRETER and     */
+  /* TT_CONFIG_OPTION_UNPATENTED_HINTING are defined. this is only used    */
+  /* during debugging.                                                     */
+#define FT_DEBUG_HOOK_UNPATENTED_HINTING  1
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    FT_LibraryRec                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The FreeType library class.  This is the root of all FreeType      */
+  /*    data.  Use FT_New_Library() to create a library object, and        */
+  /*    FT_Done_Library() to discard it and all child objects.             */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    memory           :: The library's memory object.  Manages memory   */
+  /*                        allocation.                                    */
+  /*                                                                       */
+  /*    generic          :: Client data variable.  Used to extend the      */
+  /*                        Library class by higher levels and clients.    */
+  /*                                                                       */
+  /*    version_major    :: The major version number of the library.       */
+  /*                                                                       */
+  /*    version_minor    :: The minor version number of the library.       */
+  /*                                                                       */
+  /*    version_patch    :: The current patch level of the library.        */
+  /*                                                                       */
+  /*    num_modules      :: The number of modules currently registered     */
+  /*                        within this library.  This is set to 0 for new */
+  /*                        libraries.  New modules are added through the  */
+  /*                        FT_Add_Module() API function.                  */
+  /*                                                                       */
+  /*    modules          :: A table used to store handles to the currently */
+  /*                        registered modules. Note that each font driver */
+  /*                        contains a list of its opened faces.           */
+  /*                                                                       */
+  /*    renderers        :: The list of renderers currently registered     */
+  /*                        within the library.                            */
+  /*                                                                       */
+  /*    cur_renderer     :: The current outline renderer.  This is a       */
+  /*                        shortcut used to avoid parsing the list on     */
+  /*                        each call to FT_Outline_Render().  It is a     */
+  /*                        handle to the current renderer for the         */
+  /*                        FT_GLYPH_FORMAT_OUTLINE format.                */
+  /*                                                                       */
+  /*    auto_hinter      :: XXX                                            */
+  /*                                                                       */
+  /*    raster_pool      :: The raster object's render pool.  This can     */
+  /*                        ideally be changed dynamically at run-time.    */
+  /*                                                                       */
+  /*    raster_pool_size :: The size of the render pool in bytes.          */
+  /*                                                                       */
+  /*    debug_hooks      :: XXX                                            */
+  /*                                                                       */
+  typedef struct  FT_LibraryRec_
+  {
+    FT_Memory          memory;           /* library's memory manager */
+
+    FT_Generic         generic;
+
+    FT_Int             version_major;
+    FT_Int             version_minor;
+    FT_Int             version_patch;
+
+    FT_UInt            num_modules;
+    FT_Module          modules[FT_MAX_MODULES];  /* module objects  */
+
+    FT_ListRec         renderers;        /* list of renderers        */
+    FT_Renderer        cur_renderer;     /* current outline renderer */
+    FT_Module          auto_hinter;
+
+    FT_Byte*           raster_pool;      /* scan-line conversion */
+                                         /* render pool          */
+    FT_ULong           raster_pool_size; /* size of render pool in bytes */
+
+    FT_DebugHook_Func  debug_hooks[4];
+
+  } FT_LibraryRec;
+
+
+  FT_BASE( FT_Renderer )
+  FT_Lookup_Renderer( FT_Library       library,
+                      FT_Glyph_Format  format,
+                      FT_ListNode*     node );
+
+  FT_BASE( FT_Error )
+  FT_Render_Glyph_Internal( FT_Library      library,
+                            FT_GlyphSlot    slot,
+                            FT_Render_Mode  render_mode );
+
+  typedef const char*
+  (*FT_Face_GetPostscriptNameFunc)( FT_Face  face );
+
+  typedef FT_Error
+  (*FT_Face_GetGlyphNameFunc)( FT_Face     face,
+                               FT_UInt     glyph_index,
+                               FT_Pointer  buffer,
+                               FT_UInt     buffer_max );
+
+  typedef FT_UInt
+  (*FT_Face_GetGlyphNameIndexFunc)( FT_Face     face,
+                                    FT_String*  glyph_name );
+
+
+#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_New_Memory                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Creates a new memory object.                                       */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    A pointer to the new memory object.  0 in case of error.           */
+  /*                                                                       */
+  FT_BASE( FT_Memory )
+  FT_New_Memory( void );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Done_Memory                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Discards memory manager.                                           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    memory :: A handle to the memory manager.                          */
+  /*                                                                       */
+  FT_BASE( void )
+  FT_Done_Memory( FT_Memory  memory );
+
+#endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */
+
+
+  /* Define default raster's interface.  The default raster is located in  */
+  /* `src/base/ftraster.c'.                                                */
+  /*                                                                       */
+  /* Client applications can register new rasters through the              */
+  /* FT_Set_Raster() API.                                                  */
+
+#ifndef FT_NO_DEFAULT_RASTER
+  FT_EXPORT_VAR( FT_Raster_Funcs )  ft_default_raster;
+#endif
+
+
+FT_END_HEADER
+
+#endif /* __FTOBJS_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/ftrfork.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,184 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftrfork.h                                                              */
+/*                                                                         */
+/*    Embedded resource forks accessor (specification).                    */
+/*                                                                         */
+/*  Copyright 2004, 2006 by                                                */
+/*  Masatake YAMATO and Redhat K.K.                                        */
+/*                                                                         */
+/*  This file is part of the FreeType project, and may only be used,       */
+/*  modified, and distributed under the terms of the FreeType project      */
+/*  license, FTL.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+/***************************************************************************/
+/* Development of the code in this file is support of                      */
+/* Information-technology Promotion Agency, Japan.                         */
+/***************************************************************************/
+
+
+#ifndef __FTRFORK_H__
+#define __FTRFORK_H__
+
+
+#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
+
+
+FT_BEGIN_HEADER
+
+
+  /* Number of guessing rules supported in `FT_Raccess_Guess'.            */
+  /* Don't forget to increment the number if you add a new guessing rule. */
+#define FT_RACCESS_N_RULES  8
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Raccess_Guess                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Guess a file name and offset where the actual resource fork is     */
+  /*    stored.  The macro FT_RACCESS_N_RULES holds the number of          */
+  /*    guessing rules;  the guessed result for the Nth rule is            */
+  /*    represented as a triplet: a new file name (new_names[N]), a file   */
+  /*    offset (offsets[N]), and an error code (errors[N]).                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library ::                                                         */
+  /*      A FreeType library instance.                                     */
+  /*                                                                       */
+  /*    stream ::                                                          */
+  /*      A file stream containing the resource fork.                      */
+  /*                                                                       */
+  /*    base_name ::                                                       */
+  /*      The (base) file name of the resource fork used for some          */
+  /*      guessing rules.                                                  */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    new_names ::                                                       */
+  /*      An array of guessed file names in which the resource forks may   */
+  /*      exist.  If `new_names[N]' is NULL, the guessed file name is      */
+  /*      equal to `base_name'.                                            */
+  /*                                                                       */
+  /*    offsets ::                                                         */
+  /*      An array of guessed file offsets.  `offsets[N]' holds the file   */
+  /*      offset of the possible start of the resource fork in file        */
+  /*      `new_names[N]'.                                                  */
+  /*                                                                       */
+  /*    errors ::                                                          */
+  /*      An array of FreeType error codes.  `errors[N]' is the error      */
+  /*      code of Nth guessing rule function.  If `errors[N]' is not       */
+  /*      FT_Err_Ok, `new_names[N]' and `offsets[N]' are meaningless.      */
+  /*                                                                       */
+  FT_BASE( void )
+  FT_Raccess_Guess( FT_Library  library,
+                    FT_Stream   stream,
+                    char*       base_name,
+                    char**      new_names,
+                    FT_Long*    offsets,
+                    FT_Error*   errors );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Raccess_Get_HeaderInfo                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Get the information from the header of resource fork.  The         */
+  /*    information includes the file offset where the resource map        */
+  /*    starts, and the file offset where the resource data starts.        */
+  /*    `FT_Raccess_Get_DataOffsets' requires these two data.              */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library ::                                                         */
+  /*      A FreeType library instance.                                     */
+  /*                                                                       */
+  /*    stream ::                                                          */
+  /*      A file stream containing the resource fork.                      */
+  /*                                                                       */
+  /*    rfork_offset ::                                                    */
+  /*      The file offset where the resource fork starts.                  */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    map_offset ::                                                      */
+  /*      The file offset where the resource map starts.                   */
+  /*                                                                       */
+  /*    rdata_pos ::                                                       */
+  /*      The file offset where the resource data starts.                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  FT_Err_Ok means success.                     */
+  /*                                                                       */
+  FT_BASE( FT_Error )
+  FT_Raccess_Get_HeaderInfo( FT_Library  library,
+                             FT_Stream   stream,
+                             FT_Long     rfork_offset,
+                             FT_Long    *map_offset,
+                             FT_Long    *rdata_pos );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Function>                                                            */
+  /*    FT_Raccess_Get_DataOffsets                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Get the data offsets for a tag in a resource fork.  Offsets are    */
+  /*    stored in an array because, in some cases, resources in a resource */
+  /*    fork have the same tag.                                            */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    library ::                                                         */
+  /*      A FreeType library instance.                                     */
+  /*                                                                       */
+  /*    stream ::                                                          */
+  /*      A file stream containing the resource fork.                      */
+  /*                                                                       */
+  /*    map_offset ::                                                      */
+  /*      The file offset where the resource map starts.                   */
+  /*                                                                       */
+  /*    rdata_pos ::                                                       */
+  /*      The file offset where the resource data starts.                  */
+  /*                                                                       */
+  /*    tag ::                                                             */
+  /*      The resource tag.                                                */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    offsets ::                                                         */
+  /*      The stream offsets for the resource data specified by `tag'.     */
+  /*      This array is allocated by the function, so you have to call     */
+  /*      @ft_mem_free after use.                                          */
+  /*                                                                       */
+  /*    count ::                                                           */
+  /*      The length of offsets array.                                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  FT_Err_Ok means success.                     */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    Normally you should use `FT_Raccess_Get_HeaderInfo' to get the     */
+  /*    value for `map_offset' and `rdata_pos'.                            */
+  /*                                                                       */
+  FT_BASE( FT_Error )
+  FT_Raccess_Get_DataOffsets( FT_Library  library,
+                              FT_Stream   stream,
+                              FT_Long     map_offset,
+                              FT_Long     rdata_pos,
+                              FT_Long     tag,
+                              FT_Long   **offsets,
+                              FT_Long    *count );
+
+
+FT_END_HEADER
+
+#endif /* __FTRFORK_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/ftserv.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,326 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftserv.h                                                               */
+/*                                                                         */
+/*    The FreeType services (specification only).                          */
+/*                                                                         */
+/*  Copyright 2003, 2004, 2005, 2006 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, FTL.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*  Each module can export one or more `services'.  Each service is      */
+  /*  identified by a constant string and modeled by a pointer; the latter */
+  /*  generally corresponds to a structure containing function pointers.   */
+  /*                                                                       */
+  /*  Note that a service's data cannot be a mere function pointer because */
+  /*  in C it is possible that function pointers might be implemented      */
+  /*  differently than data pointers (e.g. 48 bits instead of 32).         */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FTSERV_H__
+#define __FTSERV_H__
+
+
+FT_BEGIN_HEADER
+
+#if defined( _MSC_VER )      /* Visual C++ (and Intel C++) */
+
+  /* we disable the warning `conditional expression is constant' here */
+  /* in order to compile cleanly with the maximum level of warnings   */
+#pragma warning( disable : 4127 )
+
+#endif /* _MSC_VER */
+
+  /*
+   * @macro:
+   *   FT_FACE_FIND_SERVICE
+   *
+   * @description:
+   *   This macro is used to look up a service from a face's driver module.
+   *
+   * @input:
+   *   face ::
+   *     The source face handle.
+   *
+   *   id ::
+   *     A string describing the service as defined in the service's
+   *     header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
+   *     `multi-masters').  It is automatically prefixed with
+   *     `FT_SERVICE_ID_'.
+   *
+   * @output:
+   *   ptr ::
+   *     A variable that receives the service pointer.  Will be NULL
+   *     if not found.
+   */
+#ifdef __cplusplus
+
+#define FT_FACE_FIND_SERVICE( face, ptr, id )                               \
+  FT_BEGIN_STMNT                                                            \
+    FT_Module    module = FT_MODULE( FT_FACE( face )->driver );             \
+    FT_Pointer   _tmp_  = NULL;                                             \
+    FT_Pointer*  _pptr_ = (FT_Pointer*)&(ptr);                              \
+                                                                            \
+                                                                            \
+    if ( module->clazz->get_interface )                                     \
+      _tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \
+    *_pptr_ = _tmp_;                                                        \
+  FT_END_STMNT
+
+#else /* !C++ */
+
+#define FT_FACE_FIND_SERVICE( face, ptr, id )                               \
+  FT_BEGIN_STMNT                                                            \
+    FT_Module   module = FT_MODULE( FT_FACE( face )->driver );              \
+    FT_Pointer  _tmp_  = NULL;                                              \
+                                                                            \
+    if ( module->clazz->get_interface )                                     \
+      _tmp_ = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \
+    ptr = _tmp_;                                                            \
+  FT_END_STMNT
+
+#endif /* !C++ */
+
+  /*
+   * @macro:
+   *   FT_FACE_FIND_GLOBAL_SERVICE
+   *
+   * @description:
+   *   This macro is used to look up a service from all modules.
+   *
+   * @input:
+   *   face ::
+   *     The source face handle.
+   *
+   *   id ::
+   *     A string describing the service as defined in the service's
+   *     header files (e.g. FT_SERVICE_ID_MULTI_MASTERS which expands to
+   *     `multi-masters').  It is automatically prefixed with
+   *     `FT_SERVICE_ID_'.
+   *
+   * @output:
+   *   ptr ::
+   *     A variable that receives the service pointer.  Will be NULL
+   *     if not found.
+   */
+#ifdef __cplusplus
+
+#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id )               \
+  FT_BEGIN_STMNT                                                   \
+    FT_Module    module = FT_MODULE( FT_FACE( face )->driver );    \
+    FT_Pointer   _tmp_;                                            \
+    FT_Pointer*  _pptr_ = (FT_Pointer*)&(ptr);                     \
+                                                                   \
+                                                                   \
+    _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \
+    *_pptr_ = _tmp_;                                               \
+  FT_END_STMNT
+
+#else /* !C++ */
+
+#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id )               \
+  FT_BEGIN_STMNT                                                   \
+    FT_Module   module = FT_MODULE( FT_FACE( face )->driver );     \
+    FT_Pointer  _tmp_;                                             \
+                                                                   \
+                                                                   \
+    _tmp_ = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \
+    ptr   = _tmp_;                                                 \
+  FT_END_STMNT
+
+#endif /* !C++ */
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****         S E R V I C E   D E S C R I P T O R S                 *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  /*
+   *  The following structure is used to _describe_ a given service
+   *  to the library.  This is useful to build simple static service lists.
+   */
+  typedef struct  FT_ServiceDescRec_
+  {
+    const char*  serv_id;     /* service name         */
+    const void*  serv_data;   /* service pointer/data */
+
+  } FT_ServiceDescRec;
+
+  typedef const FT_ServiceDescRec*  FT_ServiceDesc;
+
+
+  /*
+   *  Parse a list of FT_ServiceDescRec descriptors and look for
+   *  a specific service by ID.  Note that the last element in the
+   *  array must be { NULL, NULL }, and that the function should
+   *  return NULL if the service isn't available.
+   *
+   *  This function can be used by modules to implement their
+   *  `get_service' method.
+   */
+  FT_BASE( FT_Pointer )
+  ft_service_list_lookup( FT_ServiceDesc  service_descriptors,
+                          const char*     service_id );
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****             S E R V I C E S   C A C H E                       *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  /*
+   *  This structure is used to store a cache for several frequently used
+   *  services.  It is the type of `face->internal->services'.  You
+   *  should only use FT_FACE_LOOKUP_SERVICE to access it.
+   *
+   *  All fields should have the type FT_Pointer to relax compilation
+   *  dependencies.  We assume the developer isn't completely stupid.
+   *
+   *  Each field must be named `service_XXXX' where `XXX' corresponds to
+   *  the correct FT_SERVICE_ID_XXXX macro.  See the definition of
+   *  FT_FACE_LOOKUP_SERVICE below how this is implemented.
+   *
+   */
+  typedef struct  FT_ServiceCacheRec_
+  {
+    FT_Pointer  service_POSTSCRIPT_FONT_NAME;
+    FT_Pointer  service_MULTI_MASTERS;
+    FT_Pointer  service_GLYPH_DICT;
+    FT_Pointer  service_PFR_METRICS;
+    FT_Pointer  service_WINFNT;
+
+  } FT_ServiceCacheRec, *FT_ServiceCache;
+
+
+  /*
+   *  A magic number used within the services cache.
+   */
+#define FT_SERVICE_UNAVAILABLE  ((FT_Pointer)-2)  /* magic number */
+
+
+  /*
+   * @macro:
+   *   FT_FACE_LOOKUP_SERVICE
+   *
+   * @description:
+   *   This macro is used to lookup a service from a face's driver module
+   *   using its cache.
+   *
+   * @input:
+   *   face::
+   *     The source face handle containing the cache.
+   *
+   *   field ::
+   *     The field name in the cache.
+   *
+   *   id ::
+   *     The service ID.
+   *
+   * @output:
+   *   ptr ::
+   *     A variable receiving the service data.  NULL if not available.
+   */
+#ifdef __cplusplus
+
+#define FT_FACE_LOOKUP_SERVICE( face, ptr, id )                \
+  FT_BEGIN_STMNT                                               \
+    FT_Pointer   svc;                                          \
+    FT_Pointer*  Pptr = (FT_Pointer*)&(ptr);                   \
+                                                               \
+                                                               \
+    svc = FT_FACE( face )->internal->services. service_ ## id; \
+    if ( svc == FT_SERVICE_UNAVAILABLE )                       \
+      svc = NULL;                                              \
+    else if ( svc == NULL )                                    \
+    {                                                          \
+      FT_FACE_FIND_SERVICE( face, svc, id );                   \
+                                                               \
+      FT_FACE( face )->internal->services. service_ ## id =    \
+        (FT_Pointer)( svc != NULL ? svc                        \
+                                  : FT_SERVICE_UNAVAILABLE );  \
+    }                                                          \
+    *Pptr = svc;                                               \
+  FT_END_STMNT
+
+#else /* !C++ */
+
+#define FT_FACE_LOOKUP_SERVICE( face, ptr, id )                \
+  FT_BEGIN_STMNT                                               \
+    FT_Pointer  svc;                                           \
+                                                               \
+                                                               \
+    svc = FT_FACE( face )->internal->services. service_ ## id; \
+    if ( svc == FT_SERVICE_UNAVAILABLE )                       \
+      svc = NULL;                                              \
+    else if ( svc == NULL )                                    \
+    {                                                          \
+      FT_FACE_FIND_SERVICE( face, svc, id );                   \
+                                                               \
+      FT_FACE( face )->internal->services. service_ ## id =    \
+        (FT_Pointer)( svc != NULL ? svc                        \
+                                  : FT_SERVICE_UNAVAILABLE );  \
+    }                                                          \
+    ptr = svc;                                                 \
+  FT_END_STMNT
+
+#endif /* !C++ */
+
+  /*
+   *  A macro used to define new service structure types.
+   */
+
+#define FT_DEFINE_SERVICE( name )            \
+  typedef struct FT_Service_ ## name ## Rec_ \
+    FT_Service_ ## name ## Rec ;             \
+  typedef struct FT_Service_ ## name ## Rec_ \
+    const * FT_Service_ ## name ;            \
+  struct FT_Service_ ## name ## Rec_
+
+  /* */
+
+  /*
+   *  The header files containing the services.
+   */
+
+#define FT_SERVICE_BDF_H                <freetype/internal/services/svbdf.h>
+#define FT_SERVICE_GLYPH_DICT_H         <freetype/internal/services/svgldict.h>
+#define FT_SERVICE_GX_VALIDATE_H        <freetype/internal/services/svgxval.h>
+#define FT_SERVICE_KERNING_H            <freetype/internal/services/svkern.h>
+#define FT_SERVICE_MULTIPLE_MASTERS_H   <freetype/internal/services/svmm.h>
+#define FT_SERVICE_OPENTYPE_VALIDATE_H  <freetype/internal/services/svotval.h>
+#define FT_SERVICE_PFR_H                <freetype/internal/services/svpfr.h>
+#define FT_SERVICE_POSTSCRIPT_CMAPS_H   <freetype/internal/services/svpscmap.h>
+#define FT_SERVICE_POSTSCRIPT_INFO_H    <freetype/internal/services/svpsinfo.h>
+#define FT_SERVICE_POSTSCRIPT_NAME_H    <freetype/internal/services/svpostnm.h>
+#define FT_SERVICE_SFNT_H               <freetype/internal/services/svsfnt.h>
+#define FT_SERVICE_TRUETYPE_ENGINE_H    <freetype/internal/services/svtteng.h>
+#define FT_SERVICE_TT_CMAP_H            <freetype/internal/services/svttcmap.h>
+#define FT_SERVICE_WINFNT_H             <freetype/internal/services/svwinfnt.h>
+#define FT_SERVICE_XFREE86_NAME_H       <freetype/internal/services/svxf86nm.h>
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __FTSERV_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/ftstream.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,539 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftstream.h                                                             */
+/*                                                                         */
+/*    Stream handling (specification).                                     */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2004, 2005, 2006 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, FTL.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 __FTSTREAM_H__
+#define __FTSTREAM_H__
+
+
+#include <ft2build.h>
+#include FT_SYSTEM_H
+#include FT_INTERNAL_OBJECTS_H
+
+
+FT_BEGIN_HEADER
+
+
+  /* format of an 8-bit frame_op value:           */
+  /*                                              */
+  /* bit  76543210                                */
+  /*      xxxxxxes                                */
+  /*                                              */
+  /* s is set to 1 if the value is signed.        */
+  /* e is set to 1 if the value is little-endian. */
+  /* xxx is a command.                            */
+
+#define FT_FRAME_OP_SHIFT         2
+#define FT_FRAME_OP_SIGNED        1
+#define FT_FRAME_OP_LITTLE        2
+#define FT_FRAME_OP_COMMAND( x )  ( x >> FT_FRAME_OP_SHIFT )
+
+#define FT_MAKE_FRAME_OP( command, little, sign ) \
+          ( ( command << FT_FRAME_OP_SHIFT ) | ( little << 1 ) | sign )
+
+#define FT_FRAME_OP_END    0
+#define FT_FRAME_OP_START  1  /* start a new frame     */
+#define FT_FRAME_OP_BYTE   2  /* read 1-byte value     */
+#define FT_FRAME_OP_SHORT  3  /* read 2-byte value     */
+#define FT_FRAME_OP_LONG   4  /* read 4-byte value     */
+#define FT_FRAME_OP_OFF3   5  /* read 3-byte value     */
+#define FT_FRAME_OP_BYTES  6  /* read a bytes sequence */
+
+
+  typedef enum  FT_Frame_Op_
+  {
+    ft_frame_end       = 0,
+    ft_frame_start     = FT_MAKE_FRAME_OP( FT_FRAME_OP_START, 0, 0 ),
+
+    ft_frame_byte      = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE,  0, 0 ),
+    ft_frame_schar     = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTE,  0, 1 ),
+
+    ft_frame_ushort_be = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 0 ),
+    ft_frame_short_be  = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 0, 1 ),
+    ft_frame_ushort_le = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 0 ),
+    ft_frame_short_le  = FT_MAKE_FRAME_OP( FT_FRAME_OP_SHORT, 1, 1 ),
+
+    ft_frame_ulong_be  = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 0 ),
+    ft_frame_long_be   = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 0, 1 ),
+    ft_frame_ulong_le  = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 0 ),
+    ft_frame_long_le   = FT_MAKE_FRAME_OP( FT_FRAME_OP_LONG, 1, 1 ),
+
+    ft_frame_uoff3_be  = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 0 ),
+    ft_frame_off3_be   = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 0, 1 ),
+    ft_frame_uoff3_le  = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 0 ),
+    ft_frame_off3_le   = FT_MAKE_FRAME_OP( FT_FRAME_OP_OFF3, 1, 1 ),
+
+    ft_frame_bytes     = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 0 ),
+    ft_frame_skip      = FT_MAKE_FRAME_OP( FT_FRAME_OP_BYTES, 0, 1 )
+
+  } FT_Frame_Op;
+
+
+  typedef struct  FT_Frame_Field_
+  {
+    FT_Byte    value;
+    FT_Byte    size;
+    FT_UShort  offset;
+
+  } FT_Frame_Field;
+
+
+  /* Construct an FT_Frame_Field out of a structure type and a field name. */
+  /* The structure type must be set in the FT_STRUCTURE macro before       */
+  /* calling the FT_FRAME_START() macro.                                   */
+  /*                                                                       */
+#define FT_FIELD_SIZE( f ) \
+          (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f )
+
+#define FT_FIELD_SIZE_DELTA( f ) \
+          (FT_Byte)sizeof ( ((FT_STRUCTURE*)0)->f[0] )
+
+#define FT_FIELD_OFFSET( f ) \
+          (FT_UShort)( offsetof( FT_STRUCTURE, f ) )
+
+#define FT_FRAME_FIELD( frame_op, field ) \
+          {                               \
+            frame_op,                     \
+            FT_FIELD_SIZE( field ),       \
+            FT_FIELD_OFFSET( field )      \
+          }
+
+#define FT_MAKE_EMPTY_FIELD( frame_op )  { frame_op, 0, 0 }
+
+#define FT_FRAME_START( size )   { ft_frame_start, 0, size }
+#define FT_FRAME_END             { ft_frame_end, 0, 0 }
+
+#define FT_FRAME_LONG( f )       FT_FRAME_FIELD( ft_frame_long_be, f )
+#define FT_FRAME_ULONG( f )      FT_FRAME_FIELD( ft_frame_ulong_be, f )
+#define FT_FRAME_SHORT( f )      FT_FRAME_FIELD( ft_frame_short_be, f )
+#define FT_FRAME_USHORT( f )     FT_FRAME_FIELD( ft_frame_ushort_be, f )
+#define FT_FRAME_OFF3( f )       FT_FRAME_FIELD( ft_frame_off3_be, f )
+#define FT_FRAME_UOFF3( f )      FT_FRAME_FIELD( ft_frame_uoff3_be, f )
+#define FT_FRAME_BYTE( f )       FT_FRAME_FIELD( ft_frame_byte, f )
+#define FT_FRAME_CHAR( f )       FT_FRAME_FIELD( ft_frame_schar, f )
+
+#define FT_FRAME_LONG_LE( f )    FT_FRAME_FIELD( ft_frame_long_le, f )
+#define FT_FRAME_ULONG_LE( f )   FT_FRAME_FIELD( ft_frame_ulong_le, f )
+#define FT_FRAME_SHORT_LE( f )   FT_FRAME_FIELD( ft_frame_short_le, f )
+#define FT_FRAME_USHORT_LE( f )  FT_FRAME_FIELD( ft_frame_ushort_le, f )
+#define FT_FRAME_OFF3_LE( f )    FT_FRAME_FIELD( ft_frame_off3_le, f )
+#define FT_FRAME_UOFF3_LE( f )   FT_FRAME_FIELD( ft_frame_uoff3_le, f )
+
+#define FT_FRAME_SKIP_LONG       { ft_frame_long_be, 0, 0 }
+#define FT_FRAME_SKIP_SHORT      { ft_frame_short_be, 0, 0 }
+#define FT_FRAME_SKIP_BYTE       { ft_frame_byte, 0, 0 }
+
+#define FT_FRAME_BYTES( field, count ) \
+          {                            \
+            ft_frame_bytes,            \
+            count,                     \
+            FT_FIELD_OFFSET( field )   \
+          }
+
+#define FT_FRAME_SKIP_BYTES( count )  { ft_frame_skip, count, 0 }
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Integer extraction macros -- the `buffer' parameter must ALWAYS be of */
+  /* type `char*' or equivalent (1-byte elements).                         */
+  /*                                                                       */
+
+#define FT_BYTE_( p, i )  ( ((const FT_Byte*)(p))[(i)] )
+#define FT_INT8_( p, i )  ( ((const FT_Char*)(p))[(i)] )
+
+#define FT_INT16( x )   ( (FT_Int16)(x)  )
+#define FT_UINT16( x )  ( (FT_UInt16)(x) )
+#define FT_INT32( x )   ( (FT_Int32)(x)  )
+#define FT_UINT32( x )  ( (FT_UInt32)(x) )
+
+#define FT_BYTE_I16( p, i, s )  ( FT_INT16(  FT_BYTE_( p, i ) ) << (s) )
+#define FT_BYTE_U16( p, i, s )  ( FT_UINT16( FT_BYTE_( p, i ) ) << (s) )
+#define FT_BYTE_I32( p, i, s )  ( FT_INT32(  FT_BYTE_( p, i ) ) << (s) )
+#define FT_BYTE_U32( p, i, s )  ( FT_UINT32( FT_BYTE_( p, i ) ) << (s) )
+
+#define FT_INT8_I16( p, i, s )  ( FT_INT16(  FT_INT8_( p, i ) ) << (s) )
+#define FT_INT8_U16( p, i, s )  ( FT_UINT16( FT_INT8_( p, i ) ) << (s) )
+#define FT_INT8_I32( p, i, s )  ( FT_INT32(  FT_INT8_( p, i ) ) << (s) )
+#define FT_INT8_U32( p, i, s )  ( FT_UINT32( FT_INT8_( p, i ) ) << (s) )
+
+
+#define FT_PEEK_SHORT( p )  FT_INT16( FT_INT8_I16( p, 0, 8) | \
+                                      FT_BYTE_I16( p, 1, 0) )
+
+#define FT_PEEK_USHORT( p )  FT_UINT16( FT_BYTE_U16( p, 0, 8 ) | \
+                                        FT_BYTE_U16( p, 1, 0 ) )
+
+#define FT_PEEK_LONG( p )  FT_INT32( FT_INT8_I32( p, 0, 24 ) | \
+                                     FT_BYTE_I32( p, 1, 16 ) | \
+                                     FT_BYTE_I32( p, 2,  8 ) | \
+                                     FT_BYTE_I32( p, 3,  0 ) )
+
+#define FT_PEEK_ULONG( p )  FT_UINT32( FT_BYTE_U32( p, 0, 24 ) | \
+                                       FT_BYTE_U32( p, 1, 16 ) | \
+                                       FT_BYTE_U32( p, 2,  8 ) | \
+                                       FT_BYTE_U32( p, 3,  0 ) )
+
+#define FT_PEEK_OFF3( p )  FT_INT32( FT_INT8_I32( p, 0, 16 ) | \
+                                     FT_BYTE_I32( p, 1,  8 ) | \
+                                     FT_BYTE_I32( p, 2,  0 ) )
+
+#define FT_PEEK_UOFF3( p )  FT_UINT32( FT_BYTE_U32( p, 0, 16 ) | \
+                                       FT_BYTE_U32( p, 1,  8 ) | \
+                                       FT_BYTE_U32( p, 2,  0 ) )
+
+#define FT_PEEK_SHORT_LE( p )  FT_INT16( FT_INT8_I16( p, 1, 8 ) | \
+                                         FT_BYTE_I16( p, 0, 0 ) )
+
+#define FT_PEEK_USHORT_LE( p )  FT_UINT16( FT_BYTE_U16( p, 1, 8 ) |  \
+                                           FT_BYTE_U16( p, 0, 0 ) )
+
+#define FT_PEEK_LONG_LE( p )  FT_INT32( FT_INT8_I32( p, 3, 24 ) | \
+                                        FT_BYTE_I32( p, 2, 16 ) | \
+                                        FT_BYTE_I32( p, 1,  8 ) | \
+                                        FT_BYTE_I32( p, 0,  0 ) )
+
+#define FT_PEEK_ULONG_LE( p )  FT_UINT32( FT_BYTE_U32( p, 3, 24 ) | \
+                                          FT_BYTE_U32( p, 2, 16 ) | \
+                                          FT_BYTE_U32( p, 1,  8 ) | \
+                                          FT_BYTE_U32( p, 0,  0 ) )
+
+#define FT_PEEK_OFF3_LE( p )  FT_INT32( FT_INT8_I32( p, 2, 16 ) | \
+                                        FT_BYTE_I32( p, 1,  8 ) | \
+                                        FT_BYTE_I32( p, 0,  0 ) )
+
+#define FT_PEEK_UOFF3_LE( p )  FT_UINT32( FT_BYTE_U32( p, 2, 16 ) | \
+                                          FT_BYTE_U32( p, 1,  8 ) | \
+                                          FT_BYTE_U32( p, 0,  0 ) )
+
+
+#define FT_NEXT_CHAR( buffer )       \
+          ( (signed char)*buffer++ )
+
+#define FT_NEXT_BYTE( buffer )         \
+          ( (unsigned char)*buffer++ )
+
+#define FT_NEXT_SHORT( buffer )                                   \
+          ( (short)( buffer += 2, FT_PEEK_SHORT( buffer - 2 ) ) )
+
+#define FT_NEXT_USHORT( buffer )                                            \
+          ( (unsigned short)( buffer += 2, FT_PEEK_USHORT( buffer - 2 ) ) )
+
+#define FT_NEXT_OFF3( buffer )                                  \
+          ( (long)( buffer += 3, FT_PEEK_OFF3( buffer - 3 ) ) )
+
+#define FT_NEXT_UOFF3( buffer )                                           \
+          ( (unsigned long)( buffer += 3, FT_PEEK_UOFF3( buffer - 3 ) ) )
+
+#define FT_NEXT_LONG( buffer )                                  \
+          ( (long)( buffer += 4, FT_PEEK_LONG( buffer - 4 ) ) )
+
+#define FT_NEXT_ULONG( buffer )                                           \
+          ( (unsigned long)( buffer += 4, FT_PEEK_ULONG( buffer - 4 ) ) )
+
+
+#define FT_NEXT_SHORT_LE( buffer )                                   \
+          ( (short)( buffer += 2, FT_PEEK_SHORT_LE( buffer - 2 ) ) )
+
+#define FT_NEXT_USHORT_LE( buffer )                                            \
+          ( (unsigned short)( buffer += 2, FT_PEEK_USHORT_LE( buffer - 2 ) ) )
+
+#define FT_NEXT_OFF3_LE( buffer )                                  \
+          ( (long)( buffer += 3, FT_PEEK_OFF3_LE( buffer - 3 ) ) )
+
+#define FT_NEXT_UOFF3_LE( buffer )                                           \
+          ( (unsigned long)( buffer += 3, FT_PEEK_UOFF3_LE( buffer - 3 ) ) )
+
+#define FT_NEXT_LONG_LE( buffer )                                  \
+          ( (long)( buffer += 4, FT_PEEK_LONG_LE( buffer - 4 ) ) )
+
+#define FT_NEXT_ULONG_LE( buffer )                                           \
+          ( (unsigned long)( buffer += 4, FT_PEEK_ULONG_LE( buffer - 4 ) ) )
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* Each GET_xxxx() macro uses an implicit `stream' variable.             */
+  /*                                                                       */
+#if 0
+#define FT_GET_MACRO( type )    FT_NEXT_ ## type ( stream->cursor )
+
+#define FT_GET_CHAR()       FT_GET_MACRO( CHAR )
+#define FT_GET_BYTE()       FT_GET_MACRO( BYTE )
+#define FT_GET_SHORT()      FT_GET_MACRO( SHORT )
+#define FT_GET_USHORT()     FT_GET_MACRO( USHORT )
+#define FT_GET_OFF3()       FT_GET_MACRO( OFF3 )
+#define FT_GET_UOFF3()      FT_GET_MACRO( UOFF3 )
+#define FT_GET_LONG()       FT_GET_MACRO( LONG )
+#define FT_GET_ULONG()      FT_GET_MACRO( ULONG )
+#define FT_GET_TAG4()       FT_GET_MACRO( ULONG )
+
+#define FT_GET_SHORT_LE()   FT_GET_MACRO( SHORT_LE )
+#define FT_GET_USHORT_LE()  FT_GET_MACRO( USHORT_LE )
+#define FT_GET_LONG_LE()    FT_GET_MACRO( LONG_LE )
+#define FT_GET_ULONG_LE()   FT_GET_MACRO( ULONG_LE )
+
+#else
+#define FT_GET_MACRO( func, type )        ( (type)func( stream ) )
+
+#define FT_GET_CHAR()       FT_GET_MACRO( FT_Stream_GetChar, FT_Char )
+#define FT_GET_BYTE()       FT_GET_MACRO( FT_Stream_GetChar, FT_Byte )
+#define FT_GET_SHORT()      FT_GET_MACRO( FT_Stream_GetShort, FT_Short )
+#define FT_GET_USHORT()     FT_GET_MACRO( FT_Stream_GetShort, FT_UShort )
+#define FT_GET_OFF3()       FT_GET_MACRO( FT_Stream_GetOffset, FT_Long )
+#define FT_GET_UOFF3()      FT_GET_MACRO( FT_Stream_GetOffset, FT_ULong )
+#define FT_GET_LONG()       FT_GET_MACRO( FT_Stream_GetLong, FT_Long )
+#define FT_GET_ULONG()      FT_GET_MACRO( FT_Stream_GetLong, FT_ULong )
+#define FT_GET_TAG4()       FT_GET_MACRO( FT_Stream_GetLong, FT_ULong )
+
+#define FT_GET_SHORT_LE()   FT_GET_MACRO( FT_Stream_GetShortLE, FT_Short )
+#define FT_GET_USHORT_LE()  FT_GET_MACRO( FT_Stream_GetShortLE, FT_UShort )
+#define FT_GET_LONG_LE()    FT_GET_MACRO( FT_Stream_GetLongLE, FT_Long )
+#define FT_GET_ULONG_LE()   FT_GET_MACRO( FT_Stream_GetLongLE, FT_ULong )
+#endif
+
+#define FT_READ_MACRO( func, type, var )        \
+          ( var = (type)func( stream, &error ), \
+            error != FT_Err_Ok )
+
+#define FT_READ_BYTE( var )       FT_READ_MACRO( FT_Stream_ReadChar, FT_Byte, var )
+#define FT_READ_CHAR( var )       FT_READ_MACRO( FT_Stream_ReadChar, FT_Char, var )
+#define FT_READ_SHORT( var )      FT_READ_MACRO( FT_Stream_ReadShort, FT_Short, var )
+#define FT_READ_USHORT( var )     FT_READ_MACRO( FT_Stream_ReadShort, FT_UShort, var )
+#define FT_READ_OFF3( var )       FT_READ_MACRO( FT_Stream_ReadOffset, FT_Long, var )
+#define FT_READ_UOFF3( var )      FT_READ_MACRO( FT_Stream_ReadOffset, FT_ULong, var )
+#define FT_READ_LONG( var )       FT_READ_MACRO( FT_Stream_ReadLong, FT_Long, var )
+#define FT_READ_ULONG( var )      FT_READ_MACRO( FT_Stream_ReadLong, FT_ULong, var )
+
+#define FT_READ_SHORT_LE( var )   FT_READ_MACRO( FT_Stream_ReadShortLE, FT_Short, var )
+#define FT_READ_USHORT_LE( var )  FT_READ_MACRO( FT_Stream_ReadShortLE, FT_UShort, var )
+#define FT_READ_LONG_LE( var )    FT_READ_MACRO( FT_Stream_ReadLongLE, FT_Long, var )
+#define FT_READ_ULONG_LE( var )   FT_READ_MACRO( FT_Stream_ReadLongLE, FT_ULong, var )
+
+
+#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
+
+  /* initialize a stream for reading a regular system stream */
+  FT_BASE( FT_Error )
+  FT_Stream_Open( FT_Stream    stream,
+                  const char*  filepathname );
+
+#endif /* FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */
+
+
+  /* create a new (input) stream from an FT_Open_Args structure */
+  FT_BASE( FT_Error )
+  FT_Stream_New( FT_Library           library,
+                 const FT_Open_Args*  args,
+                 FT_Stream           *astream );
+
+  /* free a stream */
+  FT_BASE( void )
+  FT_Stream_Free( FT_Stream  stream,
+                  FT_Int     external );
+
+  /* initialize a stream for reading in-memory data */
+  FT_BASE( void )
+  FT_Stream_OpenMemory( FT_Stream       stream,
+                        const FT_Byte*  base,
+                        FT_ULong        size );
+
+  /* close a stream (does not destroy the stream structure) */
+  FT_BASE( void )
+  FT_Stream_Close( FT_Stream  stream );
+
+
+  /* seek within a stream. position is relative to start of stream */
+  FT_BASE( FT_Error )
+  FT_Stream_Seek( FT_Stream  stream,
+                  FT_ULong   pos );
+
+  /* skip bytes in a stream */
+  FT_BASE( FT_Error )
+  FT_Stream_Skip( FT_Stream  stream,
+                  FT_Long    distance );
+
+  /* return current stream position */
+  FT_BASE( FT_Long )
+  FT_Stream_Pos( FT_Stream  stream );
+
+  /* read bytes from a stream into a user-allocated buffer, returns an */
+  /* error if not all bytes could be read.                             */
+  FT_BASE( FT_Error )
+  FT_Stream_Read( FT_Stream  stream,
+                  FT_Byte*   buffer,
+                  FT_ULong   count );
+
+  /* read bytes from a stream at a given position */
+  FT_BASE( FT_Error )
+  FT_Stream_ReadAt( FT_Stream  stream,
+                    FT_ULong   pos,
+                    FT_Byte*   buffer,
+                    FT_ULong   count );
+
+  /* try to read bytes at the end of a stream; return number of bytes */
+  /* really available                                                 */
+  FT_BASE( FT_ULong )
+  FT_Stream_TryRead( FT_Stream  stream,
+                     FT_Byte*   buffer,
+                     FT_ULong   count );
+
+  /* Enter a frame of `count' consecutive bytes in a stream.  Returns an */
+  /* error if the frame could not be read/accessed.  The caller can use  */
+  /* the FT_Stream_Get_XXX functions to retrieve frame data without      */
+  /* error checks.                                                       */
+  /*                                                                     */
+  /* You must _always_ call FT_Stream_ExitFrame() once you have entered  */
+  /* a stream frame!                                                     */
+  /*                                                                     */
+  FT_BASE( FT_Error )
+  FT_Stream_EnterFrame( FT_Stream  stream,
+                        FT_ULong   count );
+
+  /* exit a stream frame */
+  FT_BASE( void )
+  FT_Stream_ExitFrame( FT_Stream  stream );
+
+  /* Extract a stream frame.  If the stream is disk-based, a heap block */
+  /* is allocated and the frame bytes are read into it.  If the stream  */
+  /* is memory-based, this function simply set a pointer to the data.   */
+  /*                                                                    */
+  /* Useful to optimize access to memory-based streams transparently.   */
+  /*                                                                    */
+  /* All extracted frames must be `freed` with a call to the function   */
+  /* FT_Stream_ReleaseFrame().                                          */
+  /*                                                                    */
+  FT_BASE( FT_Error )
+  FT_Stream_ExtractFrame( FT_Stream  stream,
+                          FT_ULong   count,
+                          FT_Byte**  pbytes );
+
+  /* release an extract frame (see FT_Stream_ExtractFrame) */
+  FT_BASE( void )
+  FT_Stream_ReleaseFrame( FT_Stream  stream,
+                          FT_Byte**  pbytes );
+
+  /* read a byte from an entered frame */
+  FT_BASE( FT_Char )
+  FT_Stream_GetChar( FT_Stream  stream );
+
+  /* read a 16-bit big-endian integer from an entered frame */
+  FT_BASE( FT_Short )
+  FT_Stream_GetShort( FT_Stream  stream );
+
+  /* read a 24-bit big-endian integer from an entered frame */
+  FT_BASE( FT_Long )
+  FT_Stream_GetOffset( FT_Stream  stream );
+
+  /* read a 32-bit big-endian integer from an entered frame */
+  FT_BASE( FT_Long )
+  FT_Stream_GetLong( FT_Stream  stream );
+
+  /* read a 16-bit little-endian integer from an entered frame */
+  FT_BASE( FT_Short )
+  FT_Stream_GetShortLE( FT_Stream  stream );
+
+  /* read a 32-bit little-endian integer from an entered frame */
+  FT_BASE( FT_Long )
+  FT_Stream_GetLongLE( FT_Stream  stream );
+
+
+  /* read a byte from a stream */
+  FT_BASE( FT_Char )
+  FT_Stream_ReadChar( FT_Stream  stream,
+                      FT_Error*  error );
+
+  /* read a 16-bit big-endian integer from a stream */
+  FT_BASE( FT_Short )
+  FT_Stream_ReadShort( FT_Stream  stream,
+                       FT_Error*  error );
+
+  /* read a 24-bit big-endian integer from a stream */
+  FT_BASE( FT_Long )
+  FT_Stream_ReadOffset( FT_Stream  stream,
+                        FT_Error*  error );
+
+  /* read a 32-bit big-endian integer from a stream */
+  FT_BASE( FT_Long )
+  FT_Stream_ReadLong( FT_Stream  stream,
+                      FT_Error*  error );
+
+  /* read a 16-bit little-endian integer from a stream */
+  FT_BASE( FT_Short )
+  FT_Stream_ReadShortLE( FT_Stream  stream,
+                         FT_Error*  error );
+
+  /* read a 32-bit little-endian integer from a stream */
+  FT_BASE( FT_Long )
+  FT_Stream_ReadLongLE( FT_Stream  stream,
+                        FT_Error*  error );
+
+  /* Read a structure from a stream.  The structure must be described */
+  /* by an array of FT_Frame_Field records.                           */
+  FT_BASE( FT_Error )
+  FT_Stream_ReadFields( FT_Stream              stream,
+                        const FT_Frame_Field*  fields,
+                        void*                  structure );
+
+
+#define FT_STREAM_POS()           \
+          FT_Stream_Pos( stream )
+
+#define FT_STREAM_SEEK( position )                           \
+          FT_SET_ERROR( FT_Stream_Seek( stream, position ) )
+
+#define FT_STREAM_SKIP( distance )                           \
+          FT_SET_ERROR( FT_Stream_Skip( stream, distance ) )
+
+#define FT_STREAM_READ( buffer, count )                   \
+          FT_SET_ERROR( FT_Stream_Read( stream,           \
+                                        (FT_Byte*)buffer, \
+                                        count ) )
+
+#define FT_STREAM_READ_AT( position, buffer, count )         \
+          FT_SET_ERROR( FT_Stream_ReadAt( stream,            \
+                                           position,         \
+                                           (FT_Byte*)buffer, \
+                                           count ) )
+
+#define FT_STREAM_READ_FIELDS( fields, object )                          \
+          FT_SET_ERROR( FT_Stream_ReadFields( stream, fields, object ) )
+
+
+#define FT_FRAME_ENTER( size )                                       \
+          FT_SET_ERROR(                                              \
+            FT_DEBUG_INNER( FT_Stream_EnterFrame( stream, size ) ) )
+
+#define FT_FRAME_EXIT()                 \
+          FT_DEBUG_INNER( FT_Stream_ExitFrame( stream ) )
+
+#define FT_FRAME_EXTRACT( size, bytes )                                       \
+          FT_SET_ERROR(                                                       \
+            FT_DEBUG_INNER( FT_Stream_ExtractFrame( stream, size,             \
+                                                    (FT_Byte**)&(bytes) ) ) )
+
+#define FT_FRAME_RELEASE( bytes )                                         \
+          FT_DEBUG_INNER( FT_Stream_ReleaseFrame( stream,                 \
+                                                  (FT_Byte**)&(bytes) ) )
+
+
+FT_END_HEADER
+
+#endif /* __FTSTREAM_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/fttrace.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,133 @@
+/***************************************************************************/
+/*                                                                         */
+/*  fttrace.h                                                              */
+/*                                                                         */
+/*    Tracing handling (specification only).                               */
+/*                                                                         */
+/*  Copyright 2002, 2004, 2005, 2006 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, FTL.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /* definitions of trace levels for FreeType 2 */
+
+  /* the first level must always be `trace_any' */
+FT_TRACE_DEF( any )
+
+  /* base components */
+FT_TRACE_DEF( calc )      /* calculations            (ftcalc.c)   */
+FT_TRACE_DEF( memory )    /* memory manager          (ftobjs.c)   */
+FT_TRACE_DEF( stream )    /* stream manager          (ftstream.c) */
+FT_TRACE_DEF( io )        /* i/o interface           (ftsystem.c) */
+FT_TRACE_DEF( list )      /* list management         (ftlist.c)   */
+FT_TRACE_DEF( init )      /* initialization          (ftinit.c)   */
+FT_TRACE_DEF( objs )      /* base objects            (ftobjs.c)   */
+FT_TRACE_DEF( outline )   /* outline management      (ftoutln.c)  */
+FT_TRACE_DEF( glyph )     /* glyph management        (ftglyph.c)  */
+
+FT_TRACE_DEF( raster )    /* monochrome rasterizer   (ftraster.c) */
+FT_TRACE_DEF( smooth )    /* anti-aliasing raster    (ftgrays.c)  */
+FT_TRACE_DEF( mm )        /* MM interface            (ftmm.c)     */
+FT_TRACE_DEF( raccess )   /* resource fork accessor  (ftrfork.c)  */
+
+  /* Cache sub-system */
+FT_TRACE_DEF( cache )     /* cache sub-system        (ftcache.c, etc.) */
+
+  /* SFNT driver components */
+FT_TRACE_DEF( sfobjs )    /* SFNT object handler     (sfobjs.c)   */
+FT_TRACE_DEF( ttcmap )    /* charmap handler         (ttcmap.c)   */
+FT_TRACE_DEF( ttkern )    /* kerning handler         (ttkern.c)   */
+FT_TRACE_DEF( ttload )    /* basic TrueType tables   (ttload.c)   */
+FT_TRACE_DEF( ttmtx )     /* metrics-related tables  (ttmtx.c)    */
+FT_TRACE_DEF( ttpost )    /* PS table processing     (ttpost.c)   */
+FT_TRACE_DEF( ttsbit )    /* TrueType sbit handling  (ttsbit.c)   */
+
+  /* TrueType driver components */
+FT_TRACE_DEF( ttdriver )  /* TT font driver          (ttdriver.c) */
+FT_TRACE_DEF( ttgload )   /* TT glyph loader         (ttgload.c)  */
+FT_TRACE_DEF( ttinterp )  /* bytecode interpreter    (ttinterp.c) */
+FT_TRACE_DEF( ttobjs )    /* TT objects manager      (ttobjs.c)   */
+FT_TRACE_DEF( ttpload )   /* TT data/program loader  (ttpload.c)  */
+FT_TRACE_DEF( ttgxvar )   /* TrueType GX var handler (ttgxvar.c)  */
+
+  /* Type 1 driver components */
+FT_TRACE_DEF( t1driver )
+FT_TRACE_DEF( t1gload )
+FT_TRACE_DEF( t1hint )
+FT_TRACE_DEF( t1load )
+FT_TRACE_DEF( t1objs )
+FT_TRACE_DEF( t1parse )
+
+  /* PostScript helper module `psaux' */
+FT_TRACE_DEF( t1decode )
+FT_TRACE_DEF( psobjs )
+
+  /* PostScript hinting module `pshinter' */
+FT_TRACE_DEF( pshrec )
+FT_TRACE_DEF( pshalgo1 )
+FT_TRACE_DEF( pshalgo2 )
+
+  /* Type 2 driver components */
+FT_TRACE_DEF( cffdriver )
+FT_TRACE_DEF( cffgload )
+FT_TRACE_DEF( cffload )
+FT_TRACE_DEF( cffobjs )
+FT_TRACE_DEF( cffparse )
+
+  /* Type 42 driver component */
+FT_TRACE_DEF( t42 )
+
+  /* CID driver components */
+FT_TRACE_DEF( cidafm )
+FT_TRACE_DEF( ciddriver )
+FT_TRACE_DEF( cidgload )
+FT_TRACE_DEF( cidload )
+FT_TRACE_DEF( cidobjs )
+FT_TRACE_DEF( cidparse )
+
+  /* Windows font component */
+FT_TRACE_DEF( winfnt )
+
+  /* PCF font components */
+FT_TRACE_DEF( pcfdriver )
+FT_TRACE_DEF( pcfread )
+
+  /* BDF font components */
+FT_TRACE_DEF( bdfdriver )
+FT_TRACE_DEF( bdflib )
+
+  /* PFR font component */
+FT_TRACE_DEF( pfr )
+
+  /* OpenType validation components */
+FT_TRACE_DEF( otvmodule )
+FT_TRACE_DEF( otvcommon )
+FT_TRACE_DEF( otvbase )
+FT_TRACE_DEF( otvgdef )
+FT_TRACE_DEF( otvgpos )
+FT_TRACE_DEF( otvgsub )
+FT_TRACE_DEF( otvjstf )
+
+  /* TrueTypeGX/AAT validation components */
+FT_TRACE_DEF( gxvmodule )
+FT_TRACE_DEF( gxvcommon )
+FT_TRACE_DEF( gxvfeat )
+FT_TRACE_DEF( gxvmort )
+FT_TRACE_DEF( gxvmorx )
+FT_TRACE_DEF( gxvbsln )
+FT_TRACE_DEF( gxvjust )
+FT_TRACE_DEF( gxvkern )
+FT_TRACE_DEF( gxvopbd )
+FT_TRACE_DEF( gxvtrak )
+FT_TRACE_DEF( gxvprop )
+FT_TRACE_DEF( gxvlcar )
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/ftvalid.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,148 @@
+/***************************************************************************/
+/*                                                                         */
+/*  ftvalid.h                                                              */
+/*                                                                         */
+/*    FreeType validation support (specification).                         */
+/*                                                                         */
+/*  Copyright 2004 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, FTL.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 __FTVALID_H__
+#define __FTVALID_H__
+
+#include <ft2build.h>
+#include FT_CONFIG_STANDARD_LIBRARY_H   /* for ft_setjmp and ft_longjmp */
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /****                    V A L I D A T I O N                          ****/
+  /****                                                                 ****/
+  /****                                                                 ****/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  /* handle to a validation object */
+  typedef struct FT_ValidatorRec_*  FT_Validator;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* There are three distinct validation levels defined here:              */
+  /*                                                                       */
+  /* FT_VALIDATE_DEFAULT ::                                                */
+  /*   A table that passes this validation level can be used reliably by   */
+  /*   FreeType.  It generally means that all offsets have been checked to */
+  /*   prevent out-of-bound reads, that array counts are correct, etc.     */
+  /*                                                                       */
+  /* FT_VALIDATE_TIGHT ::                                                  */
+  /*   A table that passes this validation level can be used reliably and  */
+  /*   doesn't contain invalid data.  For example, a charmap table that    */
+  /*   returns invalid glyph indices will not pass, even though it can     */
+  /*   be used with FreeType in default mode (the library will simply      */
+  /*   return an error later when trying to load the glyph).               */
+  /*                                                                       */
+  /*   It also checks that fields which must be a multiple of 2, 4, or 8,  */
+  /*   don't have incorrect values, etc.                                   */
+  /*                                                                       */
+  /* FT_VALIDATE_PARANOID ::                                               */
+  /*   Only for font debugging.  Checks that a table follows the           */
+  /*   specification by 100%.  Very few fonts will be able to pass this    */
+  /*   level anyway but it can be useful for certain tools like font       */
+  /*   editors/converters.                                                 */
+  /*                                                                       */
+  typedef enum  FT_ValidationLevel_
+  {
+    FT_VALIDATE_DEFAULT = 0,
+    FT_VALIDATE_TIGHT,
+    FT_VALIDATE_PARANOID
+
+  } FT_ValidationLevel;
+
+
+  /* validator structure */
+  typedef struct  FT_ValidatorRec_
+  {
+    const FT_Byte*      base;        /* address of table in memory       */
+    const FT_Byte*      limit;       /* `base' + sizeof(table) in memory */
+    FT_ValidationLevel  level;       /* validation level                 */
+    FT_Error            error;       /* error returned. 0 means success  */
+
+    ft_jmp_buf          jump_buffer; /* used for exception handling      */
+
+  } FT_ValidatorRec;
+
+
+#define FT_VALIDATOR( x )  ((FT_Validator)( x ))
+
+
+  FT_BASE( void )
+  ft_validator_init( FT_Validator        valid,
+                     const FT_Byte*      base,
+                     const FT_Byte*      limit,
+                     FT_ValidationLevel  level );
+
+  FT_BASE( FT_Int )
+  ft_validator_run( FT_Validator  valid );
+
+  /* Sets the error field in a validator, then calls `longjmp' to return */
+  /* to high-level caller.  Using `setjmp/longjmp' avoids many stupid    */
+  /* error checks within the validation routines.                        */
+  /*                                                                     */
+  FT_BASE( void )
+  ft_validator_error( FT_Validator  valid,
+                      FT_Error      error );
+
+
+  /* Calls ft_validate_error.  Assumes that the `valid' local variable */
+  /* holds a pointer to the current validator object.                  */
+  /*                                                                   */
+  /* Use preprocessor prescan to pass FT_ERR_PREFIX.                   */
+  /*                                                                   */
+#define FT_INVALID( _prefix, _error )  FT_INVALID_( _prefix, _error )
+#define FT_INVALID_( _prefix, _error ) \
+          ft_validator_error( valid, _prefix ## _error )
+
+  /* called when a broken table is detected */
+#define FT_INVALID_TOO_SHORT \
+          FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
+
+  /* called when an invalid offset is detected */
+#define FT_INVALID_OFFSET \
+          FT_INVALID( FT_ERR_PREFIX, Invalid_Offset )
+
+  /* called when an invalid format/value is detected */
+#define FT_INVALID_FORMAT \
+          FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
+
+  /* called when an invalid glyph index is detected */
+#define FT_INVALID_GLYPH_ID \
+          FT_INVALID( FT_ERR_PREFIX, Invalid_Glyph_Index )
+
+  /* called when an invalid field value is detected */
+#define FT_INVALID_DATA \
+          FT_INVALID( FT_ERR_PREFIX, Invalid_Table )
+
+
+FT_END_HEADER
+
+#endif /* __FTVALID_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/internal.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,50 @@
+/***************************************************************************/
+/*                                                                         */
+/*  internal.h                                                             */
+/*                                                                         */
+/*    Internal header files (specification only).                          */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004 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, FTL.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This file is automatically included by `ft2build.h'.                  */
+  /* Do not include it manually!                                           */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#define FT_INTERNAL_OBJECTS_H             <freetype/internal/ftobjs.h>
+#define FT_INTERNAL_STREAM_H              <freetype/internal/ftstream.h>
+#define FT_INTERNAL_MEMORY_H              <freetype/internal/ftmemory.h>
+#define FT_INTERNAL_DEBUG_H               <freetype/internal/ftdebug.h>
+#define FT_INTERNAL_CALC_H                <freetype/internal/ftcalc.h>
+#define FT_INTERNAL_DRIVER_H              <freetype/internal/ftdriver.h>
+#define FT_INTERNAL_TRACE_H               <freetype/internal/fttrace.h>
+#define FT_INTERNAL_GLYPH_LOADER_H        <freetype/internal/ftgloadr.h>
+#define FT_INTERNAL_SFNT_H                <freetype/internal/sfnt.h>
+#define FT_INTERNAL_SERVICE_H             <freetype/internal/ftserv.h>
+#define FT_INTERNAL_RFORK_H               <freetype/internal/ftrfork.h>
+#define FT_INTERNAL_VALIDATE_H            <freetype/internal/ftvalid.h>
+
+#define FT_INTERNAL_TRUETYPE_TYPES_H      <freetype/internal/tttypes.h>
+#define FT_INTERNAL_TYPE1_TYPES_H         <freetype/internal/t1types.h>
+
+#define FT_INTERNAL_POSTSCRIPT_AUX_H      <freetype/internal/psaux.h>
+#define FT_INTERNAL_POSTSCRIPT_HINTS_H    <freetype/internal/pshints.h>
+#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H  <freetype/internal/psglobal.h>
+
+#define FT_INTERNAL_AUTOHINT_H            <freetype/internal/autohint.h>
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/pcftypes.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,56 @@
+/*  pcftypes.h
+
+  FreeType font driver for pcf fonts
+
+  Copyright (C) 2000, 2001, 2002 by
+  Francesco Zappa Nardelli
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+*/
+
+
+#ifndef __PCFTYPES_H__
+#define __PCFTYPES_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+
+
+FT_BEGIN_HEADER
+
+
+  typedef struct  PCF_Public_FaceRec_
+  {
+    FT_FaceRec    root;
+    FT_StreamRec  gzip_stream;
+    FT_Stream     gzip_source;
+
+    char*         charset_encoding;
+    char*         charset_registry;
+
+  } PCF_Public_FaceRec, *PCF_Public_Face;
+
+
+FT_END_HEADER
+
+#endif  /* __PCFTYPES_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/psaux.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,809 @@
+/***************************************************************************/
+/*                                                                         */
+/*  psaux.h                                                                */
+/*                                                                         */
+/*    Auxiliary functions and data structures related to PostScript fonts  */
+/*    (specification).                                                     */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2006 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, FTL.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 __PSAUX_H__
+#define __PSAUX_H__
+
+
+#include <ft2build.h>
+#include FT_INTERNAL_OBJECTS_H
+#include FT_INTERNAL_TYPE1_TYPES_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                             T1_TABLE                          *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  typedef struct PS_TableRec_*              PS_Table;
+  typedef const struct PS_Table_FuncsRec_*  PS_Table_Funcs;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    PS_Table_FuncsRec                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A set of function pointers to manage PS_Table objects.             */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    table_init    :: Used to initialize a table.                       */
+  /*                                                                       */
+  /*    table_done    :: Finalizes resp. destroy a given table.            */
+  /*                                                                       */
+  /*    table_add     :: Adds a new object to a table.                     */
+  /*                                                                       */
+  /*    table_release :: Releases table data, then finalizes it.           */
+  /*                                                                       */
+  typedef struct  PS_Table_FuncsRec_
+  {
+    FT_Error
+    (*init)( PS_Table   table,
+             FT_Int     count,
+             FT_Memory  memory );
+
+    void
+    (*done)( PS_Table  table );
+
+    FT_Error
+    (*add)( PS_Table    table,
+            FT_Int      idx,
+            void*       object,
+            FT_PtrDist  length );
+
+    void
+    (*release)( PS_Table  table );
+
+  } PS_Table_FuncsRec;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    PS_TableRec                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A PS_Table is a simple object used to store an array of objects in */
+  /*    a single memory block.                                             */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    block     :: The address in memory of the growheap's block.  This  */
+  /*                 can change between two object adds, due to            */
+  /*                 reallocation.                                         */
+  /*                                                                       */
+  /*    cursor    :: The current top of the grow heap within its block.    */
+  /*                                                                       */
+  /*    capacity  :: The current size of the heap block.  Increments by    */
+  /*                 1kByte chunks.                                        */
+  /*                                                                       */
+  /*    max_elems :: The maximum number of elements in table.              */
+  /*                                                                       */
+  /*    num_elems :: The current number of elements in table.              */
+  /*                                                                       */
+  /*    elements  :: A table of element addresses within the block.        */
+  /*                                                                       */
+  /*    lengths   :: A table of element sizes within the block.            */
+  /*                                                                       */
+  /*    memory    :: The object used for memory operations                 */
+  /*                 (alloc/realloc).                                      */
+  /*                                                                       */
+  /*    funcs     :: A table of method pointers for this object.           */
+  /*                                                                       */
+  typedef struct  PS_TableRec_
+  {
+    FT_Byte*           block;          /* current memory block           */
+    FT_Offset          cursor;         /* current cursor in memory block */
+    FT_Offset          capacity;       /* current size of memory block   */
+    FT_Long            init;
+
+    FT_Int             max_elems;
+    FT_Int             num_elems;
+    FT_Byte**          elements;       /* addresses of table elements */
+    FT_PtrDist*        lengths;        /* lengths of table elements   */
+
+    FT_Memory          memory;
+    PS_Table_FuncsRec  funcs;
+
+  } PS_TableRec;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                       T1 FIELDS & TOKENS                      *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  typedef struct PS_ParserRec_*  PS_Parser;
+
+  typedef struct T1_TokenRec_*   T1_Token;
+
+  typedef struct T1_FieldRec_*   T1_Field;
+
+
+  /* simple enumeration type used to identify token types */
+  typedef enum  T1_TokenType_
+  {
+    T1_TOKEN_TYPE_NONE = 0,
+    T1_TOKEN_TYPE_ANY,
+    T1_TOKEN_TYPE_STRING,
+    T1_TOKEN_TYPE_ARRAY,
+
+    /* do not remove */
+    T1_TOKEN_TYPE_MAX
+
+  } T1_TokenType;
+
+
+  /* a simple structure used to identify tokens */
+  typedef struct  T1_TokenRec_
+  {
+    FT_Byte*      start;   /* first character of token in input stream */
+    FT_Byte*      limit;   /* first character after the token          */
+    T1_TokenType  type;    /* type of token                            */
+
+  } T1_TokenRec;
+
+
+  /* enumeration type used to identify object fields */
+  typedef enum  T1_FieldType_
+  {
+    T1_FIELD_TYPE_NONE = 0,
+    T1_FIELD_TYPE_BOOL,
+    T1_FIELD_TYPE_INTEGER,
+    T1_FIELD_TYPE_FIXED,
+    T1_FIELD_TYPE_FIXED_1000,
+    T1_FIELD_TYPE_STRING,
+    T1_FIELD_TYPE_KEY,
+    T1_FIELD_TYPE_BBOX,
+    T1_FIELD_TYPE_INTEGER_ARRAY,
+    T1_FIELD_TYPE_FIXED_ARRAY,
+    T1_FIELD_TYPE_CALLBACK,
+
+    /* do not remove */
+    T1_FIELD_TYPE_MAX
+
+  } T1_FieldType;
+
+
+  typedef enum  T1_FieldLocation_
+  {
+    T1_FIELD_LOCATION_CID_INFO,
+    T1_FIELD_LOCATION_FONT_DICT,
+    T1_FIELD_LOCATION_FONT_INFO,
+    T1_FIELD_LOCATION_PRIVATE,
+    T1_FIELD_LOCATION_BBOX,
+
+    /* do not remove */
+    T1_FIELD_LOCATION_MAX
+
+  } T1_FieldLocation;
+
+
+  typedef void
+  (*T1_Field_ParseFunc)( FT_Face     face,
+                         FT_Pointer  parser );
+
+
+  /* structure type used to model object fields */
+  typedef struct  T1_FieldRec_
+  {
+    const char*         ident;        /* field identifier               */
+    T1_FieldLocation    location;
+    T1_FieldType        type;         /* type of field                  */
+    T1_Field_ParseFunc  reader;
+    FT_UInt             offset;       /* offset of field in object      */
+    FT_Byte             size;         /* size of field in bytes         */
+    FT_UInt             array_max;    /* maximal number of elements for */
+                                      /* array                          */
+    FT_UInt             count_offset; /* offset of element count for    */
+                                      /* arrays                         */
+  } T1_FieldRec;
+
+
+#define T1_NEW_SIMPLE_FIELD( _ident, _type, _fname ) \
+          {                                          \
+            _ident, T1CODE, _type,                   \
+            0,                                       \
+            FT_FIELD_OFFSET( _fname ),               \
+            FT_FIELD_SIZE( _fname ),                 \
+            0, 0                                     \
+          },
+
+#define T1_NEW_CALLBACK_FIELD( _ident, _reader )    \
+          {                                         \
+            _ident, T1CODE, T1_FIELD_TYPE_CALLBACK, \
+            (T1_Field_ParseFunc)_reader,            \
+            0, 0,                                   \
+            0, 0                                    \
+          },
+
+#define T1_NEW_TABLE_FIELD( _ident, _type, _fname, _max ) \
+          {                                               \
+            _ident, T1CODE, _type,                        \
+            0,                                            \
+            FT_FIELD_OFFSET( _fname ),                    \
+            FT_FIELD_SIZE_DELTA( _fname ),                \
+            _max,                                         \
+            FT_FIELD_OFFSET( num_ ## _fname )             \
+          },
+
+#define T1_NEW_TABLE_FIELD2( _ident, _type, _fname, _max ) \
+          {                                                \
+            _ident, T1CODE, _type,                         \
+            0,                                             \
+            FT_FIELD_OFFSET( _fname ),                     \
+            FT_FIELD_SIZE_DELTA( _fname ),                 \
+            _max, 0                                        \
+          },
+
+
+#define T1_FIELD_BOOL( _ident, _fname )                             \
+          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL, _fname )
+
+#define T1_FIELD_NUM( _ident, _fname )                                 \
+          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER, _fname )
+
+#define T1_FIELD_FIXED( _ident, _fname )                             \
+          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED, _fname )
+
+#define T1_FIELD_FIXED_1000( _ident, _fname )                             \
+          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_1000, _fname )
+
+#define T1_FIELD_STRING( _ident, _fname )                             \
+          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_STRING, _fname )
+
+#define T1_FIELD_KEY( _ident, _fname )                             \
+          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_KEY, _fname )
+
+#define T1_FIELD_BBOX( _ident, _fname )                             \
+          T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BBOX, _fname )
+
+
+#define T1_FIELD_NUM_TABLE( _ident, _fname, _fmax )                \
+          T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
+                              _fname, _fmax )
+
+#define T1_FIELD_FIXED_TABLE( _ident, _fname, _fmax )            \
+          T1_NEW_TABLE_FIELD( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
+                              _fname, _fmax )
+
+#define T1_FIELD_NUM_TABLE2( _ident, _fname, _fmax )                \
+          T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_INTEGER_ARRAY, \
+                               _fname, _fmax )
+
+#define T1_FIELD_FIXED_TABLE2( _ident, _fname, _fmax )            \
+          T1_NEW_TABLE_FIELD2( _ident, T1_FIELD_TYPE_FIXED_ARRAY, \
+                               _fname, _fmax )
+
+#define T1_FIELD_CALLBACK( _ident, _name )       \
+          T1_NEW_CALLBACK_FIELD( _ident, _name )
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                            T1 PARSER                          *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  typedef const struct PS_Parser_FuncsRec_*  PS_Parser_Funcs;
+
+  typedef struct  PS_Parser_FuncsRec_
+  {
+    void
+    (*init)( PS_Parser  parser,
+             FT_Byte*   base,
+             FT_Byte*   limit,
+             FT_Memory  memory );
+
+    void
+    (*done)( PS_Parser  parser );
+
+    void
+    (*skip_spaces)( PS_Parser  parser );
+    void
+    (*skip_PS_token)( PS_Parser  parser );
+
+    FT_Long
+    (*to_int)( PS_Parser  parser );
+    FT_Fixed
+    (*to_fixed)( PS_Parser  parser,
+                 FT_Int     power_ten );
+
+    FT_Error
+    (*to_bytes)( PS_Parser  parser,
+                 FT_Byte*   bytes,
+                 FT_Long    max_bytes,
+                 FT_Long*   pnum_bytes,
+                 FT_Bool    delimiters );
+
+    FT_Int
+    (*to_coord_array)( PS_Parser  parser,
+                       FT_Int     max_coords,
+                       FT_Short*  coords );
+    FT_Int
+    (*to_fixed_array)( PS_Parser  parser,
+                       FT_Int     max_values,
+                       FT_Fixed*  values,
+                       FT_Int     power_ten );
+
+    void
+    (*to_token)( PS_Parser  parser,
+                 T1_Token   token );
+    void
+    (*to_token_array)( PS_Parser  parser,
+                       T1_Token   tokens,
+                       FT_UInt    max_tokens,
+                       FT_Int*    pnum_tokens );
+
+    FT_Error
+    (*load_field)( PS_Parser       parser,
+                   const T1_Field  field,
+                   void**          objects,
+                   FT_UInt         max_objects,
+                   FT_ULong*       pflags );
+
+    FT_Error
+    (*load_field_table)( PS_Parser       parser,
+                         const T1_Field  field,
+                         void**          objects,
+                         FT_UInt         max_objects,
+                         FT_ULong*       pflags );
+
+  } PS_Parser_FuncsRec;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    PS_ParserRec                                                       */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A PS_Parser is an object used to parse a Type 1 font very quickly. */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    cursor :: The current position in the text.                        */
+  /*                                                                       */
+  /*    base   :: Start of the processed text.                             */
+  /*                                                                       */
+  /*    limit  :: End of the processed text.                               */
+  /*                                                                       */
+  /*    error  :: The last error returned.                                 */
+  /*                                                                       */
+  /*    memory :: The object used for memory operations (alloc/realloc).   */
+  /*                                                                       */
+  /*    funcs  :: A table of functions for the parser.                     */
+  /*                                                                       */
+  typedef struct  PS_ParserRec_
+  {
+    FT_Byte*   cursor;
+    FT_Byte*   base;
+    FT_Byte*   limit;
+    FT_Error   error;
+    FT_Memory  memory;
+
+    PS_Parser_FuncsRec  funcs;
+
+  } PS_ParserRec;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                         T1 BUILDER                            *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  typedef struct T1_BuilderRec_*  T1_Builder;
+
+
+  typedef FT_Error
+  (*T1_Builder_Check_Points_Func)( T1_Builder  builder,
+                                   FT_Int      count );
+
+  typedef void
+  (*T1_Builder_Add_Point_Func)( T1_Builder  builder,
+                                FT_Pos      x,
+                                FT_Pos      y,
+                                FT_Byte     flag );
+
+  typedef FT_Error
+  (*T1_Builder_Add_Point1_Func)( T1_Builder  builder,
+                                 FT_Pos      x,
+                                 FT_Pos      y );
+
+  typedef FT_Error
+  (*T1_Builder_Add_Contour_Func)( T1_Builder  builder );
+
+  typedef FT_Error
+  (*T1_Builder_Start_Point_Func)( T1_Builder  builder,
+                                  FT_Pos      x,
+                                  FT_Pos      y );
+
+  typedef void
+  (*T1_Builder_Close_Contour_Func)( T1_Builder  builder );
+
+
+  typedef const struct T1_Builder_FuncsRec_*  T1_Builder_Funcs;
+
+  typedef struct  T1_Builder_FuncsRec_
+  {
+    void
+    (*init)( T1_Builder    builder,
+             FT_Face       face,
+             FT_Size       size,
+             FT_GlyphSlot  slot,
+             FT_Bool       hinting );
+
+    void
+    (*done)( T1_Builder   builder );
+
+    T1_Builder_Check_Points_Func   check_points;
+    T1_Builder_Add_Point_Func      add_point;
+    T1_Builder_Add_Point1_Func     add_point1;
+    T1_Builder_Add_Contour_Func    add_contour;
+    T1_Builder_Start_Point_Func    start_point;
+    T1_Builder_Close_Contour_Func  close_contour;
+
+  } T1_Builder_FuncsRec;
+
+
+  /* an enumeration type to handle charstring parsing states */
+  typedef enum  T1_ParseState_
+  {
+    T1_Parse_Start,
+    T1_Parse_Have_Width,
+    T1_Parse_Have_Moveto,
+    T1_Parse_Have_Path
+
+  } T1_ParseState;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Structure>                                                           */
+  /*    T1_BuilderRec                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*     A structure used during glyph loading to store its outline.       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    memory       :: The current memory object.                         */
+  /*                                                                       */
+  /*    face         :: The current face object.                           */
+  /*                                                                       */
+  /*    glyph        :: The current glyph slot.                            */
+  /*                                                                       */
+  /*    loader       :: XXX                                                */
+  /*                                                                       */
+  /*    base         :: The base glyph outline.                            */
+  /*                                                                       */
+  /*    current      :: The current glyph outline.                         */
+  /*                                                                       */
+  /*    max_points   :: maximum points in builder outline                  */
+  /*                                                                       */
+  /*    max_contours :: Maximal number of contours in builder outline.     */
+  /*                                                                       */
+  /*    last         :: The last point position.                           */
+  /*                                                                       */
+  /*    scale_x      :: The horizontal scaling value (FUnits to            */
+  /*                    sub-pixels).                                       */
+  /*                                                                       */
+  /*    scale_y      :: The vertical scaling value (FUnits to sub-pixels). */
+  /*                                                                       */
+  /*    pos_x        :: The horizontal translation (if composite glyph).   */
+  /*                                                                       */
+  /*    pos_y        :: The vertical translation (if composite glyph).     */
+  /*                                                                       */
+  /*    left_bearing :: The left side bearing point.                       */
+  /*                                                                       */
+  /*    advance      :: The horizontal advance vector.                     */
+  /*                                                                       */
+  /*    bbox         :: Unused.                                            */
+  /*                                                                       */
+  /*    parse_state  :: An enumeration which controls the charstring       */
+  /*                    parsing state.                                     */
+  /*                                                                       */
+  /*    load_points  :: If this flag is not set, no points are loaded.     */
+  /*                                                                       */
+  /*    no_recurse   :: Set but not used.                                  */
+  /*                                                                       */
+  /*    metrics_only :: A boolean indicating that we only want to compute  */
+  /*                    the metrics of a given glyph, not load all of its  */
+  /*                    points.                                            */
+  /*                                                                       */
+  /*    funcs        :: An array of function pointers for the builder.     */
+  /*                                                                       */
+  typedef struct  T1_BuilderRec_
+  {
+    FT_Memory       memory;
+    FT_Face         face;
+    FT_GlyphSlot    glyph;
+    FT_GlyphLoader  loader;
+    FT_Outline*     base;
+    FT_Outline*     current;
+
+    FT_Vector       last;
+
+    FT_Fixed        scale_x;
+    FT_Fixed        scale_y;
+
+    FT_Pos          pos_x;
+    FT_Pos          pos_y;
+
+    FT_Vector       left_bearing;
+    FT_Vector       advance;
+
+    FT_BBox         bbox;          /* bounding box */
+    T1_ParseState   parse_state;
+    FT_Bool         load_points;
+    FT_Bool         no_recurse;
+    FT_Bool         shift;
+
+    FT_Bool         metrics_only;
+
+    void*           hints_funcs;    /* hinter-specific */
+    void*           hints_globals;  /* hinter-specific */
+
+    T1_Builder_FuncsRec  funcs;
+
+  } T1_BuilderRec;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                         T1 DECODER                            *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+#if 0
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* T1_MAX_SUBRS_CALLS details the maximum number of nested sub-routine   */
+  /* calls during glyph loading.                                           */
+  /*                                                                       */
+#define T1_MAX_SUBRS_CALLS  8
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* T1_MAX_CHARSTRING_OPERANDS is the charstring stack's capacity.  A     */
+  /* minimum of 16 is required.                                            */
+  /*                                                                       */
+#define T1_MAX_CHARSTRINGS_OPERANDS  32
+
+#endif /* 0 */
+
+
+  typedef struct  T1_Decoder_ZoneRec_
+  {
+    FT_Byte*  cursor;
+    FT_Byte*  base;
+    FT_Byte*  limit;
+
+  } T1_Decoder_ZoneRec, *T1_Decoder_Zone;
+
+
+  typedef struct T1_DecoderRec_*              T1_Decoder;
+  typedef const struct T1_Decoder_FuncsRec_*  T1_Decoder_Funcs;
+
+
+  typedef FT_Error
+  (*T1_Decoder_Callback)( T1_Decoder  decoder,
+                          FT_UInt     glyph_index );
+
+
+  typedef struct  T1_Decoder_FuncsRec_
+  {
+    FT_Error
+    (*init)( T1_Decoder           decoder,
+             FT_Face              face,
+             FT_Size              size,
+             FT_GlyphSlot         slot,
+             FT_Byte**            glyph_names,
+             PS_Blend             blend,
+             FT_Bool              hinting,
+             FT_Render_Mode       hint_mode,
+             T1_Decoder_Callback  callback );
+
+    void
+    (*done)( T1_Decoder  decoder );
+
+    FT_Error
+    (*parse_charstrings)( T1_Decoder  decoder,
+                          FT_Byte*    base,
+                          FT_UInt     len );
+
+  } T1_Decoder_FuncsRec;
+
+
+  typedef struct  T1_DecoderRec_
+  {
+    T1_BuilderRec        builder;
+
+    FT_Long              stack[T1_MAX_CHARSTRINGS_OPERANDS];
+    FT_Long*             top;
+
+    T1_Decoder_ZoneRec   zones[T1_MAX_SUBRS_CALLS + 1];
+    T1_Decoder_Zone      zone;
+
+    FT_Service_PsCMaps   psnames;      /* for seac */
+    FT_UInt              num_glyphs;
+    FT_Byte**            glyph_names;
+
+    FT_Int               lenIV;        /* internal for sub routine calls */
+    FT_UInt              num_subrs;
+    FT_Byte**            subrs;
+    FT_PtrDist*          subrs_len;    /* array of subrs length (optional) */
+
+    FT_Matrix            font_matrix;
+    FT_Vector            font_offset;
+
+    FT_Int               flex_state;
+    FT_Int               num_flex_vectors;
+    FT_Vector            flex_vectors[7];
+
+    PS_Blend             blend;       /* for multiple master support */
+
+    FT_Render_Mode       hint_mode;
+
+    T1_Decoder_Callback  parse_callback;
+    T1_Decoder_FuncsRec  funcs;
+
+  } T1_DecoderRec;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                            AFM PARSER                         *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  typedef struct AFM_ParserRec_*  AFM_Parser;
+
+  typedef struct  AFM_Parser_FuncsRec_
+  {
+    FT_Error
+    (*init)( AFM_Parser  parser,
+             FT_Memory   memory,
+             FT_Byte*    base,
+             FT_Byte*    limit );
+
+    void
+    (*done)( AFM_Parser  parser );
+
+    FT_Error
+    (*parse)( AFM_Parser  parser );
+
+  } AFM_Parser_FuncsRec;
+
+  typedef struct AFM_StreamRec_*  AFM_Stream;
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    AFM_ParserRec                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    An AFM_Parser is a parser for the AFM files.                       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    memory    :: The object used for memory operations (alloc and      */
+  /*                 realloc).                                             */
+  /*                                                                       */
+  /*    stream    :: This is an opaque object.                             */
+  /*                                                                       */
+  /*    FontInfo  :: The result will be stored here.                       */
+  /*                                                                       */
+  /*    get_index :: A user provided function to get a glyph index by its  */
+  /*                 name.                                                 */
+  /*                                                                       */
+  typedef struct  AFM_ParserRec_
+  {
+    FT_Memory     memory;
+    AFM_Stream    stream;
+
+    AFM_FontInfo  FontInfo;
+
+    FT_Int
+    (*get_index)( const char*  name,
+                  FT_UInt      len,
+                  void*        user_data );
+
+    void*         user_data;
+
+  } AFM_ParserRec;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                     TYPE1 CHARMAPS                            *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  typedef const struct T1_CMap_ClassesRec_*  T1_CMap_Classes;
+
+  typedef struct T1_CMap_ClassesRec_
+  {
+    FT_CMap_Class  standard;
+    FT_CMap_Class  expert;
+    FT_CMap_Class  custom;
+    FT_CMap_Class  unicode;
+
+  } T1_CMap_ClassesRec;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                        PSAux Module Interface                 *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  typedef struct  PSAux_ServiceRec_
+  {
+    /* don't use `PS_Table_Funcs' and friends to avoid compiler warnings */
+    const PS_Table_FuncsRec*    ps_table_funcs;
+    const PS_Parser_FuncsRec*   ps_parser_funcs;
+    const T1_Builder_FuncsRec*  t1_builder_funcs;
+    const T1_Decoder_FuncsRec*  t1_decoder_funcs;
+
+    void
+    (*t1_decrypt)( FT_Byte*   buffer,
+                   FT_Offset  length,
+                   FT_UShort  seed );
+
+    T1_CMap_Classes  t1_cmap_classes;
+
+    /* fields after this comment line were added after version 2.1.10 */
+    const AFM_Parser_FuncsRec*  afm_parser_funcs;
+
+  } PSAux_ServiceRec, *PSAux_Service;
+
+  /* backwards-compatible type definition */
+  typedef PSAux_ServiceRec   PSAux_Interface;
+
+FT_END_HEADER
+
+#endif /* __PSAUX_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/pshints.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,687 @@
+/***************************************************************************/
+/*                                                                         */
+/*  pshints.h                                                              */
+/*                                                                         */
+/*    Interface to Postscript-specific (Type 1 and Type 2) hints           */
+/*    recorders (specification only).  These are used to support native    */
+/*    T1/T2 hints in the `type1', `cid', and `cff' font drivers.           */
+/*                                                                         */
+/*  Copyright 2001, 2002, 2003, 2005, 2006 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, FTL.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 __PSHINTS_H__
+#define __PSHINTS_H__
+
+
+#include <ft2build.h>
+#include FT_FREETYPE_H
+#include FT_TYPE1_TABLES_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****               INTERNAL REPRESENTATION OF GLOBALS              *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  typedef struct PSH_GlobalsRec_*  PSH_Globals;
+
+  typedef FT_Error
+  (*PSH_Globals_NewFunc)( FT_Memory     memory,
+                          T1_Private*   private_dict,
+                          PSH_Globals*  aglobals );
+
+  typedef FT_Error
+  (*PSH_Globals_SetScaleFunc)( PSH_Globals  globals,
+                               FT_Fixed     x_scale,
+                               FT_Fixed     y_scale,
+                               FT_Fixed     x_delta,
+                               FT_Fixed     y_delta );
+
+  typedef void
+  (*PSH_Globals_DestroyFunc)( PSH_Globals  globals );
+
+
+  typedef struct  PSH_Globals_FuncsRec_
+  {
+    PSH_Globals_NewFunc       create;
+    PSH_Globals_SetScaleFunc  set_scale;
+    PSH_Globals_DestroyFunc   destroy;
+
+  } PSH_Globals_FuncsRec, *PSH_Globals_Funcs;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                  PUBLIC TYPE 1 HINTS RECORDER                 *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  /*************************************************************************
+   *
+   * @type:
+   *   T1_Hints
+   *
+   * @description:
+   *   This is a handle to an opaque structure used to record glyph hints
+   *   from a Type 1 character glyph character string.
+   *
+   *   The methods used to operate on this object are defined by the
+   *   @T1_Hints_FuncsRec structure.  Recording glyph hints is normally
+   *   achieved through the following scheme:
+   *
+   *   - Open a new hint recording session by calling the `open' method.
+   *     This rewinds the recorder and prepare it for new input.
+   *
+   *   - For each hint found in the glyph charstring, call the corresponding
+   *     method (`stem', `stem3', or `reset').  Note that these functions do
+   *     not return an error code.
+   *
+   *   - Close the recording session by calling the `close' method.  It
+   *     returns an error code if the hints were invalid or something
+   *     strange happened (e.g., memory shortage).
+   *
+   *   The hints accumulated in the object can later be used by the
+   *   PostScript hinter.
+   *
+   */
+  typedef struct T1_HintsRec_*  T1_Hints;
+
+
+  /*************************************************************************
+   *
+   * @type:
+   *   T1_Hints_Funcs
+   *
+   * @description:
+   *   A pointer to the @T1_Hints_FuncsRec structure that defines the API of
+   *   a given @T1_Hints object.
+   *
+   */
+  typedef const struct T1_Hints_FuncsRec_*  T1_Hints_Funcs;
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   T1_Hints_OpenFunc
+   *
+   * @description:
+   *   A method of the @T1_Hints class used to prepare it for a new Type 1
+   *   hints recording session.
+   *
+   * @input:
+   *   hints ::
+   *     A handle to the Type 1 hints recorder.
+   *
+   * @note:
+   *   You should always call the @T1_Hints_CloseFunc method in order to
+   *   close an opened recording session.
+   *
+   */
+  typedef void
+  (*T1_Hints_OpenFunc)( T1_Hints  hints );
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   T1_Hints_SetStemFunc
+   *
+   * @description:
+   *   A method of the @T1_Hints class used to record a new horizontal or
+   *   vertical stem.  This corresponds to the Type 1 `hstem' and `vstem'
+   *   operators.
+   *
+   * @input:
+   *   hints ::
+   *     A handle to the Type 1 hints recorder.
+   *
+   *   dimension ::
+   *     0 for horizontal stems (hstem), 1 for vertical ones (vstem).
+   *
+   *   coords ::
+   *     Array of 2 integers, used as (position,length) stem descriptor.
+   *
+   * @note:
+   *   Use vertical coordinates (y) for horizontal stems (dim=0).  Use
+   *   horizontal coordinates (x) for vertical stems (dim=1).
+   *
+   *   `coords[0]' is the absolute stem position (lowest coordinate);
+   *   `coords[1]' is the length.
+   *
+   *   The length can be negative, in which case it must be either -20 or
+   *   -21.  It is interpreted as a `ghost' stem, according to the Type 1
+   *   specification.
+   *
+   *   If the length is -21 (corresponding to a bottom ghost stem), then
+   *   the real stem position is `coords[0]+coords[1]'.
+   *
+   */
+  typedef void
+  (*T1_Hints_SetStemFunc)( T1_Hints  hints,
+                           FT_UInt   dimension,
+                           FT_Long*  coords );
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   T1_Hints_SetStem3Func
+   *
+   * @description:
+   *   A method of the @T1_Hints class used to record three
+   *   counter-controlled horizontal or vertical stems at once.
+   *
+   * @input:
+   *   hints ::
+   *     A handle to the Type 1 hints recorder.
+   *
+   *   dimension ::
+   *     0 for horizontal stems, 1 for vertical ones.
+   *
+   *   coords ::
+   *     An array of 6 integers, holding 3 (position,length) pairs for the
+   *     counter-controlled stems.
+   *
+   * @note:
+   *   Use vertical coordinates (y) for horizontal stems (dim=0).  Use
+   *   horizontal coordinates (x) for vertical stems (dim=1).
+   *
+   *   The lengths cannot be negative (ghost stems are never
+   *   counter-controlled).
+   *
+   */
+  typedef void
+  (*T1_Hints_SetStem3Func)( T1_Hints  hints,
+                            FT_UInt   dimension,
+                            FT_Long*  coords );
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   T1_Hints_ResetFunc
+   *
+   * @description:
+   *   A method of the @T1_Hints class used to reset the stems hints in a
+   *   recording session.
+   *
+   * @input:
+   *   hints ::
+   *     A handle to the Type 1 hints recorder.
+   *
+   *   end_point ::
+   *     The index of the last point in the input glyph in which the
+   *     previously defined hints apply.
+   *
+   */
+  typedef void
+  (*T1_Hints_ResetFunc)( T1_Hints  hints,
+                         FT_UInt   end_point );
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   T1_Hints_CloseFunc
+   *
+   * @description:
+   *   A method of the @T1_Hints class used to close a hint recording
+   *   session.
+   *
+   * @input:
+   *   hints ::
+   *     A handle to the Type 1 hints recorder.
+   *
+   *   end_point ::
+   *     The index of the last point in the input glyph.
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   *
+   * @note:
+   *   The error code is set to indicate that an error occurred during the
+   *   recording session.
+   *
+   */
+  typedef FT_Error
+  (*T1_Hints_CloseFunc)( T1_Hints  hints,
+                         FT_UInt   end_point );
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   T1_Hints_ApplyFunc
+   *
+   * @description:
+   *   A method of the @T1_Hints class used to apply hints to the
+   *   corresponding glyph outline.  Must be called once all hints have been
+   *   recorded.
+   *
+   * @input:
+   *   hints ::
+   *     A handle to the Type 1 hints recorder.
+   *
+   *   outline ::
+   *     A pointer to the target outline descriptor.
+   *
+   *   globals ::
+   *     The hinter globals for this font.
+   *
+   *   hint_mode ::
+   *     Hinting information.
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   *
+   * @note:
+   *   On input, all points within the outline are in font coordinates. On
+   *   output, they are in 1/64th of pixels.
+   *
+   *   The scaling transformation is taken from the `globals' object which
+   *   must correspond to the same font as the glyph.
+   *
+   */
+  typedef FT_Error
+  (*T1_Hints_ApplyFunc)( T1_Hints        hints,
+                         FT_Outline*     outline,
+                         PSH_Globals     globals,
+                         FT_Render_Mode  hint_mode );
+
+
+  /*************************************************************************
+   *
+   * @struct:
+   *   T1_Hints_FuncsRec
+   *
+   * @description:
+   *   The structure used to provide the API to @T1_Hints objects.
+   *
+   * @fields:
+   *   hints ::
+   *     A handle to the T1 Hints recorder.
+   *
+   *   open ::
+   *     The function to open a recording session.
+   *
+   *   close ::
+   *     The function to close a recording session.
+   *
+   *   stem ::
+   *     The function to set a simple stem.
+   *
+   *   stem3 ::
+   *     The function to set counter-controlled stems.
+   *
+   *   reset ::
+   *     The function to reset stem hints.
+   *
+   *   apply ::
+   *     The function to apply the hints to the corresponding glyph outline.
+   *
+   */
+  typedef struct  T1_Hints_FuncsRec_
+  {
+    T1_Hints               hints;
+    T1_Hints_OpenFunc      open;
+    T1_Hints_CloseFunc     close;
+    T1_Hints_SetStemFunc   stem;
+    T1_Hints_SetStem3Func  stem3;
+    T1_Hints_ResetFunc     reset;
+    T1_Hints_ApplyFunc     apply;
+
+  } T1_Hints_FuncsRec;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****                  PUBLIC TYPE 2 HINTS RECORDER                 *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  /*************************************************************************
+   *
+   * @type:
+   *   T2_Hints
+   *
+   * @description:
+   *   This is a handle to an opaque structure used to record glyph hints
+   *   from a Type 2 character glyph character string.
+   *
+   *   The methods used to operate on this object are defined by the
+   *   @T2_Hints_FuncsRec structure.  Recording glyph hints is normally
+   *   achieved through the following scheme:
+   *
+   *   - Open a new hint recording session by calling the `open' method.
+   *     This rewinds the recorder and prepare it for new input.
+   *
+   *   - For each hint found in the glyph charstring, call the corresponding
+   *     method (`stems', `hintmask', `counters').  Note that these
+   *     functions do not return an error code.
+   *
+   *   - Close the recording session by calling the `close' method.  It
+   *     returns an error code if the hints were invalid or something
+   *     strange happened (e.g., memory shortage).
+   *
+   *   The hints accumulated in the object can later be used by the
+   *   Postscript hinter.
+   *
+   */
+  typedef struct T2_HintsRec_*  T2_Hints;
+
+
+  /*************************************************************************
+   *
+   * @type:
+   *   T2_Hints_Funcs
+   *
+   * @description:
+   *   A pointer to the @T2_Hints_FuncsRec structure that defines the API of
+   *   a given @T2_Hints object.
+   *
+   */
+  typedef const struct T2_Hints_FuncsRec_*  T2_Hints_Funcs;
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   T2_Hints_OpenFunc
+   *
+   * @description:
+   *   A method of the @T2_Hints class used to prepare it for a new Type 2
+   *   hints recording session.
+   *
+   * @input:
+   *   hints ::
+   *     A handle to the Type 2 hints recorder.
+   *
+   * @note:
+   *   You should always call the @T2_Hints_CloseFunc method in order to
+   *   close an opened recording session.
+   *
+   */
+  typedef void
+  (*T2_Hints_OpenFunc)( T2_Hints  hints );
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   T2_Hints_StemsFunc
+   *
+   * @description:
+   *   A method of the @T2_Hints class used to set the table of stems in
+   *   either the vertical or horizontal dimension.  Equivalent to the
+   *   `hstem', `vstem', `hstemhm', and `vstemhm' Type 2 operators.
+   *
+   * @input:
+   *   hints ::
+   *     A handle to the Type 2 hints recorder.
+   *
+   *   dimension ::
+   *     0 for horizontal stems (hstem), 1 for vertical ones (vstem).
+   *
+   *   count ::
+   *     The number of stems.
+   *
+   *   coords ::
+   *     An array of `count' (position,length) pairs.
+   *
+   * @note:
+   *   Use vertical coordinates (y) for horizontal stems (dim=0).  Use
+   *   horizontal coordinates (x) for vertical stems (dim=1).
+   *
+   *   There are `2*count' elements in the `coords' aray.  Each even element
+   *   is an absolute position in font units, each odd element is a length
+   *   in font units.
+   *
+   *   A length can be negative, in which case it must be either -20 or
+   *   -21.  It is interpreted as a `ghost' stem, according to the Type 1
+   *   specification.
+   *
+   */
+  typedef void
+  (*T2_Hints_StemsFunc)( T2_Hints   hints,
+                         FT_UInt    dimension,
+                         FT_UInt    count,
+                         FT_Fixed*  coordinates );
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   T2_Hints_MaskFunc
+   *
+   * @description:
+   *   A method of the @T2_Hints class used to set a given hintmask (this
+   *   corresponds to the `hintmask' Type 2 operator).
+   *
+   * @input:
+   *   hints ::
+   *     A handle to the Type 2 hints recorder.
+   *
+   *   end_point ::
+   *     The glyph index of the last point to which the previously defined
+   *     or activated hints apply.
+   *
+   *   bit_count ::
+   *     The number of bits in the hint mask.
+   *
+   *   bytes ::
+   *     An array of bytes modelling the hint mask.
+   *
+   * @note:
+   *   If the hintmask starts the charstring (before any glyph point
+   *   definition), the value of `end_point' should be 0.
+   *
+   *   `bit_count' is the number of meaningful bits in the `bytes' array; it
+   *   must be equal to the total number of hints defined so far (i.e.,
+   *   horizontal+verticals).
+   *
+   *   The `bytes' array can come directly from the Type 2 charstring and
+   *   respects the same format.
+   *
+   */
+  typedef void
+  (*T2_Hints_MaskFunc)( T2_Hints        hints,
+                        FT_UInt         end_point,
+                        FT_UInt         bit_count,
+                        const FT_Byte*  bytes );
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   T2_Hints_CounterFunc
+   *
+   * @description:
+   *   A method of the @T2_Hints class used to set a given counter mask
+   *   (this corresponds to the `hintmask' Type 2 operator).
+   *
+   * @input:
+   *   hints ::
+   *     A handle to the Type 2 hints recorder.
+   *
+   *   end_point ::
+   *     A glyph index of the last point to which the previously defined or
+   *     active hints apply.
+   *
+   *   bit_count ::
+   *     The number of bits in the hint mask.
+   *
+   *   bytes ::
+   *     An array of bytes modelling the hint mask.
+   *
+   * @note:
+   *   If the hintmask starts the charstring (before any glyph point
+   *   definition), the value of `end_point' should be 0.
+   *
+   *   `bit_count' is the number of meaningful bits in the `bytes' array; it
+   *   must be equal to the total number of hints defined so far (i.e.,
+   *   horizontal+verticals).
+   *
+   *    The `bytes' array can come directly from the Type 2 charstring and
+   *    respects the same format.
+   *
+   */
+  typedef void
+  (*T2_Hints_CounterFunc)( T2_Hints        hints,
+                           FT_UInt         bit_count,
+                           const FT_Byte*  bytes );
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   T2_Hints_CloseFunc
+   *
+   * @description:
+   *   A method of the @T2_Hints class used to close a hint recording
+   *   session.
+   *
+   * @input:
+   *   hints ::
+   *     A handle to the Type 2 hints recorder.
+   *
+   *   end_point ::
+   *     The index of the last point in the input glyph.
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   *
+   * @note:
+   *   The error code is set to indicate that an error occurred during the
+   *   recording session.
+   *
+   */
+  typedef FT_Error
+  (*T2_Hints_CloseFunc)( T2_Hints  hints,
+                         FT_UInt   end_point );
+
+
+  /*************************************************************************
+   *
+   * @functype:
+   *   T2_Hints_ApplyFunc
+   *
+   * @description:
+   *   A method of the @T2_Hints class used to apply hints to the
+   *   corresponding glyph outline.  Must be called after the `close'
+   *   method.
+   *
+   * @input:
+   *   hints ::
+   *     A handle to the Type 2 hints recorder.
+   *
+   *   outline ::
+   *     A pointer to the target outline descriptor.
+   *
+   *   globals ::
+   *     The hinter globals for this font.
+   *
+   *   hint_mode ::
+   *     Hinting information.
+   *
+   * @return:
+   *   FreeType error code.  0 means success.
+   *
+   * @note:
+   *   On input, all points within the outline are in font coordinates. On
+   *   output, they are in 1/64th of pixels.
+   *
+   *   The scaling transformation is taken from the `globals' object which
+   *   must correspond to the same font than the glyph.
+   *
+   */
+  typedef FT_Error
+  (*T2_Hints_ApplyFunc)( T2_Hints        hints,
+                         FT_Outline*     outline,
+                         PSH_Globals     globals,
+                         FT_Render_Mode  hint_mode );
+
+
+  /*************************************************************************
+   *
+   * @struct:
+   *   T2_Hints_FuncsRec
+   *
+   * @description:
+   *   The structure used to provide the API to @T2_Hints objects.
+   *
+   * @fields:
+   *   hints ::
+   *     A handle to the T2 hints recorder object.
+   *
+   *   open ::
+   *     The function to open a recording session.
+   *
+   *   close ::
+   *     The function to close a recording session.
+   *
+   *   stems ::
+   *     The function to set the dimension's stems table.
+   *
+   *   hintmask ::
+   *     The function to set hint masks.
+   *
+   *   counter ::
+   *     The function to set counter masks.
+   *
+   *   apply ::
+   *     The function to apply the hints on the corresponding glyph outline.
+   *
+   */
+  typedef struct  T2_Hints_FuncsRec_
+  {
+    T2_Hints              hints;
+    T2_Hints_OpenFunc     open;
+    T2_Hints_CloseFunc    close;
+    T2_Hints_StemsFunc    stems;
+    T2_Hints_MaskFunc     hintmask;
+    T2_Hints_CounterFunc  counter;
+    T2_Hints_ApplyFunc    apply;
+
+  } T2_Hints_FuncsRec;
+
+
+  /* */
+
+
+  typedef struct  PSHinter_Interface_
+  {
+    PSH_Globals_Funcs  (*get_globals_funcs)( FT_Module  module );
+    T1_Hints_Funcs     (*get_t1_funcs)     ( FT_Module  module );
+    T2_Hints_Funcs     (*get_t2_funcs)     ( FT_Module  module );
+
+  } PSHinter_Interface;
+
+  typedef PSHinter_Interface*  PSHinter_Service;
+
+
+FT_END_HEADER
+
+#endif /* __PSHINTS_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svbdf.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,57 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svbdf.h                                                                */
+/*                                                                         */
+/*    The FreeType BDF services (specification).                           */
+/*                                                                         */
+/*  Copyright 2003 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, FTL.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 __SVBDF_H__
+#define __SVBDF_H__
+
+#include FT_BDF_H
+#include FT_INTERNAL_SERVICE_H
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_BDF  "bdf"
+
+  typedef FT_Error
+  (*FT_BDF_GetCharsetIdFunc)( FT_Face       face,
+                              const char*  *acharset_encoding,
+                              const char*  *acharset_registry );
+
+  typedef FT_Error
+  (*FT_BDF_GetPropertyFunc)( FT_Face           face,
+                             const char*       prop_name,
+                             BDF_PropertyRec  *aproperty );
+
+
+  FT_DEFINE_SERVICE( BDF )
+  {
+    FT_BDF_GetCharsetIdFunc  get_charset_id;
+    FT_BDF_GetPropertyFunc   get_property;
+  };
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVBDF_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svgldict.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,60 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svgldict.h                                                             */
+/*                                                                         */
+/*    The FreeType glyph dictionary services (specification).              */
+/*                                                                         */
+/*  Copyright 2003 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, FTL.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 __SVGLDICT_H__
+#define __SVGLDICT_H__
+
+#include FT_INTERNAL_SERVICE_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*
+   *  A service used to retrieve glyph names, as well as to find the
+   *  index of a given glyph name in a font.
+   *
+   */
+
+#define FT_SERVICE_ID_GLYPH_DICT  "glyph-dict"
+
+
+  typedef FT_Error
+  (*FT_GlyphDict_GetNameFunc)( FT_Face     face,
+                               FT_UInt     glyph_index,
+                               FT_Pointer  buffer,
+                               FT_UInt     buffer_max );
+
+  typedef FT_UInt
+  (*FT_GlyphDict_NameIndexFunc)( FT_Face     face,
+                                 FT_String*  glyph_name );
+
+
+  FT_DEFINE_SERVICE( GlyphDict )
+  {
+    FT_GlyphDict_GetNameFunc    get_name;
+    FT_GlyphDict_NameIndexFunc  name_index;  /* optional */
+  };
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVGLDICT_H__ */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svgxval.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,72 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svgxval.h                                                              */
+/*                                                                         */
+/*    FreeType API for validating TrueTypeGX/AAT tables (specification).   */
+/*                                                                         */
+/*  Copyright 2004, 2005 by                                                */
+/*  Masatake YAMATO, Red Hat K.K.,                                         */
+/*  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, FTL.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+/***************************************************************************/
+/*                                                                         */
+/* gxvalid is derived from both gxlayout module and otvalid module.        */
+/* Development of gxlayout is supported by the Information-technology      */
+/* Promotion Agency(IPA), Japan.                                           */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __SVGXVAL_H__
+#define __SVGXVAL_H__
+
+#include FT_GX_VALIDATE_H
+#include FT_INTERNAL_VALIDATE_H
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_GX_VALIDATE           "truetypegx-validate"
+#define FT_SERVICE_ID_CLASSICKERN_VALIDATE  "classickern-validate"
+
+  typedef FT_Error
+  (*gxv_validate_func)( FT_Face   face,
+                        FT_UInt   gx_flags,
+                        FT_Bytes  tables[FT_VALIDATE_GX_LENGTH],
+                        FT_UInt   table_length );
+
+
+  typedef FT_Error
+  (*ckern_validate_func)( FT_Face   face,
+                          FT_UInt   ckern_flags,
+                          FT_Bytes  *ckern_table );
+
+
+  FT_DEFINE_SERVICE( GXvalidate )
+  {
+    gxv_validate_func  validate;
+  };
+
+  FT_DEFINE_SERVICE( CKERNvalidate )
+  {
+    ckern_validate_func  validate;
+  };
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVGXVAL_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svkern.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,51 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svkern.h                                                               */
+/*                                                                         */
+/*    The FreeType Kerning service (specification).                        */
+/*                                                                         */
+/*  Copyright 2006 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, FTL.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 __SVKERN_H__
+#define __SVKERN_H__
+
+#include FT_INTERNAL_SERVICE_H
+#include FT_TRUETYPE_TABLES_H
+
+
+FT_BEGIN_HEADER
+
+#define FT_SERVICE_ID_KERNING  "kerning"
+
+
+  typedef FT_Error
+  (*FT_Kerning_TrackGetFunc)( FT_Face    face,
+                              FT_Fixed   point_size,
+                              FT_Int     degree,
+                              FT_Fixed*  akerning );
+
+  FT_DEFINE_SERVICE( Kerning )
+  {
+    FT_Kerning_TrackGetFunc  get_track;  
+  };
+
+  /* */
+
+ 
+FT_END_HEADER
+
+
+#endif /* __SVKERN_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svmm.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,79 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svmm.h                                                                 */
+/*                                                                         */
+/*    The FreeType Multiple Masters and GX var services (specification).   */
+/*                                                                         */
+/*  Copyright 2003, 2004 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, FTL.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 __SVMM_H__
+#define __SVMM_H__
+
+#include FT_INTERNAL_SERVICE_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*
+   *  A service used to manage multiple-masters data in a given face.
+   *
+   *  See the related APIs in `ftmm.h' (FT_MULTIPLE_MASTERS_H).
+   *
+   */
+
+#define FT_SERVICE_ID_MULTI_MASTERS  "multi-masters"
+
+
+  typedef FT_Error
+  (*FT_Get_MM_Func)( FT_Face           face,
+                     FT_Multi_Master*  master );
+
+  typedef FT_Error
+  (*FT_Get_MM_Var_Func)( FT_Face      face,
+                         FT_MM_Var*  *master );
+
+  typedef FT_Error
+  (*FT_Set_MM_Design_Func)( FT_Face   face,
+                            FT_UInt   num_coords,
+                            FT_Long*  coords );
+
+  typedef FT_Error
+  (*FT_Set_Var_Design_Func)( FT_Face    face,
+                             FT_UInt    num_coords,
+                             FT_Fixed*  coords );
+
+  typedef FT_Error
+  (*FT_Set_MM_Blend_Func)( FT_Face   face,
+                           FT_UInt   num_coords,
+                           FT_Long*  coords );
+
+
+  FT_DEFINE_SERVICE( MultiMasters )
+  {
+    FT_Get_MM_Func          get_mm;
+    FT_Set_MM_Design_Func   set_mm_design;
+    FT_Set_MM_Blend_Func    set_mm_blend;
+    FT_Get_MM_Var_Func      get_mm_var;
+    FT_Set_Var_Design_Func  set_var_design;
+  };
+
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __SVMM_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svotval.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,55 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svotval.h                                                              */
+/*                                                                         */
+/*    The FreeType OpenType validation service (specification).            */
+/*                                                                         */
+/*  Copyright 2004, 2006 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, FTL.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 __SVOTVAL_H__
+#define __SVOTVAL_H__
+
+#include FT_OPENTYPE_VALIDATE_H
+#include FT_INTERNAL_VALIDATE_H
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_OPENTYPE_VALIDATE  "opentype-validate"
+
+
+  typedef FT_Error
+  (*otv_validate_func)( FT_Face    face,
+                        FT_UInt    ot_flags,
+                        FT_Bytes  *base,
+                        FT_Bytes  *gdef,
+                        FT_Bytes  *gpos,
+                        FT_Bytes  *gsub,
+                        FT_Bytes  *jstf );
+
+
+  FT_DEFINE_SERVICE( OTvalidate )
+  {
+    otv_validate_func  validate;
+  };
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVOTVAL_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svpfr.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,66 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svpfr.h                                                                */
+/*                                                                         */
+/*    Internal PFR service functions (specification).                      */
+/*                                                                         */
+/*  Copyright 2003, 2006 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, FTL.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 __SVPFR_H__
+#define __SVPFR_H__
+
+#include FT_PFR_H
+#include FT_INTERNAL_SERVICE_H
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_PFR_METRICS  "pfr-metrics"
+
+
+  typedef FT_Error
+  (*FT_PFR_GetMetricsFunc)( FT_Face    face,
+                            FT_UInt   *aoutline,
+                            FT_UInt   *ametrics,
+                            FT_Fixed  *ax_scale,
+                            FT_Fixed  *ay_scale );
+
+  typedef FT_Error
+  (*FT_PFR_GetKerningFunc)( FT_Face     face,
+                            FT_UInt     left,
+                            FT_UInt     right,
+                            FT_Vector  *avector );
+
+  typedef FT_Error
+  (*FT_PFR_GetAdvanceFunc)( FT_Face   face,
+                            FT_UInt   gindex,
+                            FT_Pos   *aadvance );
+
+
+  FT_DEFINE_SERVICE( PfrMetrics )
+  {
+    FT_PFR_GetMetricsFunc  get_metrics;
+    FT_PFR_GetKerningFunc  get_kerning;
+    FT_PFR_GetAdvanceFunc  get_advance;
+
+  };
+
+ /* */
+
+FT_END_HEADER
+
+#endif /* __SVPFR_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svpostnm.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,58 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svpostnm.h                                                             */
+/*                                                                         */
+/*    The FreeType PostScript name services (specification).               */
+/*                                                                         */
+/*  Copyright 2003 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, FTL.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 __SVPOSTNM_H__
+#define __SVPOSTNM_H__
+
+#include FT_INTERNAL_SERVICE_H
+
+
+FT_BEGIN_HEADER
+
+  /*
+   *  A trivial service used to retrieve the PostScript name of a given
+   *  font when available.  The `get_name' field should never be NULL.
+   *
+   *  The correponding function can return NULL to indicate that the
+   *  PostScript name is not available.
+   *
+   *  The name is owned by the face and will be destroyed with it.
+   */
+
+#define FT_SERVICE_ID_POSTSCRIPT_FONT_NAME  "postscript-font-name"
+
+
+  typedef const char*
+  (*FT_PsName_GetFunc)( FT_Face  face );
+
+
+  FT_DEFINE_SERVICE( PsFontName )
+  {
+    FT_PsName_GetFunc  get_ps_font_name;
+  };
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVPOSTNM_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svpscmap.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,120 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svpscmap.h                                                             */
+/*                                                                         */
+/*    The FreeType PostScript charmap service (specification).             */
+/*                                                                         */
+/*  Copyright 2003, 2006 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, FTL.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 __SVPSCMAP_H__
+#define __SVPSCMAP_H__
+
+#include FT_INTERNAL_OBJECTS_H
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_POSTSCRIPT_CMAPS  "postscript-cmaps"
+
+
+  /*
+   *  Adobe glyph name to unicode value.
+   */
+  typedef FT_UInt32
+  (*PS_Unicode_ValueFunc)( const char*  glyph_name );
+
+  /*
+   *  Macintosh name id to glyph name.  NULL if invalid index.
+   */
+  typedef const char*
+  (*PS_Macintosh_NameFunc)( FT_UInt  name_index );
+
+  /*
+   *  Adobe standard string ID to glyph name.  NULL if invalid index.
+   */
+  typedef const char*
+  (*PS_Adobe_Std_StringsFunc)( FT_UInt  string_index );
+
+
+  /*
+   *  Simple unicode -> glyph index charmap built from font glyph names
+   *  table.
+   */
+  typedef struct  PS_UniMap_
+  {
+    FT_UInt32  unicode;      /* bit 31 set: is glyph variant */
+    FT_UInt    glyph_index;
+
+  } PS_UniMap;
+
+
+  typedef struct PS_UnicodesRec_*  PS_Unicodes;
+
+  typedef struct  PS_UnicodesRec_
+  {
+    FT_CMapRec  cmap;
+    FT_UInt     num_maps;
+    PS_UniMap*  maps;
+
+  } PS_UnicodesRec;
+
+
+  /*
+   *  A function which returns a glyph name for a given index.  Returns
+   *  NULL if invalid index.
+   */
+  typedef const char*
+  (*PS_Glyph_NameFunc)( FT_Pointer  data,
+                        FT_UInt     string_index );
+
+  typedef FT_Error
+  (*PS_Unicodes_InitFunc)( FT_Memory          memory,
+                           PS_Unicodes        unicodes,
+                           FT_UInt            num_glyphs,
+                           PS_Glyph_NameFunc  get_glyph_name,
+                           FT_Pointer         glyph_data );
+
+  typedef FT_UInt
+  (*PS_Unicodes_CharIndexFunc)( PS_Unicodes  unicodes,
+                                FT_UInt32    unicode );
+
+  typedef FT_ULong
+  (*PS_Unicodes_CharNextFunc)( PS_Unicodes  unicodes,
+                               FT_UInt32   *unicode );
+
+
+  FT_DEFINE_SERVICE( PsCMaps )
+  {
+    PS_Unicode_ValueFunc       unicode_value;
+
+    PS_Unicodes_InitFunc       unicodes_init;
+    PS_Unicodes_CharIndexFunc  unicodes_char_index;
+    PS_Unicodes_CharNextFunc   unicodes_char_next;
+
+    PS_Macintosh_NameFunc      macintosh_name;
+    PS_Adobe_Std_StringsFunc   adobe_std_strings;
+    const unsigned short*      adobe_std_encoding;
+    const unsigned short*      adobe_expert_encoding;
+  };
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVPSCMAP_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svpsinfo.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,60 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svpsinfo.h                                                             */
+/*                                                                         */
+/*    The FreeType PostScript info service (specification).                */
+/*                                                                         */
+/*  Copyright 2003, 2004 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, FTL.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 __SVPSINFO_H__
+#define __SVPSINFO_H__
+
+#include FT_INTERNAL_SERVICE_H
+#include FT_INTERNAL_TYPE1_TYPES_H
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_POSTSCRIPT_INFO  "postscript-info"
+
+
+  typedef FT_Error
+  (*PS_GetFontInfoFunc)( FT_Face          face,
+                         PS_FontInfoRec*  afont_info );
+
+  typedef FT_Int
+  (*PS_HasGlyphNamesFunc)( FT_Face   face );
+
+  typedef FT_Error
+  (*PS_GetFontPrivateFunc)( FT_Face         face,
+                            PS_PrivateRec*  afont_private );
+
+
+  FT_DEFINE_SERVICE( PsInfo )
+  {
+    PS_GetFontInfoFunc     ps_get_font_info;
+    PS_HasGlyphNamesFunc   ps_has_glyph_names;
+    PS_GetFontPrivateFunc  ps_get_font_private;
+  };
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVPSINFO_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svsfnt.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,80 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svsfnt.h                                                               */
+/*                                                                         */
+/*    The FreeType SFNT table loading service (specification).             */
+/*                                                                         */
+/*  Copyright 2003, 2004 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, FTL.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 __SVSFNT_H__
+#define __SVSFNT_H__
+
+#include FT_INTERNAL_SERVICE_H
+#include FT_TRUETYPE_TABLES_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*
+   *  SFNT table loading service.
+   */
+
+#define FT_SERVICE_ID_SFNT_TABLE  "sfnt-table"
+
+
+  /*
+   * Used to implement FT_Load_Sfnt_Table().
+   */
+  typedef FT_Error
+  (*FT_SFNT_TableLoadFunc)( FT_Face    face,
+                            FT_ULong   tag,
+                            FT_Long    offset,
+                            FT_Byte*   buffer,
+                            FT_ULong*  length );
+
+  /*
+   * Used to implement FT_Get_Sfnt_Table().
+   */
+  typedef void*
+  (*FT_SFNT_TableGetFunc)( FT_Face      face,
+                           FT_Sfnt_Tag  tag );
+
+
+  /*
+   * Used to implement FT_Sfnt_Table_Info().
+   */
+  typedef FT_Error
+  (*FT_SFNT_TableInfoFunc)( FT_Face    face,
+                            FT_UInt    idx,
+                            FT_ULong  *tag,
+                            FT_ULong  *length );
+
+
+  FT_DEFINE_SERVICE( SFNT_Table )
+  {
+    FT_SFNT_TableLoadFunc  load_table;
+    FT_SFNT_TableGetFunc   get_table;
+    FT_SFNT_TableInfoFunc  table_info;
+  };
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVSFNT_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svttcmap.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,77 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svsttcmap.h                                                            */
+/*                                                                         */
+/*    The FreeType TrueType/sfnt cmap extra information service.           */
+/*                                                                         */
+/*  Copyright 2003 by                                                      */
+/*  Masatake YAMATO, Redhat K.K.                                           */
+/*                                                                         */
+/*  Copyright 2003 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, FTL.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+/* Development of this service is support of 
+   Information-technology Promotion Agency, Japan. */
+
+#ifndef __SVTTCMAP_H__
+#define __SVTTCMAP_H__ 
+
+#include FT_INTERNAL_SERVICE_H
+#include FT_TRUETYPE_TABLES_H
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_TT_CMAP "tt-cmaps"
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_CMapInfo                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to store TrueType/sfnt specific cmap information  */
+  /*    which is not covered by the generic @FT_CharMap structure.  This   */
+  /*    structure can be accessed with the @FT_Get_TT_CMap_Info function.  */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    language ::                                                        */
+  /*      The language ID used in Mac fonts.  Definitions of values are in */
+  /*      freetype/ttnameid.h.                                             */
+  /*                                                                       */
+  typedef struct  TT_CMapInfo_
+  {
+    FT_ULong language;
+
+  } TT_CMapInfo;
+
+
+  typedef FT_Error
+  (*TT_CMap_Info_GetFunc)( FT_CharMap    charmap,
+                           TT_CMapInfo  *cmap_info );
+
+
+  FT_DEFINE_SERVICE( TTCMaps )
+  {
+    TT_CMap_Info_GetFunc  get_cmap_info;
+  }; 
+  
+  /* */
+
+
+FT_END_HEADER
+
+#endif /* __SVTTCMAP_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svtteng.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,53 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svtteng.h                                                              */
+/*                                                                         */
+/*    The FreeType TrueType engine query service (specification).          */
+/*                                                                         */
+/*  Copyright 2006 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, FTL.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 __SVTTENG_H__
+#define __SVTTENG_H__
+
+#include FT_INTERNAL_SERVICE_H
+#include FT_MODULE_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*
+   *  SFNT table loading service.
+   */
+
+#define FT_SERVICE_ID_TRUETYPE_ENGINE  "truetype-engine"
+
+  /*
+   * Used to implement FT_Get_TrueType_Engine_Type
+   */
+
+  FT_DEFINE_SERVICE( TrueTypeEngine )
+  {
+    FT_TrueTypeEngineType  engine_type;
+  };
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVTTENG_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svwinfnt.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,50 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svwinfnt.h                                                             */
+/*                                                                         */
+/*    The FreeType Windows FNT/FONT service (specification).               */
+/*                                                                         */
+/*  Copyright 2003 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, FTL.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 __SVWINFNT_H__
+#define __SVWINFNT_H__
+
+#include FT_INTERNAL_SERVICE_H
+#include FT_WINFONTS_H
+
+
+FT_BEGIN_HEADER
+
+
+#define FT_SERVICE_ID_WINFNT  "winfonts"
+
+  typedef FT_Error
+  (*FT_WinFnt_GetHeaderFunc)( FT_Face               face,
+                              FT_WinFNT_HeaderRec  *aheader );
+
+
+  FT_DEFINE_SERVICE( WinFnt )
+  {
+    FT_WinFnt_GetHeaderFunc  get_header;
+  };
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVWINFNT_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/services/svxf86nm.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,55 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svxf86nm.h                                                             */
+/*                                                                         */
+/*    The FreeType XFree86 services (specification only).                  */
+/*                                                                         */
+/*  Copyright 2003 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, FTL.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 __SVXF86NM_H__
+#define __SVXF86NM_H__
+
+#include FT_INTERNAL_SERVICE_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*
+   *  A trivial service used to return the name of a face's font driver,
+   *  according to the XFree86 nomenclature.  Note that the service data
+   *  is a simple constant string pointer.
+   */
+
+#define FT_SERVICE_ID_XF86_NAME  "xf86-driver-name"
+
+#define FT_XF86_FORMAT_TRUETYPE  "TrueType"
+#define FT_XF86_FORMAT_TYPE_1    "Type 1"
+#define FT_XF86_FORMAT_BDF       "BDF"
+#define FT_XF86_FORMAT_PCF       "PCF"
+#define FT_XF86_FORMAT_TYPE_42   "Type 42"
+#define FT_XF86_FORMAT_CID       "CID Type 1"
+#define FT_XF86_FORMAT_CFF       "CFF"
+#define FT_XF86_FORMAT_PFR       "PFR"
+#define FT_XF86_FORMAT_WINFNT    "Windows FNT"
+
+  /* */
+
+ 
+FT_END_HEADER
+
+
+#endif /* __SVXF86NM_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/sfnt.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,762 @@
+/***************************************************************************/
+/*                                                                         */
+/*  sfnt.h                                                                 */
+/*                                                                         */
+/*    High-level `sfnt' driver interface (specification).                  */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 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, FTL.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 __SFNT_H__
+#define __SFNT_H__
+
+
+#include <ft2build.h>
+#include FT_INTERNAL_DRIVER_H
+#include FT_INTERNAL_TRUETYPE_TYPES_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Init_Face_Func                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    First part of the SFNT face object initialization.  This finds     */
+  /*    the face in a SFNT file or collection, and load its format tag in  */
+  /*    face->format_tag.                                                  */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    stream     :: The input stream.                                    */
+  /*                                                                       */
+  /*    face       :: A handle to the target face object.                  */
+  /*                                                                       */
+  /*    face_index :: The index of the TrueType font, if we are opening a  */
+  /*                  collection.                                          */
+  /*                                                                       */
+  /*    num_params :: The number of additional parameters.                 */
+  /*                                                                       */
+  /*    params     :: Optional additional parameters.                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The stream cursor must be at the font file's origin.               */
+  /*                                                                       */
+  /*    This function recognizes fonts embedded in a `TrueType             */
+  /*    collection'.                                                       */
+  /*                                                                       */
+  /*    Once the format tag has been validated by the font driver, it      */
+  /*    should then call the TT_Load_Face_Func() callback to read the rest */
+  /*    of the SFNT tables in the object.                                  */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Init_Face_Func)( FT_Stream      stream,
+                        TT_Face        face,
+                        FT_Int         face_index,
+                        FT_Int         num_params,
+                        FT_Parameter*  params );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Load_Face_Func                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Second part of the SFNT face object initialization.  This loads    */
+  /*    the common SFNT tables (head, OS/2, maxp, metrics, etc.) in the    */
+  /*    face object.                                                       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    stream     :: The input stream.                                    */
+  /*                                                                       */
+  /*    face       :: A handle to the target face object.                  */
+  /*                                                                       */
+  /*    face_index :: The index of the TrueType font, if we are opening a  */
+  /*                  collection.                                          */
+  /*                                                                       */
+  /*    num_params :: The number of additional parameters.                 */
+  /*                                                                       */
+  /*    params     :: Optional additional parameters.                      */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function must be called after TT_Init_Face_Func().            */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Load_Face_Func)( FT_Stream      stream,
+                        TT_Face        face,
+                        FT_Int         face_index,
+                        FT_Int         num_params,
+                        FT_Parameter*  params );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Done_Face_Func                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A callback used to delete the common SFNT data from a face.        */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face :: A handle to the target face object.                        */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function does NOT destroy the face object.                    */
+  /*                                                                       */
+  typedef void
+  (*TT_Done_Face_Func)( TT_Face  face );
+
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Load_SFNT_HeaderRec_Func                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Loads the header of a SFNT font file.  Supports collections.       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face       :: A handle to the target face object.                  */
+  /*                                                                       */
+  /*    stream     :: The input stream.                                    */
+  /*                                                                       */
+  /*    face_index :: The index of the TrueType font, if we are opening a  */
+  /*                  collection.                                          */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    sfnt       :: The SFNT header.                                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The stream cursor must be at the font file's origin.               */
+  /*                                                                       */
+  /*    This function recognizes fonts embedded in a `TrueType             */
+  /*    collection'.                                                       */
+  /*                                                                       */
+  /*    This function checks that the header is valid by looking at the    */
+  /*    values of `search_range', `entry_selector', and `range_shift'.     */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Load_SFNT_HeaderRec_Func)( TT_Face      face,
+                                  FT_Stream    stream,
+                                  FT_Long      face_index,
+                                  SFNT_Header  sfnt );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Load_Directory_Func                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Loads the table directory into a face object.                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face   :: A handle to the target face object.                      */
+  /*                                                                       */
+  /*    stream :: The input stream.                                        */
+  /*                                                                       */
+  /*    sfnt   :: The SFNT header.                                         */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The stream cursor must be on the first byte after the 4-byte font  */
+  /*    format tag.  This is the case just after a call to                 */
+  /*    TT_Load_Format_Tag().                                              */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Load_Directory_Func)( TT_Face      face,
+                             FT_Stream    stream,
+                             SFNT_Header  sfnt );
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Load_Any_Func                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Load any font table into client memory.                            */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face   :: The face object to look for.                             */
+  /*                                                                       */
+  /*    tag    :: The tag of table to load.  Use the value 0 if you want   */
+  /*              to access the whole font file, else set this parameter   */
+  /*              to a valid TrueType table tag that you can forge with    */
+  /*              the MAKE_TT_TAG macro.                                   */
+  /*                                                                       */
+  /*    offset :: The starting offset in the table (or the file if         */
+  /*              tag == 0).                                               */
+  /*                                                                       */
+  /*    length :: The address of the decision variable:                    */
+  /*                                                                       */
+  /*                If length == NULL:                                     */
+  /*                  Loads the whole table.  Returns an error if          */
+  /*                  `offset' == 0!                                       */
+  /*                                                                       */
+  /*                If *length == 0:                                       */
+  /*                  Exits immediately; returning the length of the given */
+  /*                  table or of the font file, depending on the value of */
+  /*                  `tag'.                                               */
+  /*                                                                       */
+  /*                If *length != 0:                                       */
+  /*                  Loads the next `length' bytes of table or font,      */
+  /*                  starting at offset `offset' (in table or font too).  */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    buffer :: The address of target buffer.                            */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    TrueType error code.  0 means success.                             */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Load_Any_Func)( TT_Face    face,
+                       FT_ULong   tag,
+                       FT_Long    offset,
+                       FT_Byte   *buffer,
+                       FT_ULong*  length );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Find_SBit_Image_Func                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Check whether an embedded bitmap (an `sbit') exists for a given    */
+  /*    glyph, at a given strike.                                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face          :: The target face object.                           */
+  /*                                                                       */
+  /*    glyph_index   :: The glyph index.                                  */
+  /*                                                                       */
+  /*    strike_index  :: The current strike index.                         */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    arange        :: The SBit range containing the glyph index.        */
+  /*                                                                       */
+  /*    astrike       :: The SBit strike containing the glyph index.       */
+  /*                                                                       */
+  /*    aglyph_offset :: The offset of the glyph data in `EBDT' table.     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.  Returns                    */
+  /*    SFNT_Err_Invalid_Argument if no sbit exists for the requested      */
+  /*    glyph.                                                             */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Find_SBit_Image_Func)( TT_Face          face,
+                              FT_UInt          glyph_index,
+                              FT_ULong         strike_index,
+                              TT_SBit_Range   *arange,
+                              TT_SBit_Strike  *astrike,
+                              FT_ULong        *aglyph_offset );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Load_SBit_Metrics_Func                                          */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Get the big metrics for a given embedded bitmap.                   */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    stream      :: The input stream.                                   */
+  /*                                                                       */
+  /*    range       :: The SBit range containing the glyph.                */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    big_metrics :: A big SBit metrics structure for the glyph.         */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The stream cursor must be positioned at the glyph's offset within  */
+  /*    the `EBDT' table before the call.                                  */
+  /*                                                                       */
+  /*    If the image format uses variable metrics, the stream cursor is    */
+  /*    positioned just after the metrics header in the `EBDT' table on    */
+  /*    function exit.                                                     */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Load_SBit_Metrics_Func)( FT_Stream        stream,
+                                TT_SBit_Range    range,
+                                TT_SBit_Metrics  metrics );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Load_SBit_Image_Func                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Load a given glyph sbit image from the font resource.  This also   */
+  /*    returns its metrics.                                               */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face ::                                                            */
+  /*      The target face object.                                          */
+  /*                                                                       */
+  /*    strike_index ::                                                    */
+  /*      The strike index.                                                */
+  /*                                                                       */
+  /*    glyph_index ::                                                     */
+  /*      The current glyph index.                                         */
+  /*                                                                       */
+  /*    load_flags ::                                                      */
+  /*      The current load flags.                                          */
+  /*                                                                       */
+  /*    stream ::                                                          */
+  /*      The input stream.                                                */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    amap ::                                                            */
+  /*      The target pixmap.                                               */
+  /*                                                                       */
+  /*    ametrics ::                                                        */
+  /*      A big sbit metrics structure for the glyph image.                */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.  Returns an error if no     */
+  /*    glyph sbit exists for the index.                                   */
+  /*                                                                       */
+  /*  <Note>                                                               */
+  /*    The `map.buffer' field is always freed before the glyph is loaded. */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Load_SBit_Image_Func)( TT_Face              face,
+                              FT_ULong             strike_index,
+                              FT_UInt              glyph_index,
+                              FT_UInt              load_flags,
+                              FT_Stream            stream,
+                              FT_Bitmap           *amap,
+                              TT_SBit_MetricsRec  *ametrics );
+
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Set_SBit_Strike_OldFunc                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Select an sbit strike for a given size request.                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face          :: The target face object.                           */
+  /*                                                                       */
+  /*    req           :: The size request.                                 */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    astrike_index :: The index of the sbit strike.                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.  Returns an error if no     */
+  /*    sbit strike exists for the selected ppem values.                   */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Set_SBit_Strike_OldFunc)( TT_Face    face,
+                                 FT_UInt    x_ppem,
+                                 FT_UInt    y_ppem,
+                                 FT_ULong*  astrike_index );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_CharMap_Load_Func                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Loads a given TrueType character map into memory.                  */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face   :: A handle to the parent face object.                      */
+  /*                                                                       */
+  /*    stream :: A handle to the current stream object.                   */
+  /*                                                                       */
+  /* <InOut>                                                               */
+  /*    cmap   :: A pointer to a cmap object.                              */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The function assumes that the stream is already in use (i.e.,      */
+  /*    opened).  In case of error, all partially allocated tables are     */
+  /*    released.                                                          */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_CharMap_Load_Func)( TT_Face    face,
+                           void*      cmap,
+                           FT_Stream  input );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_CharMap_Free_Func                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Destroys a character mapping table.                                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face :: A handle to the parent face object.                        */
+  /*                                                                       */
+  /*    cmap :: A handle to a cmap object.                                 */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_CharMap_Free_Func)( TT_Face       face,
+                           void*         cmap );
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Set_SBit_Strike_Func                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Select an sbit strike for a given size request.                    */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face          :: The target face object.                           */
+  /*                                                                       */
+  /*    req           :: The size request.                                 */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    astrike_index :: The index of the sbit strike.                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.  Returns an error if no     */
+  /*    sbit strike exists for the selected ppem values.                   */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Set_SBit_Strike_Func)( TT_Face          face,
+                              FT_Size_Request  req,
+                              FT_ULong*        astrike_index );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Load_Strike_Metrics_Func                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Load the metrics of a given strike.                                */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face          :: The target face object.                           */
+  /*                                                                       */
+  /*    strike_index  :: The strike index.                                 */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    metrics       :: the metrics of the strike.                        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.  Returns an error if no     */
+  /*    such sbit strike exists.                                           */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Load_Strike_Metrics_Func)( TT_Face           face,
+                                  FT_ULong          strike_index,
+                                  FT_Size_Metrics*  metrics );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Get_PS_Name_Func                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Get the PostScript glyph name of a glyph.                          */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    idx  :: The glyph index.                                           */
+  /*                                                                       */
+  /*    PSname :: The address of a string pointer.  Will be NULL in case   */
+  /*              of error, otherwise it is a pointer to the glyph name.   */
+  /*                                                                       */
+  /*              You must not modify the returned string!                 */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Get_PS_Name_Func)( TT_Face      face,
+                          FT_UInt      idx,
+                          FT_String**  PSname );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Load_Metrics_Func                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Load a metrics table, which is a table with a horizontal and a     */
+  /*    vertical version.                                                  */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face     :: A handle to the target face object.                    */
+  /*                                                                       */
+  /*    stream   :: The input stream.                                      */
+  /*                                                                       */
+  /*    vertical :: A boolean flag.  If set, load the vertical one.        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Load_Metrics_Func)( TT_Face    face,
+                           FT_Stream  stream,
+                           FT_Bool    vertical );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Get_Metrics_Func                                                */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Load the horizontal or vertical header in a face object.           */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face     :: A handle to the target face object.                    */
+  /*                                                                       */
+  /*    stream   :: The input stream.                                      */
+  /*                                                                       */
+  /*    vertical :: A boolean flag.  If set, load vertical metrics.        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Get_Metrics_Func)( TT_Face     face,
+                          FT_Bool     vertical,
+                          FT_UInt     gindex,
+                          FT_Short*   abearing,
+                          FT_UShort*  aadvance );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Load_Table_Func                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Load a given TrueType table.                                       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face   :: A handle to the target face object.                      */
+  /*                                                                       */
+  /*    stream :: The input stream.                                        */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The function uses `face->goto_table' to seek the stream to the     */
+  /*    start of the table, except while loading the font directory.       */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Load_Table_Func)( TT_Face    face,
+                         FT_Stream  stream );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Free_Table_Func                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Free a given TrueType table.                                       */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face :: A handle to the target face object.                        */
+  /*                                                                       */
+  typedef void
+  (*TT_Free_Table_Func)( TT_Face  face );
+
+
+  /*
+   * @functype:
+   *    TT_Face_GetKerningFunc
+   *
+   * @description:
+   *    Return the horizontal kerning value between two glyphs.
+   *
+   * @input:
+   *    face        :: A handle to the source face object.
+   *    left_glyph  :: The left glyph index.
+   *    right_glyph :: The right glyph index.
+   *
+   * @return:
+   *    The kerning value in font units.
+   */
+  typedef FT_Int
+  (*TT_Face_GetKerningFunc)( TT_Face  face,
+                             FT_UInt  left_glyph,
+                             FT_UInt  right_glyph );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    SFNT_Interface                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This structure holds pointers to the functions used to load and    */
+  /*    free the basic tables that are required in a `sfnt' font file.     */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    Check the various xxx_Func() descriptions for details.             */
+  /*                                                                       */
+  typedef struct  SFNT_Interface_
+  {
+    TT_Loader_GotoTableFunc      goto_table;
+
+    TT_Init_Face_Func            init_face;
+    TT_Load_Face_Func            load_face;
+    TT_Done_Face_Func            done_face;
+    FT_Module_Requester          get_interface;
+
+    TT_Load_Any_Func             load_any;
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+    TT_Load_SFNT_HeaderRec_Func  load_sfnt_header;
+    TT_Load_Directory_Func       load_directory;
+#endif
+
+    /* these functions are called by `load_face' but they can also  */
+    /* be called from external modules, if there is a need to do so */
+    TT_Load_Table_Func           load_head;
+    TT_Load_Metrics_Func         load_hhea;
+    TT_Load_Table_Func           load_cmap;
+    TT_Load_Table_Func           load_maxp;
+    TT_Load_Table_Func           load_os2;
+    TT_Load_Table_Func           load_post;
+
+    TT_Load_Table_Func           load_name;
+    TT_Free_Table_Func           free_name;
+
+    /* optional tables */
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+    TT_Load_Table_Func           load_hdmx_stub;
+    TT_Free_Table_Func           free_hdmx_stub;
+#endif
+
+    /* this field was called `load_kerning' up to version 2.1.10 */
+    TT_Load_Table_Func           load_kern;
+
+    TT_Load_Table_Func           load_gasp;
+    TT_Load_Table_Func           load_pclt;
+
+    /* see `ttload.h'; this field was called `load_bitmap_header' up to */
+    /* version 2.1.10                                                   */
+    TT_Load_Table_Func           load_bhed;
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+    /* see `ttsbit.h' */
+    TT_Set_SBit_Strike_OldFunc   set_sbit_strike_stub;
+    TT_Load_Table_Func           load_sbits_stub;
+
+    /*
+     *  The following two fields appeared in version 2.1.8, and were placed
+     *  between `load_sbits' and `load_sbit_image'.  We support them as a
+     *  special exception since they are used by Xfont library within the
+     *  X.Org xserver, and because the probability that other rogue clients
+     *  use the other version 2.1.7 fields below is _extremely_ low.
+     *
+     *  Note that this forces us to disable an interesting memory-saving
+     *  optimization though...
+     */
+
+    TT_Find_SBit_Image_Func      find_sbit_image;
+    TT_Load_SBit_Metrics_Func    load_sbit_metrics;
+
+#endif
+
+    TT_Load_SBit_Image_Func      load_sbit_image;
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+    TT_Free_Table_Func           free_sbits_stub;
+#endif
+
+    /* see `ttpost.h' */
+    TT_Get_PS_Name_Func          get_psname;
+    TT_Free_Table_Func           free_psnames;
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+    TT_CharMap_Load_Func         load_charmap_stub;
+    TT_CharMap_Free_Func         free_charmap_stub;
+#endif
+
+    /* starting here, the structure differs from version 2.1.7 */
+
+    /* this field was introduced in version 2.1.8, named `get_psname' */
+    TT_Face_GetKerningFunc       get_kerning;
+
+    /* new elements introduced after version 2.1.10 */
+
+    /* load the font directory, i.e., the offset table and */
+    /* the table directory                                 */
+    TT_Load_Table_Func           load_font_dir;
+    TT_Load_Metrics_Func         load_hmtx;
+    
+    TT_Load_Table_Func           load_eblc;
+    TT_Free_Table_Func           free_eblc;
+    
+    TT_Set_SBit_Strike_Func      set_sbit_strike;
+    TT_Load_Strike_Metrics_Func  load_strike_metrics;
+    
+    TT_Get_Metrics_Func          get_metrics;
+
+  } SFNT_Interface;
+
+
+  /* transitional */
+  typedef SFNT_Interface*   SFNT_Service;
+
+
+FT_END_HEADER
+
+#endif /* __SFNT_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/t1types.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,241 @@
+/***************************************************************************/
+/*                                                                         */
+/*  t1types.h                                                              */
+/*                                                                         */
+/*    Basic Type1/Type2 type definitions and interface (specification      */
+/*    only).                                                               */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2003, 2004, 2006 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, FTL.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 __T1TYPES_H__
+#define __T1TYPES_H__
+
+
+#include <ft2build.h>
+#include FT_TYPE1_TABLES_H
+#include FT_INTERNAL_POSTSCRIPT_HINTS_H
+#include FT_INTERNAL_SERVICE_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /***              REQUIRED TYPE1/TYPE2 TABLES DEFINITIONS              ***/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    T1_EncodingRec                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure modeling a custom encoding.                            */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    num_chars  :: The number of character codes in the encoding.       */
+  /*                  Usually 256.                                         */
+  /*                                                                       */
+  /*    code_first :: The lowest valid character code in the encoding.     */
+  /*                                                                       */
+  /*    code_last  :: The highest valid character code in the encoding.    */
+  /*                                                                       */
+  /*    char_index :: An array of corresponding glyph indices.             */
+  /*                                                                       */
+  /*    char_name  :: An array of corresponding glyph names.               */
+  /*                                                                       */
+  typedef struct  T1_EncodingRecRec_
+  {
+    FT_Int       num_chars;
+    FT_Int       code_first;
+    FT_Int       code_last;
+
+    FT_UShort*   char_index;
+    FT_String**  char_name;
+
+  } T1_EncodingRec, *T1_Encoding;
+
+
+  typedef enum  T1_EncodingType_
+  {
+    T1_ENCODING_TYPE_NONE = 0,
+    T1_ENCODING_TYPE_ARRAY,
+    T1_ENCODING_TYPE_STANDARD,
+    T1_ENCODING_TYPE_ISOLATIN1,
+    T1_ENCODING_TYPE_EXPERT
+
+  } T1_EncodingType;
+
+
+  typedef struct  T1_FontRec_
+  {
+    PS_FontInfoRec   font_info;         /* font info dictionary */
+    PS_PrivateRec    private_dict;      /* private dictionary   */
+    FT_String*       font_name;         /* top-level dictionary */
+
+    T1_EncodingType  encoding_type;
+    T1_EncodingRec   encoding;
+
+    FT_Byte*         subrs_block;
+    FT_Byte*         charstrings_block;
+    FT_Byte*         glyph_names_block;
+
+    FT_Int           num_subrs;
+    FT_Byte**        subrs;
+    FT_PtrDist*      subrs_len;
+
+    FT_Int           num_glyphs;
+    FT_String**      glyph_names;       /* array of glyph names       */
+    FT_Byte**        charstrings;       /* array of glyph charstrings */
+    FT_PtrDist*      charstrings_len;
+
+    FT_Byte          paint_type;
+    FT_Byte          font_type;
+    FT_Matrix        font_matrix;
+    FT_Vector        font_offset;
+    FT_BBox          font_bbox;
+    FT_Long          font_id;
+
+    FT_Fixed         stroke_width;
+
+  } T1_FontRec, *T1_Font;
+
+
+  typedef struct  CID_SubrsRec_
+  {
+    FT_UInt    num_subrs;
+    FT_Byte**  code;
+
+  } CID_SubrsRec, *CID_Subrs;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /***                AFM FONT INFORMATION STRUCTURES                    ***/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  typedef struct  AFM_TrackKernRec_
+  {
+    FT_Int    degree;
+    FT_Fixed  min_ptsize;
+    FT_Fixed  min_kern;
+    FT_Fixed  max_ptsize;
+    FT_Fixed  max_kern;
+
+  } AFM_TrackKernRec, *AFM_TrackKern;
+
+  typedef struct  AFM_KernPairRec_
+  {
+    FT_Int  index1;
+    FT_Int  index2;
+    FT_Int  x;
+    FT_Int  y;
+
+  } AFM_KernPairRec, *AFM_KernPair;
+
+  typedef struct  AFM_FontInfoRec_
+  {
+    FT_Bool        IsCIDFont;
+    FT_BBox        FontBBox;
+    FT_Fixed       Ascender;
+    FT_Fixed       Descender;
+    AFM_TrackKern  TrackKerns;   /* free if non-NULL */
+    FT_Int         NumTrackKern;
+    AFM_KernPair   KernPairs;    /* free if non-NULL */
+    FT_Int         NumKernPair;
+
+  } AFM_FontInfoRec, *AFM_FontInfo;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /***                ORIGINAL T1_FACE CLASS DEFINITION                  ***/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  typedef struct T1_FaceRec_*   T1_Face;
+  typedef struct CID_FaceRec_*  CID_Face;
+
+
+  typedef struct  T1_FaceRec_
+  {
+    FT_FaceRec      root;
+    T1_FontRec      type1;
+    const void*     psnames;
+    const void*     psaux;
+    const void*     afm_data;
+    FT_CharMapRec   charmaprecs[2];
+    FT_CharMap      charmaps[2];
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+    PS_Unicodes     unicode_map;
+#endif    
+
+    /* support for Multiple Masters fonts */
+    PS_Blend        blend;
+
+    /* since version 2.1 - interface to PostScript hinter */
+    const void*     pshinter;
+
+  } T1_FaceRec;
+
+
+  typedef struct  CID_FaceRec_
+  {
+    FT_FaceRec       root;
+    void*            psnames;
+    void*            psaux;
+    CID_FaceInfoRec  cid;
+    void*            afm_data;
+    CID_Subrs        subrs;
+
+    /* since version 2.1 - interface to PostScript hinter */
+    void*            pshinter;
+
+    /* since version 2.1.8, but was originally positioned after `afm_data' */
+    FT_Byte*         binary_data; /* used if hex data has been converted */
+    FT_Stream        cid_stream;
+
+  } CID_FaceRec;
+
+
+FT_END_HEADER
+
+#endif /* __T1TYPES_H__ */
+
+
+/* END */
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/fontservices/freetypefontrasteriser/freetype2/include/freetype/internal/tttypes.h	Mon Aug 23 13:09:42 2010 +0100
@@ -0,0 +1,1532 @@
+/***************************************************************************/
+/*                                                                         */
+/*  tttypes.h                                                              */
+/*                                                                         */
+/*    Basic SFNT/TrueType type definitions and interface (specification    */
+/*    only).                                                               */
+/*                                                                         */
+/*  Copyright 1996-2001, 2002, 2004, 2005, 2006 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, FTL.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 __TTTYPES_H__
+#define __TTTYPES_H__
+
+
+#include <ft2build.h>
+#include FT_TRUETYPE_TABLES_H
+#include FT_INTERNAL_OBJECTS_H
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+#include FT_MULTIPLE_MASTERS_H
+#endif
+
+
+FT_BEGIN_HEADER
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /***             REQUIRED TRUETYPE/OPENTYPE TABLES DEFINITIONS         ***/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TTC_HeaderRec                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    TrueType collection header.  This table contains the offsets of    */
+  /*    the font headers of each distinct TrueType face in the file.       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    tag     :: Must be `ttc ' to indicate a TrueType collection.       */
+  /*                                                                       */
+  /*    version :: The version number.                                     */
+  /*                                                                       */
+  /*    count   :: The number of faces in the collection.  The             */
+  /*               specification says this should be an unsigned long, but */
+  /*               we use a signed long since we need the value -1 for     */
+  /*               specific purposes.                                      */
+  /*                                                                       */
+  /*    offsets :: The offsets of the font headers, one per face.          */
+  /*                                                                       */
+  typedef struct  TTC_HeaderRec_
+  {
+    FT_ULong   tag;
+    FT_Fixed   version;
+    FT_Long    count;
+    FT_ULong*  offsets;
+
+  } TTC_HeaderRec;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    SFNT_HeaderRec                                                     */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    SFNT file format header.                                           */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    format_tag     :: The font format tag.                             */
+  /*                                                                       */
+  /*    num_tables     :: The number of tables in file.                    */
+  /*                                                                       */
+  /*    search_range   :: Must be `16 * (max power of 2 <= num_tables)'.   */
+  /*                                                                       */
+  /*    entry_selector :: Must be log2 of `search_range / 16'.             */
+  /*                                                                       */
+  /*    range_shift    :: Must be `num_tables * 16 - search_range'.        */
+  /*                                                                       */
+  typedef struct  SFNT_HeaderRec_
+  {
+    FT_ULong   format_tag;
+    FT_UShort  num_tables;
+    FT_UShort  search_range;
+    FT_UShort  entry_selector;
+    FT_UShort  range_shift;
+
+    FT_ULong   offset;  /* not in file */
+
+  } SFNT_HeaderRec, *SFNT_Header;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_TableRec                                                        */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    This structure describes a given table of a TrueType font.         */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    Tag      :: A four-bytes tag describing the table.                 */
+  /*                                                                       */
+  /*    CheckSum :: The table checksum.  This value can be ignored.        */
+  /*                                                                       */
+  /*    Offset   :: The offset of the table from the start of the TrueType */
+  /*                font in its resource.                                  */
+  /*                                                                       */
+  /*    Length   :: The table length (in bytes).                           */
+  /*                                                                       */
+  typedef struct  TT_TableRec_
+  {
+    FT_ULong  Tag;        /*        table type */
+    FT_ULong  CheckSum;   /*    table checksum */
+    FT_ULong  Offset;     /* table file offset */
+    FT_ULong  Length;     /*      table length */
+
+  } TT_TableRec, *TT_Table;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_LongMetricsRec                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure modeling the long metrics of the `hmtx' and `vmtx'     */
+  /*    TrueType tables.  The values are expressed in font units.          */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    advance :: The advance width or height for the glyph.              */
+  /*                                                                       */
+  /*    bearing :: The left-side or top-side bearing for the glyph.        */
+  /*                                                                       */
+  typedef struct  TT_LongMetricsRec_
+  {
+    FT_UShort  advance;
+    FT_Short   bearing;
+
+  } TT_LongMetricsRec, *TT_LongMetrics;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    TT_ShortMetrics                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple type to model the short metrics of the `hmtx' and `vmtx'  */
+  /*    tables.                                                            */
+  /*                                                                       */
+  typedef FT_Short  TT_ShortMetrics;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_NameEntryRec                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure modeling TrueType name records.  Name records are used */
+  /*    to store important strings like family name, style name,           */
+  /*    copyright, etc. in _localized_ versions (i.e., language, encoding, */
+  /*    etc).                                                              */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    platformID   :: The ID of the name's encoding platform.            */
+  /*                                                                       */
+  /*    encodingID   :: The platform-specific ID for the name's encoding.  */
+  /*                                                                       */
+  /*    languageID   :: The platform-specific ID for the name's language.  */
+  /*                                                                       */
+  /*    nameID       :: The ID specifying what kind of name this is.       */
+  /*                                                                       */
+  /*    stringLength :: The length of the string in bytes.                 */
+  /*                                                                       */
+  /*    stringOffset :: The offset to the string in the `name' table.      */
+  /*                                                                       */
+  /*    string       :: A pointer to the string's bytes.  Note that these  */
+  /*                    are usually UTF-16 encoded characters.             */
+  /*                                                                       */
+  typedef struct  TT_NameEntryRec_
+  {
+    FT_UShort  platformID;
+    FT_UShort  encodingID;
+    FT_UShort  languageID;
+    FT_UShort  nameID;
+    FT_UShort  stringLength;
+    FT_ULong   stringOffset;
+
+    /* this last field is not defined in the spec */
+    /* but used by the FreeType engine            */
+
+    FT_Byte*   string;
+
+  } TT_NameEntryRec, *TT_NameEntry;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_NameTableRec                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure modeling the TrueType name table.                      */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    format         :: The format of the name table.                    */
+  /*                                                                       */
+  /*    numNameRecords :: The number of names in table.                    */
+  /*                                                                       */
+  /*    storageOffset  :: The offset of the name table in the `name'       */
+  /*                      TrueType table.                                  */
+  /*                                                                       */
+  /*    names          :: An array of name records.                        */
+  /*                                                                       */
+  /*    stream         :: the file's input stream.                         */
+  /*                                                                       */
+  typedef struct  TT_NameTableRec_
+  {
+    FT_UShort         format;
+    FT_UInt           numNameRecords;
+    FT_UInt           storageOffset;
+    TT_NameEntryRec*  names;
+    FT_Stream         stream;
+
+  } TT_NameTableRec, *TT_NameTable;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /***             OPTIONAL TRUETYPE/OPENTYPE TABLES DEFINITIONS         ***/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_GaspRangeRec                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A tiny structure used to model a gasp range according to the       */
+  /*    TrueType specification.                                            */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    maxPPEM  :: The maximum ppem value to which `gaspFlag' applies.    */
+  /*                                                                       */
+  /*    gaspFlag :: A flag describing the grid-fitting and anti-aliasing   */
+  /*                modes to be used.                                      */
+  /*                                                                       */
+  typedef struct  TT_GaspRangeRec_
+  {
+    FT_UShort  maxPPEM;
+    FT_UShort  gaspFlag;
+
+  } TT_GaspRangeRec, *TT_GaspRange;
+
+
+#define TT_GASP_GRIDFIT  0x01
+#define TT_GASP_DOGRAY   0x02
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_GaspRec                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure modeling the TrueType `gasp' table used to specify     */
+  /*    grid-fitting and anti-aliasing behaviour.                          */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    version    :: The version number.                                  */
+  /*                                                                       */
+  /*    numRanges  :: The number of gasp ranges in table.                  */
+  /*                                                                       */
+  /*    gaspRanges :: An array of gasp ranges.                             */
+  /*                                                                       */
+  typedef struct  TT_Gasp_
+  {
+    FT_UShort     version;
+    FT_UShort     numRanges;
+    TT_GaspRange  gaspRanges;
+
+  } TT_GaspRec;
+
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_HdmxEntryRec                                                    */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A small structure used to model the pre-computed widths of a given */
+  /*    size.  They are found in the `hdmx' table.                         */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    ppem      :: The pixels per EM value at which these metrics apply. */
+  /*                                                                       */
+  /*    max_width :: The maximum advance width for this metric.            */
+  /*                                                                       */
+  /*    widths    :: An array of widths.  Note: These are 8-bit bytes.     */
+  /*                                                                       */
+  typedef struct  TT_HdmxEntryRec_
+  {
+    FT_Byte   ppem;
+    FT_Byte   max_width;
+    FT_Byte*  widths;
+
+  } TT_HdmxEntryRec, *TT_HdmxEntry;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_HdmxRec                                                         */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model the `hdmx' table, which contains         */
+  /*    pre-computed widths for a set of given sizes/dimensions.           */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    version     :: The version number.                                 */
+  /*                                                                       */
+  /*    num_records :: The number of hdmx records.                         */
+  /*                                                                       */
+  /*    records     :: An array of hdmx records.                           */
+  /*                                                                       */
+  typedef struct  TT_HdmxRec_
+  {
+    FT_UShort     version;
+    FT_Short      num_records;
+    TT_HdmxEntry  records;
+
+  } TT_HdmxRec, *TT_Hdmx;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_Kern0_PairRec                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to model a kerning pair for the kerning table     */
+  /*    format 0.  The engine now loads this table if it finds one in the  */
+  /*    font file.                                                         */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    left  :: The index of the left glyph in pair.                      */
+  /*                                                                       */
+  /*    right :: The index of the right glyph in pair.                     */
+  /*                                                                       */
+  /*    value :: The kerning distance.  A positive value spaces the        */
+  /*             glyphs, a negative one makes them closer.                 */
+  /*                                                                       */
+  typedef struct  TT_Kern0_PairRec_
+  {
+    FT_UShort  left;   /* index of left  glyph in pair */
+    FT_UShort  right;  /* index of right glyph in pair */
+    FT_FWord   value;  /* kerning value                */
+
+  } TT_Kern0_PairRec, *TT_Kern0_Pair;
+
+#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /***                    EMBEDDED BITMAPS SUPPORT                       ***/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_SBit_MetricsRec                                                 */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to hold the big metrics of a given glyph bitmap   */
+  /*    in a TrueType or OpenType font.  These are usually found in the    */
+  /*    `EBDT' (Microsoft) or `bloc' (Apple) table.                        */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    height       :: The glyph height in pixels.                        */
+  /*                                                                       */
+  /*    width        :: The glyph width in pixels.                         */
+  /*                                                                       */
+  /*    horiBearingX :: The horizontal left bearing.                       */
+  /*                                                                       */
+  /*    horiBearingY :: The horizontal top bearing.                        */
+  /*                                                                       */
+  /*    horiAdvance  :: The horizontal advance.                            */
+  /*                                                                       */
+  /*    vertBearingX :: The vertical left bearing.                         */
+  /*                                                                       */
+  /*    vertBearingY :: The vertical top bearing.                          */
+  /*                                                                       */
+  /*    vertAdvance  :: The vertical advance.                              */
+  /*                                                                       */
+  typedef struct  TT_SBit_MetricsRec_
+  {
+    FT_Byte  height;
+    FT_Byte  width;
+
+    FT_Char  horiBearingX;
+    FT_Char  horiBearingY;
+    FT_Byte  horiAdvance;
+
+    FT_Char  vertBearingX;
+    FT_Char  vertBearingY;
+    FT_Byte  vertAdvance;
+
+  } TT_SBit_MetricsRec, *TT_SBit_Metrics;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_SBit_SmallMetricsRec                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to hold the small metrics of a given glyph bitmap */
+  /*    in a TrueType or OpenType font.  These are usually found in the    */
+  /*    `EBDT' (Microsoft) or the `bdat' (Apple) table.                    */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    height   :: The glyph height in pixels.                            */
+  /*                                                                       */
+  /*    width    :: The glyph width in pixels.                             */
+  /*                                                                       */
+  /*    bearingX :: The left-side bearing.                                 */
+  /*                                                                       */
+  /*    bearingY :: The top-side bearing.                                  */
+  /*                                                                       */
+  /*    advance  :: The advance width or height.                           */
+  /*                                                                       */
+  typedef struct  TT_SBit_Small_Metrics_
+  {
+    FT_Byte  height;
+    FT_Byte  width;
+
+    FT_Char  bearingX;
+    FT_Char  bearingY;
+    FT_Byte  advance;
+
+  } TT_SBit_SmallMetricsRec, *TT_SBit_SmallMetrics;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_SBit_LineMetricsRec                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used to describe the text line metrics of a given      */
+  /*    bitmap strike, for either a horizontal or vertical layout.         */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    ascender                :: The ascender in pixels.                 */
+  /*                                                                       */
+  /*    descender               :: The descender in pixels.                */
+  /*                                                                       */
+  /*    max_width               :: The maximum glyph width in pixels.      */
+  /*                                                                       */
+  /*    caret_slope_enumerator  :: Rise of the caret slope, typically set  */
+  /*                               to 1 for non-italic fonts.              */
+  /*                                                                       */
+  /*    caret_slope_denominator :: Rise of the caret slope, typically set  */
+  /*                               to 0 for non-italic fonts.              */
+  /*                                                                       */
+  /*    caret_offset            :: Offset in pixels to move the caret for  */
+  /*                               proper positioning.                     */
+  /*                                                                       */
+  /*    min_origin_SB           :: Minimum of horiBearingX (resp.          */
+  /*                               vertBearingY).                          */
+  /*    min_advance_SB          :: Minimum of                              */
+  /*                                                                       */
+  /*                                 horizontal advance -                  */
+  /*                                   ( horiBearingX + width )            */
+  /*                                                                       */
+  /*                               resp.                                   */
+  /*                                                                       */
+  /*                                 vertical advance -                    */
+  /*                                   ( vertBearingY + height )           */
+  /*                                                                       */
+  /*    max_before_BL           :: Maximum of horiBearingY (resp.          */
+  /*                               vertBearingY).                          */
+  /*                                                                       */
+  /*    min_after_BL            :: Minimum of                              */
+  /*                                                                       */
+  /*                                 horiBearingY - height                 */
+  /*                                                                       */
+  /*                               resp.                                   */
+  /*                                                                       */
+  /*                                 vertBearingX - width                  */
+  /*                                                                       */
+  /*    pads                    :: Unused (to make the size of the record  */
+  /*                               a multiple of 32 bits.                  */
+  /*                                                                       */
+  typedef struct  TT_SBit_LineMetricsRec_
+  {
+    FT_Char  ascender;
+    FT_Char  descender;
+    FT_Byte  max_width;
+    FT_Char  caret_slope_numerator;
+    FT_Char  caret_slope_denominator;
+    FT_Char  caret_offset;
+    FT_Char  min_origin_SB;
+    FT_Char  min_advance_SB;
+    FT_Char  max_before_BL;
+    FT_Char  min_after_BL;
+    FT_Char  pads[2];
+
+  } TT_SBit_LineMetricsRec, *TT_SBit_LineMetrics;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_SBit_RangeRec                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A TrueType/OpenType subIndexTable as defined in the `EBLC'         */
+  /*    (Microsoft) or `bloc' (Apple) tables.                              */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    first_glyph   :: The first glyph index in the range.               */
+  /*                                                                       */
+  /*    last_glyph    :: The last glyph index in the range.                */
+  /*                                                                       */
+  /*    index_format  :: The format of index table.  Valid values are 1    */
+  /*                     to 5.                                             */
+  /*                                                                       */
+  /*    image_format  :: The format of `EBDT' image data.                  */
+  /*                                                                       */
+  /*    image_offset  :: The offset to image data in `EBDT'.               */
+  /*                                                                       */
+  /*    image_size    :: For index formats 2 and 5.  This is the size in   */
+  /*                     bytes of each glyph bitmap.                       */
+  /*                                                                       */
+  /*    big_metrics   :: For index formats 2 and 5.  This is the big       */
+  /*                     metrics for each glyph bitmap.                    */
+  /*                                                                       */
+  /*    num_glyphs    :: For index formats 4 and 5.  This is the number of */
+  /*                     glyphs in the code array.                         */
+  /*                                                                       */
+  /*    glyph_offsets :: For index formats 1 and 3.                        */
+  /*                                                                       */
+  /*    glyph_codes   :: For index formats 4 and 5.                        */
+  /*                                                                       */
+  /*    table_offset  :: The offset of the index table in the `EBLC'       */
+  /*                     table.  Only used during strike loading.          */
+  /*                                                                       */
+  typedef struct  TT_SBit_RangeRec
+  {
+    FT_UShort           first_glyph;
+    FT_UShort           last_glyph;
+
+    FT_UShort           index_format;
+    FT_UShort           image_format;
+    FT_ULong            image_offset;
+
+    FT_ULong            image_size;
+    TT_SBit_MetricsRec  metrics;
+    FT_ULong            num_glyphs;
+
+    FT_ULong*           glyph_offsets;
+    FT_UShort*          glyph_codes;
+
+    FT_ULong            table_offset;
+
+  } TT_SBit_RangeRec, *TT_SBit_Range;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_SBit_StrikeRec                                                  */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used describe a given bitmap strike in the `EBLC'      */
+  /*    (Microsoft) or `bloc' (Apple) tables.                              */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*   num_index_ranges :: The number of index ranges.                     */
+  /*                                                                       */
+  /*   index_ranges     :: An array of glyph index ranges.                 */
+  /*                                                                       */
+  /*   color_ref        :: Unused.  `color_ref' is put in for future       */
+  /*                       enhancements, but these fields are already      */
+  /*                       in use by other platforms (e.g. Newton).        */
+  /*                       For details, please see                         */
+  /*                                                                       */
+  /*                         http://fonts.apple.com/                       */
+  /*                                TTRefMan/RM06/Chap6bloc.html           */
+  /*                                                                       */
+  /*   hori             :: The line metrics for horizontal layouts.        */
+  /*                                                                       */
+  /*   vert             :: The line metrics for vertical layouts.          */
+  /*                                                                       */
+  /*   start_glyph      :: The lowest glyph index for this strike.         */
+  /*                                                                       */
+  /*   end_glyph        :: The highest glyph index for this strike.        */
+  /*                                                                       */
+  /*   x_ppem           :: The number of horizontal pixels per EM.         */
+  /*                                                                       */
+  /*   y_ppem           :: The number of vertical pixels per EM.           */
+  /*                                                                       */
+  /*   bit_depth        :: The bit depth.  Valid values are 1, 2, 4,       */
+  /*                       and 8.                                          */
+  /*                                                                       */
+  /*   flags            :: Is this a vertical or horizontal strike?  For   */
+  /*                       details, please see                             */
+  /*                                                                       */
+  /*                         http://fonts.apple.com/                       */
+  /*                                TTRefMan/RM06/Chap6bloc.html           */
+  /*                                                                       */
+  typedef struct  TT_SBit_StrikeRec_
+  {
+    FT_Int                  num_ranges;
+    TT_SBit_Range           sbit_ranges;
+    FT_ULong                ranges_offset;
+
+    FT_ULong                color_ref;
+
+    TT_SBit_LineMetricsRec  hori;
+    TT_SBit_LineMetricsRec  vert;
+
+    FT_UShort               start_glyph;
+    FT_UShort               end_glyph;
+
+    FT_Byte                 x_ppem;
+    FT_Byte                 y_ppem;
+
+    FT_Byte                 bit_depth;
+    FT_Char                 flags;
+
+  } TT_SBit_StrikeRec, *TT_SBit_Strike;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_SBit_ComponentRec                                               */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A simple structure to describe a compound sbit element.            */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    glyph_code :: The element's glyph index.                           */
+  /*                                                                       */
+  /*    x_offset   :: The element's left bearing.                          */
+  /*                                                                       */
+  /*    y_offset   :: The element's top bearing.                           */
+  /*                                                                       */
+  typedef struct  TT_SBit_ComponentRec_
+  {
+    FT_UShort  glyph_code;
+    FT_Char    x_offset;
+    FT_Char    y_offset;
+
+  } TT_SBit_ComponentRec, *TT_SBit_Component;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_SBit_ScaleRec                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A structure used describe a given bitmap scaling table, as defined */
+  /*    in the `EBSC' table.                                               */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    hori              :: The horizontal line metrics.                  */
+  /*                                                                       */
+  /*    vert              :: The vertical line metrics.                    */
+  /*                                                                       */
+  /*    x_ppem            :: The number of horizontal pixels per EM.       */
+  /*                                                                       */
+  /*    y_ppem            :: The number of vertical pixels per EM.         */
+  /*                                                                       */
+  /*    x_ppem_substitute :: Substitution x_ppem value.                    */
+  /*                                                                       */
+  /*    y_ppem_substitute :: Substitution y_ppem value.                    */
+  /*                                                                       */
+  typedef struct  TT_SBit_ScaleRec_
+  {
+    TT_SBit_LineMetricsRec  hori;
+    TT_SBit_LineMetricsRec  vert;
+
+    FT_Byte                 x_ppem;
+    FT_Byte                 y_ppem;
+
+    FT_Byte                 x_ppem_substitute;
+    FT_Byte                 y_ppem_substitute;
+
+  } TT_SBit_ScaleRec, *TT_SBit_Scale;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /***                  POSTSCRIPT GLYPH NAMES SUPPORT                   ***/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_Post_20Rec                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Postscript names sub-table, format 2.0.  Stores the PS name of     */
+  /*    each glyph in the font face.                                       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    num_glyphs    :: The number of named glyphs in the table.          */
+  /*                                                                       */
+  /*    num_names     :: The number of PS names stored in the table.       */
+  /*                                                                       */
+  /*    glyph_indices :: The indices of the glyphs in the names arrays.    */
+  /*                                                                       */
+  /*    glyph_names   :: The PS names not in Mac Encoding.                 */
+  /*                                                                       */
+  typedef struct  TT_Post_20Rec_
+  {
+    FT_UShort   num_glyphs;
+    FT_UShort   num_names;
+    FT_UShort*  glyph_indices;
+    FT_Char**   glyph_names;
+
+  } TT_Post_20Rec, *TT_Post_20;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_Post_25Rec                                                      */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Postscript names sub-table, format 2.5.  Stores the PS name of     */
+  /*    each glyph in the font face.                                       */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    num_glyphs :: The number of glyphs in the table.                   */
+  /*                                                                       */
+  /*    offsets    :: An array of signed offsets in a normal Mac           */
+  /*                  Postscript name encoding.                            */
+  /*                                                                       */
+  typedef struct  TT_Post_25_
+  {
+    FT_UShort  num_glyphs;
+    FT_Char*   offsets;
+
+  } TT_Post_25Rec, *TT_Post_25;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_Post_NamesRec                                                   */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Postscript names table, either format 2.0 or 2.5.                  */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    loaded    :: A flag to indicate whether the PS names are loaded.   */
+  /*                                                                       */
+  /*    format_20 :: The sub-table used for format 2.0.                    */
+  /*                                                                       */
+  /*    format_25 :: The sub-table used for format 2.5.                    */
+  /*                                                                       */
+  typedef struct  TT_Post_NamesRec_
+  {
+    FT_Bool  loaded;
+
+    union
+    {
+      TT_Post_20Rec  format_20;
+      TT_Post_25Rec  format_25;
+
+    } names;
+
+  } TT_Post_NamesRec, *TT_Post_Names;
+
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /***                    GX VARIATION TABLE SUPPORT                     ***/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+  typedef struct GX_BlendRec_  *GX_Blend;
+#endif
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /***              EMBEDDED BDF PROPERTIES TABLE SUPPORT                ***/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+  /*
+   * These types are used to support a `BDF ' table that isn't part of the
+   * official TrueType specification.  It is mainly used in SFNT-based
+   * bitmap fonts that were generated from a set of BDF fonts.
+   *
+   * The format of the table is as follows.
+   *
+   *   USHORT   version      `BDF ' table version number, should be 0x0001.
+   *   USHORT   strikeCount  Number of strikes (bitmap sizes) in this table.
+   *   ULONG    stringTable  Offset (froms start of BDF table) to string
+   *                         table.
+   *
+   * This is followed by an array of `strikeCount' descriptors, having the
+   * following format.
+   *
+   *   USHORT   ppem         Vertical pixels per EM for this strike.
+   *   USHORT   numItems     Number of items for this strike (properties and
+   *                         atoms).  Maximum is 255.
+   *
+   * This array in turn is followed by `strikeCount' value sets.  Each
+   * `value set' is an array of `numItems' items with the following format.
+   *
+   *   ULONG    item_name    Offset in string table to item name.
+   *   USHORT   item_type    The item type.  Possible values are
+   *                            0 => string (e.g., COMMENT)
+   *                            1 => atom   (e.g., FONT or even SIZE)
+   *                            2 => int32
+   *                            3 => uint32
+   *                         0x10 => A flag to indicate a properties.  This
+   *                                 is ORed with the above values.
+   *   ULONG    item_value   For strings  => Offset into string table without
+   *                                         the corresponding double quotes.
+   *                         For atoms    => Offset into string table.
+   *                         For integers => Direct value.
+   *
+   * All strings in the string table consist of bytes and are
+   * zero-terminated.
+   *
+   */
+
+#ifdef TT_CONFIG_OPTION_BDF
+
+  typedef struct  TT_BDFRec_
+  {
+    FT_Byte*   table;
+    FT_Byte*   table_end;
+    FT_Byte*   strings;
+    FT_UInt32  strings_size;
+    FT_UInt    num_strikes;
+    FT_Bool    loaded;
+
+  } TT_BDFRec, *TT_BDF;
+
+#endif /* TT_CONFIG_OPTION_BDF */
+
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /***                  ORIGINAL TT_FACE CLASS DEFINITION                ***/
+  /***                                                                   ***/
+  /***                                                                   ***/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* This structure/class is defined here because it is common to the      */
+  /* following formats: TTF, OpenType-TT, and OpenType-CFF.                */
+  /*                                                                       */
+  /* Note, however, that the classes TT_Size and TT_GlyphSlot are not      */
+  /* shared between font drivers, and are thus defined in `ttobjs.h'.      */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <Type>                                                                */
+  /*    TT_Face                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    A handle to a TrueType face/font object.  A TT_Face encapsulates   */
+  /*    the resolution and scaling independent parts of a TrueType font    */
+  /*    resource.                                                          */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The TT_Face structure is also used as a `parent class' for the     */
+  /*    OpenType-CFF class (T2_Face).                                      */
+  /*                                                                       */
+  typedef struct TT_FaceRec_*  TT_Face;
+
+
+  /* a function type used for the truetype bytecode interpreter hooks */
+  typedef FT_Error
+  (*TT_Interpreter)( void*  exec_context );
+
+  /* forward declaration */
+  typedef struct TT_LoaderRec_*  TT_Loader;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Loader_GotoTableFunc                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Seeks a stream to the start of a given TrueType table.             */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    face   :: A handle to the target face object.                      */
+  /*                                                                       */
+  /*    tag    :: A 4-byte tag used to name the table.                     */
+  /*                                                                       */
+  /*    stream :: The input stream.                                        */
+  /*                                                                       */
+  /* <Output>                                                              */
+  /*    length :: The length of the table in bytes.  Set to 0 if not       */
+  /*              needed.                                                  */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    The stream cursor must be at the font file's origin.               */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Loader_GotoTableFunc)( TT_Face    face,
+                              FT_ULong   tag,
+                              FT_Stream  stream,
+                              FT_ULong*  length );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Loader_StartGlyphFunc                                           */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Seeks a stream to the start of a given glyph element, and opens a  */
+  /*    frame for it.                                                      */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    loader      :: The current TrueType glyph loader object.           */
+  /*                                                                       */
+  /*    glyph index :: The index of the glyph to access.                   */
+  /*                                                                       */
+  /*    offset      :: The offset of the glyph according to the            */
+  /*                   `locations' table.                                  */
+  /*                                                                       */
+  /*    byte_count  :: The size of the frame in bytes.                     */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  /* <Note>                                                                */
+  /*    This function is normally equivalent to FT_STREAM_SEEK(offset)     */
+  /*    followed by FT_FRAME_ENTER(byte_count) with the loader's stream,   */
+  /*    but alternative formats (e.g. compressed ones) might use something */
+  /*    different.                                                         */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Loader_StartGlyphFunc)( TT_Loader  loader,
+                               FT_UInt    glyph_index,
+                               FT_ULong   offset,
+                               FT_UInt    byte_count );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Loader_ReadGlyphFunc                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Reads one glyph element (its header, a simple glyph, or a          */
+  /*    composite) from the loader's current stream frame.                 */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    loader :: The current TrueType glyph loader object.                */
+  /*                                                                       */
+  /* <Return>                                                              */
+  /*    FreeType error code.  0 means success.                             */
+  /*                                                                       */
+  typedef FT_Error
+  (*TT_Loader_ReadGlyphFunc)( TT_Loader  loader );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /* <FuncType>                                                            */
+  /*    TT_Loader_EndGlyphFunc                                             */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    Closes the current loader stream frame for the glyph.              */
+  /*                                                                       */
+  /* <Input>                                                               */
+  /*    loader :: The current TrueType glyph loader object.                */
+  /*                                                                       */
+  typedef void
+  (*TT_Loader_EndGlyphFunc)( TT_Loader  loader );
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*                         TrueType Face Type                            */
+  /*                                                                       */
+  /* <Struct>                                                              */
+  /*    TT_Face                                                            */
+  /*                                                                       */
+  /* <Description>                                                         */
+  /*    The TrueType face class.  These objects model the resolution and   */
+  /*    point-size independent data found in a TrueType font file.         */
+  /*                                                                       */
+  /* <Fields>                                                              */
+  /*    root                 :: The base FT_Face structure, managed by the */
+  /*                            base layer.                                */
+  /*                                                                       */
+  /*    ttc_header           :: The TrueType collection header, used when  */
+  /*                            the file is a `ttc' rather than a `ttf'.   */
+  /*                            For ordinary font files, the field         */
+  /*                            `ttc_header.count' is set to 0.            */
+  /*                                                                       */
+  /*    format_tag           :: The font format tag.                       */
+  /*                                                                       */
+  /*    num_tables           :: The number of TrueType tables in this font */
+  /*                            file.                                      */
+  /*                                                                       */
+  /*    dir_tables           :: The directory of TrueType tables for this  */
+  /*                            font file.                                 */
+  /*                                                                       */
+  /*    header               :: The font's font header (`head' table).     */
+  /*                            Read on font opening.                      */
+  /*                                                                       */
+  /*    horizontal           :: The font's horizontal header (`hhea'       */
+  /*                            table).  This field also contains the      */
+  /*                            associated horizontal metrics table        */
+  /*                            (`hmtx').                                  */
+  /*                                                                       */
+  /*    max_profile          :: The font's maximum profile table.  Read on */
+  /*                            font opening.  Note that some maximum      */
+  /*                            values cannot be taken directly from this  */
+  /*                            table.  We thus define additional fields   */
+  /*                            below to hold the computed maxima.         */
+  /*                                                                       */
+  /*    vertical_info        :: A boolean which is set when the font file  */
+  /*                            contains vertical metrics.  If not, the    */
+  /*                            value of the `vertical' field is           */
+  /*                            undefined.                                 */
+  /*                                                                       */
+  /*    vertical             :: The font's vertical header (`vhea' table). */
+  /*                            This field also contains the associated    */
+  /*                            vertical metrics table (`vmtx'), if found. */
+  /*                            IMPORTANT: The contents of this field is   */
+  /*                            undefined if the `verticalInfo' field is   */
+  /*                            unset.                                     */
+  /*                                                                       */
+  /*    num_names            :: The number of name records within this     */
+  /*                            TrueType font.                             */
+  /*                                                                       */
+  /*    name_table           :: The table of name records (`name').        */
+  /*                                                                       */
+  /*    os2                  :: The font's OS/2 table (`OS/2').            */
+  /*                                                                       */
+  /*    postscript           :: The font's PostScript table (`post'        */
+  /*                            table).  The PostScript glyph names are    */
+  /*                            not loaded by the driver on face opening.  */
+  /*                            See the `ttpost' module for more details.  */
+  /*                                                                       */
+  /*    cmap_table           :: Address of the face's `cmap' SFNT table    */
+  /*                            in memory (it's an extracted frame).       */
+  /*                                                                       */
+  /*    cmap_size            :: The size in bytes of the `cmap_table'      */
+  /*                            described above.                           */
+  /*                                                                       */
+  /*    goto_table           :: A function called by each TrueType table   */
+  /*                            loader to position a stream's cursor to    */
+  /*                            the start of a given table according to    */
+  /*                            its tag.  It defaults to TT_Goto_Face but  */
+  /*                            can be different for strange formats (e.g. */
+  /*                            Type 42).                                  */
+  /*                                                                       */
+  /*    access_glyph_frame   :: A function used to access the frame of a   */
+  /*                            given glyph within the face's font file.   */
+  /*                                                                       */
+  /*    forget_glyph_frame   :: A function used to forget the frame of a   */
+  /*                            given glyph when all data has been loaded. */
+  /*                                                                       */
+  /*    read_glyph_header    :: A function used to read a glyph header.    */
+  /*                            It must be called between an `access' and  */
+  /*                            `forget'.                                  */
+  /*                                                                       */
+  /*    read_simple_glyph    :: A function used to read a simple glyph.    */
+  /*                            It must be called after the header was     */
+  /*                            read, and before the `forget'.             */
+  /*                                                                       */
+  /*    read_composite_glyph :: A function used to read a composite glyph. */
+  /*                            It must be called after the header was     */
+  /*                            read, and before the `forget'.             */
+  /*                                                                       */
+  /*    sfnt                 :: A pointer to the SFNT service.             */
+  /*                                                                       */
+  /*    psnames              :: A pointer to the PostScript names service. */
+  /*                                                                       */
+  /*    hdmx                 :: The face's horizontal device metrics       */
+  /*                            (`hdmx' table).  This table is optional in */
+  /*                            TrueType/OpenType fonts.                   */
+  /*                                                                       */
+  /*    gasp                 :: The grid-fitting and scaling properties    */
+  /*                            table (`gasp').  This table is optional in */
+  /*                            TrueType/OpenType fonts.                   */
+  /*                                                                       */
+  /*    pclt                 :: The `pclt' SFNT table.                     */
+  /*                                                                       */
+  /*    num_sbit_strikes     :: The number of sbit strikes, i.e., bitmap   */
+  /*                            sizes, embedded in this font.              */
+  /*                                                                       */
+  /*    sbit_strikes         :: An array of sbit strikes embedded in this  */
+  /*                            font.  This table is optional in a         */
+  /*                            TrueType/OpenType font.                    */
+  /*                                                                       */
+  /*    num_sbit_scales      :: The number of sbit scales for this font.   */
+  /*                                                                       */
+  /*    sbit_scales          :: Array of sbit scales embedded in this      */
+  /*                            font.  This table is optional in a         */
+  /*                            TrueType/OpenType font.                    */
+  /*                                                                       */
+  /*    postscript_names     :: A table used to store the Postscript names */
+  /*                            of  the glyphs for this font.  See the     */
+  /*                            file  `ttconfig.h' for comments on the     */
+  /*                            TT_CONFIG_OPTION_POSTSCRIPT_NAMES option.  */
+  /*                                                                       */
+  /*    num_locations        :: The number of glyph locations in this      */
+  /*                            TrueType file.  This should be             */
+  /*                            identical to the number of glyphs.         */
+  /*                            Ignored for Type 2 fonts.                  */
+  /*                                                                       */
+  /*    glyph_locations      :: An array of longs.  These are offsets to   */
+  /*                            glyph data within the `glyf' table.        */
+  /*                            Ignored for Type 2 font faces.             */
+  /*                                                                       */
+  /*    glyf_len             :: The length of the `glyf' table.  Needed    */
+  /*                            for malformed `loca' tables.               */
+  /*                                                                       */
+  /*    font_program_size    :: Size in bytecodes of the face's font       */
+  /*                            program.  0 if none defined.  Ignored for  */
+  /*                            Type 2 fonts.                              */
+  /*                                                                       */
+  /*    font_program         :: The face's font program (bytecode stream)  */
+  /*                            executed at load time, also used during    */
+  /*                            glyph rendering.  Comes from the `fpgm'    */
+  /*                            table.  Ignored for Type 2 font fonts.     */
+  /*                                                                       */
+  /*    cvt_program_size     :: The size in bytecodes of the face's cvt    */
+  /*                            program.  Ignored for Type 2 fonts.        */
+  /*                                                                       */
+  /*    cvt_program          :: The face's cvt program (bytecode stream)   */
+  /*                            executed each time an instance/size is     */
+  /*                            changed/reset.  Comes from the `prep'      */
+  /*                            table.  Ignored for Type 2 fonts.          */
+  /*                                                                       */
+  /*    cvt_size             :: Size of the control value table (in        */
+  /*                            entries).   Ignored for Type 2 fonts.      */
+  /*                                                                       */
+  /*    cvt                  :: The face's original control value table.   */
+  /*                            Coordinates are expressed in unscaled font */
+  /*                            units.  Comes from the `cvt ' table.       */
+  /*                            Ignored for Type 2 fonts.                  */
+  /*                                                                       */
+  /*    num_kern_pairs       :: The number of kerning pairs present in the */
+  /*                            font file.  The engine only loads the      */
+  /*                            first horizontal format 0 kern table it    */
+  /*                            finds in the font file.  Ignored for       */
+  /*                            Type 2 fonts.                              */
+  /*                                                                       */
+  /*    kern_table_index     :: The index of the kerning table in the font */
+  /*                            kerning directory.  Ignored for Type 2     */
+  /*                            fonts.                                     */
+  /*                                                                       */
+  /*    interpreter          :: A pointer to the TrueType bytecode         */
+  /*                            interpreters field is also used to hook    */
+  /*                            the debugger in `ttdebug'.                 */
+  /*                                                                       */
+  /*    unpatented_hinting   :: If true, use only unpatented methods in    */
+  /*                            the bytecode interpreter.                  */
+  /*                                                                       */
+  /*    doblend              :: A boolean which is set if the font should  */
+  /*                            be blended (this is for GX var).           */
+  /*                                                                       */
+  /*    blend                :: Contains the data needed to control GX     */
+  /*                            variation tables (rather like Multiple     */
+  /*                            Master data).                              */
+  /*                                                                       */
+  /*    extra                :: Reserved for third-party font drivers.     */
+  /*                                                                       */
+  /*    postscript_name      :: The PS name of the font.  Used by the      */
+  /*                            postscript name service.                   */
+  /*                                                                       */
+  typedef struct  TT_FaceRec_
+  {
+    FT_FaceRec            root;
+
+    TTC_HeaderRec         ttc_header;
+
+    FT_ULong              format_tag;
+    FT_UShort             num_tables;
+    TT_Table              dir_tables;
+
+    TT_Header             header;       /* TrueType header table          */
+    TT_HoriHeader         horizontal;   /* TrueType horizontal header     */
+
+    TT_MaxProfile         max_profile;
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+    FT_ULong              max_components;  /* stubbed to 0 */
+#endif
+
+    FT_Bool               vertical_info;
+    TT_VertHeader         vertical;     /* TT Vertical header, if present */
+
+    FT_UShort             num_names;    /* number of name records  */
+    TT_NameTableRec       name_table;   /* name table              */
+
+    TT_OS2                os2;          /* TrueType OS/2 table            */
+    TT_Postscript         postscript;   /* TrueType Postscript table      */
+
+    FT_Byte*              cmap_table;   /* extracted `cmap' table */
+    FT_ULong              cmap_size;
+
+    TT_Loader_GotoTableFunc   goto_table;
+
+    TT_Loader_StartGlyphFunc  access_glyph_frame;
+    TT_Loader_EndGlyphFunc    forget_glyph_frame;
+    TT_Loader_ReadGlyphFunc   read_glyph_header;
+    TT_Loader_ReadGlyphFunc   read_simple_glyph;
+    TT_Loader_ReadGlyphFunc   read_composite_glyph;
+
+    /* a typeless pointer to the SFNT_Interface table used to load */
+    /* the basic TrueType tables in the face object                */
+    void*                 sfnt;
+
+    /* a typeless pointer to the FT_Service_PsCMapsRec table used to */
+    /* handle glyph names <-> unicode & Mac values                   */
+    void*                 psnames;
+
+
+    /***********************************************************************/
+    /*                                                                     */
+    /* Optional TrueType/OpenType tables                                   */
+    /*                                                                     */
+    /***********************************************************************/
+
+    /* horizontal device metrics */
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+    TT_HdmxRec            hdmx;
+#endif
+
+    /* grid-fitting and scaling table */
+    TT_GaspRec            gasp;                 /* the `gasp' table */
+
+    /* PCL 5 table */
+    TT_PCLT               pclt;
+
+    /* embedded bitmaps support */
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+    FT_ULong              num_sbit_strikes;
+    TT_SBit_Strike        sbit_strikes;
+#endif
+
+    FT_ULong              num_sbit_scales;
+    TT_SBit_Scale         sbit_scales;
+
+    /* postscript names table */
+    TT_Post_NamesRec      postscript_names;
+
+
+    /***********************************************************************/
+    /*                                                                     */
+    /* TrueType-specific fields (ignored by the OTF-Type2 driver)          */
+    /*                                                                     */
+    /***********************************************************************/
+
+    /* the glyph locations */
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+    FT_UShort             num_locations_stub;
+    FT_Long*              glyph_locations_stub;
+#endif
+
+    /* the font program, if any */
+    FT_ULong              font_program_size;
+    FT_Byte*              font_program;
+
+    /* the cvt program, if any */
+    FT_ULong              cvt_program_size;
+    FT_Byte*              cvt_program;
+
+    /* the original, unscaled, control value table */
+    FT_ULong              cvt_size;
+    FT_Short*             cvt;
+
+#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
+    /* the format 0 kerning table, if any */
+    FT_Int                num_kern_pairs;
+    FT_Int                kern_table_index;
+    TT_Kern0_Pair         kern_pairs;
+#endif
+
+    /* A pointer to the bytecode interpreter to use.  This is also */
+    /* used to hook the debugger for the `ttdebug' utility.        */
+    TT_Interpreter        interpreter;
+
+#ifdef TT_CONFIG_OPTION_UNPATENTED_HINTING
+    /* Use unpatented hinting only. */
+    FT_Bool               unpatented_hinting;
+#endif
+
+    /***********************************************************************/
+    /*                                                                     */
+    /* Other tables or fields. This is used by derivative formats like     */
+    /* OpenType.                                                           */
+    /*                                                                     */
+    /***********************************************************************/
+
+    FT_Generic            extra;
+
+    const char*           postscript_name;
+
+    /* since version 2.1.8, but was originally placed after */
+    /* `glyph_locations_stub'                               */
+    FT_ULong              glyf_len;
+
+    /* since version 2.1.8, but was originally placed before `extra' */
+#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
+    FT_Bool               doblend;
+    GX_Blend              blend;
+#endif
+
+    /* since version 2.2 */
+
+#ifdef FT_OPTIMIZE_MEMORY
+    FT_Byte*              horz_metrics;
+    FT_ULong              horz_metrics_size;
+
+    FT_Byte*              vert_metrics;
+    FT_ULong              vert_metrics_size;
+
+    FT_UInt               num_locations;
+    FT_Byte*              glyph_locations;
+
+    FT_Byte*              hdmx_table;
+    FT_ULong              hdmx_table_size;
+    FT_UInt               hdmx_record_count;
+    FT_ULong              hdmx_record_size;
+    FT_Byte*              hdmx_record_sizes;
+
+    FT_Byte*              sbit_table;
+    FT_ULong              sbit_table_size;
+    FT_UInt               sbit_num_strikes;
+
+    FT_Byte*              kern_table;
+    FT_ULong              kern_table_size;
+    FT_UInt               num_kern_tables;
+    FT_UInt32             kern_avail_bits;
+    FT_UInt32             kern_order_bits;
+#endif
+
+#ifdef TT_CONFIG_OPTION_BDF
+    TT_BDFRec             bdf;
+#endif /* TT_CONFIG_OPTION_BDF */
+
+  } TT_FaceRec;
+
+
+  /*************************************************************************/
+  /*                                                                       */
+  /*  <Struct>                                                             */
+  /*     TT_GlyphZoneRec                                                   */
+  /*                                                                       */
+  /*  <Description>                                                        */
+  /*     A glyph zone is used to load, scale and hint glyph outline        */
+  /*     coordinates.                                                      */
+  /*                                                                       */
+  /*  <Fields>                                                             */
+  /*     memory       :: A handle to the memory manager.                   */
+  /*                                                                       */
+  /*     max_points   :: The maximal size in points of the zone.           */
+  /*                                                                       */
+  /*     max_contours :: Max size in links contours of thez one.           */
+  /*                                                                       */
+  /*     n_points     :: The current number of points in the zone.         */
+  /*                                                                       */
+  /*     n_contours   :: The current number of contours in the zone.       */
+  /*                                                                       */
+  /*     org          :: The original glyph coordinates (font              */
+  /*                     units/scaled).                                    */
+  /*                                                                       */
+  /*     cur          :: The current glyph coordinates (scaled/hinted).    */
+  /*                                                                       */
+  /*     tags         :: The point control tags.                           */
+  /*                                                                       */
+  /*     contours     :: The contours end points.                          */
+  /*                                                                       */
+  typedef struct  TT_GlyphZoneRec_
+  {
+    FT_Memory   memory;
+    FT_UShort   max_points;
+    FT_UShort   max_contours;
+    FT_UShort   n_points;   /* number of points in zone    */
+    FT_Short    n_contours; /* number of contours          */
+
+    FT_Vector*  org;        /* original point coordinates  */
+    FT_Vector*  cur;        /* current point coordinates   */
+
+    FT_Byte*    tags;       /* current touch flags         */
+    FT_UShort*  contours;   /* contour end points          */
+
+  } TT_GlyphZoneRec, *TT_GlyphZone;
+
+
+  /* handle to execution context */
+  typedef struct TT_ExecContextRec_*  TT_ExecContext;
+
+  /* glyph loader structure */
+  typedef struct  TT_LoaderRec_
+  {
+    FT_Face          face;
+    FT_Size          size;
+    FT_GlyphSlot     glyph;
+    FT_GlyphLoader   gloader;
+
+    FT_ULong         load_flags;
+    FT_UInt          glyph_index;
+
+    FT_Stream        stream;
+    FT_Int           byte_len;
+
+    FT_Short         n_contours;
+    FT_BBox          bbox;
+    FT_Int           left_bearing;
+    FT_Int           advance;
+    FT_Int           linear;
+    FT_Bool          linear_def;
+    FT_Bool          preserve_pps;
+    FT_Vector        pp1;
+    FT_Vector        pp2;
+
+    FT_ULong         glyf_offset;
+
+    /* the zone where we load our glyphs */
+    TT_GlyphZoneRec  base;
+    TT_GlyphZoneRec  zone;
+
+    TT_ExecContext   exec;
+    FT_Byte*         instructions;
+    FT_ULong         ins_pos;
+
+    /* for possible extensibility in other formats */
+    void*            other;
+
+    /* since version 2.1.8 */
+    FT_Int           top_bearing;
+    FT_Int           vadvance;
+    FT_Vector        pp3;
+    FT_Vector        pp4;
+
+  } TT_LoaderRec;
+
+
+FT_END_HEADER
+
+#endif /* __TTTYPES_H__ */
+
+
+/* END */