* include/freetype/internal/autohint.h, src/autohint/ahmodule.c,

src/base/ftapi.c, src/base/ftobjs.c: updating the type definitions for
        the auto-hinter module.

        (i.e. FT_AutoHinter_Interface  => FT_AutoHinter_ServiceRec,
              FT_AutoHinter_Interface* => FT_AutoHinter_Service, etc..)
This commit is contained in:
David Turner 2002-03-14 08:49:59 +00:00
parent 329b3ce324
commit 9657ef0598
5 changed files with 48 additions and 39 deletions

View File

@ -1,3 +1,14 @@
2002-03-14 David Turner <david@freetype.org>
* include/freetype/internal/autohint.h, src/autohint/ahmodule.c,
src/base/ftapi.c, src/base/ftobjs.c: updating the type definitions for
the auto-hinter module.
(i.e. FT_AutoHinter_Interface => FT_AutoHinter_ServiceRec,
FT_AutoHinter_Interface* => FT_AutoHinter_Service, etc..)
2002-03-13 Antoine Leca <antoine@oriolnet.com> 2002-03-13 Antoine Leca <antoine@oriolnet.com>
* include/freetype/config/ftoption.h: changed the automatic detection * include/freetype/config/ftoption.h: changed the automatic detection

View File

@ -83,13 +83,13 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
/* FT_AutoHinter_Get_Global_Func */ /* FT_AutoHinter_GlobalGetFunc */
/* */ /* */
/* <Description> */ /* <Description> */
/* Retrieves the global hints computed for a given face object the */ /* Retrieves the global hints computed for a given face object the */
/* resulting data is dissociated from the face and will survive a */ /* resulting data is dissociated from the face and will survive a */
/* call to FT_Done_Face(). It must be discarded through the API */ /* call to FT_Done_Face(). It must be discarded through the API */
/* FT_AutoHinter_Done_Global_Func(). */ /* FT_AutoHinter_GlobalDoneFunc (). */
/* */ /* */
/* <Input> */ /* <Input> */
/* hinter :: A handle to the source auto-hinter. */ /* hinter :: A handle to the source auto-hinter. */
@ -102,7 +102,7 @@ FT_BEGIN_HEADER
/* global_len :: The size in bytes of the global hints. */ /* global_len :: The size in bytes of the global hints. */
/* */ /* */
typedef void typedef void
(*FT_AutoHinter_Get_Global_Func)( FT_AutoHinter hinter, (*FT_AutoHinter_GlobalGetFunc )( FT_AutoHinter hinter,
FT_Face face, FT_Face face,
void** global_hints, void** global_hints,
long* global_len ); long* global_len );
@ -111,11 +111,11 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
/* FT_AutoHinter_Done_Global_Func */ /* FT_AutoHinter_GlobalDoneFunc */
/* */ /* */
/* <Description> */ /* <Description> */
/* Discards the global hints retrieved through */ /* Discards the global hints retrieved through */
/* FT_AutoHinter_Get_Global_Func(). This is the only way these hints */ /* FT_AutoHinter_GlobalGetFunc (). This is the only way these hints */
/* are freed from memory. */ /* are freed from memory. */
/* */ /* */
/* <Input> */ /* <Input> */
@ -124,14 +124,14 @@ FT_BEGIN_HEADER
/* global :: A pointer to retrieved global hints to discard. */ /* global :: A pointer to retrieved global hints to discard. */
/* */ /* */
typedef void typedef void
(*FT_AutoHinter_Done_Global_Func)( FT_AutoHinter hinter, (*FT_AutoHinter_GlobalDoneFunc )( FT_AutoHinter hinter,
void* global ); void* global );
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
/* FT_AutoHinter_Reset_Func */ /* FT_AutoHinter_GlobalResetFunc */
/* */ /* */
/* <Description> */ /* <Description> */
/* This function is used to recompute the global metrics in a given */ /* This function is used to recompute the global metrics in a given */
@ -144,14 +144,14 @@ FT_BEGIN_HEADER
/* face :: A handle to the face. */ /* face :: A handle to the face. */
/* */ /* */
typedef void typedef void
(*FT_AutoHinter_Reset_Func)( FT_AutoHinter hinter, (*FT_AutoHinter_GlobalResetFunc )( FT_AutoHinter hinter,
FT_Face face ); FT_Face face );
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
/* FT_AutoHinter_Load_Func */ /* FT_AutoHinter_GlyphLoadFunc */
/* */ /* */
/* <Description> */ /* <Description> */
/* This function is used to load, scale, and automatically hint a */ /* This function is used to load, scale, and automatically hint a */
@ -170,7 +170,7 @@ FT_BEGIN_HEADER
/* FT_LOAD_NO_SCALE set. */ /* FT_LOAD_NO_SCALE set. */
/* */ /* */
typedef FT_Error typedef FT_Error
(*FT_AutoHinter_Load_Func)( FT_AutoHinter hinter, (*FT_AutoHinter_GlyphLoadFunc)( FT_AutoHinter hinter,
FT_GlyphSlot slot, FT_GlyphSlot slot,
FT_Size size, FT_Size size,
FT_UInt glyph_index, FT_UInt glyph_index,
@ -180,21 +180,19 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Struct> */ /* <Struct> */
/* FT_AutoHinter_Interface */ /* FT_AutoHinter_ServiceRec */
/* */ /* */
/* <Description> */ /* <Description> */
/* The auto-hinter module's interface. */ /* The auto-hinter module's interface. */
/* */ /* */
typedef struct FT_AutoHinter_Interface typedef struct FT_AutoHinter_ServiceRec_
{ {
FT_AutoHinter_Reset_Func reset_face; FT_AutoHinter_GlobalResetFunc reset_face;
FT_AutoHinter_Load_Func load_glyph; FT_AutoHinter_GlobalGetFunc get_global_hints;
FT_AutoHinter_GlobalDoneFunc done_global_hints;
FT_AutoHinter_Get_Global_Func get_global_hints; FT_AutoHinter_GlyphLoadFunc load_glyph;
FT_AutoHinter_Done_Global_Func done_global_hints;
} FT_AutoHinter_Interface;
} FT_AutoHinter_ServiceRec, *FT_AutoHinter_Service;
FT_END_HEADER FT_END_HEADER

View File

@ -64,7 +64,7 @@
FT_CALLBACK_DEF( FT_Error ) FT_CALLBACK_DEF( FT_Error )
ft_autohinter_load( FT_AutoHinter module, ft_autohinter_load_glyph( FT_AutoHinter module,
FT_GlyphSlot slot, FT_GlyphSlot slot,
FT_Size size, FT_Size size,
FT_UInt glyph_index, FT_UInt glyph_index,
@ -76,7 +76,7 @@
FT_CALLBACK_DEF( void ) FT_CALLBACK_DEF( void )
ft_autohinter_reset( FT_AutoHinter module, ft_autohinter_reset_globals( FT_AutoHinter module,
FT_Face face ) FT_Face face )
{ {
FT_UNUSED( module ); FT_UNUSED( module );
@ -106,12 +106,12 @@
FT_CALLBACK_TABLE_DEF FT_CALLBACK_TABLE_DEF
const FT_AutoHinter_Interface autohinter_interface = const FT_AutoHinter_ServiceRec ft_autohinter_service =
{ {
ft_autohinter_reset, ft_autohinter_reset_globals,
ft_autohinter_load,
ft_autohinter_get_globals, ft_autohinter_get_globals,
ft_autohinter_done_globals ft_autohinter_done_globals,
ft_autohinter_load_glyph
}; };
@ -125,7 +125,7 @@
0x10000L, /* version 1.0 of the autohinter */ 0x10000L, /* version 1.0 of the autohinter */
0x20000L, /* requires FreeType 2.0 or above */ 0x20000L, /* requires FreeType 2.0 or above */
(const void*)&autohinter_interface, (const void*) &ft_autohinter_service,
(FT_Module_Constructor)ft_autohinter_init, (FT_Module_Constructor)ft_autohinter_init,
(FT_Module_Destructor) ft_autohinter_done, (FT_Module_Destructor) ft_autohinter_done,

View File

@ -140,7 +140,7 @@
if ( autohint ) if ( autohint )
{ {
FT_AutoHinter_Interface* hinting; FT_AutoHinter_Service hinting;
/* try to load embedded bitmaps first if available */ /* try to load embedded bitmaps first if available */
@ -159,7 +159,7 @@
} }
/* load auto-hinted outline */ /* load auto-hinted outline */
hinting = (FT_AutoHinter_Interface*)hinter->clazz->module_interface; hinting = (FT_AutoHinter_Service)hinter->clazz->module_interface;
error = hinting->load_glyph( (FT_AutoHinter)hinter, error = hinting->load_glyph( (FT_AutoHinter)hinter,
slot, face->size, slot, face->size,

View File

@ -407,7 +407,7 @@
if ( autohint ) if ( autohint )
{ {
FT_AutoHinter_Interface* hinting; FT_AutoHinter_Service hinting;
/* try to load embedded bitmaps first if available */ /* try to load embedded bitmaps first if available */
@ -426,7 +426,7 @@
} }
/* load auto-hinted outline */ /* load auto-hinted outline */
hinting = (FT_AutoHinter_Interface*)hinter->clazz->module_interface; hinting = (FT_AutoHinter_Service)hinter->clazz->module_interface;
error = hinting->load_glyph( (FT_AutoHinter)hinter, error = hinting->load_glyph( (FT_AutoHinter)hinter,
slot, face->size, slot, face->size,