[xorg-commit-diffs] xc/extras/freetype2/include/freetype/internal ftserv.h, NONE, 1.1.6.1 ftdriver.h, 1.1.4.1, 1.1.4.2 ftgloadr.h, 1.1, 1.1.4.1 ftmemory.h, 1.1, 1.1.4.1 ftobjs.h, 1.1.4.1, 1.1.4.2 internal.h, 1.1.4.2, 1.1.4.3 pcftypes.h, 1.1.4.1, 1.1.4.2 psaux.h, 1.1.4.1, 1.1.4.2 pshints.h, 1.1.4.1, 1.1.4.2 sfnt.h, 1.1.4.1, 1.1.4.2 t1types.h, 1.1, 1.1.4.1 tttypes.h, 1.1.4.1, 1.1.4.2 bdftypes.h, 1.1.4.1, NONE cfftypes.h, 1.1.4.1, NONE fnttypes.h, 1.1.4.1, NONE ftcore.h, 1.1, NONE ftexcept.h, 1.1.4.2, NONE fthash.h, 1.1.4.1, NONE ftobject.h, 1.1.4.1, NONE pfr.h, 1.1, NONE psnames.h, 1.1.4.1, NONE t42types.h, 1.1.4.1, NONE

Egbert Eich xorg-commit at pdx.freedesktop.org
Thu Apr 15 03:14:32 PDT 2004


Committed by: eich

Update of /cvs/xorg/xc/extras/freetype2/include/freetype/internal
In directory pdx:/home/eich/tstbuild/xc/extras/freetype2/include/freetype/internal

Modified Files:
      Tag: XORG-CURRENT
	ftdriver.h ftgloadr.h ftmemory.h ftobjs.h internal.h 
	pcftypes.h psaux.h pshints.h sfnt.h t1types.h tttypes.h 
Added Files:
      Tag: XORG-CURRENT
	ftserv.h 
Removed Files:
      Tag: XORG-CURRENT
	bdftypes.h cfftypes.h fnttypes.h ftcore.h ftexcept.h fthash.h 
	ftobject.h pfr.h psnames.h t42types.h 
Log Message:
2004-04-15  Egbert Eich  <eich at freedesktop.org>
        Merged changes from RELEASE-1 branch
	


--- NEW FILE: ftserv.h ---
/***************************************************************************/
/*                                                                         */
/*  ftserv.h                                                               */
/*                                                                         */
/*    The FreeType 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, LICENSE.TXT.  By continuing to use, modify, or distribute     */
/*  this file you indicate that you have read the license and              */
/*  understand and accept it fully.                                        */
/*                                                                         */
/***************************************************************************/

  /*************************************************************************/
  /*                                                                       */
  /*  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


  /*
   * @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.
   */
#define FT_FACE_FIND_SERVICE( face, ptr, id )                               \
  FT_BEGIN_STMNT                                                            \
    FT_Module    module = FT_MODULE( FT_FACE(face)->driver );               \
    /* the strange cast is to allow C++ compilation */                      \
    FT_Pointer*  Pptr   = (FT_Pointer*) &(ptr);                             \
                                                                            \
                                                                            \
    *Pptr = NULL;                                                           \
    if ( module->clazz->get_interface )                                     \
      *Pptr = module->clazz->get_interface( module, FT_SERVICE_ID_ ## id ); \
  FT_END_STMNT


  /*
   * @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.
   */
#define FT_FACE_FIND_GLOBAL_SERVICE( face, ptr, id )               \
  FT_BEGIN_STMNT                                                   \
    FT_Module    module = FT_MODULE( FT_FACE(face)->driver );      \
    /* the strange cast is to allow C++ compilation */             \
    FT_Pointer*  Pptr   = (FT_Pointer*) &(ptr);                    \
                                                                   \
                                                                   \
    *Pptr = ft_module_get_service( module, FT_SERVICE_ID_ ## id ); \
  FT_END_STMNT


  /*************************************************************************/
  /*************************************************************************/
  /*****                                                               *****/
  /*****         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.
   */
#define FT_FACE_LOOKUP_SERVICE( face, ptr, id )                  \
  FT_BEGIN_STMNT                                                 \
    /* the strange cast is to allow C++ compilation */           \
    FT_Pointer*  pptr = (FT_Pointer*)&(ptr);                     \
    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 );    \
    }                                                            \
    *pptr = svc;                                                 \
  FT_END_STMNT


  /*
   *  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_MULTIPLE_MASTERS_H  <freetype/internal/services/svmm.h>
#define FT_SERVICE_POSTSCRIPT_NAME_H   <freetype/internal/services/svpostnm.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_GLYPH_DICT_H        <freetype/internal/services/svgldict.h>
#define FT_SERVICE_BDF_H               <freetype/internal/services/svbdf.h>
#define FT_SERVICE_XFREE86_NAME_H      <freetype/internal/services/svxf86nm.h>
#define FT_SERVICE_SFNT_H              <freetype/internal/services/svsfnt.h>
#define FT_SERVICE_PFR_H               <freetype/internal/services/svpfr.h>
#define FT_SERVICE_WINFNT_H            <freetype/internal/services/svwinfnt.h>

 /* */

FT_END_HEADER

#endif /* __FTSERV_H__ */


/* END */

Index: ftdriver.h
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/ftdriver.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/ftdriver.h	26 Nov 2003 22:48:25 -0000	1.1.4.1
+++ b/ftdriver.h	15 Apr 2004 10:14:28 -0000	1.1.4.2
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    FreeType font driver interface (specification).                      */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -169,9 +169,9 @@
   {
     FT_Module_Class           root;
 
-    FT_Int                    face_object_size;
-    FT_Int                    size_object_size;
-    FT_Int                    slot_object_size;
+    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;

Index: ftgloadr.h
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/ftgloadr.h,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -d -r1.1 -r1.1.4.1
--- a/ftgloadr.h	14 Nov 2003 16:48:24 -0000	1.1
+++ b/ftgloadr.h	15 Apr 2004 10:14:28 -0000	1.1.4.1
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType glyph loader (specification).                           */
 /*                                                                         */
-/*  Copyright 2002 by                                                      */
+/*  Copyright 2002, 2003 by                                                */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg                       */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -52,12 +52,6 @@
 #define FT_SUBGLYPH_FLAG_USE_MY_METRICS      0x200
 
 
-  enum
-  {
-    FT_GLYPH_OWN_BITMAP = 1
-  };
-
-
   typedef struct  FT_SubGlyphRec_
   {
     FT_Int     index;

Index: ftmemory.h
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/ftmemory.h,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -d -r1.1 -r1.1.4.1
--- a/ftmemory.h	14 Nov 2003 16:48:24 -0000	1.1
+++ b/ftmemory.h	15 Apr 2004 10:14:28 -0000	1.1.4.1
@@ -141,7 +141,7 @@
   FT_Realloc( FT_Memory  memory,
               FT_Long    current,
               FT_Long    size,
-              void**     P );
+              void*     *P );
 
 
   /*************************************************************************/
@@ -159,17 +159,14 @@
   /*    P      :: This is the _address_ of a _pointer_ which points to the */
   /*              allocated block.  It is always set to NULL on exit.      */
   /*                                                                       */
-  /* <Return>                                                              */
-  /*    FreeType error code.  0 means success.                             */
-  /*                                                                       */
   /* <Note>                                                                */
-  /*    If P or *P are NULL, this function should return successfully.     */
+  /*    If P or *P is NULL, this function should return successfully.      */
   /*    This is a strong convention within all of FreeType and its         */
   /*    drivers.                                                           */
   /*                                                                       */
   FT_BASE( void )
   FT_Free( FT_Memory  memory,
-           void**     P );
+           void*     *P );
 
 
 #define FT_MEM_SET( dest, byte, count )     ft_memset( dest, byte, count )

Index: ftobjs.h
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/ftobjs.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/ftobjs.h	26 Nov 2003 22:48:25 -0000	1.1.4.1
+++ b/ftobjs.h	15 Apr 2004 10:14:28 -0000	1.1.4.2
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    The FreeType private base classes (specification).                   */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -34,7 +34,7 @@
 #include FT_INTERNAL_GLYPH_LOADER_H
 #include FT_INTERNAL_DRIVER_H
 #include FT_INTERNAL_AUTOHINT_H
-#include FT_INTERNAL_OBJECT_H
+#include FT_INTERNAL_SERVICE_H
 
 #ifdef FT_CONFIG_OPTION_INCREMENTAL
 #include FT_INCREMENTAL_H
@@ -112,7 +112,7 @@
   /*   return an error later when trying to load the glyph).               */
   /*                                                                       */
   /*   It also check that fields that must be a multiple of 2, 4, or 8     */
-  /*   dont' have incorrect values, etc.                                   */
+  /*   don't have incorrect values, etc.                                   */
   /*                                                                       */
   /* FT_VALIDATE_PARANOID ::                                               */
   /*   Only for font debugging.  Checks that a table follows the           */
@@ -239,7 +239,7 @@
 
   typedef struct  FT_CMap_ClassRec_
   {
-    FT_UInt                size;
+    FT_ULong               size;
     FT_CMap_InitFunc       init;
     FT_CMap_DoneFunc       done;
     FT_CMap_CharIndexFunc  char_index;
@@ -271,56 +271,52 @@
   /*    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.                              */
+  /*    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.                              */
   /*                                                                       */
-  /*    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.                                     */
+  /*    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_delta  :: A translation vector used to transform glyph   */
-  /*                        outlines after they are loaded from the font.  */
-  /*                        Only used by the convenience functions.        */
+  /*    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_flags  :: Some flags used to classify the transform.     */
-  /*                        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.                                                       */
   /*                                                                       */
-  /*    hint_flags       :: Some flags used to change the hinters'         */
-  /*                        behaviour.  Only used for debugging for now.   */
+  /*    transform_flags ::                                                 */
+  /*      Some flags used to classify the transform.  Only used by the     */
+  /*      convenience functions.                                           */
   /*                                                                       */
-  /*    postscript_name  :: Postscript font name for this face.            */
+  /*    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.      */
+  /*      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_
   {
-    FT_UShort    max_points;
-    FT_Short     max_contours;
-
-    FT_Matrix    transform_matrix;
-    FT_Vector    transform_delta;
-    FT_Int       transform_flags;
+    FT_UShort           max_points;
+    FT_Short            max_contours;
 
-    FT_UInt32    hint_flags;
+    FT_Matrix           transform_matrix;
+    FT_Vector           transform_delta;
+    FT_Int              transform_flags;
 
-    const char*  postscript_name;
+    FT_ServiceCacheRec  services;
 
 #ifdef FT_CONFIG_OPTION_INCREMENTAL
     FT_Incremental_InterfaceRec*  incremental_interface;
@@ -343,6 +339,11 @@
   /*    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  */
@@ -357,9 +358,13 @@
   /*                                                                       */
   /*    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;
@@ -416,25 +421,25 @@
 
 
 #define FT_MODULE_IS_DRIVER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
-                                    ft_module_font_driver )
+                                    FT_MODULE_FONT_DRIVER )
 
 #define FT_MODULE_IS_RENDERER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
-                                      ft_module_renderer )
+                                      FT_MODULE_RENDERER )
 
 #define FT_MODULE_IS_HINTER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
-                                    ft_module_hinter )
+                                    FT_MODULE_HINTER )
 
 #define FT_MODULE_IS_STYLER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
-                                    ft_module_styler )
+                                    FT_MODULE_STYLER )
 
 #define FT_DRIVER_IS_SCALABLE( x )  ( FT_MODULE_CLASS( x )->module_flags & \
-                                      ft_module_driver_scalable )
+                                      FT_MODULE_DRIVER_SCALABLE )
 
 #define FT_DRIVER_USES_OUTLINES( x )  !( FT_MODULE_CLASS( x )->module_flags & \
-                                         ft_module_driver_no_outlines )
+                                         FT_MODULE_DRIVER_NO_OUTLINES )
 
 #define FT_DRIVER_HAS_HINTER( x )  ( FT_MODULE_CLASS( x )->module_flags & \
-                                     ft_module_driver_has_hinter )
+                                     FT_MODULE_DRIVER_HAS_HINTER )
 
 
   /*************************************************************************/
@@ -462,6 +467,10 @@
   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 );
+
  /* */
 
 
@@ -537,28 +546,30 @@
   FT_Done_GlyphSlot( FT_GlyphSlot  slot );
 
  /* */
- 
+
  /*
-  * free the bitmap of a given glyphslot when needed
-  * (i.e. only when it was allocated with ft_glyphslot_alloc_bitmap)
+  * 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
+  * 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
+  * 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_Pointer     buffer );
+  ft_glyphslot_set_bitmap( FT_GlyphSlot  slot,
+                           FT_Byte*      buffer );
 
 
   /*************************************************************************/
@@ -667,8 +678,18 @@
   /*************************************************************************/
 
 
-#define FT_DEBUG_HOOK_TRUETYPE  0
-#define FT_DEBUG_HOOK_TYPE1     1
+/* 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
 
 
   /*************************************************************************/
@@ -688,6 +709,12 @@
   /*    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  */
@@ -738,8 +765,6 @@
 
     FT_DebugHook_Func  debug_hooks[4];
 
-    FT_MetaClassRec    meta_class;
-
   } FT_LibraryRec;
 
 

Index: internal.h
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/internal.h,v
retrieving revision 1.1.4.2
retrieving revision 1.1.4.3
diff -u -d -r1.1.4.2 -r1.1.4.3
--- a/internal.h	5 Mar 2004 13:38:42 -0000	1.1.4.2
+++ b/internal.h	15 Apr 2004 10:14:28 -0000	1.1.4.3
@@ -14,7 +14,6 @@
 /*  understand and accept it fully.                                        */
 /*                                                                         */
 /***************************************************************************/
-/* $XFree86$ */
 
   /*************************************************************************/
   /*                                                                       */
@@ -33,20 +32,14 @@
 #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_HASH_H                <freetype/internal/fthash.h>
-#define FT_INTERNAL_OBJECT_H              <freetype/internal/ftobject.h>
+#define FT_INTERNAL_SERVICE_H             <freetype/internal/ftserv.h>
 
 #define FT_INTERNAL_TRUETYPE_TYPES_H      <freetype/internal/tttypes.h>
 #define FT_INTERNAL_TYPE1_TYPES_H         <freetype/internal/t1types.h>
-#define FT_INTERNAL_TYPE42_TYPES_H        <freetype/internal/t42types.h>
-#define FT_INTERNAL_CFF_TYPES_H           <freetype/internal/cfftypes.h>
-#define FT_INTERNAL_FNT_TYPES_H           <freetype/internal/fnttypes.h>
-#define FT_INTERNAL_BDF_TYPES_H           <freetype/internal/bdftypes.h>
-#define FT_INTERNAL_PFR_H                 <freetype/internal/pfr.h>
 
-#define FT_INTERNAL_POSTSCRIPT_NAMES_H    <freetype/internal/psnames.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>
 

Index: pcftypes.h
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/pcftypes.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/pcftypes.h	26 Nov 2003 22:48:25 -0000	1.1.4.1
+++ b/pcftypes.h	15 Apr 2004 10:14:28 -0000	1.1.4.2
@@ -2,7 +2,7 @@
 
   FreeType font driver for pcf fonts
 
-  Copyright (C) 2000-2001 by
+  Copyright (C) 2000, 2001, 2002 by
   Francesco Zappa Nardelli
 
 Permission is hereby granted, free of charge, to any person obtaining a copy

Index: psaux.h
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/psaux.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/psaux.h	26 Nov 2003 22:48:25 -0000	1.1.4.1
+++ b/psaux.h	15 Apr 2004 10:14:28 -0000	1.1.4.2
@@ -5,7 +5,7 @@
 /*    Auxiliary functions and data structures related to PostScript fonts  */
 /*    (specification).                                                     */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -24,6 +24,7 @@
 #include <ft2build.h>
 #include FT_INTERNAL_OBJECTS_H
 #include FT_INTERNAL_TYPE1_TYPES_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
 
 
 FT_BEGIN_HEADER
@@ -70,10 +71,10 @@
     (*done)( PS_Table  table );
 
     FT_Error
-    (*add)( PS_Table   table,
-            FT_Int     index,
-            void*      object,
-            FT_Int     length );
+    (*add)( PS_Table    table,
+            FT_Int      idx,
+            void*       object,
+            FT_PtrDist  length );
 
     void
     (*release)( PS_Table  table );
@@ -177,7 +178,9 @@
     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,
@@ -261,7 +264,7 @@
           },
 
 
-#define T1_FIELD_TYPE_BOOL( _ident, _fname )                        \
+#define T1_FIELD_BOOL( _ident, _fname )                             \
           T1_NEW_SIMPLE_FIELD( _ident, T1_FIELD_TYPE_BOOL, _fname )
 
 #define T1_FIELD_NUM( _ident, _fname )                                 \
@@ -270,9 +273,15 @@
 #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 )
 
@@ -321,13 +330,21 @@
     void
     (*skip_spaces)( PS_Parser  parser );
     void
-    (*skip_alpha)( PS_Parser  parser );
+    (*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,
@@ -634,7 +651,7 @@
     T1_Decoder_ZoneRec   zones[T1_MAX_SUBRS_CALLS + 1];
     T1_Decoder_Zone      zone;
 
-    PSNames_Service      psnames;      /* for seac */
+    FT_Service_PsCMaps   psnames;      /* for seac */
     FT_UInt              num_glyphs;
     FT_Byte**            glyph_names;
 
@@ -652,7 +669,6 @@
 
     PS_Blend             blend;       /* for multiple master support */
 
-    FT_UInt32            hint_flags;
     FT_Render_Mode       hint_mode;
 
     T1_Decoder_Callback  parse_callback;

Index: pshints.h
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/pshints.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/pshints.h	26 Nov 2003 22:48:25 -0000	1.1.4.1
+++ b/pshints.h	15 Apr 2004 10:14:28 -0000	1.1.4.2
@@ -6,7 +6,7 @@
 /*    recorders (specification only).  These are used to support native    */
 /*    T1/T2 hints in the "type1", "cid" and "cff" font drivers.            */
 /*                                                                         */
-/*  Copyright 2001, 2002 by                                                */
+/*  Copyright 2001, 2002, 2003 by                                          */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -261,13 +261,13 @@
   /*    been recorded.                                                     */
   /*                                                                       */
   /* @input:                                                               */
-  /*   hints      :: A handle to the Type 1 hints recorder.                */
+  /*   hints     :: A handle to the Type 1 hints recorder.                 */
   /*                                                                       */
-  /*   outline    :: A pointer to the target outline descriptor.           */
+  /*   outline   :: A pointer to the target outline descriptor.            */
   /*                                                                       */
-  /*   globals    :: The hinter globals for this font.                     */
+  /*   globals   :: The hinter globals for this font.                      */
   /*                                                                       */
-  /*   hint_flags :: Hinter bit flags.                                     */
+  /*   hint_mode :: Hinting information.                                   */
   /*                                                                       */
   /* @return:                                                              */
   /*   FreeType error code.  0 means success.                              */
@@ -542,13 +542,13 @@
   /*    method.                                                            */
   /*                                                                       */
   /* @input:                                                               */
-  /*    hints      :: A handle to the Type 2 hints recorder.               */
+  /*    hints     :: A handle to the Type 2 hints recorder.                */
   /*                                                                       */
-  /*    outline    :: A pointer to the target outline descriptor.          */
+  /*    outline   :: A pointer to the target outline descriptor.           */
   /*                                                                       */
-  /*    globals    :: The hinter globals for this font.                    */
+  /*    globals   :: The hinter globals for this font.                     */
   /*                                                                       */
-  /*    hint_flags :: Hinter bit flags.                                    */
+  /*    hint_mode :: Hinting information.                                  */
   /*                                                                       */
   /* @return:                                                              */
   /*   FreeType error code.  0 means success.                              */

Index: sfnt.h
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/sfnt.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/sfnt.h	26 Nov 2003 22:48:25 -0000	1.1.4.1
+++ b/sfnt.h	15 Apr 2004 10:14:28 -0000	1.1.4.2
@@ -4,7 +4,7 @@
 /*                                                                         */
 /*    High-level `sfnt' driver interface (specification).                  */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -125,11 +125,6 @@
   (*TT_Done_Face_Func)( TT_Face  face );
 
 
-  typedef FT_Module_Interface
-  (*SFNT_Get_Interface_Func)( FT_Module    module,
-                              const char*  func_interface );
-
-
   /*************************************************************************/
   /*                                                                       */
   /* <FuncType>                                                            */
@@ -459,21 +454,6 @@
 
   /*************************************************************************/
   /*                                                                       */
-  /* <FuncType>                                                            */
-  /*    SFNT_Load_Table_Func                                               */
-  /*                                                                       */
-  /* <Description>                                                         */
-  /*    Loads a given SFNT table in memory                                 */
-  /*                                                                       */
-  typedef FT_Error
-  (*SFNT_Load_Table_Func)( FT_Face      face,
-                           FT_ULong     tag,
-                           FT_Long      offset,
-                           FT_Byte*     buffer,
-                           FT_ULong*    length );
-
-  /*************************************************************************/
-  /*                                                                       */
   /* <Struct>                                                              */
   /*    SFNT_Interface                                                     */
   /*                                                                       */
@@ -491,7 +471,7 @@
     TT_Init_Face_Func            init_face;
     TT_Load_Face_Func            load_face;
     TT_Done_Face_Func            done_face;
-    SFNT_Get_Interface_Func      get_interface;
+    FT_Module_Requester          get_interface;
 
     TT_Load_Any_Func             load_any;
     TT_Load_SFNT_HeaderRec_Func  load_sfnt_header;

Index: t1types.h
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/t1types.h,v
retrieving revision 1.1
retrieving revision 1.1.4.1
diff -u -d -r1.1 -r1.1.4.1
--- a/t1types.h	14 Nov 2003 16:48:24 -0000	1.1
+++ b/t1types.h	15 Apr 2004 10:14:28 -0000	1.1.4.1
@@ -5,7 +5,7 @@
 /*    Basic Type1/Type2 type definitions and interface (specification      */
 /*    only).                                                               */
 /*                                                                         */
-/*  Copyright 1996-2001, 2002 by                                           */
+/*  Copyright 1996-2001, 2002, 2003 by                                     */
 /*  David Turner, Robert Wilhelm, and Werner Lemberg.                      */
 /*                                                                         */
 /*  This file is part of the FreeType project, and may only be used,       */
@@ -23,8 +23,9 @@
 
 #include <ft2build.h>
 #include FT_TYPE1_TABLES_H
-#include FT_INTERNAL_POSTSCRIPT_NAMES_H
 #include FT_INTERNAL_POSTSCRIPT_HINTS_H
+#include FT_INTERNAL_SERVICE_H
+#include FT_SERVICE_POSTSCRIPT_CMAPS_H
 
 
 FT_BEGIN_HEADER
@@ -115,7 +116,7 @@
     FT_BBox          font_bbox;
     FT_Long          font_id;
 
-    FT_Int           stroke_width;
+    FT_Fixed         stroke_width;
 
   } T1_FontRec, *T1_Font;
 
@@ -169,7 +170,7 @@
 
     /* support for Multiple Masters fonts */
     PS_Blend       blend;
-    
+
     /* since FT 2.1 - interface to PostScript hinter */
     const void*    pshinter;
 
@@ -184,7 +185,7 @@
     CID_FaceInfoRec  cid;
     void*            afm_data;
     CID_Subrs        subrs;
-    
+
     /* since FT 2.1 - interface to PostScript hinter */
     void*            pshinter;
 

Index: tttypes.h
===================================================================
RCS file: /cvs/xorg/xc/extras/freetype2/include/freetype/internal/tttypes.h,v
retrieving revision 1.1.4.1
retrieving revision 1.1.4.2
diff -u -d -r1.1.4.1 -r1.1.4.2
--- a/tttypes.h	26 Nov 2003 22:48:25 -0000	1.1.4.1
+++ b/tttypes.h	15 Apr 2004 10:14:28 -0000	1.1.4.2
@@ -1375,10 +1375,9 @@
   /*                            It must be called after the header was     */
   /*                            read, and before the `forget'.             */
   /*                                                                       */
-  /*    sfnt                 :: A pointer to the SFNT `driver' interface.  */
+  /*    sfnt                 :: A pointer to the SFNT service.             */
   /*                                                                       */
-  /*    psnames              :: A pointer to the `PSNames' module          */
-  /*                            interface.                                 */
+  /*    psnames              :: A pointer to the PostScript names service. */
   /*                                                                       */
   /*    hdmx                 :: The face's horizontal device metrics       */
   /*                            (`hdmx' table).  This table is optional in */
@@ -1456,6 +1455,9 @@
   /*                            interpreters field is also used to hook    */
   /*                            the debugger in `ttdebug'.                 */
   /*                                                                       */
+  /*    unpatented_hinting   :: If true, use only unpatented methods in    */
+  /*                            the bytecode interpreter.                  */
+  /*                                                                       */
   /*    extra                :: Reserved for third-party font drivers.     */
   /*                                                                       */
   typedef struct  TT_FaceRec_
@@ -1494,14 +1496,15 @@
     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                    */
+    /* 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 PSNames_Interface table used to       */
-    /* handle glyph names <-> unicode & Mac values                     */
+    /* a typeless pointer to the FT_Service_PsCMapsRec table used to */
+    /* handle glyph names <-> unicode & Mac values                   */
     void*                 psnames;
 
+
     /***********************************************************************/
     /*                                                                     */
     /* Optional TrueType/OpenType tables                                   */
@@ -1559,6 +1562,10 @@
     /* 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
 
     /***********************************************************************/
     /*                                                                     */
@@ -1569,6 +1576,8 @@
 
     FT_Generic            extra;
 
+    const char*           postscript_name;
+
   } TT_FaceRec;
 
 

--- bdftypes.h DELETED ---

--- cfftypes.h DELETED ---

--- fnttypes.h DELETED ---

--- ftcore.h DELETED ---

--- ftexcept.h DELETED ---

--- fthash.h DELETED ---

--- ftobject.h DELETED ---

--- pfr.h DELETED ---

--- psnames.h DELETED ---

--- t42types.h DELETED ---




More information about the xorg-commit-diffs mailing list