Formatting, copyright years, documentation improvements.

This commit is contained in:
Werner Lemberg 2006-02-17 08:07:09 +00:00
parent cda2d957dc
commit 8e6f8c4d79
29 changed files with 333 additions and 253 deletions

View File

@ -1,25 +1,53 @@
2006-02-16 David Turner <david@freetype.org>
* 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 <b90201047@ntu.edu.tw>
@ -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

View File

@ -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(). */
/* */
/*************************************************************************/

View File

@ -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

View File

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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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,

View File

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

View File

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

View File

@ -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
/*************************************************************************/
/* */
/* <Function> */
/* ft_mem_alloc */
/* ft_mem_alloc */
/* */
/* <Description> */
/* 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 */

View File

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

View File

@ -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;

View File

@ -126,6 +126,7 @@ FT_BEGIN_HEADER
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/*************************************************************************/
/* */
/* <FuncType> */
@ -164,7 +165,6 @@ FT_BEGIN_HEADER
SFNT_Header sfnt );
/*************************************************************************/
/* */
/* <FuncType> */
@ -174,11 +174,11 @@ FT_BEGIN_HEADER
/* Loads the table directory into a face object. */
/* */
/* <Input> */
/* 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. */
/* */
/* <Return> */
/* 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 */
/*************************************************************************/
/* */
/* <FuncType> */
@ -362,6 +364,7 @@ FT_BEGIN_HEADER
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/*************************************************************************/
/* */
/* <FuncType> */
@ -388,6 +391,7 @@ FT_BEGIN_HEADER
FT_UInt y_ppem,
FT_ULong* astrike_index );
/*************************************************************************/
/* */
/* <FuncType> */
@ -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 */
/*************************************************************************/
/* */
/* <FuncType> */
@ -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;

View File

@ -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;

View File

@ -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;

View File

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

View File

@ -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;

View File

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

View File

@ -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(). */
/* */
/*************************************************************************/

View File

@ -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 )

View File

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

View File

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

View File

@ -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,

View File

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

View File

@ -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;

View File

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

View File

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

View File

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