shithub: freetype+ttf2subf

Download patch

ref: 104dd41d968d29056cdbe2bdbd2d1e3462261421
parent: 754d558893d71e2a46da8a9c35bc137378bfea36
author: Werner Lemberg <[email protected]>
date: Tue Sep 16 03:57:25 EDT 2003

* include/freetype/internal/services/bdf.h: Renamed to...
* include/freetype/internal/services/svbdf.h: This.
Add copyright notice.
* include/freetype/internal/services/glyfdict.h: Renamed to...
* include/freetype/internal/services/svgldict.h: This.
Add copyright notice.
* include/freetype/internal/services/multmast.h: Renamed to...
* include/freetype/internal/services/svmm.h: This.
Add copyright notice.
Add FT_BEGIN_HEADER and FT_END_HEADER.
* include/freetype/internal/services/sfnt.h: Renamed to...
* include/freetype/internal/services/svsfnt.h: This.
Add copyright notice.
* include/freetype/internal/services/postname.h: Renamed to...
* include/freetype/internal/services/svpostnm.h: This.
Add copyright notice.
* include/freetype/internal/services/xf86name.h: Renamed to...
* include/freetype/internal/services/svxf86nm.h: This.
Add copyright notice.

* include/freetype/internal/ftserv.h: Add FT_BEGIN_HEADER and
FT_END_HEADER.
Add copyright notice.
Update macro names of services header files.

* builds/freetype.mk (SERVICES_DIR): New variable.
(BASE_H): Add services header files.

git/fs: mount .git/fs: mount/attach disallowed
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,33 @@
+2003-09-15  Werner Lemberg  <[email protected]>
+
+	* include/freetype/internal/services/bdf.h: Renamed to...
+	* include/freetype/internal/services/svbdf.h: This.
+	Add copyright notice.
+	* include/freetype/internal/services/glyfdict.h: Renamed to...
+	* include/freetype/internal/services/svgldict.h: This.
+	Add copyright notice.
+	* include/freetype/internal/services/multmast.h: Renamed to...
+	* include/freetype/internal/services/svmm.h: This.
+	Add copyright notice.
+	Add FT_BEGIN_HEADER and FT_END_HEADER.
+	* include/freetype/internal/services/sfnt.h: Renamed to...
+	* include/freetype/internal/services/svsfnt.h: This.
+	Add copyright notice.
+	* include/freetype/internal/services/postname.h: Renamed to...
+	* include/freetype/internal/services/svpostnm.h: This.
+	Add copyright notice.
+	* include/freetype/internal/services/xf86name.h: Renamed to...
+	* include/freetype/internal/services/svxf86nm.h: This.
+	Add copyright notice.
+
+	* include/freetype/internal/ftserv.h: Add FT_BEGIN_HEADER and
+	FT_END_HEADER.
+	Add copyright notice.
+	Update macro names of services header files.
+
+	* builds/freetype.mk (SERVICES_DIR): New variable.
+	(BASE_H): Add services header files.
+
 2003-09-11  Werner Lemberg  <[email protected]>
 
 	* builds/toplevel.mk (distclean): Remove `builds/unix/freetype2.pc'.
--- a/builds/freetype.mk
+++ b/builds/freetype.mk
@@ -97,6 +97,7 @@
 #
 PUBLIC_DIR   := $(TOP_DIR)/include/freetype
 INTERNAL_DIR := $(PUBLIC_DIR)/internal
+SERVICES_DIR := $(INTERNAL_DIR)/services
 CONFIG_DIR   := $(PUBLIC_DIR)/config
 CACHE_DIR    := $(PUBLIC_DIR)/cache
 
@@ -155,7 +156,8 @@
 # changes, the whole library is recompiled.
 #
 PUBLIC_H   := $(wildcard $(PUBLIC_DIR)/*.h)
-BASE_H     := $(wildcard $(INTERNAL_DIR)/*.h)
+BASE_H     := $(wildcard $(INTERNAL_DIR)/*.h) \
+              $(wildcard $(SERVICES_DIR)/*.h)
 CONFIG_H   := $(wildcard $(CONFIG_DIR)/*.h) \
               $(wildcard $(BUILD_DIR)/freetype/config/*.h)
 CACHE_H    := $(wildcard $(CACHE_DIR)/*.h)
--- a/include/freetype/config/ftconfig.h
+++ b/include/freetype/config/ftconfig.h
@@ -193,8 +193,9 @@
 
 
 #define FT_BEGIN_STMNT  do {
-#define FT_END_STMNT    } while (0)
+#define FT_END_STMNT    } while ( 0 )
 #define FT_DUMMY_STMNT  FT_BEGIN_STMNT FT_END_STMNT
+
 
   /*************************************************************************/
   /*                                                                       */
--- a/include/freetype/ftmodule.h
+++ b/include/freetype/ftmodule.h
@@ -69,7 +69,8 @@
 #define ft_module_driver_no_outlines  FT_MODULE_DRIVER_NO_OUTLINES
 #define ft_module_driver_has_hinter   FT_MODULE_DRIVER_HAS_HINTER
 
-  typedef  FT_Pointer   FT_Module_Interface;
+
+  typedef FT_Pointer  FT_Module_Interface;
 
   typedef FT_Error
   (*FT_Module_Constructor)( FT_Module  module );
--- a/include/freetype/internal/ftobjs.h
+++ b/include/freetype/internal/ftobjs.h
@@ -271,47 +271,50 @@
   /*    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_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_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_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_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.        */
+  /*    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.      */
+  /*      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_UShort           max_points;
+    FT_Short            max_contours;
 
-    FT_Matrix    transform_matrix;
-    FT_Vector    transform_delta;
-    FT_Int       transform_flags;
+    FT_Matrix           transform_matrix;
+    FT_Vector           transform_delta;
+    FT_Int              transform_flags;
 
     FT_ServiceCacheRec  services;
 
@@ -701,6 +704,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 */
--- a/include/freetype/internal/ftserv.h
+++ b/include/freetype/internal/ftserv.h
@@ -1,48 +1,85 @@
-#ifndef __FT_SERVICE_H__
-#define __FT_SERVICE_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 are implemented     */
+  /*  differently from data pointers (e.g. 48 bits instead of 32).         */
+  /*                                                                       */
+  /*************************************************************************/
+
+
+#ifndef __FTSERV_H__
+#define __FTSERV_H__
+
+
+FT_BEGIN_HEADER
+
+
  /*
-  *  each module can export one or more 'services'. Each service is
-  *  identified by a constant string, and modeled by a pointer, which
-  *  generally corresponds to a structure containing function pointers.
+  * @macro:
+  *   FT_FACE_FIND_SERVICE
   *
-  *  note that a service's data cannot be a mere function
-  *  pointer. that's because in C, function pointers might be implemented
-  *  differently than data pointers (e.g. 48 bits instead of 32)
-  */
-
- /* this macro is used to lookup a service from a face's driver module
+  * @description:
+  *   This macro is used to lookup a service from a face's driver module.
   *
-  *   ptr :: variable that receives the service pointer. will be NULL
-  *          if not found
+  * @input:
+  *   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').
   *
-  *   id  :: a string describing the service. the list of valid service
-  *          identifiers is below
+  *   face ::
+  *     The source face handle.
   *
-  *   face :: the source face handle
+  * @output:
+  *   ptr ::
+  *     A variable that receives the service pointer.  Will be NULL
+  *     if not found.
   */
-#define  FT_FACE_FIND_SERVICE(ptr,face,id)                         \
-   FT_BEGIN_STMNT                                                  \
-     FT_Module  module = FT_MODULE(FT_FACE(face)->driver);         \
-                                                                   \
-     (ptr) = NULL;                                                 \
-     if ( module->clazz->get_interface )                           \
-       (ptr) = module->clazz->get_interface( module, id );         \
-   FT_END_STMNT
+#define FT_FACE_FIND_SERVICE( ptr, face, id )               \
+  FT_BEGIN_STMNT                                            \
+    FT_Module  module = FT_MODULE( FT_FACE(face)->driver ); \
+                                                            \
+                                                            \
+    (ptr) = NULL;                                           \
+    if ( module->clazz->get_interface )                     \
+      (ptr) = module->clazz->get_interface( module, id );   \
+  FT_END_STMNT
 
 
- /*************************************************************************/
- /*************************************************************************/
- /*****                                                               *****/
- /*****         S E R V I C E   D E S C R I P T O R S                 *****/
- /*****                                                               *****/
- /*************************************************************************/
- /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****         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_
+  /*
+   *  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 */
@@ -49,92 +86,120 @@
   
   } FT_ServiceDescRec;
 
-  typedef const FT_ServiceDescRec*   FT_ServiceDesc;
+  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
-  */
+  /*
+   *  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                       *****/
- /*****                                                               *****/
- /*************************************************************************/
- /*************************************************************************/
+  /*************************************************************************/
+  /*************************************************************************/
+  /*****                                                               *****/
+  /*****             S E R V I C E S   C A C H E                       *****/
+  /*****                                                               *****/
+  /*************************************************************************/
+  /*************************************************************************/
  
- /*  this structure is used to store a cache for several often-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
-  *
-  *
-  */
-  typedef struct FT_ServiceCacheRec_
+  /*
+   *  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.
+   */
+  typedef struct  FT_ServiceCacheRec_
   {
-    FT_Pointer     postscript_name;
-    FT_Pointer     multi_masters;
-    FT_Pointer     glyph_dict;
+    FT_Pointer  postscript_name;
+    FT_Pointer  multi_masters;
+    FT_Pointer  glyph_dict;
     
   } FT_ServiceCacheRec, *FT_ServiceCache;
 
- /* a magic number used within the services cache
-  */
-#define  FT_SERVICE_UNAVAILABLE  ((FT_Pointer)-2)  /* magic number */
 
- /*  this macro is used to lookup a service from a face's driver module
-  *  using its cache.
-  *
-  *  ptr   :: variable receiving the service data. NULL if not available
-  *  face  :: source face handle containing the cache
-  *  field :: field name in cache
-  *  id    :: service id
-  *
-  */
-#define  FT_FACE_LOOKUP_SERVICE(face,ptr,field,id)                       \
-   FT_BEGIN_STMNT                                                        \
-     (ptr) = FT_FACE(face)->internal->services. field ;                  \
-     if ( (ptr) == FT_SERVICE_UNAVAILABLE )                              \
-       (ptr) = NULL;                                                     \
-     else if ( (ptr) == NULL )                                           \
-     {                                                                   \
-       FT_FACE_FIND_SERVICE( ptr, face, id );                            \
-                                                                         \
-       FT_FACE(face)->internal->services. field =                        \
-            (FT_Pointer)( (ptr) != NULL                                  \
-                        ? (ptr)                                          \
-                        : FT_SERVICE_UNAVAILABLE );                      \
-     }                                                                   \
-   FT_END_STMNT
+  /*
+   *  A magic number used within the services cache.
+   */
+#define FT_SERVICE_UNAVAILABLE  ((FT_Pointer)-2)  /* magic number */
 
 
- /*  A macro used to define new service structure types
-  */
+  /*
+   * @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, field, id )          \
+  FT_BEGIN_STMNT                                                \
+    (ptr) = FT_FACE(face)->internal->services.field ;           \
+    if ( (ptr) == FT_SERVICE_UNAVAILABLE )                      \
+      (ptr) = NULL;                                             \
+    else if ( (ptr) == NULL )                                   \
+    {                                                           \
+      FT_FACE_FIND_SERVICE( ptr, face, id );                    \
+                                                                \
+      FT_FACE(face)->internal->services.field =                 \
+        (FT_Pointer)( (ptr) != NULL ? (ptr)                     \
+                                    : FT_SERVICE_UNAVAILABLE ); \
+    }                                                           \
+  FT_END_STMNT
 
-#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 ;        \
+
+  /*
+   *  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/multmast.h>
-#define FT_SERVICE_POSTSCRIPT_NAME_H   <freetype/internal/services/postname.h> 
-#define FT_SERVICE_GLYPH_DICT_H        <freetype/internal/services/glyfdict.h>
-#define FT_SERVICE_BDF_H               <freetype/internal/services/bdf.h>
-#define FT_SERVICE_XFREE86_NAME_H      <freetype/internal/services/xf86name.h>
-#define FT_SERVICE_SFNT_H              <freetype/internal/services/sfnt.h>
+#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_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>
 
-#endif /* __FT_SERVICE_H__ */
+
+FT_END_HEADER
+
+#endif /* __FTSERV_H__ */
+
+
+/* END */
--- a/include/freetype/internal/services/bdf.h
+++ /dev/null
@@ -1,30 +1,0 @@
-#ifndef __FT_SERVICE_BDF_H__
-#define __FT_SERVICE_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 /* __FT_SERVICE_BDF_H__ */
--- a/include/freetype/internal/services/glyfdict.h
+++ /dev/null
@@ -1,36 +1,0 @@
-#ifndef __FT_SERVICE_GLYPH_DICT_H__
-#define __FT_SERVICE_GLYPH_DICT_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 /* __FT_SERVICE_GLYPH_DICT_H__ */
--- a/include/freetype/internal/services/multmast.h
+++ /dev/null
@@ -1,37 +1,0 @@
-#ifndef __FT_SERVICE_MULTIPLE_MASTERS_H__
-#define __FT_SERVICE_MULTIPLE_MASTERS_H__
-
-#include FT_INTERNAL_SERVICE_H
-
- /*
-  *  a service used to manage multiple-masters data in a given face
-  *
-  *  see the related APIs in "ftmm.h" / FT_MULTIPLE_MASTERS_H
-  *
-  */
-
-
-  typedef FT_Error
-  (*FT_Get_MM_Func)( FT_Face           face,
-                     FT_Multi_Master*  master );
-
-  typedef FT_Error
-  (*FT_Set_MM_Design_Func)( FT_Face   face,
-                            FT_UInt   num_coords,
-                            FT_Long*  coords );
-
-  typedef FT_Error
-  (*FT_Set_MM_Blend_Func)( FT_Face   face,
-                           FT_UInt   num_coords,
-                           FT_Long*  coords );
-
-#define FT_SERVICE_ID_MULTI_MASTERS  "multi-masters"
-
-  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;
-  };
-
-#endif /* __FT_SERVICE_MULTIPLE_MASTERS_H__ */
--- a/include/freetype/internal/services/postname.h
+++ /dev/null
@@ -1,30 +1,0 @@
-#ifndef __FT_SERVICE_POSTSCRIPT_NAME_H__
-#define __FT_SERVICE_POSTSCRIPT_NAME_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_NAME   "postscript-name"
-
-  typedef const char*  (*FT_PsName_GetFunc)( FT_Face  face );
-  
-  FT_DEFINE_SERVICE( PsName )
-  {
-    FT_PsName_GetFunc   get_ps_name;
-  };
-
-FT_END_HEADER
-
-#endif /* __FT_SERVICE_POSTSCRIPT_NAME_H__ */
--- a/include/freetype/internal/services/sfnt.h
+++ /dev/null
@@ -1,42 +1,0 @@
-#ifndef __FT_SERVICE_SFNT_H__
-#define __FT_SERVICE_SFNT_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 );
-
- 
-  FT_DEFINE_SERVICE( SFNT_Table )
-  {
-    FT_SFNT_TableLoadFunc    load_table;
-    FT_SFNT_TableGetFunc     get_table;
-  };
-
- /* */
- 
-FT_END_HEADER
-
-#endif /* __FT_SERVICE_SFNT_H__ */
--- /dev/null
+++ b/include/freetype/internal/services/svbdf.h
@@ -1,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, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __SVBDF_H__
+#define __SVBDF_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
+++ b/include/freetype/internal/services/svgldict.h
@@ -1,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, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __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
+++ b/include/freetype/internal/services/svmm.h
@@ -1,0 +1,68 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svmm.h                                                                 */
+/*                                                                         */
+/*    The FreeType Multiple Masters 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, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __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_Set_MM_Design_Func)( FT_Face   face,
+                            FT_UInt   num_coords,
+                            FT_Long*  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_END_HEADER
+
+#endif /* __SVMM_H__ */
+
+
+/* END */
--- /dev/null
+++ b/include/freetype/internal/services/svpostnm.h
@@ -1,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, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __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_NAME  "postscript-name"
+
+
+  typedef const char*
+  (*FT_PsName_GetFunc)( FT_Face  face );
+  
+
+  FT_DEFINE_SERVICE( PsName )
+  {
+    FT_PsName_GetFunc  get_ps_name;
+  };
+
+  /* */
+
+
+FT_END_HEADER
+
+
+#endif /* __SVPOSTNM_H__ */
+
+
+/* END */
--- /dev/null
+++ b/include/freetype/internal/services/svsfnt.h
@@ -1,0 +1,69 @@
+/***************************************************************************/
+/*                                                                         */
+/*  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, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __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 );
+
+ 
+  FT_DEFINE_SERVICE( SFNT_Table )
+  {
+    FT_SFNT_TableLoadFunc    load_table;
+    FT_SFNT_TableGetFunc     get_table;
+  };
+
+  /* */
+
+ 
+FT_END_HEADER
+
+
+#endif /* __SVSFNT_H__ */
+
+
+/* END */
--- /dev/null
+++ b/include/freetype/internal/services/svxf86nm.h
@@ -1,0 +1,55 @@
+/***************************************************************************/
+/*                                                                         */
+/*  svxf86nm.h                                                             */
+/*                                                                         */
+/*    The FreeType XFree86 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, LICENSE.TXT.  By continuing to use, modify, or distribute     */
+/*  this file you indicate that you have read the license and              */
+/*  understand and accept it fully.                                        */
+/*                                                                         */
+/***************************************************************************/
+
+
+#ifndef __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 */
--- a/include/freetype/internal/services/xf86name.h
+++ /dev/null
@@ -1,31 +1,0 @@
-#ifndef __FT_SERVICE_XF86_NAME_H__
-#define __FT_SERVICE_XF86_NAME_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 /* __FT_SERVICE_XF86_NAME_H__ */