diff --git a/ChangeLog b/ChangeLog index 96c9a397d..209deba77 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-03-14 David Turner + + * 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 * include/freetype/config/ftoption.h: changed the automatic detection diff --git a/include/freetype/internal/autohint.h b/include/freetype/internal/autohint.h index 40ade95f1..e35e0b57f 100644 --- a/include/freetype/internal/autohint.h +++ b/include/freetype/internal/autohint.h @@ -83,13 +83,13 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /* */ - /* FT_AutoHinter_Get_Global_Func */ + /* FT_AutoHinter_GlobalGetFunc */ /* */ /* */ /* Retrieves the global hints computed for a given face object the */ /* resulting data is dissociated from the face and will survive a */ /* call to FT_Done_Face(). It must be discarded through the API */ - /* FT_AutoHinter_Done_Global_Func(). */ + /* FT_AutoHinter_GlobalDoneFunc (). */ /* */ /* */ /* 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. */ /* */ typedef void - (*FT_AutoHinter_Get_Global_Func)( FT_AutoHinter hinter, + (*FT_AutoHinter_GlobalGetFunc )( FT_AutoHinter hinter, FT_Face face, void** global_hints, long* global_len ); @@ -111,11 +111,11 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /* */ - /* FT_AutoHinter_Done_Global_Func */ + /* FT_AutoHinter_GlobalDoneFunc */ /* */ /* */ /* 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. */ /* */ /* */ @@ -124,14 +124,14 @@ FT_BEGIN_HEADER /* global :: A pointer to retrieved global hints to discard. */ /* */ typedef void - (*FT_AutoHinter_Done_Global_Func)( FT_AutoHinter hinter, + (*FT_AutoHinter_GlobalDoneFunc )( FT_AutoHinter hinter, void* global ); /*************************************************************************/ /* */ /* */ - /* FT_AutoHinter_Reset_Func */ + /* FT_AutoHinter_GlobalResetFunc */ /* */ /* */ /* 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. */ /* */ typedef void - (*FT_AutoHinter_Reset_Func)( FT_AutoHinter hinter, + (*FT_AutoHinter_GlobalResetFunc )( FT_AutoHinter hinter, FT_Face face ); /*************************************************************************/ /* */ /* */ - /* FT_AutoHinter_Load_Func */ + /* FT_AutoHinter_GlyphLoadFunc */ /* */ /* */ /* This function is used to load, scale, and automatically hint a */ @@ -170,31 +170,29 @@ FT_BEGIN_HEADER /* FT_LOAD_NO_SCALE set. */ /* */ typedef FT_Error - (*FT_AutoHinter_Load_Func)( FT_AutoHinter hinter, - FT_GlyphSlot slot, - FT_Size size, - FT_UInt glyph_index, - FT_ULong load_flags ); + (*FT_AutoHinter_GlyphLoadFunc)( FT_AutoHinter hinter, + FT_GlyphSlot slot, + FT_Size size, + FT_UInt glyph_index, + FT_ULong load_flags ); /*************************************************************************/ /* */ /* */ - /* FT_AutoHinter_Interface */ + /* FT_AutoHinter_ServiceRec */ /* */ /* */ /* The auto-hinter module's interface. */ /* */ - typedef struct FT_AutoHinter_Interface + typedef struct FT_AutoHinter_ServiceRec_ { - FT_AutoHinter_Reset_Func reset_face; - FT_AutoHinter_Load_Func load_glyph; - - FT_AutoHinter_Get_Global_Func get_global_hints; - FT_AutoHinter_Done_Global_Func done_global_hints; - - } FT_AutoHinter_Interface; + FT_AutoHinter_GlobalResetFunc reset_face; + FT_AutoHinter_GlobalGetFunc get_global_hints; + FT_AutoHinter_GlobalDoneFunc done_global_hints; + FT_AutoHinter_GlyphLoadFunc load_glyph; + } FT_AutoHinter_ServiceRec, *FT_AutoHinter_Service; FT_END_HEADER diff --git a/src/autohint/ahmodule.c b/src/autohint/ahmodule.c index f8d54b9cc..66f275da5 100644 --- a/src/autohint/ahmodule.c +++ b/src/autohint/ahmodule.c @@ -64,11 +64,11 @@ FT_CALLBACK_DEF( FT_Error ) - ft_autohinter_load( FT_AutoHinter module, - FT_GlyphSlot slot, - FT_Size size, - FT_UInt glyph_index, - FT_ULong load_flags ) + ft_autohinter_load_glyph( FT_AutoHinter module, + FT_GlyphSlot slot, + FT_Size size, + FT_UInt glyph_index, + FT_ULong load_flags ) { return ah_hinter_load_glyph( module->hinter, slot, size, glyph_index, load_flags ); @@ -76,8 +76,8 @@ FT_CALLBACK_DEF( void ) - ft_autohinter_reset( FT_AutoHinter module, - FT_Face face ) + ft_autohinter_reset_globals( FT_AutoHinter module, + FT_Face face ) { FT_UNUSED( module ); @@ -106,12 +106,12 @@ FT_CALLBACK_TABLE_DEF - const FT_AutoHinter_Interface autohinter_interface = + const FT_AutoHinter_ServiceRec ft_autohinter_service = { - ft_autohinter_reset, - ft_autohinter_load, + ft_autohinter_reset_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 */ 0x20000L, /* requires FreeType 2.0 or above */ - (const void*)&autohinter_interface, + (const void*) &ft_autohinter_service, (FT_Module_Constructor)ft_autohinter_init, (FT_Module_Destructor) ft_autohinter_done, diff --git a/src/base/ftapi.c b/src/base/ftapi.c index 8ae8e81c2..455b0b273 100644 --- a/src/base/ftapi.c +++ b/src/base/ftapi.c @@ -140,7 +140,7 @@ if ( autohint ) { - FT_AutoHinter_Interface* hinting; + FT_AutoHinter_Service hinting; /* try to load embedded bitmaps first if available */ @@ -159,7 +159,7 @@ } /* 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, slot, face->size, diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index f4d7af31f..7b4d089b2 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -407,7 +407,7 @@ if ( autohint ) { - FT_AutoHinter_Interface* hinting; + FT_AutoHinter_Service hinting; /* try to load embedded bitmaps first if available */ @@ -426,7 +426,7 @@ } /* 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, slot, face->size,