* 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.
This commit is contained in:
David Turner 2006-02-16 22:45:31 +00:00
parent 0d565fdc1d
commit cda2d957dc
38 changed files with 1035 additions and 522 deletions

View File

@ -1,8 +1,31 @@
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.
2006-02-15 Chia-I Wu <b90201047@ntu.edu.tw> 2006-02-15 Chia-I Wu <b90201047@ntu.edu.tw>
* include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove * include/freetype/internal/ftobjs.h (FT_Face_InternalRec): Remove
unused `max_points' and `max_contours'. unused `max_points' and `max_contours'.
* src/cid/cidobjs.c (cid_face_init), src/type1/t1objs.c * src/cid/cidobjs.c (cid_face_init), src/type1/t1objs.c
(T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Update. (T1_Face_Init), src/type42/t42objs.c (T42_Face_Init): Update.
@ -127,7 +150,7 @@
src/sfnt/sfdriver.c, src/sfnt/sfnt.c, src/sfnt/sfobjs.c, src/sfnt/sfdriver.c, src/sfnt/sfnt.c, src/sfnt/sfobjs.c,
src/sfnt/ttload.c, src/sfnt/ttload.h, src/sfnt/ttsbit.c, src/sfnt/ttload.c, src/sfnt/ttload.h, src/sfnt/ttsbit.c,
src/sfnt/ttsbit.h, src/sfnt/ttsbit0.c: Clean up the SFNT_Interface. src/sfnt/ttsbit.h, src/sfnt/ttsbit0.c: Clean up the SFNT_Interface.
* src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: New files. Metrics-related * src/sfnt/ttmtx.c, src/sfnt/ttmtx.h: New files. Metrics-related
tables' loading and parsing code is moved to here. tables' loading and parsing code is moved to here.
Move `tt_face_get_metrics' here from the truetype module. The Move `tt_face_get_metrics' here from the truetype module. The
@ -377,7 +400,7 @@
2006-01-27 David Turner <david@freetype.org> 2006-01-27 David Turner <david@freetype.org>
* builds/unix/configure.ac: Fix build problem on Cygwin. * builds/unix/configure.ac: Fix build problem on Cygwin.
* builds/unix/install.mk (install): Don't install the internal * builds/unix/install.mk (install): Don't install the internal
headers, and remove existing ones if found in the target install headers, and remove existing ones if found in the target install
directory. directory.

View File

@ -116,7 +116,7 @@ Free_VecPooled( APTR poolHeader,
/* */ /* */
/* It is not necessary to do any error checking for the */ /* It is not necessary to do any error checking for the */
/* allocation-related functions. This will be done by the higher level */ /* allocation-related functions. This will be done by the higher level */
/* routines like FT_Alloc() or FT_Realloc(). */ /* routines like ft_mem_alloc() or ft_mem_realloc(). */
/* */ /* */
/*************************************************************************/ /*************************************************************************/

View File

@ -567,7 +567,7 @@ FT_BEGIN_HEADER
/* /*
* This temporary macro is used to control whether we are going to * This temporary macro is used to control whether we are going to
* compile certain functions like FT_Alloc in a way that prevents recent * compile certain functions like ft_mem_alloc in a way that prevents recent
* GCC releases from emitting zillions of `strict aliasing' warning * GCC releases from emitting zillions of `strict aliasing' warning
* messages each time a memory-management function is called. * messages each time a memory-management function is called.
*/ */

View File

@ -82,6 +82,16 @@ FT_BEGIN_HEADER
FTC_Node_Destroy( FTC_Node node, FTC_Node_Destroy( FTC_Node node,
FTC_Manager manager ); 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

@ -25,64 +25,15 @@
FT_BEGIN_HEADER 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.
*/
/*************************************************************************/ #if 0
/* */
/* <Section> */
/* cache_subsystem */
/* */
/*************************************************************************/
/*************************************************************************
*
* @type:
* FTC_CMapCache
*
* @description:
* An opaque handle used to manager a charmap cache. This cache is to
* hold character codes -> glyph indices mappings.
*
*/
typedef struct FTC_CMapCacheRec_* FTC_CMapCache;
/*************************************************************************
*
* @type:
* FTC_CMapDesc
*
* @description:
* A handle to an @FTC_CMapDescRec structure used to describe a given
* charmap in a charmap cache.
*
* Each @FTC_CMapDesc describes which charmap (of which @FTC_FaceID) we
* want to use in @FTC_CMapCache_Lookup.
*
*/
typedef struct FTC_CMapDescRec_* FTC_CMapDesc;
/*************************************************************************
*
* @enum:
* FTC_CMapType
*
* @description:
* The list of valid @FTC_CMapDesc types. They indicate how we want to
* address a charmap within an @FTC_FaceID.
*
* @values:
* FTC_CMAP_BY_INDEX ::
* Address a charmap by its index in the corresponding @FT_Face.
*
* FTC_CMAP_BY_ENCODING ::
* Use a @FT_Face charmap that corresponds to a given encoding.
*
* FTC_CMAP_BY_ID ::
* Use an @FT_Face charmap that corresponds to a given
* (platform,encoding) ID. See @FTC_CMapIdRec.
*
*/
typedef enum FTC_CMapType_ typedef enum FTC_CMapType_
{ {
FTC_CMAP_BY_INDEX = 0, FTC_CMAP_BY_INDEX = 0,
@ -92,23 +43,6 @@ FT_BEGIN_HEADER
} FTC_CMapType; } FTC_CMapType;
/*************************************************************************
*
* @struct:
* FTC_CMapIdRec
*
* @description:
* A short structure to identify a charmap by a (platform,encoding) pair
* of values.
*
* @fields:
* platform ::
* The platform ID.
*
* encoding ::
* The encoding ID.
*
*/
typedef struct FTC_CMapIdRec_ typedef struct FTC_CMapIdRec_
{ {
FT_UInt platform; FT_UInt platform;
@ -117,34 +51,6 @@ FT_BEGIN_HEADER
} FTC_CMapIdRec; } FTC_CMapIdRec;
/*************************************************************************
*
* @struct:
* FTC_CMapDescRec
*
* @description:
* A structure to describe a given charmap to @FTC_CMapCache.
*
* @fields:
* face_id ::
* @FTC_FaceID of the face this charmap belongs to.
*
* type ::
* The type of charmap, see @FTC_CMapType.
*
* u.index ::
* For @FTC_CMAP_BY_INDEX types, this is the charmap index (within a
* @FT_Face) we want to use.
*
* u.encoding ::
* For @FTC_CMAP_BY_ENCODING types, this is the charmap encoding we
* want to use. see @FT_Encoding.
*
* u.id ::
* For @FTC_CMAP_BY_ID types, this is the (platform,encoding) pair we
* want to use. see @FTC_CMapIdRec and @FT_CharMapRec.
*
*/
typedef struct FTC_CMapDescRec_ typedef struct FTC_CMapDescRec_
{ {
FTC_FaceID face_id; FTC_FaceID face_id;
@ -158,73 +64,25 @@ FT_BEGIN_HEADER
} u; } u;
} FTC_CMapDescRec; } FTC_CMapDescRec, *FTC_CMapDesc;
/************************************************************************* #if 0
*
* @function:
* FTC_CMapCache_New
*
* @description:
* Creates a new charmap cache.
*
* @input:
* manager ::
* A handle to the cache manager.
*
* @output:
* acache ::
* A new cache handle. NULL in case of error.
*
* @return:
* FreeType error code. 0 means success.
*
* @note:
* Like all other caches, this one will be destroyed with the cache
* manager.
*
*/
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FTC_CMapCache_New( FTC_Manager manager, FTC_CMapCache_New( FTC_Manager manager,
FTC_CMapCache *acache ); FTC_CMapCache *acache );
/*************************************************************************
*
* @function:
* FTC_CMapCache_Lookup
*
* @description:
* Translates a character code into a glyph index, using the charmap
* cache.
*
* @input:
* cache ::
* A charmap cache handle.
*
* cmap_desc ::
* A charmap descriptor handle.
*
* char_code ::
* The character code (in the corresponding charmap).
*
* @return:
* Glyph index. 0 means `no glyph'.
*
* @note:
* This function doesn't return @FTC_Node handles, since there is no
* real use for them with typical uses of charmaps.
*
*/
FT_EXPORT( FT_UInt ) FT_EXPORT( FT_UInt )
FTC_CMapCache_Lookup( FTC_CMapCache cache, FTC_CMapCache_Lookup( FTC_CMapCache cache,
FTC_CMapDesc cmap_desc, FTC_CMapDesc cmap_desc,
FT_UInt32 char_code ); FT_UInt32 char_code );
#endif
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/* */ /* */
FT_END_HEADER FT_END_HEADER

View File

@ -583,12 +583,17 @@ FT_BEGIN_HEADER
/* /*
* This temporary macro is used to control whether we are going to * This temporary macro is used to control whether we are going to
* compile certain functions like FT_Alloc in a way that prevents recent * compile certain functions like ft_mem_alloc in a way that prevents recent
* GCC releases from emitting zillions of `strict aliasing' warning * GCC releases from emitting zillions of `strict aliasing' warning
* messages each time a memory-management function is called. * 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
FT_END_HEADER FT_END_HEADER

View File

@ -829,6 +829,23 @@ FT_BEGIN_HEADER
/* */ /* */
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_EXPORT( FT_Error )
FTC_Manager_Lookup_Face( FTC_Manager manager,
FTC_FaceID face_id,
FT_Face *aface );
FT_EXPORT( FT_Error )
FTC_Manager_Lookup_Size( FTC_Manager manager,
FTC_Font font,
FT_Face *aface,
FT_Size *asize );
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/* */
FT_END_HEADER FT_END_HEADER
#endif /* __FTCACHE_H__ */ #endif /* __FTCACHE_H__ */

View File

@ -176,7 +176,7 @@ FT_BEGIN_HEADER
/* descriptor will be released. */ /* descriptor will be released. */
/* */ /* */
/* The reason why this function takes an `library' parameter is */ /* The reason why this function takes an `library' parameter is */
/* simply to use FT_Free(). */ /* simply to use ft_mem_free(). */
/* */ /* */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Outline_Done( FT_Library library, FT_Outline_Done( FT_Library library,

View File

@ -48,7 +48,7 @@ FT_BEGIN_HEADER
FT_SqrtFixed( FT_Int32 x ); FT_SqrtFixed( FT_Int32 x );
#if 0 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -68,7 +68,7 @@ FT_BEGIN_HEADER
FT_EXPORT( FT_Int32 ) FT_EXPORT( FT_Int32 )
FT_Sqrt32( FT_Int32 x ); FT_Sqrt32( FT_Int32 x );
#endif /* 0 */ #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/*************************************************************************/ /*************************************************************************/

View File

@ -59,6 +59,19 @@ FT_BEGIN_HEADER
typedef FT_Error typedef FT_Error
(*FT_Size_SelectFunc)( FT_Size size, (*FT_Size_SelectFunc)( FT_Size size,
FT_ULong size_index ); FT_ULong size_index );
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
typedef FT_Error
(*FT_Size_ResetPointsFunc)( FT_Size size,
FT_F26Dot6 char_width,
FT_F26Dot6 char_height,
FT_UInt horz_resolution,
FT_UInt vert_resolution );
typedef FT_Error
(*FT_Size_ResetPixelsFunc)( FT_Size size,
FT_UInt pixel_width,
FT_UInt pixel_height );
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
typedef FT_Error typedef FT_Error
(*FT_Slot_LoadFunc)( FT_GlyphSlot slot, (*FT_Slot_LoadFunc)( FT_GlyphSlot slot,
@ -125,15 +138,6 @@ FT_BEGIN_HEADER
/* */ /* */
/* done_slot :: The format-specific slot destructor. */ /* done_slot :: The format-specific slot destructor. */
/* */ /* */
/* request_size :: A handle to a function used to request the new */
/* character size. Can be set to 0 if the */
/* scaling done in the base layer suffices. */
/* */
/* select_size :: A handle to a function used to select a new */
/* fixed size. It is used only if */
/* @FT_FACE_FLAG_FIXED_SIZES is set. Can be set */
/* to 0 if the scaling done in the base layer */
/* suffices. */
/* */ /* */
/* load_glyph :: A function handle to load a glyph to a slot. */ /* load_glyph :: A function handle to load a glyph to a slot. */
/* This field is mandatory! */ /* This field is mandatory! */
@ -163,6 +167,15 @@ FT_BEGIN_HEADER
/* device-independent text layout without loading */ /* device-independent text layout without loading */
/* a single glyph image. */ /* a single glyph image. */
/* */ /* */
/* request_size :: A handle to a function used to request the new */
/* character size. Can be set to 0 if the */
/* scaling done in the base layer suffices. */
/* */
/* select_size :: A handle to a function used to select a new */
/* fixed size. It is used only if */
/* @FT_FACE_FLAG_FIXED_SIZES is set. Can be set */
/* to 0 if the scaling done in the base layer */
/* suffices. */
/* <Note> */ /* <Note> */
/* Most function pointers, with the exception of `load_glyph' and */ /* Most function pointers, with the exception of `load_glyph' and */
/* `get_char_index' can be set to 0 to indicate a default behaviour. */ /* `get_char_index' can be set to 0 to indicate a default behaviour. */
@ -184,8 +197,10 @@ FT_BEGIN_HEADER
FT_Slot_InitFunc init_slot; FT_Slot_InitFunc init_slot;
FT_Slot_DoneFunc done_slot; FT_Slot_DoneFunc done_slot;
FT_Size_RequestFunc request_size; #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_Size_SelectFunc select_size; FT_Size_ResetPointsFunc set_char_sizes;
FT_Size_ResetPixelsFunc set_pixel_sizes;
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
FT_Slot_LoadFunc load_glyph; FT_Slot_LoadFunc load_glyph;
@ -193,9 +208,33 @@ FT_BEGIN_HEADER
FT_Face_AttachFunc attach_file; FT_Face_AttachFunc attach_file;
FT_Face_GetAdvancesFunc get_advances; FT_Face_GetAdvancesFunc get_advances;
/* since FT 2.2. */
FT_Size_RequestFunc request_size;
FT_Size_SelectFunc select_size;
} FT_Driver_ClassRec, *FT_Driver_Class; } 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
*/
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_BASE( FT_Error )
ft_stub_set_char_sizes( FT_Size size,
FT_F26Dot6 width,
FT_F26Dot6 height,
FT_UInt horz_res,
FT_UInt vert_res );
FT_BASE( FT_Error )
ft_stub_set_pixel_sizes( FT_Size size,
FT_UInt width,
FT_UInt height );
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
FT_END_HEADER FT_END_HEADER
#endif /* __FTDRIVER_H__ */ #endif /* __FTDRIVER_H__ */

View File

@ -67,90 +67,90 @@ FT_BEGIN_HEADER
*/ */
FT_BASE( FT_Pointer ) FT_BASE( FT_Pointer )
FT_Alloc( FT_Memory memory, ft_mem_alloc( FT_Memory memory,
FT_Long size, FT_Long size,
FT_Error *p_error ); FT_Error *p_error );
FT_BASE( FT_Pointer ) FT_BASE( FT_Pointer )
FT_QAlloc( FT_Memory memory, ft_mem_qalloc( FT_Memory memory,
FT_Long size, FT_Long size,
FT_Error *p_error ); FT_Error *p_error );
FT_BASE( FT_Pointer ) FT_BASE( FT_Pointer )
FT_Realloc( FT_Memory memory, ft_mem_realloc( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void* block, void* block,
FT_Error *p_error ); FT_Error *p_error );
FT_BASE( FT_Pointer ) FT_BASE( FT_Pointer )
FT_QRealloc( FT_Memory memory, ft_mem_qrealloc( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void* block, void* block,
FT_Error *p_error ); FT_Error *p_error );
FT_BASE( void ) FT_BASE( void )
FT_Free( FT_Memory memory, ft_mem_free( FT_Memory memory,
const void* P ); const void* P );
#ifdef FT_DEBUG_MEMORY #ifdef FT_DEBUG_MEMORY
FT_BASE( FT_Pointer ) FT_BASE( FT_Pointer )
FT_Alloc_Debug( FT_Memory memory, ft_mem_alloc_debug( FT_Memory memory,
FT_Long size, FT_Long size,
FT_Error *p_error, FT_Error *p_error,
const char* file_name, const char* file_name,
FT_Long line_no ); FT_Long line_no );
FT_BASE( FT_Pointer ) FT_BASE( FT_Pointer )
FT_QAlloc_Debug( FT_Memory memory, ft_mem_qalloc_debug( FT_Memory memory,
FT_Long size, FT_Long size,
FT_Error *p_error, FT_Error *p_error,
const char* file_name, const char* file_name,
FT_Long line_no ); FT_Long line_no );
FT_BASE( FT_Pointer ) FT_BASE( FT_Pointer )
FT_Realloc_Debug( FT_Memory memory, ft_mem_realloc_debug( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void* P, void* P,
FT_Error *p_error, FT_Error *p_error,
const char* file_name, const char* file_name,
FT_Long line_no ); FT_Long line_no );
FT_BASE( FT_Pointer ) FT_BASE( FT_Pointer )
FT_QRealloc_Debug( FT_Memory memory, ft_mem_qrealloc_debug( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void* P, void* P,
FT_Error *p_error, FT_Error *p_error,
const char* file_name,
FT_Long line_no );
FT_BASE( void )
ft_mem_free_debug( FT_Memory memory,
const void *P,
const char* file_name, const char* file_name,
FT_Long line_no ); FT_Long line_no );
FT_BASE( void )
FT_Free_Debug( FT_Memory memory,
const void *P,
const char* file_name,
FT_Long line_no );
#define FT_MEM_ALLOC( _pointer_, _size_ ) \ #define FT_MEM_ALLOC( _pointer_, _size_ ) \
(_pointer_) = FT_Alloc_Debug( memory, _size_, &error, \ (_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_Realloc_Debug( memory, _current_, _size_, \ (_pointer_) = ft_mem_realloc_debug( memory, _current_, _size_, \
(_pointer_), &error, \ (_pointer_), &error, \
__FILE__, __LINE__ ) __FILE__, __LINE__ )
#define FT_MEM_QALLOC( _pointer_, _size_ ) \ #define FT_MEM_QALLOC( _pointer_, _size_ ) \
(_pointer_) = FT_QAlloc_Debug( memory, _size_, &error, \ (_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_QRealloc_Debug( memory, _current_, _size_, \ (_pointer_) = ft_mem_qrealloc_debug( memory, _current_, _size_, \
(_pointer_), &error, \ (_pointer_), &error, \
__FILE__, __LINE__ ) __FILE__, __LINE__ )
@ -158,7 +158,7 @@ FT_BEGIN_HEADER
FT_BEGIN_STMNT \ FT_BEGIN_STMNT \
if ( _pointer_ ) \ if ( _pointer_ ) \
{ \ { \
FT_Free_Debug( memory, (_pointer_), __FILE__, __LINE__ ); \ ft_mem_free_debug( memory, (_pointer_), __FILE__, __LINE__ ); \
(_pointer_) = NULL; \ (_pointer_) = NULL; \
} \ } \
FT_END_STMNT FT_END_STMNT
@ -168,26 +168,26 @@ FT_BEGIN_HEADER
#define FT_MEM_ALLOC( _pointer_, _size_ ) \ #define FT_MEM_ALLOC( _pointer_, _size_ ) \
(_pointer_) = FT_Alloc( memory, _size_, &error ) (_pointer_) = ft_mem_alloc( memory, _size_, &error )
#define FT_MEM_FREE( _pointer_ ) \ #define FT_MEM_FREE( _pointer_ ) \
FT_BEGIN_STMNT \ FT_BEGIN_STMNT \
if ( (_pointer_) ) \ if ( (_pointer_) ) \
{ \ { \
FT_Free( memory, (_pointer_) ); \ ft_mem_free( memory, (_pointer_) ); \
(_pointer_) = NULL; \ (_pointer_) = NULL; \
} \ } \
FT_END_STMNT FT_END_STMNT
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \ #define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
(_pointer_) = FT_Realloc( memory, _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_QAlloc( memory, _size_, &error ) (_pointer_) = ft_mem_qalloc( memory, _size_, &error )
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \ #define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
(_pointer_) = FT_QRealloc( memory, _current_, _size_, \ (_pointer_) = ft_mem_qrealloc( memory, _current_, _size_, \
(_pointer_), &error ) (_pointer_), &error )
#endif /* !FT_DEBUG_MEMORY */ #endif /* !FT_DEBUG_MEMORY */
@ -203,40 +203,40 @@ FT_BEGIN_HEADER
FT_BASE( FT_Error ) FT_BASE( FT_Error )
FT_Alloc_Debug( FT_Memory memory, ft_mem_alloc_debug( FT_Memory memory,
FT_Long size, FT_Long size,
void* *P, void* *P,
const char* file_name, const char* file_name,
FT_Long line_no ); FT_Long line_no );
FT_BASE( FT_Error ) FT_BASE( FT_Error )
FT_QAlloc_Debug( FT_Memory memory, ft_mem_qalloc_debug( FT_Memory memory,
FT_Long size, FT_Long size,
void* *P, void* *P,
const char* file_name, const char* file_name,
FT_Long line_no ); FT_Long line_no );
FT_BASE( FT_Error ) FT_BASE( FT_Error )
FT_Realloc_Debug( FT_Memory memory, ft_mem_realloc_debug( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void* *P, void* *P,
const char* file_name, const char* file_name,
FT_Long line_no ); FT_Long line_no );
FT_BASE( FT_Error ) FT_BASE( FT_Error )
FT_QRealloc_Debug( FT_Memory memory, ft_mem_qrealloc_debug( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void* *P, void* *P,
const char* file_name, const char* file_name,
FT_Long line_no ); FT_Long line_no );
FT_BASE( void ) FT_BASE( void )
FT_Free_Debug( FT_Memory memory, ft_mem_free_debug( FT_Memory memory,
FT_Pointer block, FT_Pointer block,
const char* file_name, const char* file_name,
FT_Long line_no ); FT_Long line_no );
#endif /* FT_DEBUG_MEMORY */ #endif /* FT_DEBUG_MEMORY */
@ -245,7 +245,7 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Function> */ /* <Function> */
/* FT_Alloc */ /* ft_mem_alloc */
/* */ /* */
/* <Description> */ /* <Description> */
/* Allocates a new block of memory. The returned area is always */ /* Allocates a new block of memory. The returned area is always */
@ -265,15 +265,15 @@ FT_BEGIN_HEADER
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_BASE( FT_Error ) FT_BASE( FT_Error )
FT_Alloc( FT_Memory memory, ft_mem_alloc( FT_Memory memory,
FT_Long size, FT_Long size,
void* *P ); void* *P );
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Function> */ /* <Function> */
/* FT_QAlloc */ /* ft_mem_qalloc */
/* */ /* */
/* <Description> */ /* <Description> */
/* Allocates a new block of memory. The returned area is *not* */ /* Allocates a new block of memory. The returned area is *not* */
@ -293,15 +293,15 @@ FT_BEGIN_HEADER
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_BASE( FT_Error ) FT_BASE( FT_Error )
FT_QAlloc( FT_Memory memory, ft_mem_qalloc( FT_Memory memory,
FT_Long size, FT_Long size,
void* *p ); void* *p );
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Function> */ /* <Function> */
/* FT_Realloc */ /* ft_mem_realloc */
/* */ /* */
/* <Description> */ /* <Description> */
/* Reallocates a block of memory pointed to by `*P' to `Size' bytes */ /* Reallocates a block of memory pointed to by `*P' to `Size' bytes */
@ -324,20 +324,20 @@ FT_BEGIN_HEADER
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
/* <Note> */ /* <Note> */
/* All callers of FT_Realloc() _must_ provide the current block size */ /* All callers of ft_mem_realloc() _must_ provide the current block */
/* as well as the new one. */ /* size as well as the new one. */
/* */ /* */
FT_BASE( FT_Error ) FT_BASE( FT_Error )
FT_Realloc( FT_Memory memory, ft_mem_realloc( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void* *P ); void* *P );
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Function> */ /* <Function> */
/* FT_QRealloc */ /* ft_mem_qrealloc */
/* */ /* */
/* <Description> */ /* <Description> */
/* Reallocates a block of memory pointed to by `*P' to `Size' bytes */ /* Reallocates a block of memory pointed to by `*P' to `Size' bytes */
@ -360,23 +360,23 @@ FT_BEGIN_HEADER
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
/* <Note> */ /* <Note> */
/* All callers of FT_Realloc() _must_ provide the current block size */ /* All callers of ft_mem_realloc() _must_ provide the current block */
/* as well as the new one. */ /* size as well as the new one. */
/* */ /* */
FT_BASE( FT_Error ) FT_BASE( FT_Error )
FT_QRealloc( FT_Memory memory, ft_mem_qrealloc( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void* *p ); void* *p );
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Function> */ /* <Function> */
/* FT_Free */ /* ft_mem_free */
/* */ /* */
/* <Description> */ /* <Description> */
/* Releases a given block of memory allocated through FT_Alloc(). */ /* Releases a given block of memory allocated through ft_mem_alloc(). */
/* */ /* */
/* <Input> */ /* <Input> */
/* memory :: A handle to a given `memory object' which handles */ /* memory :: A handle to a given `memory object' which handles */
@ -391,35 +391,35 @@ FT_BEGIN_HEADER
/* drivers. */ /* drivers. */
/* */ /* */
FT_BASE( void ) FT_BASE( void )
FT_Free( FT_Memory memory, ft_mem_free( FT_Memory memory,
void* *P ); void* *P );
#ifdef FT_DEBUG_MEMORY #ifdef FT_DEBUG_MEMORY
#define FT_MEM_ALLOC( _pointer_, _size_ ) \ #define FT_MEM_ALLOC( _pointer_, _size_ ) \
FT_Alloc_Debug( memory, _size_, \ ft_mem_alloc_debug( memory, _size_, \
(void**)(void*)&(_pointer_), \ (void**)(void*)&(_pointer_), \
__FILE__, __LINE__ ) __FILE__, __LINE__ )
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \ #define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
FT_Realloc_Debug( memory, _current_, _size_, \ ft_mem_realloc_debug( memory, _current_, _size_, \
(void**)(void*)&(_pointer_), \ (void**)(void*)&(_pointer_), \
__FILE__, __LINE__ ) __FILE__, __LINE__ )
#define FT_MEM_QALLOC( _pointer_, _size_ ) \ #define FT_MEM_QALLOC( _pointer_, _size_ ) \
FT_QAlloc_Debug( memory, _size_, \ ft_mem_qalloc_debug( memory, _size_, \
(void**)(void*)&(_pointer_), \ (void**)(void*)&(_pointer_), \
__FILE__, __LINE__ ) __FILE__, __LINE__ )
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \ #define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
FT_QRealloc_Debug( memory, _current_, _size_, \ ft_mem_qrealloc_debug( memory, _current_, _size_, \
(void**)(void*)&(_pointer_), \ (void**)(void*)&(_pointer_), \
__FILE__, __LINE__ ) __FILE__, __LINE__ )
#define FT_MEM_FREE( _pointer_ ) \ #define FT_MEM_FREE( _pointer_ ) \
FT_Free_Debug( memory, (void**)(void*)&(_pointer_), \ ft_mem_free_debug( memory, (void**)(void*)&(_pointer_), \
__FILE__, __LINE__ ) __FILE__, __LINE__ )
@ -427,23 +427,23 @@ FT_BEGIN_HEADER
#define FT_MEM_ALLOC( _pointer_, _size_ ) \ #define FT_MEM_ALLOC( _pointer_, _size_ ) \
FT_Alloc( memory, _size_, \ ft_mem_alloc( memory, _size_, \
(void**)(void*)&(_pointer_) ) (void**)(void*)&(_pointer_) )
#define FT_MEM_FREE( _pointer_ ) \ #define FT_MEM_FREE( _pointer_ ) \
FT_Free( memory, \ ft_mem_free( memory, \
(void**)(void*)&(_pointer_) ) (void**)(void*)&(_pointer_) )
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \ #define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
FT_Realloc( memory, _current_, _size_, \ ft_mem_realloc( memory, _current_, _size_, \
(void**)(void*)&(_pointer_) ) (void**)(void*)&(_pointer_) )
#define FT_MEM_QALLOC( _pointer_, _size_ ) \ #define FT_MEM_QALLOC( _pointer_, _size_ ) \
FT_QAlloc( memory, _size_, \ ft_mem_qalloc( memory, _size_, \
(void**)(void*)&(_pointer_) ) (void**)(void*)&(_pointer_) )
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \ #define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
FT_QRealloc( memory, _current_, _size_, \ ft_mem_qrealloc( memory, _current_, _size_, \
(void**)(void*)&(_pointer_) ) (void**)(void*)&(_pointer_) )
@ -580,6 +580,36 @@ FT_BEGIN_HEADER
(_new_) * sizeof ( _type_ ) ) (_new_) * sizeof ( _type_ ) )
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_BASE( FT_Error )
FT_Alloc( FT_Memory memory,
FT_Long size,
void* *P );
FT_BASE( FT_Error )
FT_QAlloc( FT_Memory memory,
FT_Long size,
void* *p );
FT_BASE( FT_Error )
FT_Realloc( FT_Memory memory,
FT_Long current,
FT_Long size,
void* *P );
FT_BASE( FT_Error )
FT_QRealloc( FT_Memory memory,
FT_Long current,
FT_Long size,
void* *p );
FT_BASE( void )
FT_Free( FT_Memory memory,
void* *P );
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/* */ /* */

View File

@ -213,6 +213,10 @@ FT_BEGIN_HEADER
/* */ /* */
typedef struct FT_Face_InternalRec_ typedef struct FT_Face_InternalRec_
{ {
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_UShort reserved1;
FT_Short reserved2;
#endif
FT_Matrix transform_matrix; FT_Matrix transform_matrix;
FT_Vector transform_delta; FT_Vector transform_delta;
FT_Int transform_flags; FT_Int transform_flags;

View File

@ -154,7 +154,7 @@ FT_BEGIN_HEADER
/* offsets :: */ /* offsets :: */
/* The stream offsets for the resource data specified by `tag'. */ /* The stream offsets for the resource data specified by `tag'. */
/* This array is allocated by the function, so you have to call */ /* This array is allocated by the function, so you have to call */
/* @FT_Free after use. */ /* @ft_mem_free after use. */
/* */ /* */
/* count :: */ /* count :: */
/* The length of offsets array. */ /* The length of offsets array. */

View File

@ -784,7 +784,6 @@ FT_BEGIN_HEADER
const PS_Parser_FuncsRec* ps_parser_funcs; const PS_Parser_FuncsRec* ps_parser_funcs;
const T1_Builder_FuncsRec* t1_builder_funcs; const T1_Builder_FuncsRec* t1_builder_funcs;
const T1_Decoder_FuncsRec* t1_decoder_funcs; const T1_Decoder_FuncsRec* t1_decoder_funcs;
const AFM_Parser_FuncsRec* afm_parser_funcs;
void void
(*t1_decrypt)( FT_Byte* buffer, (*t1_decrypt)( FT_Byte* buffer,
@ -793,6 +792,9 @@ FT_BEGIN_HEADER
T1_CMap_Classes t1_cmap_classes; T1_CMap_Classes t1_cmap_classes;
/* fields from here were added after 2.1.10 */
const AFM_Parser_FuncsRec* afm_parser_funcs;
} PSAux_ServiceRec, *PSAux_Service; } PSAux_ServiceRec, *PSAux_Service;
/* backwards-compatible type definition */ /* backwards-compatible type definition */

View File

@ -125,6 +125,75 @@ FT_BEGIN_HEADER
(*TT_Done_Face_Func)( TT_Face face ); (*TT_Done_Face_Func)( TT_Face face );
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/*************************************************************************/
/* */
/* <FuncType> */
/* TT_Load_SFNT_HeaderRec_Func */
/* */
/* <Description> */
/* Loads the header of a SFNT font file. Supports collections. */
/* */
/* <Input> */
/* face :: A handle to the target face object. */
/* */
/* stream :: The input stream. */
/* */
/* face_index :: The index of the TrueType font, if we are opening a */
/* collection. */
/* */
/* <Output> */
/* sfnt :: The SFNT header. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
/* The stream cursor must be at the font file's origin. */
/* */
/* This function recognizes fonts embedded in a `TrueType */
/* collection'. */
/* */
/* This function checks that the header is valid by looking at the */
/* values of `search_range', `entry_selector', and `range_shift'. */
/* */
typedef FT_Error
(*TT_Load_SFNT_HeaderRec_Func)( TT_Face face,
FT_Stream stream,
FT_Long face_index,
SFNT_Header sfnt );
/*************************************************************************/
/* */
/* <FuncType> */
/* TT_Load_Directory_Func */
/* */
/* <Description> */
/* Loads the table directory into a face object. */
/* */
/* <Input> */
/* face :: A handle to the target face object. */
/* */
/* stream :: The input stream. */
/* */
/* sfnt :: The SFNT header. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
/* The stream cursor must be on the first byte after the 4-byte font */
/* format tag. This is the case just after a call to */
/* TT_Load_Format_Tag(). */
/* */
typedef FT_Error
(*TT_Load_Directory_Func)( TT_Face face,
FT_Stream stream,
SFNT_Header sfnt );
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
@ -292,6 +361,85 @@ FT_BEGIN_HEADER
TT_SBit_MetricsRec *ametrics ); TT_SBit_MetricsRec *ametrics );
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/*************************************************************************/
/* */
/* <FuncType> */
/* TT_Set_SBit_Strike_OldFunc */
/* */
/* <Description> */
/* Select an sbit strike for a given size request. */
/* */
/* <Input> */
/* face :: The target face object. */
/* */
/* req :: The size request. */
/* */
/* <Output> */
/* astrike_index :: The index of the sbit strike. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. Returns an error if no */
/* sbit strike exists for the selected ppem values. */
/* */
typedef FT_Error
(*TT_Set_SBit_Strike_OldFunc)( TT_Face face,
FT_UInt x_ppem,
FT_UInt y_ppem,
FT_ULong* astrike_index );
/*************************************************************************/
/* */
/* <FuncType> */
/* TT_CharMap_Load_Func */
/* */
/* <Description> */
/* Loads a given TrueType character map into memory. */
/* */
/* <Input> */
/* face :: A handle to the parent face object. */
/* */
/* stream :: A handle to the current stream object. */
/* */
/* <InOut> */
/* cmap :: A pointer to a cmap object. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
/* <Note> */
/* The function assumes that the stream is already in use (i.e., */
/* opened). In case of error, all partially allocated tables are */
/* released. */
/* */
typedef FT_Error
(*TT_CharMap_Load_Func)( TT_Face face,
void* cmap,
FT_Stream input );
/*************************************************************************/
/* */
/* <FuncType> */
/* TT_CharMap_Free_Func */
/* */
/* <Description> */
/* Destroys a character mapping table. */
/* */
/* <Input> */
/* face :: A handle to the parent face object. */
/* */
/* cmap :: A handle to a cmap object. */
/* */
/* <Return> */
/* FreeType error code. 0 means success. */
/* */
typedef FT_Error
(*TT_CharMap_Free_Func)( TT_Face face,
void* cmap );
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
@ -503,50 +651,81 @@ FT_BEGIN_HEADER
FT_Module_Requester get_interface; FT_Module_Requester get_interface;
TT_Load_Any_Func load_any; TT_Load_Any_Func load_any;
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/* load the font directory, i.e., the offset table and */ TT_Load_SFNT_HeaderRec_Func load_sfnt_header;
/* the table directory */ TT_Load_Directory_Func load_directory;
TT_Load_Table_Func load_font_dir; #endif
/* these functions are called by `load_face' but they can also */ /* these functions are called by `load_face' but they can also */
/* be called from external modules, if there is a need to do so */ /* be called from external modules, if there is a need to do so */
TT_Load_Table_Func load_head; TT_Load_Table_Func load_head;
TT_Load_Metrics_Func load_hhea; TT_Load_Metrics_Func load_hhea;
TT_Load_Metrics_Func load_hmtx;
TT_Load_Table_Func load_cmap; TT_Load_Table_Func load_cmap;
TT_Load_Table_Func load_maxp; TT_Load_Table_Func load_maxp;
TT_Load_Table_Func load_os2; TT_Load_Table_Func load_os2;
TT_Load_Table_Func load_post; TT_Load_Table_Func load_post;
TT_Load_Table_Func load_name; TT_Load_Table_Func load_name;
TT_Free_Table_Func free_name; TT_Free_Table_Func free_name;
/* optional tables */ /* optional tables */
TT_Load_Table_Func load_kern; #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
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 */
TT_Load_Table_Func load_gasp; TT_Load_Table_Func load_gasp;
TT_Load_Table_Func load_pclt; TT_Load_Table_Func load_pclt;
/* see `ttload.h' */ /* see `ttload.h' */
TT_Load_Table_Func load_bhed; TT_Load_Table_Func load_bhed; /* a.k.a load_bitmap_header <= 2.1.10 */
/* see `ttsbit.h' */ /* see `ttsbit.h' */
TT_Load_Table_Func load_eblc; #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
TT_Free_Table_Func free_eblc; TT_Set_SBit_Strike_OldFunc set_sbit_strike_stub;
TT_Load_Table_Func load_sbits_stub;
#endif
TT_Set_SBit_Strike_Func set_sbit_strike;
TT_Load_Strike_Metrics_Func load_strike_metrics;
TT_Find_SBit_Image_Func find_sbit_image;
TT_Load_SBit_Metrics_Func load_sbit_metrics;
TT_Load_SBit_Image_Func load_sbit_image; TT_Load_SBit_Image_Func load_sbit_image;
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/* see `ttkern.h' */ TT_Free_Table_Func free_sbits_stub;
TT_Face_GetKerningFunc get_kerning; #endif
TT_Get_Metrics_Func get_metrics;
/* see `ttpost.h' */ /* see `ttpost.h' */
TT_Get_PS_Name_Func get_psname; TT_Get_PS_Name_Func get_psname;
TT_Free_Table_Func free_psnames; TT_Free_Table_Func free_psnames;
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS /* the following disappeared in 2.1.8, but were there before */
TT_CharMap_Load_Func load_charmap_stub;
TT_CharMap_Free_Func free_charmap_stub;
#endif
/* from here, the structure differs from 2.1.7 */
/* since FT 2.1.8, but appeared before '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 */
/* since FreeType 2.2 */
/* load the font directory, i.e., the offset table and */
/* the table directory */
TT_Load_Table_Func load_font_dir;
TT_Load_Metrics_Func load_hmtx;
TT_Load_Table_Func load_eblc;
TT_Free_Table_Func free_eblc;
TT_Set_SBit_Strike_Func set_sbit_strike;
TT_Load_Strike_Metrics_Func load_strike_metrics;
TT_Get_Metrics_Func get_metrics;
} SFNT_Interface; } SFNT_Interface;

View File

@ -200,7 +200,9 @@ FT_BEGIN_HEADER
const void* afm_data; const void* afm_data;
FT_CharMapRec charmaprecs[2]; FT_CharMapRec charmaprecs[2];
FT_CharMap charmaps[2]; FT_CharMap charmaps[2];
PS_UnicodesRec unicode_map; #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
PS_Unicodes unicode_map; /* apparently unused, keep for old internals */
#endif
/* support for Multiple Masters fonts */ /* support for Multiple Masters fonts */
PS_Blend blend; PS_Blend blend;
@ -218,13 +220,15 @@ FT_BEGIN_HEADER
void* psaux; void* psaux;
CID_FaceInfoRec cid; CID_FaceInfoRec cid;
void* afm_data; void* afm_data;
FT_Byte* binary_data; /* used if hex data has been converted */
FT_Stream cid_stream;
CID_Subrs subrs; CID_Subrs subrs;
/* since FT 2.1 - interface to PostScript hinter */ /* since FT 2.1 - interface to PostScript hinter */
void* pshinter; void* pshinter;
/* since FT 2.1.8, but was originally after 'afm_data' */
FT_Byte* binary_data; /* used if hex data has been converted */
FT_Stream cid_stream;
} CID_FaceRec; } CID_FaceRec;

View File

@ -311,7 +311,7 @@ FT_BEGIN_HEADER
} TT_GaspRec; } TT_GaspRec;
#ifndef FT_OPTIMIZE_MEMORY #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -389,7 +389,7 @@ FT_BEGIN_HEADER
} TT_Kern0_PairRec, *TT_Kern0_Pair; } TT_Kern0_PairRec, *TT_Kern0_Pair;
#endif /* !OPTIMIZE_MEMORY */ #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/*************************************************************************/ /*************************************************************************/
@ -1267,19 +1267,14 @@ FT_BEGIN_HEADER
TT_Header header; /* TrueType header table */ TT_Header header; /* TrueType header table */
TT_HoriHeader horizontal; /* TrueType horizontal header */ TT_HoriHeader horizontal; /* TrueType horizontal header */
#ifdef FT_OPTIMIZE_MEMORY
FT_Byte* horz_metrics;
FT_ULong horz_metrics_size;
#endif
TT_MaxProfile max_profile; TT_MaxProfile max_profile;
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_ULong max_components; /* stubbed to 0 */
#endif
FT_Bool vertical_info; FT_Bool vertical_info;
TT_VertHeader vertical; /* TT Vertical header, if present */ TT_VertHeader vertical; /* TT Vertical header, if present */
#ifdef FT_OPTIMIZE_MEMORY
FT_Byte* vert_metrics;
FT_ULong vert_metrics_size;
#endif
FT_UShort num_names; /* number of name records */ FT_UShort num_names; /* number of name records */
TT_NameTableRec name_table; /* name table */ TT_NameTableRec name_table; /* name table */
@ -1314,13 +1309,7 @@ FT_BEGIN_HEADER
/***********************************************************************/ /***********************************************************************/
/* horizontal device metrics */ /* horizontal device metrics */
#ifdef FT_OPTIMIZE_MEMORY #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_Byte* hdmx_table;
FT_ULong hdmx_table_size;
FT_UInt hdmx_record_count;
FT_ULong hdmx_record_size;
FT_Byte* hdmx_record_sizes;
#else
TT_HdmxRec hdmx; TT_HdmxRec hdmx;
#endif #endif
@ -1331,11 +1320,7 @@ FT_BEGIN_HEADER
TT_PCLT pclt; TT_PCLT pclt;
/* embedded bitmaps support */ /* embedded bitmaps support */
#ifdef FT_OPTIMIZE_MEMORY #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_Byte* sbit_table;
FT_ULong sbit_table_size;
FT_UInt sbit_num_strikes;
#else
FT_ULong num_sbit_strikes; FT_ULong num_sbit_strikes;
TT_SBit_Strike sbit_strikes; TT_SBit_Strike sbit_strikes;
#endif #endif
@ -1354,16 +1339,11 @@ FT_BEGIN_HEADER
/***********************************************************************/ /***********************************************************************/
/* the glyph locations */ /* the glyph locations */
#ifdef FT_OPTIMIZE_MEMORY #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_UInt num_locations; FT_UShort num_locations_stub;
FT_Byte* glyph_locations; FT_Long* glyph_locations_stub;
#else
FT_UShort num_locations;
FT_Long* glyph_locations;
#endif #endif
FT_ULong glyf_len;
/* the font program, if any */ /* the font program, if any */
FT_ULong font_program_size; FT_ULong font_program_size;
FT_Byte* font_program; FT_Byte* font_program;
@ -1376,13 +1356,7 @@ FT_BEGIN_HEADER
FT_ULong cvt_size; FT_ULong cvt_size;
FT_Short* cvt; FT_Short* cvt;
#ifdef FT_OPTIMIZE_MEMORY #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_Byte* kern_table;
FT_ULong kern_table_size;
FT_UInt num_kern_tables;
FT_UInt32 kern_avail_bits;
FT_UInt32 kern_order_bits;
#else
/* the format 0 kerning table, if any */ /* the format 0 kerning table, if any */
FT_Int num_kern_pairs; FT_Int num_kern_pairs;
FT_Int kern_table_index; FT_Int kern_table_index;
@ -1398,15 +1372,6 @@ FT_BEGIN_HEADER
FT_Bool unpatented_hinting; FT_Bool unpatented_hinting;
#endif #endif
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
FT_Bool doblend;
GX_Blend blend;
#endif
#ifdef TT_CONFIG_OPTION_BDF
TT_BDFRec bdf;
#endif /* TT_CONFIG_OPTION_BDF */
/***********************************************************************/ /***********************************************************************/
/* */ /* */
/* Other tables or fields. This is used by derivative formats like */ /* Other tables or fields. This is used by derivative formats like */
@ -1418,6 +1383,48 @@ FT_BEGIN_HEADER
const char* postscript_name; const char* postscript_name;
/* since FreeType 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' */
#ifdef TT_CONFIG_OPTION_GX_VAR_SUPPORT
FT_Bool doblend;
GX_Blend blend;
#endif
/* since FreeType 2.2 */
#ifdef FT_OPTIMIZE_MEMORY
FT_Byte* horz_metrics;
FT_ULong horz_metrics_size;
FT_Byte* vert_metrics;
FT_ULong vert_metrics_size;
FT_UInt num_locations;
FT_Byte* glyph_locations;
FT_Byte* hdmx_table;
FT_ULong hdmx_table_size;
FT_UInt hdmx_record_count;
FT_ULong hdmx_record_size;
FT_Byte* hdmx_record_sizes;
FT_Byte* sbit_table;
FT_ULong sbit_table_size;
FT_UInt sbit_num_strikes;
FT_Byte* kern_table;
FT_ULong kern_table_size;
FT_UInt num_kern_tables;
FT_UInt32 kern_avail_bits;
FT_UInt32 kern_order_bits;
#endif
#ifdef TT_CONFIG_OPTION_BDF
TT_BDFRec bdf;
#endif /* TT_CONFIG_OPTION_BDF */
} TT_FaceRec; } TT_FaceRec;
@ -1488,15 +1495,11 @@ FT_BEGIN_HEADER
FT_BBox bbox; FT_BBox bbox;
FT_Int left_bearing; FT_Int left_bearing;
FT_Int advance; FT_Int advance;
FT_Int top_bearing;
FT_Int vadvance;
FT_Int linear; FT_Int linear;
FT_Bool linear_def; FT_Bool linear_def;
FT_Bool preserve_pps; FT_Bool preserve_pps;
FT_Vector pp1; FT_Vector pp1;
FT_Vector pp2; FT_Vector pp2;
FT_Vector pp3;
FT_Vector pp4;
FT_ULong glyf_offset; FT_ULong glyf_offset;
@ -1511,6 +1514,12 @@ FT_BEGIN_HEADER
/* for possible extensibility in other formats */ /* for possible extensibility in other formats */
void* other; void* other;
/* since FT 2.1.8 */
FT_Int top_bearing;
FT_Int vadvance;
FT_Vector pp3;
FT_Vector pp4;
} TT_LoaderRec; } TT_LoaderRec;

View File

@ -99,7 +99,7 @@
} }
#if 0 #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
/* documentation is in ftcalc.h */ /* documentation is in ftcalc.h */
@ -130,7 +130,7 @@
return root; return root;
} }
#endif /* 0 */ #endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
#ifdef FT_LONG64 #ifdef FT_LONG64

View File

@ -891,7 +891,7 @@
FT_BASE_DEF( FT_Pointer ) FT_BASE_DEF( FT_Pointer )
FT_Alloc_Debug( FT_Memory memory, ft_mem_alloc_debug( FT_Memory memory,
FT_Long size, FT_Long size,
FT_Error *p_error, FT_Error *p_error,
const char* file_name, const char* file_name,
@ -906,12 +906,12 @@
table->line_no = line_no; table->line_no = line_no;
} }
return FT_Alloc( memory, size, p_error ); return ft_mem_alloc( memory, size, p_error );
} }
FT_BASE_DEF( FT_Pointer ) FT_BASE_DEF( FT_Pointer )
FT_Realloc_Debug( FT_Memory memory, ft_mem_realloc_debug( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void* block, void* block,
@ -928,12 +928,12 @@
table->line_no = line_no; table->line_no = line_no;
} }
return FT_Realloc( memory, current, size, block, p_error ); return ft_mem_realloc( memory, current, size, block, p_error );
} }
FT_BASE_DEF( FT_Pointer ) FT_BASE_DEF( FT_Pointer )
FT_QAlloc_Debug( FT_Memory memory, ft_mem_qalloc_debug( FT_Memory memory,
FT_Long size, FT_Long size,
FT_Error *p_error, FT_Error *p_error,
const char* file_name, const char* file_name,
@ -948,12 +948,12 @@
table->line_no = line_no; table->line_no = line_no;
} }
return FT_QAlloc( memory, size, p_error ); return ft_mem_qalloc( memory, size, p_error );
} }
FT_BASE_DEF( FT_Pointer ) FT_BASE_DEF( FT_Pointer )
FT_QRealloc_Debug( FT_Memory memory, ft_mem_qrealloc_debug( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void* block, void* block,
@ -970,12 +970,12 @@
table->line_no = line_no; table->line_no = line_no;
} }
return FT_QRealloc( memory, current, size, block, p_error ); return ft_mem_qrealloc( memory, current, size, block, p_error );
} }
FT_BASE_DEF( void ) FT_BASE_DEF( void )
FT_Free_Debug( FT_Memory memory, ft_mem_free_debug( FT_Memory memory,
const void *P, const void *P,
const char* file_name, const char* file_name,
FT_Long line_no ) FT_Long line_no )
@ -989,7 +989,7 @@
table->line_no = line_no; table->line_no = line_no;
} }
FT_Free( memory, (void *)P ); ft_mem_free( memory, (void *)P );
} }
@ -997,7 +997,7 @@
FT_BASE_DEF( FT_Error ) FT_BASE_DEF( FT_Error )
FT_Alloc_Debug( FT_Memory memory, ft_mem_alloc_debug( FT_Memory memory,
FT_Long size, FT_Long size,
void* *P, void* *P,
const char* file_name, const char* file_name,
@ -1012,12 +1012,12 @@
table->line_no = line_no; table->line_no = line_no;
} }
return FT_Alloc( memory, size, P ); return ft_mem_alloc( memory, size, P );
} }
FT_BASE_DEF( FT_Error ) FT_BASE_DEF( FT_Error )
FT_Realloc_Debug( FT_Memory memory, ft_mem_realloc_debug( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void* *P, void* *P,
@ -1033,12 +1033,12 @@
table->line_no = line_no; table->line_no = line_no;
} }
return FT_Realloc( memory, current, size, P ); return ft_mem_realloc( memory, current, size, P );
} }
FT_BASE_DEF( FT_Error ) FT_BASE_DEF( FT_Error )
FT_QAlloc_Debug( FT_Memory memory, ft_mem_qalloc_debug( FT_Memory memory,
FT_Long size, FT_Long size,
void* *P, void* *P,
const char* file_name, const char* file_name,
@ -1053,12 +1053,12 @@
table->line_no = line_no; table->line_no = line_no;
} }
return FT_QAlloc( memory, size, P ); return ft_mem_qalloc( memory, size, P );
} }
FT_BASE_DEF( FT_Error ) FT_BASE_DEF( FT_Error )
FT_QRealloc_Debug( FT_Memory memory, ft_mem_qrealloc_debug( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void* *P, void* *P,
@ -1074,12 +1074,12 @@
table->line_no = line_no; table->line_no = line_no;
} }
return FT_QRealloc( memory, current, size, P ); return ft_mem_qrealloc( memory, current, size, P );
} }
FT_BASE_DEF( void ) FT_BASE_DEF( void )
FT_Free_Debug( FT_Memory memory, ft_mem_free_debug( FT_Memory memory,
FT_Pointer block, FT_Pointer block,
const char* file_name, const char* file_name,
FT_Long line_no ) FT_Long line_no )
@ -1093,7 +1093,7 @@
table->line_no = line_no; table->line_no = line_no;
} }
FT_Free( memory, (void **)block ); ft_mem_free( memory, (void **)block );
} }

View File

@ -1734,7 +1734,7 @@
{ {
FT_Int i; FT_Int i;
for ( i = 0; i < face->num_fixed_sizes; i++ ) for ( i = 0; i < face->num_fixed_sizes; i++ )
{ {
FT_Bitmap_Size* bsize = face->available_sizes + i; FT_Bitmap_Size* bsize = face->available_sizes + i;
@ -3674,5 +3674,61 @@
library->debug_hooks[hook_index] = debug_hook; 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,
FT_F26Dot6 height,
FT_UInt horz_res,
FT_UInt vert_res )
{
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;
req.height = height;
if ( horz_res == 0 )
horz_res = vert_res;
if ( vert_res == 0 )
vert_res = horz_res;
if ( horz_res == 0 )
horz_res = vert_res = 72;
req.horiResolution = horz_res;
req.vertResolution = vert_res;
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_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.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 */ /* END */

View File

@ -46,7 +46,7 @@
/* */ /* */
/* It is not necessary to do any error checking for the */ /* It is not necessary to do any error checking for the */
/* allocation-related functions. This will be done by the higher level */ /* allocation-related functions. This will be done by the higher level */
/* routines like FT_Alloc() or FT_Realloc(). */ /* routines like ft_mem_alloc() or ft_mem_realloc(). */
/* */ /* */
/*************************************************************************/ /*************************************************************************/

View File

@ -50,13 +50,13 @@
FT_BASE_DEF( FT_Pointer ) FT_BASE_DEF( FT_Pointer )
FT_Alloc( FT_Memory memory, ft_mem_alloc( FT_Memory memory,
FT_Long size, FT_Long size,
FT_Error *p_error ) FT_Error *p_error )
{ {
FT_Error error = FT_Err_Ok; FT_Error error = FT_Err_Ok;
FT_Pointer block = NULL; FT_Pointer block = NULL;
if ( size > 0 ) if ( size > 0 )
{ {
@ -70,16 +70,16 @@
*p_error = error; *p_error = error;
return block; return block;
} }
FT_BASE_DEF( FT_Pointer ) FT_BASE_DEF( FT_Pointer )
FT_QAlloc( FT_Memory memory, ft_mem_qalloc( FT_Memory memory,
FT_Long size, FT_Long size,
FT_Error *p_error ) FT_Error *p_error )
{ {
FT_Error error = FT_Err_Ok; FT_Error error = FT_Err_Ok;
FT_Pointer block = NULL; FT_Pointer block = NULL;
if ( size > 0 ) if ( size > 0 )
{ {
@ -91,28 +91,28 @@
*p_error = error; *p_error = error;
return block; return block;
} }
FT_BASE_DEF( FT_Pointer ) FT_BASE_DEF( FT_Pointer )
FT_Realloc( FT_Memory memory, ft_mem_realloc( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void* block, void* block,
FT_Error *p_error ) FT_Error *p_error )
{ {
FT_Error error = FT_Err_Ok; FT_Error error = FT_Err_Ok;
if ( size <= 0 ) if ( size <= 0 )
{ {
FT_Free( memory, block ); ft_mem_free( memory, block );
block = NULL; block = NULL;
} }
else if ( current <= 0 ) else if ( current <= 0 )
{ {
FT_ASSERT( block == NULL ); FT_ASSERT( block == NULL );
block = FT_Alloc( memory, size, &error ); block = ft_mem_alloc( memory, size, &error );
} }
else else
{ {
@ -133,28 +133,28 @@
*p_error = error; *p_error = error;
return block; return block;
} }
FT_BASE_DEF( FT_Pointer ) FT_BASE_DEF( FT_Pointer )
FT_QRealloc( FT_Memory memory, ft_mem_qrealloc( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void* block, void* block,
FT_Error *p_error ) FT_Error *p_error )
{ {
FT_Error error = FT_Err_Ok; FT_Error error = FT_Err_Ok;
if ( size <= 0 ) if ( size <= 0 )
{ {
FT_Free( memory, block ); ft_mem_free( memory, block );
block = NULL; block = NULL;
} }
else if ( current <= 0 ) else if ( current <= 0 )
{ {
FT_ASSERT( block == NULL ); FT_ASSERT( block == NULL );
block = FT_QAlloc( memory, size, &error ); block = ft_mem_qalloc( memory, size, &error );
} }
else else
{ {
@ -170,15 +170,15 @@
*p_error = error; *p_error = error;
return block; return block;
} }
FT_BASE_DEF( void ) FT_BASE_DEF( void )
FT_Free( FT_Memory memory, ft_mem_free( FT_Memory memory,
const void *P ) const void *P )
{ {
if ( P ) if ( P )
memory->free( memory, (void*)P ); memory->free( memory, (void*)P );
} }
#else /* !FT_STRICT_ALIASING */ #else /* !FT_STRICT_ALIASING */
@ -187,7 +187,7 @@
/* documentation is in ftmemory.h */ /* documentation is in ftmemory.h */
FT_BASE_DEF( FT_Error ) FT_BASE_DEF( FT_Error )
FT_Alloc( FT_Memory memory, ft_mem_alloc( FT_Memory memory,
FT_Long size, FT_Long size,
void* *P ) void* *P )
{ {
@ -198,7 +198,7 @@
*P = memory->alloc( memory, size ); *P = memory->alloc( memory, size );
if ( !*P ) if ( !*P )
{ {
FT_ERROR(( "FT_Alloc:" )); FT_ERROR(( "ft_mem_alloc:" ));
FT_ERROR(( " Out of memory? (%ld requested)\n", FT_ERROR(( " Out of memory? (%ld requested)\n",
size )); size ));
@ -209,7 +209,7 @@
else else
*P = NULL; *P = NULL;
FT_TRACE7(( "FT_Alloc:" )); FT_TRACE7(( "ft_mem_alloc:" ));
FT_TRACE7(( " size = %ld, block = 0x%08p, ref = 0x%08p\n", FT_TRACE7(( " size = %ld, block = 0x%08p, ref = 0x%08p\n",
size, *P, P )); size, *P, P ));
@ -220,7 +220,7 @@
/* documentation is in ftmemory.h */ /* documentation is in ftmemory.h */
FT_BASE_DEF( FT_Error ) FT_BASE_DEF( FT_Error )
FT_QAlloc( FT_Memory memory, ft_mem_qalloc( FT_Memory memory,
FT_Long size, FT_Long size,
void* *P ) void* *P )
{ {
@ -231,7 +231,7 @@
*P = memory->alloc( memory, size ); *P = memory->alloc( memory, size );
if ( !*P ) if ( !*P )
{ {
FT_ERROR(( "FT_QAlloc:" )); FT_ERROR(( "ft_mem_qalloc:" ));
FT_ERROR(( " Out of memory? (%ld requested)\n", FT_ERROR(( " Out of memory? (%ld requested)\n",
size )); size ));
@ -241,7 +241,7 @@
else else
*P = NULL; *P = NULL;
FT_TRACE7(( "FT_QAlloc:" )); FT_TRACE7(( "ft_mem_qalloc:" ));
FT_TRACE7(( " size = %ld, block = 0x%08p, ref = 0x%08p\n", FT_TRACE7(( " size = %ld, block = 0x%08p, ref = 0x%08p\n",
size, *P, P )); size, *P, P ));
@ -252,7 +252,7 @@
/* documentation is in ftmemory.h */ /* documentation is in ftmemory.h */
FT_BASE_DEF( FT_Error ) FT_BASE_DEF( FT_Error )
FT_Realloc( FT_Memory memory, ft_mem_realloc( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void** P ) void** P )
@ -262,14 +262,14 @@
FT_ASSERT( P != 0 ); FT_ASSERT( P != 0 );
/* if the original pointer is NULL, call FT_Alloc() */ /* if the original pointer is NULL, call ft_mem_alloc() */
if ( !*P ) if ( !*P )
return FT_Alloc( memory, size, P ); return ft_mem_alloc( memory, size, P );
/* if the new block if zero-sized, clear the current one */ /* if the new block if zero-sized, clear the current one */
if ( size <= 0 ) if ( size <= 0 )
{ {
FT_Free( memory, P ); ft_mem_free( memory, P );
return FT_Err_Ok; return FT_Err_Ok;
} }
@ -284,7 +284,7 @@
return FT_Err_Ok; return FT_Err_Ok;
Fail: Fail:
FT_ERROR(( "FT_Realloc:" )); FT_ERROR(( "ft_mem_realloc:" ));
FT_ERROR(( " Failed (current %ld, requested %ld)\n", FT_ERROR(( " Failed (current %ld, requested %ld)\n",
current, size )); current, size ));
return FT_Err_Out_Of_Memory; return FT_Err_Out_Of_Memory;
@ -294,7 +294,7 @@
/* documentation is in ftmemory.h */ /* documentation is in ftmemory.h */
FT_BASE_DEF( FT_Error ) FT_BASE_DEF( FT_Error )
FT_QRealloc( FT_Memory memory, ft_mem_qrealloc( FT_Memory memory,
FT_Long current, FT_Long current,
FT_Long size, FT_Long size,
void** P ) void** P )
@ -304,14 +304,14 @@
FT_ASSERT( P != 0 ); FT_ASSERT( P != 0 );
/* if the original pointer is NULL, call FT_QAlloc() */ /* if the original pointer is NULL, call ft_mem_qalloc() */
if ( !*P ) if ( !*P )
return FT_QAlloc( memory, size, P ); return ft_mem_qalloc( memory, size, P );
/* if the new block if zero-sized, clear the current one */ /* if the new block if zero-sized, clear the current one */
if ( size <= 0 ) if ( size <= 0 )
{ {
FT_Free( memory, P ); ft_mem_free( memory, P );
return FT_Err_Ok; return FT_Err_Ok;
} }
@ -323,7 +323,7 @@
return FT_Err_Ok; return FT_Err_Ok;
Fail: Fail:
FT_ERROR(( "FT_QRealloc:" )); FT_ERROR(( "ft_mem_qrealloc:" ));
FT_ERROR(( " Failed (current %ld, requested %ld)\n", FT_ERROR(( " Failed (current %ld, requested %ld)\n",
current, size )); current, size ));
return FT_Err_Out_Of_Memory; return FT_Err_Out_Of_Memory;
@ -333,10 +333,10 @@
/* documentation is in ftmemory.h */ /* documentation is in ftmemory.h */
FT_BASE_DEF( void ) FT_BASE_DEF( void )
FT_Free( FT_Memory memory, ft_mem_free( FT_Memory memory,
void** P ) void** P )
{ {
FT_TRACE7(( "FT_Free:" )); FT_TRACE7(( "ft_mem_free:" ));
FT_TRACE7(( " Freeing block 0x%08p, ref 0x%08p\n", FT_TRACE7(( " Freeing block 0x%08p, ref 0x%08p\n",
P, P ? *P : (void*)0 )); P, P ? *P : (void*)0 ));
@ -561,5 +561,66 @@
return value; return value;
} }
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_BASE_DEF( FT_Error )
FT_Alloc( FT_Memory memory,
FT_Long size,
void* *P )
{
FT_Error error;
(void)FT_ALLOC( *P, size );
return error;
}
FT_BASE_DEF( FT_Error )
FT_QAlloc( FT_Memory memory,
FT_Long size,
void* *p )
{
FT_Error error;
(void)FT_QALLOC( *p, size );
return error;
}
FT_BASE_DEF( FT_Error )
FT_Realloc( FT_Memory memory,
FT_Long current,
FT_Long size,
void* *P )
{
FT_Error error;
(void)FT_REALLOC( *P, current, size );
return error;
}
FT_BASE_DEF( FT_Error )
FT_QRealloc( FT_Memory memory,
FT_Long current,
FT_Long size,
void* *p )
{
FT_Error error;
(void)FT_QREALLOC( *p, current, size );
return error;
}
FT_BASE_DEF( void )
FT_Free( FT_Memory memory,
void* *P )
{
if ( *P )
{
ft_mem_free( memory, *P );
*P = NULL;
}
}
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/* END */ /* END */

View File

@ -251,7 +251,7 @@ THE SOFTWARE.
{ {
if ( FT_ALLOC( face->style_name, ft_strlen( "Regular" ) + 1 ) ) if ( FT_ALLOC( face->style_name, ft_strlen( "Regular" ) + 1 ) )
return error; return error;
ft_strcpy( face->style_name, "Regular" ); ft_strcpy( face->style_name, "Regular" );
} }
else else
@ -475,7 +475,7 @@ THE SOFTWARE.
(face->en_table[n]).enc = cur[n].encoding; (face->en_table[n]).enc = cur[n].encoding;
FT_TRACE4(( "idx %d, val 0x%lX\n", n, cur[n].encoding )); FT_TRACE4(( "idx %d, val 0x%lX\n", n, cur[n].encoding ));
(face->en_table[n]).glyph = (FT_Short)n; (face->en_table[n]).glyph = (FT_Short)n;
if ( cur[n].encoding == font->default_char ) if ( cur[n].encoding == font->default_char )
face->default_glyph = n; face->default_glyph = n;
} }
@ -639,6 +639,7 @@ THE SOFTWARE.
} }
FT_CALLBACK_DEF( FT_Error ) FT_CALLBACK_DEF( FT_Error )
BDF_Glyph_Load( FT_GlyphSlot slot, BDF_Glyph_Load( FT_GlyphSlot slot,
FT_Size size, FT_Size size,
@ -704,7 +705,7 @@ THE SOFTWARE.
slot->metrics.width = bitmap->width << 6; slot->metrics.width = bitmap->width << 6;
slot->metrics.height = bitmap->rows << 6; slot->metrics.height = bitmap->rows << 6;
/* /*
* XXX DWIDTH1 and VVECTOR should be parsed and * XXX DWIDTH1 and VVECTOR should be parsed and
* used here, provided such fonts do exist. * used here, provided such fonts do exist.
*/ */
@ -837,14 +838,18 @@ THE SOFTWARE.
0, /* FT_Slot_InitFunc */ 0, /* FT_Slot_InitFunc */
0, /* FT_Slot_DoneFunc */ 0, /* FT_Slot_DoneFunc */
BDF_Size_Request, #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
BDF_Size_Select, ft_stub_set_char_sizes,
ft_stub_set_pixel_sizes,
#endif
BDF_Glyph_Load, BDF_Glyph_Load,
0, /* FT_Face_GetKerningFunc */ 0, /* FT_Face_GetKerningFunc */
0, /* FT_Face_AttachFunc */ 0, /* FT_Face_AttachFunc */
0, /* FT_Face_GetAdvancesFunc */ 0, /* FT_Face_GetAdvancesFunc */
BDF_Size_Request,
BDF_Size_Select
}; };

View File

@ -256,7 +256,7 @@
/* remove a node from the cache manager */ /* remove a node from the cache manager */
FT_LOCAL_DEF( void ) FT_BASE_DEF( void )
ftc_node_destroy( FTC_Node node, ftc_node_destroy( FTC_Node node,
FTC_Manager manager ) FTC_Manager manager )
{ {

View File

@ -79,11 +79,11 @@
FT_LOCAL( void ) FT_LOCAL( void )
ftc_cache_done( FTC_Cache cache ); ftc_cache_done( FTC_Cache cache );
#ifndef FT_CONFIG_OPTION_OLD_INTERNALS
FT_LOCAL( void ) FT_LOCAL( void )
ftc_node_destroy( FTC_Node node, ftc_node_destroy( FTC_Node node,
FTC_Manager manager ); FTC_Manager manager );
#endif
#endif /* __FTCCBACK_H__ */ #endif /* __FTCCBACK_H__ */

1
src/cache/ftccmap.c vendored
View File

@ -300,4 +300,5 @@
} }
/* END */ /* END */

43
src/cache/ftcmanag.c vendored
View File

@ -677,5 +677,48 @@
node->ref_count--; node->ref_count--;
} }
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_EXPORT_DEF( FT_Error )
FTC_Manager_Lookup_Face( FTC_Manager manager,
FTC_FaceID face_id,
FT_Face *aface )
{
return FTC_Manager_LookupFace( manager, face_id, aface );
}
FT_EXPORT( FT_Error )
FTC_Manager_Lookup_Size( FTC_Manager manager,
FTC_Font font,
FT_Face *aface,
FT_Size *asize )
{
FTC_ScalerRec scaler;
FT_Error error;
FT_Size size;
scaler.face_id = font->face_id;
scaler.width = font->pix_width;
scaler.height = font->pix_height;
scaler.pixel = TRUE;
scaler.x_res = 0;
scaler.y_res = 0;
error = FTC_Manager_LookupSize( manager, &scaler, &size );
if ( error )
{
*aface = NULL;
*asize = NULL;
}
else
{
*aface = size->face;
*asize = size;
}
return error;
}
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
/* END */ /* END */

View File

@ -313,8 +313,8 @@
/* /*
* TT CMAP INFO * TT CMAP INFO
* *
* If the charmap is a synthetic Unicode encoding cmap or * If the charmap is a synthetic Unicode encoding cmap or
* a Type 1 standard (or expert) encoding cmap, hide TT CMAP INFO * a Type 1 standard (or expert) encoding cmap, hide TT CMAP INFO
* service defined in SFNT module. * service defined in SFNT module.
* *
* Otherwise call the service function in the sfnt module. * Otherwise call the service function in the sfnt module.
@ -330,7 +330,7 @@
cmap_info->language = 0; cmap_info->language = 0;
if ( cmap->clazz != &cff_cmap_encoding_class_rec && if ( cmap->clazz != &cff_cmap_encoding_class_rec &&
cmap->clazz != &cff_cmap_unicode_class_rec ) cmap->clazz != &cff_cmap_unicode_class_rec )
{ {
FT_Face face = FT_CMAP_FACE( cmap ); FT_Face face = FT_CMAP_FACE( cmap );
@ -433,19 +433,24 @@
cff_slot_init, cff_slot_init,
cff_slot_done, cff_slot_done,
cff_size_request, #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
ft_stub_set_char_sizes,
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS ft_stub_set_pixel_sizes,
cff_size_select, #endif
#else
0, /* FT_Size_SelectFunc */
#endif
Load_Glyph, Load_Glyph,
cff_get_kerning, cff_get_kerning,
0, /* FT_Face_AttachFunc */ 0, /* FT_Face_AttachFunc */
0 /* FT_Face_GetAdvancesFunc */ 0, /* FT_Face_GetAdvancesFunc */
cff_size_request,
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
cff_size_select
#else
0 /* FT_Size_SelectFunc */
#endif
}; };

View File

@ -143,15 +143,20 @@
cid_slot_init, cid_slot_init,
cid_slot_done, cid_slot_done,
cid_size_request, #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
0, /* FT_Size_SelectFunc */ ft_stub_set_char_sizes,
ft_stub_set_pixel_sizes,
#endif
cid_slot_load_glyph, cid_slot_load_glyph,
0, /* FT_Face_GetKerningFunc */ 0, /* FT_Face_GetKerningFunc */
0, /* FT_Face_AttachFunc */ 0, /* FT_Face_AttachFunc */
0 /* FT_Face_GetAdvancesFunc */ 0, /* FT_Face_GetAdvancesFunc */
cid_size_request,
0 /* FT_Size_SelectFunc */
}; };

View File

@ -643,14 +643,18 @@ THE SOFTWARE.
0, /* FT_Slot_InitFunc */ 0, /* FT_Slot_InitFunc */
0, /* FT_Slot_DoneFunc */ 0, /* FT_Slot_DoneFunc */
PCF_Size_Request, #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
PCF_Size_Select, ft_stub_set_char_sizes,
ft_stub_set_pixel_sizes,
#endif
PCF_Glyph_Load, PCF_Glyph_Load,
0, /* FT_Face_GetKerningFunc */ 0, /* FT_Face_GetKerningFunc */
0, /* FT_Face_AttachFunc */ 0, /* FT_Face_AttachFunc */
0 /* FT_Face_GetAdvancesFunc */ 0, /* FT_Face_GetAdvancesFunc */
PCF_Size_Request,
PCF_Size_Select
}; };

View File

@ -190,13 +190,17 @@
pfr_slot_init, pfr_slot_init,
pfr_slot_done, pfr_slot_done,
0, /* FT_Size_RequestFunc */ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
0, /* FT_Size_SelectFunc */ ft_stub_set_char_sizes,
ft_stub_set_pixel_sizes,
#endif
pfr_slot_load, pfr_slot_load,
pfr_get_kerning, pfr_get_kerning,
0, /* FT_Face_AttachFunc */ 0, /* FT_Face_AttachFunc */
0 /* FT_Face_GetAdvancesFunc */ 0, /* FT_Face_GetAdvancesFunc */
0, /* FT_Size_RequestFunc */
0, /* FT_Size_SelectFunc */
}; };

View File

@ -107,15 +107,15 @@
&ps_parser_funcs, &ps_parser_funcs,
&t1_builder_funcs, &t1_builder_funcs,
&t1_decoder_funcs, &t1_decoder_funcs,
t1_decrypt,
(const T1_CMap_ClassesRec*) &t1_cmap_classes,
#ifndef T1_CONFIG_OPTION_NO_AFM #ifndef T1_CONFIG_OPTION_NO_AFM
&afm_parser_funcs, &afm_parser_funcs,
#else #else
0, 0,
#endif #endif
t1_decrypt,
(const T1_CMap_ClassesRec*) &t1_cmap_classes,
}; };

View File

@ -312,7 +312,7 @@
/* XXX: I don't know whether this is correct, since /* XXX: I don't know whether this is correct, since
* tt_face_find_bdf_prop only returns something correct if we have * tt_face_find_bdf_prop only returns something correct if we have
* previously selected a size that is listed in the BDF table. * previously selected a size that is listed in the BDF table.
* Should we change the BDF table format to include single offsets * Should we change the BDF table format to include single offsets
* for `CHARSET_REGISTRY' and `CHARSET_ENCODING'? * for `CHARSET_REGISTRY' and `CHARSET_ENCODING'?
*/ */
@ -376,6 +376,112 @@
} }
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
FT_CALLBACK_DEF( FT_Error )
tt_face_load_sfnt_header_stub( TT_Face face,
FT_Stream stream,
FT_Long face_index,
SFNT_Header header )
{
FT_UNUSED( face );
FT_UNUSED( stream );
FT_UNUSED( face_index );
FT_UNUSED( header );
return FT_Err_Unimplemented_Feature;
}
FT_CALLBACK_DEF( FT_Error )
tt_face_load_directory_stub( TT_Face face,
FT_Stream stream,
SFNT_Header header )
{
FT_UNUSED( face );
FT_UNUSED( stream );
FT_UNUSED( header );
return FT_Err_Unimplemented_Feature;
}
FT_CALLBACK_DEF( FT_Error )
tt_face_load_hdmx_stub( TT_Face face,
FT_Stream stream )
{
FT_UNUSED( face );
FT_UNUSED( stream );
return FT_Err_Unimplemented_Feature;
}
FT_CALLBACK_DEF( void )
tt_face_free_hdmx_stub( TT_Face face )
{
FT_UNUSED( face );
}
FT_CALLBACK_DEF( FT_Error )
tt_face_set_sbit_strike_stub( TT_Face face,
FT_UInt x_ppem,
FT_UInt y_ppem,
FT_ULong* astrike_index )
{
FT_UNUSED( face );
FT_UNUSED( x_ppem );
FT_UNUSED( y_ppem );
*astrike_index = 0x7FFFFFFFUL;
return FT_Err_Unimplemented_Feature;
}
FT_CALLBACK_DEF( FT_Error )
tt_face_load_sbit_stub( TT_Face face,
FT_Stream stream )
{
FT_UNUSED( face );
FT_UNUSED( stream );
return FT_Err_Unimplemented_Feature;
}
FT_CALLBACK_DEF( void )
tt_face_free_sbit_stub( TT_Face face )
{
FT_UNUSED( face );
}
FT_CALLBACK_DEF( FT_Error )
tt_face_load_charmap_stub( TT_Face face,
void* cmap,
FT_Stream input )
{
FT_UNUSED( face );
FT_UNUSED( cmap );
FT_UNUSED( input );
return FT_Err_Unimplemented_Feature;
}
FT_CALLBACK_DEF( FT_Error )
tt_face_free_charmap_stub( TT_Face face,
void* cmap )
{
FT_UNUSED( face );
FT_UNUSED( cmap );
return 0;
}
#endif /* FT_CONFIG_OPTION_OLD_INTERNALS */
static static
const SFNT_Interface sfnt_interface = const SFNT_Interface sfnt_interface =
{ {
@ -387,11 +493,14 @@
sfnt_get_interface, sfnt_get_interface,
tt_face_load_any, tt_face_load_any,
tt_face_load_font_dir,
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
tt_face_load_sfnt_header_stub,
tt_face_load_directory_stub,
#endif
tt_face_load_head, tt_face_load_head,
tt_face_load_hhea, tt_face_load_hhea,
tt_face_load_hmtx,
tt_face_load_cmap, tt_face_load_cmap,
tt_face_load_maxp, tt_face_load_maxp,
tt_face_load_os2, tt_face_load_os2,
@ -400,62 +509,82 @@
tt_face_load_name, tt_face_load_name,
tt_face_free_name, tt_face_free_name,
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
tt_face_load_hdmx_stub,
tt_face_free_hdmx_stub,
#endif
tt_face_load_kern, tt_face_load_kern,
tt_face_load_gasp, tt_face_load_gasp,
tt_face_load_pclt, tt_face_load_pclt,
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS #ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
/* see `ttload.h' */ /* see `ttload.h' */
tt_face_load_bhed, tt_face_load_bhed,
#else
0,
#endif
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
tt_face_set_sbit_strike_stub,
tt_face_load_sbit_stub,
#endif
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
tt_face_load_sbit_image,
#else /* !TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
0,
#endif /* !TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
tt_face_free_sbit_stub,
#endif
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
/* see `ttpost.h' */
tt_face_get_ps_name,
tt_face_free_ps_names,
#else /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
0,
0,
#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
tt_face_load_charmap_stub,
tt_face_free_charmap_stub,
#endif
/* since FT 2.1.8 */
tt_face_get_kerning,
# ifndef FT_OPTIMIZE_MEMORY
tt_find_sbit_image,
tt_load_sbit_metrics,
# else
0,
0,
# endif
/* since FT 2.2 */
tt_face_load_font_dir,
tt_face_load_hmtx,
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
/* see `ttsbit.h' and `sfnt.h' */ /* see `ttsbit.h' and `sfnt.h' */
tt_face_load_eblc, tt_face_load_eblc,
tt_face_free_eblc, tt_face_free_eblc,
tt_face_set_sbit_strike, tt_face_set_sbit_strike,
tt_face_load_strike_metrics, tt_face_load_strike_metrics,
#ifdef FT_OPTIMIZE_MEMORY
0,
0,
#else #else
tt_find_sbit_image,
tt_load_sbit_metrics,
#endif
tt_face_load_sbit_image,
#else /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */
0,
0,
0,
0,
0, 0,
0, 0,
0, 0,
0, 0,
#endif
#endif /* TT_CONFIG_OPTION_EMBEDDED_BITMAPS */ tt_face_get_metrics
/* see `ttkern.h' */
tt_face_get_kerning,
tt_face_get_metrics,
#ifdef TT_CONFIG_OPTION_POSTSCRIPT_NAMES
/* see `ttpost.h' */
tt_face_get_ps_name,
tt_face_free_ps_names,
#else /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
0,
0,
#endif /* TT_CONFIG_OPTION_POSTSCRIPT_NAMES */
}; };

View File

@ -113,7 +113,7 @@
if ( sfnt ) if ( sfnt )
kerning->x = sfnt->get_kerning( face, left_glyph, right_glyph ); kerning->x = sfnt->get_kerning( face, left_glyph, right_glyph );
return 0; return 0;
} }
@ -365,18 +365,22 @@
tt_slot_init, tt_slot_init,
0, /* FT_Slot_DoneFunc */ 0, /* FT_Slot_DoneFunc */
tt_size_request, #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS ft_stub_set_char_sizes,
tt_size_select, ft_stub_set_pixel_sizes,
#else #endif
0, /* FT_Size_SelectFunc */
#endif
Load_Glyph, Load_Glyph,
tt_get_kerning, tt_get_kerning,
0, /* FT_Face_AttachFunc */ 0, /* FT_Face_AttachFunc */
0 /* FT_Face_GetAdvancesFunc */ 0, /* FT_Face_GetAdvancesFunc */
tt_size_request,
#ifdef TT_CONFIG_OPTION_EMBEDDED_BITMAPS
tt_size_select
#else
0 /* FT_Size_SelectFunc */
#endif
}; };

View File

@ -306,8 +306,10 @@
(FT_Slot_InitFunc) T1_GlyphSlot_Init, (FT_Slot_InitFunc) T1_GlyphSlot_Init,
(FT_Slot_DoneFunc) T1_GlyphSlot_Done, (FT_Slot_DoneFunc) T1_GlyphSlot_Done,
(FT_Size_RequestFunc) T1_Size_Request, #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
(FT_Size_SelectFunc) 0, ft_stub_set_char_sizes,
ft_stub_set_pixel_sizes,
#endif
(FT_Slot_LoadFunc) T1_Load_Glyph, (FT_Slot_LoadFunc) T1_Load_Glyph,
#ifdef T1_CONFIG_OPTION_NO_AFM #ifdef T1_CONFIG_OPTION_NO_AFM
@ -317,7 +319,9 @@
(FT_Face_GetKerningFunc) Get_Kerning, (FT_Face_GetKerningFunc) Get_Kerning,
(FT_Face_AttachFunc) T1_Read_Metrics, (FT_Face_AttachFunc) T1_Read_Metrics,
#endif #endif
(FT_Face_GetAdvancesFunc) 0 (FT_Face_GetAdvancesFunc) 0,
(FT_Size_RequestFunc) T1_Size_Request,
(FT_Size_SelectFunc) 0
}; };

View File

@ -115,8 +115,8 @@
FT_Size_Request req ) FT_Size_Request req )
{ {
PSH_Globals_Funcs funcs = T1_Size_Get_Globals_Funcs( size ); PSH_Globals_Funcs funcs = T1_Size_Get_Globals_Funcs( size );
FT_Request_Metrics( size->root.face, req ); FT_Request_Metrics( size->root.face, req );
if ( funcs ) if ( funcs )
@ -240,8 +240,11 @@
#endif #endif
/* release unicode map, if any */ /* release unicode map, if any */
FT_FREE( face->unicode_map.maps ); #if 0
face->unicode_map.num_maps = 0; FT_FREE( face->unicode_map_rec.maps );
face->unicode_map_rec.num_maps = 0;
face->unicode_map = NULL;
#endif
face->root.family_name = 0; face->root.family_name = 0;
face->root.style_name = 0; face->root.style_name = 0;

View File

@ -229,14 +229,18 @@
(FT_Slot_InitFunc) T42_GlyphSlot_Init, (FT_Slot_InitFunc) T42_GlyphSlot_Init,
(FT_Slot_DoneFunc) T42_GlyphSlot_Done, (FT_Slot_DoneFunc) T42_GlyphSlot_Done,
(FT_Size_RequestFunc) T42_Size_Request, #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
(FT_Size_SelectFunc) T42_Size_Select, ft_stub_set_char_sizes,
ft_stub_set_pixel_sizes,
#endif
(FT_Slot_LoadFunc) T42_GlyphSlot_Load, (FT_Slot_LoadFunc) T42_GlyphSlot_Load,
(FT_Face_GetKerningFunc) 0, (FT_Face_GetKerningFunc) 0,
(FT_Face_AttachFunc) 0, (FT_Face_AttachFunc) 0,
(FT_Face_GetAdvancesFunc) 0 (FT_Face_GetAdvancesFunc) 0,
(FT_Size_RequestFunc) T42_Size_Request,
(FT_Size_SelectFunc) T42_Size_Select
}; };

View File

@ -479,7 +479,7 @@
bsize->y_ppem = FT_MulDiv( bsize->size, y_res, 72 ); bsize->y_ppem = FT_MulDiv( bsize->size, y_res, 72 );
bsize->y_ppem = FT_PIX_ROUND( bsize->y_ppem ); bsize->y_ppem = FT_PIX_ROUND( bsize->y_ppem );
/* /*
* this reads: * this reads:
* *
* the nominal height is larger than the bbox's height * the nominal height is larger than the bbox's height
@ -801,13 +801,18 @@
(FT_Slot_InitFunc) 0, (FT_Slot_InitFunc) 0,
(FT_Slot_DoneFunc) 0, (FT_Slot_DoneFunc) 0,
(FT_Size_RequestFunc) FNT_Size_Request, #ifdef FT_CONFIG_OPTION_OLD_INTERNALS
(FT_Size_SelectFunc) FNT_Size_Select, ft_stub_set_char_sizes,
ft_stub_set_pixel_sizes,
#endif
(FT_Slot_LoadFunc) FNT_Load_Glyph, (FT_Slot_LoadFunc) FNT_Load_Glyph,
(FT_Face_GetKerningFunc) 0, (FT_Face_GetKerningFunc) 0,
(FT_Face_AttachFunc) 0, (FT_Face_AttachFunc) 0,
(FT_Face_GetAdvancesFunc) 0 (FT_Face_GetAdvancesFunc) 0,
(FT_Size_RequestFunc) FNT_Size_Request,
(FT_Size_SelectFunc) FNT_Size_Select
}; };