From 8e6f8c4d7934b8725463cabb3ba18bf086b908d7 Mon Sep 17 00:00:00 2001 From: Werner Lemberg Date: Fri, 17 Feb 2006 08:07:09 +0000 Subject: [PATCH] Formatting, copyright years, documentation improvements. --- ChangeLog | 76 ++++++++++++------ builds/amiga/src/base/ftsystem.c | 6 +- devel/ftoption.h | 8 +- include/freetype/cache/ftccache.h | 7 +- include/freetype/cache/ftccmap.h | 21 ++--- include/freetype/config/ftoption.h | 26 ++++--- include/freetype/ftcache.h | 3 +- include/freetype/ftoutln.h | 2 +- include/freetype/internal/ftcalc.h | 2 +- include/freetype/internal/ftdriver.h | 29 ++++--- include/freetype/internal/ftmemory.h | 111 ++++++++++++++------------- include/freetype/internal/ftrfork.h | 4 +- include/freetype/internal/psaux.h | 2 +- include/freetype/internal/sfnt.h | 49 +++++++----- include/freetype/internal/t1types.h | 9 ++- include/freetype/internal/tttypes.h | 11 +-- src/base/ftcalc.c | 2 +- src/base/ftdbgmem.c | 88 ++++++++++----------- src/base/ftobjs.c | 15 +++- src/base/ftsystem.c | 4 +- src/base/ftutil.c | 56 ++++++++------ src/cache/ftccback.h | 2 +- src/cache/ftcmanag.c | 8 +- src/sfnt/sfdriver.c | 32 ++++---- src/sfnt/ttcmap.c | 2 +- src/sfnt/ttmtx.c | 5 +- src/sfnt/ttpost.c | 2 +- src/truetype/ttinterp.c | 2 +- src/truetype/ttinterp.h | 2 +- 29 files changed, 333 insertions(+), 253 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5fb84f10b..797efdf8e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,25 +1,53 @@ 2006-02-16 David Turner - * builds/amiga/src/base/ftsystem.c, devel/ftoption.h - include/freetype/ftcache.h, include/freetype/ftoutln.h, - include/freetype/cache/ftccache.h, include/freetype/cache/ftccmap.h, - include/freetype/config/ftoption.h, include/freetype/internal/ftcalc.h, - include/freetype/internal/ftdriver.h, - include/freetype/internal/ftmemory.h, - include/freetype/internal/ftobjs.h, include/freetype/internal/ftrfork.h, - include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h, - include/freetype/internal/t1types.h, include/freetype/internal/tttypes.h, - src/base/ftcalc.c, src/base/ftdbgmem.c, src/base/ftobjs.c, - src/base/ftsystem.c, src/base/ftutil.c, src/bdf/bdfdrivr.c, - src/cache/ftccache.c, src/cache/ftccback.h, src/cache/ftccmap.c, - src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c, - src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c, - src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c, - src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c: + Massive changes to the internals to respect the internal object + layouts and exported functions of FreeType 2.1.7. Note that the + cache sub-system cannot be fully retrofitted, unfortunately. - massive changes to the internals to respect the internal object layouts - and exported functions of FreeType 2.1.7. Note that the cache sub-system - cannot be fully retrofitted, unfortunately. + * include/freetype/config/ftoption.h + (FT_CONFIG_OPTION_OLD_INTERNALS): New macro. + + * include/freetype/ftcache.h, include/freetype/cache/ftccache.h, + include/freetype/cache/ftccmap.h, + include/freetype/internal/ftcalc.h, + include/freetype/internal/ftdriver.h, + include/freetype/internal/ftmemory.h, + include/freetype/internal/ftobjs.h, + include/freetype/internal/psaux.h, include/freetype/internal/sfnt.h, + include/freetype/internal/t1types.h, + include/freetype/internal/tttypes.h, src/base/ftcalc.c, + src/base/ftdbgmem.c, src/base/ftobjs.c, src/base/ftutil.c, + src/bdf/bdfdrivr.c, src/cache/ftccache.c, src/cache/ftccback.h, + src/cache/ftcmanag.c, src/cff/cffdrivr.c, src/cid/cidriver.c, + src/pcf/pcfdrivr.c, src/pfr/pfrdrivr.c, src/psaux/psauxmod.c, + src/sfnt/sfdriver.c, src/truetype/ttdriver.c, src/type1/t1driver.c, + src/type1/t1objs.c, src/type42/t42drivr.c, src/winfonts/winfnt.c: + Use FT_CONFIG_OPTION_OLD_INTERNALS to revive old functions and data + structures. + + Move newly added structure elements to the end of the affected + structure and add stub fields (if FT_CONFIG_OPTION_OLD_INTERNALS is + defined) to assure binary compatibility with older FreeType + versions. + Use FT_CONFIG_OPTION_OLD_INTERNALS to add function stubs for old + functions: + + ft_stub_set_char_sizes + ft_stub_set_pixel_sizes + + Rename the following internal functions to provide the old function + names as stubs: + + FT_Alloc -> ft_mem_alloc + FT_QAlloc -> ft_mem_qalloc + FT_Realloc -> ft_mem_realloc + FT_QRealloc -> ft_mem_qrealloc + FT_Free -> ft_mem_free + FT_Alloc_Debug -> ft_mem_alloc_debug + FT_QAlloc_Debug -> ft_mem_qalloc_debug + FT_Realloc_Debug -> ft_mem_realloc_debug + FT_QRealloc_Debug -> ft_mem_qrealloc_debug + FT_Free_Debug -> ft_mem_free_debug 2006-02-15 Chia-I Wu @@ -47,23 +75,23 @@ possible segment faults for the non-FT_OPTIMIZE_MEMORY'ed versions. (finally!) + For most OpenType tables, `tt_face_load_xxxx' simply loads the table and `face->root' is set later in `sfnt_load_face'. Here, we try to - make this work for _all_ tables. + make this work for _all_ tables. Also improve tracing messages. * src/sfnt/ttsbit.c, src/sfnt/ttsbit0.c, src/sfnt/ttload.c, src/sfnt/ttmtx.c: all `tt_face_load_xxxx' should load the table and then exit. Error handling or setting face->root is done later in `sfnt_load_face'. - Pretty trace messages. * src/sfnt/sfobjs.c (sfnt_load_face): Work harder. Mac bitmap-only fonts are not scalable. Check that `face->header.Units_Per_EM' is not zero. - (LOAD_, LOADM_): Pretty trace messages. + (LOAD_, LOADM_): Emit pretty trace messages. - * src/sfnt/ttsbit0.c (tt_face_load_strike_metrics): Read metrics from - `eblc'. + * src/sfnt/ttsbit0.c (tt_face_load_strike_metrics): Read metrics + from `eblc'. * src/sfnt/ttcmap.c (tt_face_build_cmaps), src/sfnt/ttpost.c (load_format_20, load_format_25, tt_face_get_ps_name): Use diff --git a/builds/amiga/src/base/ftsystem.c b/builds/amiga/src/base/ftsystem.c index 1eb63df10..725f78d4a 100644 --- a/builds/amiga/src/base/ftsystem.c +++ b/builds/amiga/src/base/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* Amiga-specific FreeType low-level system interface (body). */ /* */ -/* Copyright 1996-2001, 2002, 2005 by */ +/* Copyright 1996-2001, 2002, 2005, 2006 by */ /* David Turner, Robert Wilhelm, Werner Lemberg and Detlef Würkner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -115,8 +115,8 @@ Free_VecPooled( APTR poolHeader, /*************************************************************************/ /* */ /* It is not necessary to do any error checking for the */ - /* allocation-related functions. This will be done by the higher level */ - /* routines like ft_mem_alloc() or ft_mem_realloc(). */ + /* allocation-related functions. This is done by the higher level */ + /* routines like ft_mem_alloc() or ft_mem_realloc(). */ /* */ /*************************************************************************/ diff --git a/devel/ftoption.h b/devel/ftoption.h index 742edb2ad..3e0efe204 100644 --- a/devel/ftoption.h +++ b/devel/ftoption.h @@ -566,10 +566,10 @@ FT_BEGIN_HEADER /* - * This temporary macro is used to control whether we are going to - * compile certain functions like ft_mem_alloc in a way that prevents recent - * GCC releases from emitting zillions of `strict aliasing' warning - * messages each time a memory-management function is called. + * This temporary macro is used to control whether we are going to compile + * certain functions like ft_mem_alloc in a way that prevents recent GCC + * releases from emitting zillions of `strict aliasing' warning messages + * each time a memory-management function is called. */ #define FT_STRICT_ALIASING diff --git a/include/freetype/cache/ftccache.h b/include/freetype/cache/ftccache.h index 3bd247683..f7241af2e 100644 --- a/include/freetype/cache/ftccache.h +++ b/include/freetype/cache/ftccache.h @@ -4,7 +4,7 @@ /* */ /* FreeType internal cache interface (specification). */ /* */ -/* Copyright 2000-2001, 2002, 2003, 2004, 2005 by */ +/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -82,17 +82,18 @@ FT_BEGIN_HEADER FTC_Node_Destroy( FTC_Node node, FTC_Manager manager ); + #ifdef FT_CONFIG_OPTION_OLD_INTERNALS FT_BASE( void ) ftc_node_destroy( FTC_Node node, FTC_Manager manager ); - + FT_BASE( void ) ftc_node_done( FTC_Node node, FTC_Manager manager ); - #endif + /*************************************************************************/ /*************************************************************************/ /***** *****/ diff --git a/include/freetype/cache/ftccmap.h b/include/freetype/cache/ftccmap.h index 0b97704fa..638dc4bb2 100644 --- a/include/freetype/cache/ftccmap.h +++ b/include/freetype/cache/ftccmap.h @@ -4,7 +4,7 @@ /* */ /* FreeType charmap cache (specification). */ /* */ -/* Copyright 2000-2001, 2003, 2005 by */ +/* Copyright 2000-2001, 2003, 2005, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -25,12 +25,14 @@ FT_BEGIN_HEADER -/* the FT 2.1.7 Charmap cache interface - * - * unfortunately, it is not possible to implement it in later - * versions, since some function signature changed too significantly - * to do that. - */ + + /* + * The FreeType 2.1.7 Charmap cache interface. + * + * Unfortunately, it is not possible to implement it in later versions, + * since some function signatures changed too significantly to do that. + * + */ #if 0 @@ -67,7 +69,6 @@ FT_BEGIN_HEADER } FTC_CMapDescRec, *FTC_CMapDesc; -#if 0 FT_EXPORT( FT_Error ) FTC_CMapCache_New( FTC_Manager manager, FTC_CMapCache *acache ); @@ -77,12 +78,12 @@ FT_BEGIN_HEADER FTC_CMapCache_Lookup( FTC_CMapCache cache, FTC_CMapDesc cmap_desc, FT_UInt32 char_code ); -#endif -#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ +#endif /* 0 */ /* */ + FT_END_HEADER diff --git a/include/freetype/config/ftoption.h b/include/freetype/config/ftoption.h index 33704092b..bb1bbee6f 100644 --- a/include/freetype/config/ftoption.h +++ b/include/freetype/config/ftoption.h @@ -578,22 +578,26 @@ FT_BEGIN_HEADER * This temporary macro is used to control various optimizations for * reducing the heap footprint of memory-mapped TrueType files. */ -#define FT_OPTIMIZE_MEMORY +#define FT_OPTIMIZE_MEMORY /* - * This temporary macro is used to control whether we are going to - * compile certain functions like ft_mem_alloc in a way that prevents recent - * GCC releases from emitting zillions of `strict aliasing' warning - * messages each time a memory-management function is called. + * This temporary macro is used to control whether we are going to compile + * certain functions like ft_mem_alloc in a way that prevents recent GCC + * releases from emitting zillions of `strict aliasing' warning messages + * each time a memory-management function is called. */ -#define FT_STRICT_ALIASING +#define FT_STRICT_ALIASING + + + /* + * Define this variable if you want to keep the layout of internal + * structures that was used prior to FreeType 2.2. This also compiles in + * a few obsolete functions to avoid linking problems on typical Unix + * distributions. + */ +#define FT_CONFIG_OPTION_OLD_INTERNALS -/* define this variable if you want to keep the layout of internal structures - * that was used prior to FreeType 2.2. This also compiles in a few obsolete - * functions to avoid linking problems on typical Unix distributions - */ -#define FT_CONFIG_OPTION_OLD_INTERNALS FT_END_HEADER diff --git a/include/freetype/ftcache.h b/include/freetype/ftcache.h index fdc6b945c..f0910dfd2 100644 --- a/include/freetype/ftcache.h +++ b/include/freetype/ftcache.h @@ -4,7 +4,7 @@ /* */ /* FreeType Cache subsystem (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -844,6 +844,7 @@ FT_BEGIN_HEADER #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + /* */ FT_END_HEADER diff --git a/include/freetype/ftoutln.h b/include/freetype/ftoutln.h index 96412d3e9..946af7378 100644 --- a/include/freetype/ftoutln.h +++ b/include/freetype/ftoutln.h @@ -176,7 +176,7 @@ FT_BEGIN_HEADER /* descriptor will be released. */ /* */ /* The reason why this function takes an `library' parameter is */ - /* simply to use ft_mem_free(). */ + /* simply to use ft_mem_free(). */ /* */ FT_EXPORT( FT_Error ) FT_Outline_Done( FT_Library library, diff --git a/include/freetype/internal/ftcalc.h b/include/freetype/internal/ftcalc.h index 1fe2f7b9b..53d7a6770 100644 --- a/include/freetype/internal/ftcalc.h +++ b/include/freetype/internal/ftcalc.h @@ -4,7 +4,7 @@ /* */ /* Arithmetic computations (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004,2005 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/include/freetype/internal/ftdriver.h b/include/freetype/internal/ftdriver.h index dd86db9ca..44992d24f 100644 --- a/include/freetype/internal/ftdriver.h +++ b/include/freetype/internal/ftdriver.h @@ -59,7 +59,9 @@ FT_BEGIN_HEADER typedef FT_Error (*FT_Size_SelectFunc)( FT_Size size, FT_ULong size_index ); + #ifdef FT_CONFIG_OPTION_OLD_INTERNALS + typedef FT_Error (*FT_Size_ResetPointsFunc)( FT_Size size, FT_F26Dot6 char_width, @@ -71,6 +73,7 @@ FT_BEGIN_HEADER (*FT_Size_ResetPixelsFunc)( FT_Size size, FT_UInt pixel_width, FT_UInt pixel_height ); + #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ typedef FT_Error @@ -198,8 +201,10 @@ FT_BEGIN_HEADER FT_Slot_DoneFunc done_slot; #ifdef FT_CONFIG_OPTION_OLD_INTERNALS + FT_Size_ResetPointsFunc set_char_sizes; FT_Size_ResetPixelsFunc set_pixel_sizes; + #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ FT_Slot_LoadFunc load_glyph; @@ -208,20 +213,22 @@ FT_BEGIN_HEADER FT_Face_AttachFunc attach_file; FT_Face_GetAdvancesFunc get_advances; - /* since FT 2.2. */ + /* since version 2.2 */ FT_Size_RequestFunc request_size; FT_Size_SelectFunc select_size; } FT_Driver_ClassRec, *FT_Driver_Class; -/* the following are used as stubs for 'set_char_sizes' - * and 'set_pixel_sizes'. their implementation uses - * 'request_size' and 'select_size' functions instead - * - * implementation is in src/base/ftobjs.c - */ + /* + * The following functions are used as stubs for `set_char_sizes' and + * `set_pixel_sizes'; the code uses `request_size' and `select_size' + * functions instead. + * + * Implementation is in `src/base/ftobjs.c'. + */ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS + FT_BASE( FT_Error ) ft_stub_set_char_sizes( FT_Size size, FT_F26Dot6 width, @@ -230,11 +237,13 @@ FT_BEGIN_HEADER FT_UInt vert_res ); FT_BASE( FT_Error ) - ft_stub_set_pixel_sizes( FT_Size size, - FT_UInt width, - FT_UInt height ); + ft_stub_set_pixel_sizes( FT_Size size, + FT_UInt width, + FT_UInt height ); + #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + FT_END_HEADER #endif /* __FTDRIVER_H__ */ diff --git a/include/freetype/internal/ftmemory.h b/include/freetype/internal/ftmemory.h index 0114ffa80..8547c8db4 100644 --- a/include/freetype/internal/ftmemory.h +++ b/include/freetype/internal/ftmemory.h @@ -136,59 +136,60 @@ FT_BEGIN_HEADER const char* file_name, FT_Long line_no ); -#define FT_MEM_ALLOC( _pointer_, _size_ ) \ + +#define FT_MEM_ALLOC( _pointer_, _size_ ) \ (_pointer_) = ft_mem_alloc_debug( memory, _size_, &error, \ - __FILE__, __LINE__ ) + __FILE__, __LINE__ ) -#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \ +#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \ (_pointer_) = ft_mem_realloc_debug( memory, _current_, _size_, \ - (_pointer_), &error, \ - __FILE__, __LINE__ ) + (_pointer_), &error, \ + __FILE__, __LINE__ ) -#define FT_MEM_QALLOC( _pointer_, _size_ ) \ +#define FT_MEM_QALLOC( _pointer_, _size_ ) \ (_pointer_) = ft_mem_qalloc_debug( memory, _size_, &error, \ - __FILE__, __LINE__ ) + __FILE__, __LINE__ ) -#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \ +#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \ (_pointer_) = ft_mem_qrealloc_debug( memory, _current_, _size_, \ - (_pointer_), &error, \ - __FILE__, __LINE__ ) + (_pointer_), &error, \ + __FILE__, __LINE__ ) -#define FT_MEM_FREE( _pointer_ ) \ - FT_BEGIN_STMNT \ - if ( _pointer_ ) \ - { \ +#define FT_MEM_FREE( _pointer_ ) \ + FT_BEGIN_STMNT \ + if ( _pointer_ ) \ + { \ ft_mem_free_debug( memory, (_pointer_), __FILE__, __LINE__ ); \ - (_pointer_) = NULL; \ - } \ + (_pointer_) = NULL; \ + } \ FT_END_STMNT #else /* !FT_DEBUG_MEMORY */ -#define FT_MEM_ALLOC( _pointer_, _size_ ) \ +#define FT_MEM_ALLOC( _pointer_, _size_ ) \ (_pointer_) = ft_mem_alloc( memory, _size_, &error ) -#define FT_MEM_FREE( _pointer_ ) \ - FT_BEGIN_STMNT \ - if ( (_pointer_) ) \ - { \ +#define FT_MEM_FREE( _pointer_ ) \ + FT_BEGIN_STMNT \ + if ( (_pointer_) ) \ + { \ ft_mem_free( memory, (_pointer_) ); \ - (_pointer_) = NULL; \ - } \ + (_pointer_) = NULL; \ + } \ FT_END_STMNT -#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \ +#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \ (_pointer_) = ft_mem_realloc( memory, _current_, _size_, \ - (_pointer_), &error ) + (_pointer_), &error ) -#define FT_MEM_QALLOC( _pointer_, _size_ ) \ +#define FT_MEM_QALLOC( _pointer_, _size_ ) \ (_pointer_) = ft_mem_qalloc( memory, _size_, &error ) -#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \ +#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \ (_pointer_) = ft_mem_qrealloc( memory, _current_, _size_, \ - (_pointer_), &error ) + (_pointer_), &error ) #endif /* !FT_DEBUG_MEMORY */ @@ -245,7 +246,7 @@ FT_BEGIN_HEADER /*************************************************************************/ /* */ /* */ - /* ft_mem_alloc */ + /* ft_mem_alloc */ /* */ /* */ /* Allocates a new block of memory. The returned area is always */ @@ -398,53 +399,53 @@ FT_BEGIN_HEADER #ifdef FT_DEBUG_MEMORY -#define FT_MEM_ALLOC( _pointer_, _size_ ) \ +#define FT_MEM_ALLOC( _pointer_, _size_ ) \ ft_mem_alloc_debug( memory, _size_, \ - (void**)(void*)&(_pointer_), \ - __FILE__, __LINE__ ) + (void**)(void*)&(_pointer_), \ + __FILE__, __LINE__ ) -#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \ +#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \ ft_mem_realloc_debug( memory, _current_, _size_, \ - (void**)(void*)&(_pointer_), \ - __FILE__, __LINE__ ) + (void**)(void*)&(_pointer_), \ + __FILE__, __LINE__ ) -#define FT_MEM_QALLOC( _pointer_, _size_ ) \ +#define FT_MEM_QALLOC( _pointer_, _size_ ) \ ft_mem_qalloc_debug( memory, _size_, \ - (void**)(void*)&(_pointer_), \ - __FILE__, __LINE__ ) + (void**)(void*)&(_pointer_), \ + __FILE__, __LINE__ ) -#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \ +#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \ ft_mem_qrealloc_debug( memory, _current_, _size_, \ - (void**)(void*)&(_pointer_), \ - __FILE__, __LINE__ ) + (void**)(void*)&(_pointer_), \ + __FILE__, __LINE__ ) -#define FT_MEM_FREE( _pointer_ ) \ +#define FT_MEM_FREE( _pointer_ ) \ ft_mem_free_debug( memory, (void**)(void*)&(_pointer_), \ - __FILE__, __LINE__ ) + __FILE__, __LINE__ ) #else /* !FT_DEBUG_MEMORY */ -#define FT_MEM_ALLOC( _pointer_, _size_ ) \ +#define FT_MEM_ALLOC( _pointer_, _size_ ) \ ft_mem_alloc( memory, _size_, \ - (void**)(void*)&(_pointer_) ) + (void**)(void*)&(_pointer_) ) -#define FT_MEM_FREE( _pointer_ ) \ +#define FT_MEM_FREE( _pointer_ ) \ ft_mem_free( memory, \ - (void**)(void*)&(_pointer_) ) + (void**)(void*)&(_pointer_) ) -#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \ - ft_mem_realloc( memory, _current_, _size_, \ - (void**)(void*)&(_pointer_) ) +#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \ + ft_mem_realloc( memory, _current_, _size_, \ + (void**)(void*)&(_pointer_) ) -#define FT_MEM_QALLOC( _pointer_, _size_ ) \ +#define FT_MEM_QALLOC( _pointer_, _size_ ) \ ft_mem_qalloc( memory, _size_, \ - (void**)(void*)&(_pointer_) ) + (void**)(void*)&(_pointer_) ) -#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \ - ft_mem_qrealloc( memory, _current_, _size_, \ - (void**)(void*)&(_pointer_) ) +#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \ + ft_mem_qrealloc( memory, _current_, _size_, \ + (void**)(void*)&(_pointer_) ) #endif /* !FT_DEBUG_MEMORY */ diff --git a/include/freetype/internal/ftrfork.h b/include/freetype/internal/ftrfork.h index 490949111..94402bcfa 100644 --- a/include/freetype/internal/ftrfork.h +++ b/include/freetype/internal/ftrfork.h @@ -4,7 +4,7 @@ /* */ /* Embedded resource forks accessor (specification). */ /* */ -/* Copyright 2004 by */ +/* Copyright 2004, 2006 by */ /* Masatake YAMATO and Redhat K.K. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -154,7 +154,7 @@ FT_BEGIN_HEADER /* offsets :: */ /* The stream offsets for the resource data specified by `tag'. */ /* This array is allocated by the function, so you have to call */ - /* @ft_mem_free after use. */ + /* @ft_mem_free after use. */ /* */ /* count :: */ /* The length of offsets array. */ diff --git a/include/freetype/internal/psaux.h b/include/freetype/internal/psaux.h index 43017dd07..6f8ba6cc8 100644 --- a/include/freetype/internal/psaux.h +++ b/include/freetype/internal/psaux.h @@ -792,7 +792,7 @@ FT_BEGIN_HEADER T1_CMap_Classes t1_cmap_classes; - /* fields from here were added after 2.1.10 */ + /* fields after this comment line were added after version 2.1.10 */ const AFM_Parser_FuncsRec* afm_parser_funcs; } PSAux_ServiceRec, *PSAux_Service; diff --git a/include/freetype/internal/sfnt.h b/include/freetype/internal/sfnt.h index 27d76c046..b9d0ab970 100644 --- a/include/freetype/internal/sfnt.h +++ b/include/freetype/internal/sfnt.h @@ -126,6 +126,7 @@ FT_BEGIN_HEADER #ifdef FT_CONFIG_OPTION_OLD_INTERNALS + /*************************************************************************/ /* */ /* */ @@ -164,7 +165,6 @@ FT_BEGIN_HEADER SFNT_Header sfnt ); - /*************************************************************************/ /* */ /* */ @@ -174,11 +174,11 @@ FT_BEGIN_HEADER /* Loads the table directory into a face object. */ /* */ /* */ - /* face :: A handle to the target face object. */ + /* face :: A handle to the target face object. */ /* */ - /* stream :: The input stream. */ + /* stream :: The input stream. */ /* */ - /* sfnt :: The SFNT header. */ + /* sfnt :: The SFNT header. */ /* */ /* */ /* FreeType error code. 0 means success. */ @@ -192,8 +192,10 @@ FT_BEGIN_HEADER (*TT_Load_Directory_Func)( TT_Face face, FT_Stream stream, SFNT_Header sfnt ); + #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + /*************************************************************************/ /* */ /* */ @@ -362,6 +364,7 @@ FT_BEGIN_HEADER #ifdef FT_CONFIG_OPTION_OLD_INTERNALS + /*************************************************************************/ /* */ /* */ @@ -388,6 +391,7 @@ FT_BEGIN_HEADER FT_UInt y_ppem, FT_ULong* astrike_index ); + /*************************************************************************/ /* */ /* */ @@ -413,9 +417,9 @@ FT_BEGIN_HEADER /* released. */ /* */ typedef FT_Error - (*TT_CharMap_Load_Func)( TT_Face face, - void* cmap, - FT_Stream input ); + (*TT_CharMap_Load_Func)( TT_Face face, + void* cmap, + FT_Stream input ); /*************************************************************************/ @@ -440,6 +444,7 @@ FT_BEGIN_HEADER #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + /*************************************************************************/ /* */ /* */ @@ -651,6 +656,7 @@ FT_BEGIN_HEADER FT_Module_Requester get_interface; TT_Load_Any_Func load_any; + #ifdef FT_CONFIG_OPTION_OLD_INTERNALS TT_Load_SFNT_HeaderRec_Func load_sfnt_header; TT_Load_Directory_Func load_directory; @@ -673,13 +679,16 @@ FT_BEGIN_HEADER TT_Load_Table_Func load_hdmx_stub; TT_Free_Table_Func free_hdmx_stub; #endif - TT_Load_Table_Func load_kern; /* a.k.a load_kerning <= 2.1.10 */ + + /* this field was called `load_kerning' up to version 2.1.10 */ + TT_Load_Table_Func load_kern; TT_Load_Table_Func load_gasp; TT_Load_Table_Func load_pclt; - /* see `ttload.h' */ - TT_Load_Table_Func load_bhed; /* a.k.a load_bitmap_header <= 2.1.10 */ + /* see `ttload.h'; this field was called `load_bitmap_header' up to */ + /* version 2.1.10 */ + TT_Load_Table_Func load_bhed; /* see `ttsbit.h' */ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS @@ -688,6 +697,7 @@ FT_BEGIN_HEADER #endif TT_Load_SBit_Image_Func load_sbit_image; + #ifdef FT_CONFIG_OPTION_OLD_INTERNALS TT_Free_Table_Func free_sbits_stub; #endif @@ -696,23 +706,24 @@ FT_BEGIN_HEADER TT_Get_PS_Name_Func get_psname; TT_Free_Table_Func free_psnames; -#ifdef FT_CONFIG_OPTION_OLD_INTERNALS /* the following disappeared in 2.1.8, but were there before */ +#ifdef FT_CONFIG_OPTION_OLD_INTERNALS TT_CharMap_Load_Func load_charmap_stub; TT_CharMap_Free_Func free_charmap_stub; #endif - /* from here, the structure differs from 2.1.7 */ + /* starting here, the structure differs from version 2.1.7 */ - /* since FT 2.1.8, but appeared before 'get_psname' */ + /* this field was introduced in version 2.1.8, named `get_psname' */ TT_Face_GetKerningFunc get_kerning; - /* the following appeared in 2.1.8, but were placed - * between 'load_sbits' and 'load_sbit_image'. BOOOOH - */ - TT_Find_SBit_Image_Func find_sbit_image; /* NULL if FT_OPTIMIZE_MEMORY */ - TT_Load_SBit_Metrics_Func load_sbit_metrics; /* NULL if FT_OPTIMIZE_MEMORY */ + /* The following appeared in 2.1.8, but were placed between */ + /* `load_sbits' and `load_sbit_image'. Both fields are NULL if */ + /* FT_OPTIMIZE_MEMORY is used. */ + TT_Find_SBit_Image_Func find_sbit_image; + TT_Load_SBit_Metrics_Func load_sbit_metrics; + + /* new elements introduced after version 2.1.10 */ - /* since FreeType 2.2 */ /* load the font directory, i.e., the offset table and */ /* the table directory */ TT_Load_Table_Func load_font_dir; diff --git a/include/freetype/internal/t1types.h b/include/freetype/internal/t1types.h index d66d10974..65d9ca92e 100644 --- a/include/freetype/internal/t1types.h +++ b/include/freetype/internal/t1types.h @@ -200,14 +200,15 @@ FT_BEGIN_HEADER const void* afm_data; FT_CharMapRec charmaprecs[2]; FT_CharMap charmaps[2]; + #ifdef FT_CONFIG_OPTION_OLD_INTERNALS - PS_Unicodes unicode_map; /* apparently unused, keep for old internals */ + PS_Unicodes unicode_map; #endif /* support for Multiple Masters fonts */ PS_Blend blend; - /* since FT 2.1 - interface to PostScript hinter */ + /* since version 2.1 - interface to PostScript hinter */ const void* pshinter; } T1_FaceRec; @@ -222,10 +223,10 @@ FT_BEGIN_HEADER void* afm_data; CID_Subrs subrs; - /* since FT 2.1 - interface to PostScript hinter */ + /* since version 2.1 - interface to PostScript hinter */ void* pshinter; - /* since FT 2.1.8, but was originally after 'afm_data' */ + /* since version 2.1.8, but was originally positioned after `afm_data' */ FT_Byte* binary_data; /* used if hex data has been converted */ FT_Stream cid_stream; diff --git a/include/freetype/internal/tttypes.h b/include/freetype/internal/tttypes.h index 3e71b308a..cc47a3d6a 100644 --- a/include/freetype/internal/tttypes.h +++ b/include/freetype/internal/tttypes.h @@ -5,7 +5,7 @@ /* Basic SFNT/TrueType type definitions and interface (specification */ /* only). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2005 by */ +/* Copyright 1996-2001, 2002, 2004, 2005, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -1383,16 +1383,17 @@ FT_BEGIN_HEADER const char* postscript_name; - /* since FreeType 2.1.8, but was originally placed after 'glyph_locations_stub' */ + /* since version 2.1.8, but was originally placed after */ + /* `glyph_locations_stub' */ FT_ULong glyf_len; - /* since FreeType 2.1.8, but was originally placed before 'extra' */ + /* since version 2.1.8, but was originally placed before `extra' */ #ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT FT_Bool doblend; GX_Blend blend; #endif - /* since FreeType 2.2 */ + /* since version 2.2 */ #ifdef FT_OPTIMIZE_MEMORY FT_Byte* horz_metrics; @@ -1514,7 +1515,7 @@ FT_BEGIN_HEADER /* for possible extensibility in other formats */ void* other; - /* since FT 2.1.8 */ + /* since version 2.1.8 */ FT_Int top_bearing; FT_Int vadvance; FT_Vector pp3; diff --git a/src/base/ftcalc.c b/src/base/ftcalc.c index 4af18498a..ba3d08935 100644 --- a/src/base/ftcalc.c +++ b/src/base/ftcalc.c @@ -4,7 +4,7 @@ /* */ /* Arithmetic computations (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/base/ftdbgmem.c b/src/base/ftdbgmem.c index 77d50f707..632d5df0d 100644 --- a/src/base/ftdbgmem.c +++ b/src/base/ftdbgmem.c @@ -892,10 +892,10 @@ FT_BASE_DEF( FT_Pointer ) ft_mem_alloc_debug( FT_Memory memory, - FT_Long size, - FT_Error *p_error, - const char* file_name, - FT_Long line_no ) + FT_Long size, + FT_Error *p_error, + const char* file_name, + FT_Long line_no ) { FT_MemTable table = (FT_MemTable)memory->user; @@ -912,12 +912,12 @@ FT_BASE_DEF( FT_Pointer ) ft_mem_realloc_debug( FT_Memory memory, - FT_Long current, - FT_Long size, - void* block, - FT_Error *p_error, - const char* file_name, - FT_Long line_no ) + FT_Long current, + FT_Long size, + void* block, + FT_Error *p_error, + const char* file_name, + FT_Long line_no ) { FT_MemTable table = (FT_MemTable)memory->user; @@ -934,10 +934,10 @@ FT_BASE_DEF( FT_Pointer ) ft_mem_qalloc_debug( FT_Memory memory, - FT_Long size, - FT_Error *p_error, - const char* file_name, - FT_Long line_no ) + FT_Long size, + FT_Error *p_error, + const char* file_name, + FT_Long line_no ) { FT_MemTable table = (FT_MemTable)memory->user; @@ -954,12 +954,12 @@ FT_BASE_DEF( FT_Pointer ) ft_mem_qrealloc_debug( FT_Memory memory, - FT_Long current, - FT_Long size, - void* block, - FT_Error *p_error, - const char* file_name, - FT_Long line_no ) + FT_Long current, + FT_Long size, + void* block, + FT_Error *p_error, + const char* file_name, + FT_Long line_no ) { FT_MemTable table = (FT_MemTable)memory->user; @@ -976,9 +976,9 @@ FT_BASE_DEF( void ) ft_mem_free_debug( FT_Memory memory, - const void *P, - const char* file_name, - FT_Long line_no ) + const void *P, + const char* file_name, + FT_Long line_no ) { FT_MemTable table = (FT_MemTable)memory->user; @@ -998,10 +998,10 @@ FT_BASE_DEF( FT_Error ) ft_mem_alloc_debug( FT_Memory memory, - FT_Long size, - void* *P, - const char* file_name, - FT_Long line_no ) + FT_Long size, + void* *P, + const char* file_name, + FT_Long line_no ) { FT_MemTable table = (FT_MemTable)memory->user; @@ -1018,11 +1018,11 @@ FT_BASE_DEF( FT_Error ) ft_mem_realloc_debug( FT_Memory memory, - FT_Long current, - FT_Long size, - void* *P, - const char* file_name, - FT_Long line_no ) + FT_Long current, + FT_Long size, + void* *P, + const char* file_name, + FT_Long line_no ) { FT_MemTable table = (FT_MemTable)memory->user; @@ -1039,10 +1039,10 @@ FT_BASE_DEF( FT_Error ) ft_mem_qalloc_debug( FT_Memory memory, - FT_Long size, - void* *P, - const char* file_name, - FT_Long line_no ) + FT_Long size, + void* *P, + const char* file_name, + FT_Long line_no ) { FT_MemTable table = (FT_MemTable)memory->user; @@ -1059,11 +1059,11 @@ FT_BASE_DEF( FT_Error ) ft_mem_qrealloc_debug( FT_Memory memory, - FT_Long current, - FT_Long size, - void* *P, - const char* file_name, - FT_Long line_no ) + FT_Long current, + FT_Long size, + void* *P, + const char* file_name, + FT_Long line_no ) { FT_MemTable table = (FT_MemTable)memory->user; @@ -1080,9 +1080,9 @@ FT_BASE_DEF( void ) ft_mem_free_debug( FT_Memory memory, - FT_Pointer block, - const char* file_name, - FT_Long line_no ) + FT_Pointer block, + const char* file_name, + FT_Long line_no ) { FT_MemTable table = (FT_MemTable)memory->user; diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c index a6a62d6e9..e7b666602 100644 --- a/src/base/ftobjs.c +++ b/src/base/ftobjs.c @@ -3674,7 +3674,9 @@ library->debug_hooks[hook_index] = debug_hook; } + #ifdef FT_CONFIG_OPTION_OLD_INTERNALS + FT_BASE_DEF( FT_Error ) ft_stub_set_char_sizes( FT_Size size, FT_F26Dot6 width, @@ -3685,6 +3687,7 @@ FT_Size_RequestRec req; FT_Driver driver = size->face->driver; + if ( driver->clazz->request_size ) { req.type = FT_SIZE_REQUEST_TYPE_NOMINAL; @@ -3705,30 +3708,34 @@ return driver->clazz->request_size( size, &req ); } + return 0; } FT_BASE_DEF( FT_Error ) - ft_stub_set_pixel_sizes( FT_Size size, - FT_UInt width, - FT_UInt height ) + ft_stub_set_pixel_sizes( FT_Size size, + FT_UInt width, + FT_UInt height ) { FT_Size_RequestRec req; FT_Driver driver = size->face->driver; + if ( driver->clazz->request_size ) { req.type = FT_SIZE_REQUEST_TYPE_NOMINAL; - req.width = width << 6; + req.width = width << 6; req.height = height << 6; req.horiResolution = 0; req.vertResolution = 0; return driver->clazz->request_size( size, &req ); } + return 0; } + #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ /* END */ diff --git a/src/base/ftsystem.c b/src/base/ftsystem.c index 86b5df6a4..b7fb5f90e 100644 --- a/src/base/ftsystem.c +++ b/src/base/ftsystem.c @@ -4,7 +4,7 @@ /* */ /* ANSI-specific FreeType low-level system interface (body). */ /* */ -/* Copyright 1996-2001, 2002 by */ +/* Copyright 1996-2001, 2002, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -46,7 +46,7 @@ /* */ /* It is not necessary to do any error checking for the */ /* allocation-related functions. This will be done by the higher level */ - /* routines like ft_mem_alloc() or ft_mem_realloc(). */ + /* routines like ft_mem_alloc() or ft_mem_realloc(). */ /* */ /*************************************************************************/ diff --git a/src/base/ftutil.c b/src/base/ftutil.c index ef5935301..efc23144b 100644 --- a/src/base/ftutil.c +++ b/src/base/ftutil.c @@ -51,8 +51,8 @@ FT_BASE_DEF( FT_Pointer ) ft_mem_alloc( FT_Memory memory, - FT_Long size, - FT_Error *p_error ) + FT_Long size, + FT_Error *p_error ) { FT_Error error = FT_Err_Ok; FT_Pointer block = NULL; @@ -74,8 +74,8 @@ FT_BASE_DEF( FT_Pointer ) ft_mem_qalloc( FT_Memory memory, - FT_Long size, - FT_Error *p_error ) + FT_Long size, + FT_Error *p_error ) { FT_Error error = FT_Err_Ok; FT_Pointer block = NULL; @@ -95,10 +95,10 @@ FT_BASE_DEF( FT_Pointer ) ft_mem_realloc( FT_Memory memory, - FT_Long current, - FT_Long size, - void* block, - FT_Error *p_error ) + FT_Long current, + FT_Long size, + void* block, + FT_Error *p_error ) { FT_Error error = FT_Err_Ok; @@ -137,10 +137,10 @@ FT_BASE_DEF( FT_Pointer ) ft_mem_qrealloc( FT_Memory memory, - FT_Long current, - FT_Long size, - void* block, - FT_Error *p_error ) + FT_Long current, + FT_Long size, + void* block, + FT_Error *p_error ) { FT_Error error = FT_Err_Ok; @@ -174,7 +174,7 @@ FT_BASE_DEF( void ) ft_mem_free( FT_Memory memory, - const void *P ) + const void *P ) { if ( P ) memory->free( memory, (void*)P ); @@ -188,8 +188,8 @@ FT_BASE_DEF( FT_Error ) ft_mem_alloc( FT_Memory memory, - FT_Long size, - void* *P ) + FT_Long size, + void* *P ) { FT_ASSERT( P != 0 ); @@ -221,8 +221,8 @@ FT_BASE_DEF( FT_Error ) ft_mem_qalloc( FT_Memory memory, - FT_Long size, - void* *P ) + FT_Long size, + void* *P ) { FT_ASSERT( P != 0 ); @@ -253,9 +253,9 @@ FT_BASE_DEF( FT_Error ) ft_mem_realloc( FT_Memory memory, - FT_Long current, - FT_Long size, - void** P ) + FT_Long current, + FT_Long size, + void** P ) { void* Q; @@ -295,9 +295,9 @@ FT_BASE_DEF( FT_Error ) ft_mem_qrealloc( FT_Memory memory, - FT_Long current, - FT_Long size, - void** P ) + FT_Long current, + FT_Long size, + void** P ) { void* Q; @@ -334,7 +334,7 @@ FT_BASE_DEF( void ) ft_mem_free( FT_Memory memory, - void** P ) + void** P ) { FT_TRACE7(( "ft_mem_free:" )); FT_TRACE7(( " Freeing block 0x%08p, ref 0x%08p\n", @@ -561,6 +561,7 @@ return value; } + #ifdef FT_CONFIG_OPTION_OLD_INTERNALS FT_BASE_DEF( FT_Error ) @@ -570,10 +571,12 @@ { FT_Error error; + (void)FT_ALLOC( *P, size ); return error; } + FT_BASE_DEF( FT_Error ) FT_QAlloc( FT_Memory memory, FT_Long size, @@ -581,10 +584,12 @@ { FT_Error error; + (void)FT_QALLOC( *p, size ); return error; } + FT_BASE_DEF( FT_Error ) FT_Realloc( FT_Memory memory, FT_Long current, @@ -593,6 +598,7 @@ { FT_Error error; + (void)FT_REALLOC( *P, current, size ); return error; } @@ -606,10 +612,12 @@ { FT_Error error; + (void)FT_QREALLOC( *p, current, size ); return error; } + FT_BASE_DEF( void ) FT_Free( FT_Memory memory, void* *P ) diff --git a/src/cache/ftccback.h b/src/cache/ftccback.h index b0aa3e93c..5d7e8bd26 100644 --- a/src/cache/ftccback.h +++ b/src/cache/ftccback.h @@ -4,7 +4,7 @@ /* */ /* Callback functions of the caching sub-system (specification only). */ /* */ -/* Copyright 2004, 2005 by */ +/* Copyright 2004, 2005, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/cache/ftcmanag.c b/src/cache/ftcmanag.c index 16b4158aa..fe4fa0275 100644 --- a/src/cache/ftcmanag.c +++ b/src/cache/ftcmanag.c @@ -4,7 +4,7 @@ /* */ /* FreeType Cache Manager (body). */ /* */ -/* Copyright 2000-2001, 2002, 2003, 2004, 2005 by */ +/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -677,6 +677,7 @@ node->ref_count--; } + #ifdef FT_CONFIG_OPTION_OLD_INTERNALS FT_EXPORT_DEF( FT_Error ) @@ -698,6 +699,7 @@ FT_Error error; FT_Size size; + scaler.face_id = font->face_id; scaler.width = font->pix_width; scaler.height = font->pix_height; @@ -716,9 +718,11 @@ *aface = size->face; *asize = size; } - return error; + + return error; } #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + /* END */ diff --git a/src/sfnt/sfdriver.c b/src/sfnt/sfdriver.c index 88958532e..6a1658da7 100644 --- a/src/sfnt/sfdriver.c +++ b/src/sfnt/sfdriver.c @@ -418,7 +418,7 @@ FT_CALLBACK_DEF( void ) - tt_face_free_hdmx_stub( TT_Face face ) + tt_face_free_hdmx_stub( TT_Face face ) { FT_UNUSED( face ); } @@ -458,9 +458,9 @@ FT_CALLBACK_DEF( FT_Error ) - tt_face_load_charmap_stub( TT_Face face, - void* cmap, - FT_Stream input ) + tt_face_load_charmap_stub( TT_Face face, + void* cmap, + FT_Stream input ) { FT_UNUSED( face ); FT_UNUSED( cmap ); @@ -471,8 +471,8 @@ FT_CALLBACK_DEF( FT_Error ) - tt_face_free_charmap_stub( TT_Face face, - void* cmap ) + tt_face_free_charmap_stub( TT_Face face, + void* cmap ) { FT_UNUSED( face ); FT_UNUSED( cmap ); @@ -482,6 +482,7 @@ #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */ + static const SFNT_Interface sfnt_interface = { @@ -532,9 +533,9 @@ #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS tt_face_load_sbit_image, -#else /* !TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ +#else 0, -#endif /* !TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ +#endif #ifdef FT_CONFIG_OPTION_OLD_INTERNALS tt_face_free_sbit_stub, @@ -544,29 +545,30 @@ /* see `ttpost.h' */ tt_face_get_ps_name, tt_face_free_ps_names, -#else /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */ +#else 0, 0, -#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */ +#endif #ifdef FT_CONFIG_OPTION_OLD_INTERNALS tt_face_load_charmap_stub, tt_face_free_charmap_stub, #endif - /* since FT 2.1.8 */ + /* since version 2.1.8 */ tt_face_get_kerning, -# ifndef FT_OPTIMIZE_MEMORY +#ifndef FT_OPTIMIZE_MEMORY tt_find_sbit_image, tt_load_sbit_metrics, -# else +#else 0, 0, -# endif +#endif + + /* since version 2.2 */ - /* since FT 2.2 */ tt_face_load_font_dir, tt_face_load_hmtx, diff --git a/src/sfnt/ttcmap.c b/src/sfnt/ttcmap.c index 6f087947d..4c1a3402b 100644 --- a/src/sfnt/ttcmap.c +++ b/src/sfnt/ttcmap.c @@ -4,7 +4,7 @@ /* */ /* TrueType character mapping table (cmap) support (body). */ /* */ -/* Copyright 2002, 2003, 2004, 2005 by */ +/* Copyright 2002, 2003, 2004, 2005, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/sfnt/ttmtx.c b/src/sfnt/ttmtx.c index 141574c46..bb89cd33c 100644 --- a/src/sfnt/ttmtx.c +++ b/src/sfnt/ttmtx.c @@ -292,7 +292,7 @@ goto Fail; FT_TRACE3(( "Ascender: %5d\n", header->Ascender )); - FT_TRACE3(( "Descenter: %5d\n", header->Descender )); + FT_TRACE3(( "Descender: %5d\n", header->Descender )); FT_TRACE3(( "number_Of_Metrics: %5u\n", header->number_Of_HMetrics )); header->long_metrics = NULL; @@ -404,7 +404,8 @@ FT_UShort k = header->number_Of_HMetrics; - if ( k == 0 || !header->long_metrics || + if ( k == 0 || + !header->long_metrics || gindex >= (FT_UInt)face->max_profile.numGlyphs ) { *abearing = *aadvance = 0; diff --git a/src/sfnt/ttpost.c b/src/sfnt/ttpost.c index 573b1f0af..39f99163f 100644 --- a/src/sfnt/ttpost.c +++ b/src/sfnt/ttpost.c @@ -5,7 +5,7 @@ /* Postcript name table processing for TrueType and OpenType fonts */ /* (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003 by */ +/* Copyright 1996-2001, 2002, 2003, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/truetype/ttinterp.c b/src/truetype/ttinterp.c index df252aaa0..bb08a5ae2 100644 --- a/src/truetype/ttinterp.c +++ b/src/truetype/ttinterp.c @@ -4,7 +4,7 @@ /* */ /* TrueType bytecode interpreter (body). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ diff --git a/src/truetype/ttinterp.h b/src/truetype/ttinterp.h index d8be89223..2b8dae100 100644 --- a/src/truetype/ttinterp.h +++ b/src/truetype/ttinterp.h @@ -4,7 +4,7 @@ /* */ /* TrueType bytecode interpreter (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */ +/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */