formatting

This commit is contained in:
Werner Lemberg 2001-06-28 07:17:51 +00:00
parent 52005c3042
commit 4a2305cf0c
39 changed files with 1447 additions and 1295 deletions

View File

@ -17,7 +17,7 @@
#include <ft2build.h> #include <ft2build.h>
/* we use our special ftconfig.h file, not the standard one */ /* we use our special ftconfig.h file, not the standard one */
#include <ftconfig.h> #include <ftconfig.h>
#include FT_INTERNAL_DEBUG_H #include FT_INTERNAL_DEBUG_H
#include FT_SYSTEM_H #include FT_SYSTEM_H
@ -48,8 +48,9 @@
#else #else
extern extern
#endif #endif
int munmap( char* addr, int
int len ); munmap( char* addr,
int len );
#define MUNMAP_ARG_CAST char * #define MUNMAP_ARG_CAST char *

View File

@ -48,8 +48,9 @@
#else #else
extern extern
#endif #endif
int munmap( char* addr, int
int len ); munmap( char* addr,
int len );
#define MUNMAP_ARG_CAST char * #define MUNMAP_ARG_CAST char *

View File

@ -825,7 +825,7 @@ FT_BEGIN_HEADER
/* A bit-field constant, used to indicate that the font contains */ /* A bit-field constant, used to indicate that the font contains */
/* glyph names that can be retrieved through FT_Get_Glyph_Name(). */ /* glyph names that can be retrieved through FT_Get_Glyph_Name(). */
/* */ /* */
#define FT_FACE_FLAG_GLYPH_NAMES 0x200 #define FT_FACE_FLAG_GLYPH_NAMES 0x200
/*************************************************************************/ /*************************************************************************/
@ -838,7 +838,7 @@ FT_BEGIN_HEADER
/* a face's stream was provided by the client application and should */ /* a face's stream was provided by the client application and should */
/* not be destroyed by FT_Done_Face(). */ /* not be destroyed by FT_Done_Face(). */
/* */ /* */
#define FT_FACE_FLAG_EXTERNAL_STREAM 0x4000 #define FT_FACE_FLAG_EXTERNAL_STREAM 0x4000
/* */ /* */
@ -1330,7 +1330,8 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Init_FreeType( FT_Library *alibrary ); FT_EXPORT( FT_Error )
FT_Init_FreeType( FT_Library *alibrary );
/*************************************************************************/ /*************************************************************************/
@ -1348,7 +1349,8 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Done_FreeType( FT_Library library ); FT_EXPORT( FT_Error )
FT_Done_FreeType( FT_Library library );
/*************************************************************************/ /*************************************************************************/
@ -1505,10 +1507,11 @@ FT_BEGIN_HEADER
/* `aface'. Its return value should be 0 if the font format is */ /* `aface'. Its return value should be 0 if the font format is */
/* recognized, or non-zero if not. */ /* recognized, or non-zero if not. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_New_Face( FT_Library library, FT_EXPORT( FT_Error )
const char* filepathname, FT_New_Face( FT_Library library,
FT_Long face_index, const char* filepathname,
FT_Face *aface ); FT_Long face_index,
FT_Face *aface );
/*************************************************************************/ /*************************************************************************/
@ -1552,11 +1555,12 @@ FT_BEGIN_HEADER
/* `aface'. Its return value should be 0 if the font format is */ /* `aface'. Its return value should be 0 if the font format is */
/* recognized, or non-zero if not. */ /* recognized, or non-zero if not. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_New_Memory_Face( FT_Library library, FT_EXPORT( FT_Error )
const FT_Byte* file_base, FT_New_Memory_Face( FT_Library library,
FT_Long file_size, const FT_Byte* file_base,
FT_Long face_index, FT_Long file_size,
FT_Face *aface ); FT_Long face_index,
FT_Face *aface );
/*************************************************************************/ /*************************************************************************/
@ -1595,10 +1599,11 @@ FT_BEGIN_HEADER
/* `*face'. Its return value should be 0 if the font format is */ /* `*face'. Its return value should be 0 if the font format is */
/* recognized, or non-zero if not. */ /* recognized, or non-zero if not. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Open_Face( FT_Library library, FT_EXPORT( FT_Error )
FT_Open_Args* args, FT_Open_Face( FT_Library library,
FT_Long face_index, FT_Open_Args* args,
FT_Face *aface ); FT_Long face_index,
FT_Face *aface );
/*************************************************************************/ /*************************************************************************/
@ -1633,8 +1638,9 @@ FT_BEGIN_HEADER
/* when invoking this function. Most drivers simply do not implement */ /* when invoking this function. Most drivers simply do not implement */
/* file attachments. */ /* file attachments. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Attach_File( FT_Face face, FT_EXPORT( FT_Error )
const char* filepathname ); FT_Attach_File( FT_Face face,
const char* filepathname );
/*************************************************************************/ /*************************************************************************/
@ -1664,8 +1670,9 @@ FT_BEGIN_HEADER
/* when invoking this function. Most drivers simply do not implement */ /* when invoking this function. Most drivers simply do not implement */
/* file attachments. */ /* file attachments. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Attach_Stream( FT_Face face, FT_EXPORT( FT_Error )
FT_Open_Args* parameters ); FT_Attach_Stream( FT_Face face,
FT_Open_Args* parameters );
/*************************************************************************/ /*************************************************************************/
@ -1683,7 +1690,8 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Done_Face( FT_Face face ); FT_EXPORT( FT_Error )
FT_Done_Face( FT_Face face );
/*************************************************************************/ /*************************************************************************/
@ -1720,11 +1728,12 @@ FT_BEGIN_HEADER
/* When dealing with fixed-size faces (i.e., non-scalable formats), */ /* When dealing with fixed-size faces (i.e., non-scalable formats), */
/* use the function FT_Set_Pixel_Sizes(). */ /* use the function FT_Set_Pixel_Sizes(). */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Set_Char_Size( FT_Face face, FT_EXPORT( FT_Error )
FT_F26Dot6 char_width, FT_Set_Char_Size( FT_Face face,
FT_F26Dot6 char_height, FT_F26Dot6 char_width,
FT_UInt horz_resolution, FT_F26Dot6 char_height,
FT_UInt vert_resolution ); FT_UInt horz_resolution,
FT_UInt vert_resolution );
/*************************************************************************/ /*************************************************************************/
@ -1766,9 +1775,10 @@ FT_BEGIN_HEADER
/* guarantee in any way that you will get glyph bitmaps that all fit */ /* guarantee in any way that you will get glyph bitmaps that all fit */
/* within an 8x8 cell (sometimes even far from it). */ /* within an 8x8 cell (sometimes even far from it). */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Set_Pixel_Sizes( FT_Face face, FT_EXPORT( FT_Error )
FT_UInt pixel_width, FT_Set_Pixel_Sizes( FT_Face face,
FT_UInt pixel_height ); FT_UInt pixel_width,
FT_UInt pixel_height );
/*************************************************************************/ /*************************************************************************/
@ -1805,9 +1815,10 @@ FT_BEGIN_HEADER
/* Note that this also transforms the `face.glyph.advance' field, but */ /* Note that this also transforms the `face.glyph.advance' field, but */
/* *not* the values in `face.glyph.metrics'. */ /* *not* the values in `face.glyph.metrics'. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Load_Glyph( FT_Face face, FT_EXPORT( FT_Error )
FT_UInt glyph_index, FT_Load_Glyph( FT_Face face,
FT_Int load_flags ); FT_UInt glyph_index,
FT_Int load_flags );
/*************************************************************************/ /*************************************************************************/
@ -1849,9 +1860,10 @@ FT_BEGIN_HEADER
/* Note that this also transforms the `face.glyph.advance' field, but */ /* Note that this also transforms the `face.glyph.advance' field, but */
/* *not* the values in `face.glyph.metrics'. */ /* *not* the values in `face.glyph.metrics'. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Load_Char( FT_Face face, FT_EXPORT( FT_Error )
FT_ULong char_code, FT_Load_Char( FT_Face face,
FT_Int load_flags ); FT_ULong char_code,
FT_Int load_flags );
/*************************************************************************/ /*************************************************************************/
@ -2018,7 +2030,7 @@ FT_BEGIN_HEADER
/* the glyph loader should not try to transform the loaded glyph */ /* the glyph loader should not try to transform the loaded glyph */
/* image. */ /* image. */
/* */ /* */
#define FT_LOAD_IGNORE_TRANSFORM 2048 #define FT_LOAD_IGNORE_TRANSFORM 2048
/*************************************************************************/ /*************************************************************************/
@ -2045,7 +2057,7 @@ FT_BEGIN_HEADER
/* the function should return the linearly scaled metrics expressed */ /* the function should return the linearly scaled metrics expressed */
/* in original font units, instead of the default 16.16 pixel values. */ /* in original font units, instead of the default 16.16 pixel values. */
/* */ /* */
#define FT_LOAD_LINEAR_DESIGN 8192 #define FT_LOAD_LINEAR_DESIGN 8192
/*************************************************************************/ /*************************************************************************/
@ -2087,9 +2099,10 @@ FT_BEGIN_HEADER
/* the transformation and is performed on the character size given in */ /* the transformation and is performed on the character size given in */
/* the last call to FT_Set_Char_Sizes() or FT_Set_Pixel_Sizes(). */ /* the last call to FT_Set_Char_Sizes() or FT_Set_Pixel_Sizes(). */
/* */ /* */
FT_EXPORT( void ) FT_Set_Transform( FT_Face face, FT_EXPORT( void )
FT_Matrix* matrix, FT_Set_Transform( FT_Face face,
FT_Vector* delta ); FT_Matrix* matrix,
FT_Vector* delta );
/*************************************************************************/ /*************************************************************************/
@ -2149,8 +2162,9 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Render_Glyph( FT_GlyphSlot slot, FT_EXPORT( FT_Error )
FT_UInt render_mode ); FT_Render_Glyph( FT_GlyphSlot slot,
FT_UInt render_mode );
/*************************************************************************/ /*************************************************************************/
@ -2214,11 +2228,12 @@ FT_BEGIN_HEADER
/* kernings, are out of the scope of this API function -- they can be */ /* kernings, are out of the scope of this API function -- they can be */
/* implemented through format-specific interfaces. */ /* implemented through format-specific interfaces. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Get_Kerning( FT_Face face, FT_EXPORT( FT_Error )
FT_UInt left_glyph, FT_Get_Kerning( FT_Face face,
FT_UInt right_glyph, FT_UInt left_glyph,
FT_UInt kern_mode, FT_UInt right_glyph,
FT_Vector *akerning ); FT_UInt kern_mode,
FT_Vector *akerning );
/*************************************************************************/ /*************************************************************************/
@ -2257,10 +2272,11 @@ FT_BEGIN_HEADER
/* macro FT_CONFIG_OPTION_NO_GLYPH_NAMES is defined in */ /* macro FT_CONFIG_OPTION_NO_GLYPH_NAMES is defined in */
/* `include/freetype/config/ftoptions.h' */ /* `include/freetype/config/ftoptions.h' */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Get_Glyph_Name( FT_Face face, FT_EXPORT( FT_Error )
FT_UInt glyph_index, FT_Get_Glyph_Name( FT_Face face,
FT_Pointer buffer, FT_UInt glyph_index,
FT_UInt buffer_max ); FT_Pointer buffer,
FT_UInt buffer_max );
/*************************************************************************/ /*************************************************************************/
@ -2285,8 +2301,9 @@ FT_BEGIN_HEADER
/* This function will return an error if no charmap in the face */ /* This function will return an error if no charmap in the face */
/* corresponds to the encoding queried here. */ /* corresponds to the encoding queried here. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Select_Charmap( FT_Face face, FT_EXPORT( FT_Error )
FT_Encoding encoding ); FT_Select_Charmap( FT_Face face,
FT_Encoding encoding );
/*************************************************************************/ /*************************************************************************/
@ -2312,8 +2329,9 @@ FT_BEGIN_HEADER
/* the face (i.e., if it is not listed in the face->charmaps[] */ /* the face (i.e., if it is not listed in the face->charmaps[] */
/* table). */ /* table). */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Set_Charmap( FT_Face face, FT_EXPORT( FT_Error )
FT_CharMap charmap ); FT_Set_Charmap( FT_Face face,
FT_CharMap charmap );
/*************************************************************************/ /*************************************************************************/
@ -2333,8 +2351,9 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* The glyph index. 0 means `undefined character code'. */ /* The glyph index. 0 means `undefined character code'. */
/* */ /* */
FT_EXPORT( FT_UInt ) FT_Get_Char_Index( FT_Face face, FT_EXPORT( FT_UInt )
FT_ULong charcode ); FT_Get_Char_Index( FT_Face face,
FT_ULong charcode );
/*************************************************************************/ /*************************************************************************/
@ -2389,9 +2408,10 @@ FT_BEGIN_HEADER
/* divide by zero; it simply returns `MaxInt' or `MinInt' depending */ /* divide by zero; it simply returns `MaxInt' or `MinInt' depending */
/* on the signs of `a' and `b'. */ /* on the signs of `a' and `b'. */
/* */ /* */
FT_EXPORT( FT_Long ) FT_MulDiv( FT_Long a, FT_EXPORT( FT_Long )
FT_Long b, FT_MulDiv( FT_Long a,
FT_Long c ); FT_Long b,
FT_Long c );
/*************************************************************************/ /*************************************************************************/
@ -2423,8 +2443,9 @@ FT_BEGIN_HEADER
/* _second_ argument of this function; this can make a great */ /* _second_ argument of this function; this can make a great */
/* difference. */ /* difference. */
/* */ /* */
FT_EXPORT( FT_Long ) FT_MulFix( FT_Long a, FT_EXPORT( FT_Long )
FT_Long b ); FT_MulFix( FT_Long a,
FT_Long b );
/*************************************************************************/ /*************************************************************************/
@ -2450,8 +2471,9 @@ FT_BEGIN_HEADER
/* 32 bits, then the division is computed directly. Otherwise, we */ /* 32 bits, then the division is computed directly. Otherwise, we */
/* use a specialized version of the old FT_MulDiv64(). */ /* use a specialized version of the old FT_MulDiv64(). */
/* */ /* */
FT_EXPORT( FT_Long ) FT_DivFix( FT_Long a, FT_EXPORT( FT_Long )
FT_Long b ); FT_DivFix( FT_Long a,
FT_Long b );
/*************************************************************************/ /*************************************************************************/
@ -2468,7 +2490,8 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* The result of `(a + 0x8000) & -0x10000'. */ /* The result of `(a + 0x8000) & -0x10000'. */
/* */ /* */
FT_EXPORT( FT_Fixed ) FT_RoundFix( FT_Fixed a ); FT_EXPORT( FT_Fixed )
FT_RoundFix( FT_Fixed a );
/*************************************************************************/ /*************************************************************************/
@ -2486,7 +2509,8 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* The result of `(a + 0x10000 - 1) & -0x10000'. */ /* The result of `(a + 0x10000 - 1) & -0x10000'. */
/* */ /* */
FT_EXPORT( FT_Fixed ) FT_CeilFix( FT_Fixed a ); FT_EXPORT( FT_Fixed )
FT_CeilFix( FT_Fixed a );
/*************************************************************************/ /*************************************************************************/
@ -2504,7 +2528,8 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* The result of `a & -0x10000'. */ /* The result of `a & -0x10000'. */
/* */ /* */
FT_EXPORT( FT_Fixed ) FT_FloorFix( FT_Fixed a ); FT_EXPORT( FT_Fixed )
FT_FloorFix( FT_Fixed a );
/*************************************************************************/ /*************************************************************************/
@ -2524,8 +2549,9 @@ FT_BEGIN_HEADER
/* <Note> */ /* <Note> */
/* The result is undefined if either `vector' or `matrix' is invalid. */ /* The result is undefined if either `vector' or `matrix' is invalid. */
/* */ /* */
FT_EXPORT( void ) FT_Vector_Transform( FT_Vector* vec, FT_EXPORT( void )
FT_Matrix* matrix ); FT_Vector_Transform( FT_Vector* vec,
FT_Matrix* matrix );
/* */ /* */

View File

@ -67,8 +67,9 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Outline_Get_BBox( FT_Outline* outline, FT_EXPORT( FT_Error )
FT_BBox *abbox ); FT_Outline_Get_BBox( FT_Outline* outline,
FT_BBox *abbox );
/* */ /* */

View File

@ -110,10 +110,11 @@ FT_BEGIN_HEADER
/* face object, like creating a new FT_Size for it, or setting a */ /* face object, like creating a new FT_Size for it, or setting a */
/* transformation through FT_Set_Transform()! */ /* transformation through FT_Set_Transform()! */
/* */ /* */
typedef FT_Error (*FTC_Face_Requester)( FTC_FaceID face_id, typedef FT_Error
FT_Library library, (*FTC_Face_Requester)( FTC_FaceID face_id,
FT_Pointer request_data, FT_Library library,
FT_Face* aface ); FT_Pointer request_data,
FT_Face* aface );
/*************************************************************************/ /*************************************************************************/
@ -209,13 +210,14 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FTC_Manager_New( FT_Library library, FT_EXPORT( FT_Error )
FT_UInt max_faces, FTC_Manager_New( FT_Library library,
FT_UInt max_sizes, FT_UInt max_faces,
FT_ULong max_bytes, FT_UInt max_sizes,
FTC_Face_Requester requester, FT_ULong max_bytes,
FT_Pointer req_data, FTC_Face_Requester requester,
FTC_Manager *amanager ); FT_Pointer req_data,
FTC_Manager *amanager );
/*************************************************************************/ /*************************************************************************/
@ -230,7 +232,8 @@ FT_BEGIN_HEADER
/* <InOut> */ /* <InOut> */
/* manager :: A handle to the manager. */ /* manager :: A handle to the manager. */
/* */ /* */
FT_EXPORT( void ) FTC_Manager_Reset( FTC_Manager manager ); FT_EXPORT( void )
FTC_Manager_Reset( FTC_Manager manager );
/*************************************************************************/ /*************************************************************************/
@ -244,7 +247,8 @@ FT_BEGIN_HEADER
/* <Input> */ /* <Input> */
/* manager :: A handle to the target cache manager object. */ /* manager :: A handle to the target cache manager object. */
/* */ /* */
FT_EXPORT( void ) FTC_Manager_Done( FTC_Manager manager ); FT_EXPORT( void )
FTC_Manager_Done( FTC_Manager manager );
/*************************************************************************/ /*************************************************************************/
@ -279,9 +283,10 @@ FT_BEGIN_HEADER
/* the FT_Set_Transform() function) on a returned face! If you need */ /* the FT_Set_Transform() function) on a returned face! If you need */
/* to transform glyphs, do it yourself after glyph loading. */ /* to transform glyphs, do it yourself after glyph loading. */
/* */ /* */
FT_EXPORT( FT_Error ) FTC_Manager_Lookup_Face( FTC_Manager manager, FT_EXPORT( FT_Error )
FTC_FaceID face_id, FTC_Manager_Lookup_Face( FTC_Manager manager,
FT_Face *aface ); FTC_FaceID face_id,
FT_Face *aface );
/*************************************************************************/ /*************************************************************************/
@ -323,10 +328,11 @@ FT_BEGIN_HEADER
/* The returned size object is the face's current size, which means */ /* The returned size object is the face's current size, which means */
/* that you can call FT_Load_Glyph() with the face if you need to. */ /* that you can call FT_Load_Glyph() with the face if you need to. */
/* */ /* */
FT_EXPORT( FT_Error ) FTC_Manager_Lookup_Size( FTC_Manager manager, FT_EXPORT( FT_Error )
FTC_Font font, FTC_Manager_Lookup_Size( FTC_Manager manager,
FT_Face *aface, FTC_Font font,
FT_Size *asize ); FT_Face *aface,
FT_Size *asize );
/* a cache class is used to describe a unique cache type to the manager */ /* a cache class is used to describe a unique cache type to the manager */
@ -335,10 +341,10 @@ FT_BEGIN_HEADER
/* this must be used internally for the moment */ /* this must be used internally for the moment */
FT_EXPORT( FT_Error ) FTC_Manager_Register_Cache( FT_EXPORT( FT_Error )
FTC_Manager manager, FTC_Manager_Register_Cache( FTC_Manager manager,
FTC_Cache_Class* clazz, FTC_Cache_Class* clazz,
FTC_Cache *acache ); FTC_Cache *acache );
/* */ /* */

View File

@ -182,8 +182,9 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Get_Glyph( FT_GlyphSlot slot, FT_EXPORT( FT_Error )
FT_Glyph *aglyph ); FT_Get_Glyph( FT_GlyphSlot slot,
FT_Glyph *aglyph );
/*************************************************************************/ /*************************************************************************/
@ -204,8 +205,9 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Glyph_Copy( FT_Glyph source, FT_EXPORT( FT_Error )
FT_Glyph *target ); FT_Glyph_Copy( FT_Glyph source,
FT_Glyph *target );
/*************************************************************************/ /*************************************************************************/
@ -233,9 +235,10 @@ FT_BEGIN_HEADER
/* The 2x2 transformation matrix is also applied to the glyph's */ /* The 2x2 transformation matrix is also applied to the glyph's */
/* advance vector. */ /* advance vector. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Glyph_Transform( FT_Glyph glyph, FT_EXPORT( FT_Error )
FT_Matrix* matrix, FT_Glyph_Transform( FT_Glyph glyph,
FT_Vector* delta ); FT_Matrix* matrix,
FT_Vector* delta );
/* */ /* */
@ -311,9 +314,10 @@ FT_BEGIN_HEADER
}; };
FT_EXPORT( void ) FT_Glyph_Get_CBox( FT_Glyph glyph, FT_EXPORT( void )
FT_UInt bbox_mode, FT_Glyph_Get_CBox( FT_Glyph glyph,
FT_BBox *acbox ); FT_UInt bbox_mode,
FT_BBox *acbox );
/*************************************************************************/ /*************************************************************************/
@ -387,10 +391,11 @@ FT_BEGIN_HEADER
/* This function will always fail if the glyph's format isn't */ /* This function will always fail if the glyph's format isn't */
/* scalable. */ /* scalable. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Glyph_To_Bitmap( FT_Glyph* the_glyph, FT_EXPORT( FT_Error )
FT_ULong render_mode, FT_Glyph_To_Bitmap( FT_Glyph* the_glyph,
FT_Vector* origin, FT_ULong render_mode,
FT_Bool destroy ); FT_Vector* origin,
FT_Bool destroy );
/*************************************************************************/ /*************************************************************************/
@ -404,7 +409,8 @@ FT_BEGIN_HEADER
/* <Input> */ /* <Input> */
/* glyph :: A handle to the target glyph object. */ /* glyph :: A handle to the target glyph object. */
/* */ /* */
FT_EXPORT( void ) FT_Done_Glyph( FT_Glyph glyph ); FT_EXPORT( void )
FT_Done_Glyph( FT_Glyph glyph );
/* other helpful functions */ /* other helpful functions */
@ -434,8 +440,9 @@ FT_BEGIN_HEADER
/* <Note> */ /* <Note> */
/* The result is undefined if either `a' or `b' is zero. */ /* The result is undefined if either `a' or `b' is zero. */
/* */ /* */
FT_EXPORT( void ) FT_Matrix_Multiply( FT_Matrix* a, FT_EXPORT( void )
FT_Matrix* b ); FT_Matrix_Multiply( FT_Matrix* a,
FT_Matrix* b );
/*************************************************************************/ /*************************************************************************/
@ -453,7 +460,8 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Matrix_Invert( FT_Matrix* matrix ); FT_EXPORT( FT_Error )
FT_Matrix_Invert( FT_Matrix* matrix );
/* */ /* */

View File

@ -424,8 +424,9 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* Error code. 0 means success. */ /* Error code. 0 means success. */
/* */ /* */
typedef int (*FT_Outline_MoveTo_Func)( FT_Vector* to, typedef int
void* user ); (*FT_Outline_MoveTo_Func)( FT_Vector* to,
void* user );
/*************************************************************************/ /*************************************************************************/
@ -448,8 +449,9 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* Error code. 0 means success. */ /* Error code. 0 means success. */
/* */ /* */
typedef int (*FT_Outline_LineTo_Func)( FT_Vector* to, typedef int
void* user ); (*FT_Outline_LineTo_Func)( FT_Vector* to,
void* user );
/*************************************************************************/ /*************************************************************************/
@ -476,9 +478,10 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* Error code. 0 means success. */ /* Error code. 0 means success. */
/* */ /* */
typedef int (*FT_Outline_ConicTo_Func)( FT_Vector* control, typedef int
FT_Vector* to, (*FT_Outline_ConicTo_Func)( FT_Vector* control,
void* user ); FT_Vector* to,
void* user );
/*************************************************************************/ /*************************************************************************/
@ -505,10 +508,11 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* Error code. 0 means success. */ /* Error code. 0 means success. */
/* */ /* */
typedef int (*FT_Outline_CubicTo_Func)( FT_Vector* control1, typedef int
FT_Vector* control2, (*FT_Outline_CubicTo_Func)( FT_Vector* control1,
FT_Vector* to, FT_Vector* control2,
void* user ); FT_Vector* to,
void* user );
/*************************************************************************/ /*************************************************************************/
@ -750,10 +754,11 @@ FT_BEGIN_HEADER
/* Otherwise, the callback is only called once per scan-line, and */ /* Otherwise, the callback is only called once per scan-line, and */
/* only for those scanlines that do have `gray' pixels on them. */ /* only for those scanlines that do have `gray' pixels on them. */
/* */ /* */
typedef void (*FT_Raster_Span_Func)( int y, typedef void
int count, (*FT_Raster_Span_Func)( int y,
FT_Span* spans, int count,
void* user ); FT_Span* spans,
void* user );
/*************************************************************************/ /*************************************************************************/
@ -777,9 +782,10 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* 1 if the pixel is `set', 0 otherwise. */ /* 1 if the pixel is `set', 0 otherwise. */
/* */ /* */
typedef int (*FT_Raster_BitTest_Func)( int y, typedef int
int x, (*FT_Raster_BitTest_Func)( int y,
void* user ); int x,
void* user );
/*************************************************************************/ /*************************************************************************/
@ -802,9 +808,10 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* 1 if the pixel is `set', 0 otherwise. */ /* 1 if the pixel is `set', 0 otherwise. */
/* */ /* */
typedef void (*FT_Raster_BitSet_Func)( int y, typedef void
int x, (*FT_Raster_BitSet_Func)( int y,
void* user ); int x,
void* user );
/*************************************************************************/ /*************************************************************************/
@ -944,8 +951,9 @@ FT_BEGIN_HEADER
/* FreeType memory allocator. However, this field can be completely */ /* FreeType memory allocator. However, this field can be completely */
/* ignored by a given raster implementation. */ /* ignored by a given raster implementation. */
/* */ /* */
typedef int (*FT_Raster_New_Func)( void* memory, typedef int
FT_Raster* raster ); (*FT_Raster_New_Func)( void* memory,
FT_Raster* raster );
/*************************************************************************/ /*************************************************************************/
@ -959,7 +967,8 @@ FT_BEGIN_HEADER
/* <Input> */ /* <Input> */
/* raster :: A handle to the raster object. */ /* raster :: A handle to the raster object. */
/* */ /* */
typedef void (*FT_Raster_Done_Func)( FT_Raster raster ); typedef void
(*FT_Raster_Done_Func)( FT_Raster raster );
/*************************************************************************/ /*************************************************************************/
@ -989,9 +998,10 @@ FT_BEGIN_HEADER
/* passed to the raster constructor). However, this is not */ /* passed to the raster constructor). However, this is not */
/* recommended for efficiency purposes. */ /* recommended for efficiency purposes. */
/* */ /* */
typedef void (*FT_Raster_Reset_Func)( FT_Raster raster, typedef void
unsigned char* pool_base, (*FT_Raster_Reset_Func)( FT_Raster raster,
unsigned long pool_size ); unsigned char* pool_base,
unsigned long pool_size );
/*************************************************************************/ /*************************************************************************/
@ -1012,9 +1022,10 @@ FT_BEGIN_HEADER
/* */ /* */
/* args :: A pointer to the new mode/property to use. */ /* args :: A pointer to the new mode/property to use. */
/* */ /* */
typedef int (*FT_Raster_Set_Mode_Func)( FT_Raster raster, typedef int
unsigned long mode, (*FT_Raster_Set_Mode_Func)( FT_Raster raster,
void* args ); unsigned long mode,
void* args );
/*************************************************************************/ /*************************************************************************/
@ -1051,8 +1062,9 @@ FT_BEGIN_HEADER
/* examples of distinct implementations which support direct */ /* examples of distinct implementations which support direct */
/* composition). */ /* composition). */
/* */ /* */
typedef int (*FT_Raster_Render_Func)( FT_Raster raster, typedef int
FT_Raster_Params* params ); (*FT_Raster_Render_Func)( FT_Raster raster,
FT_Raster_Params* params );
/*************************************************************************/ /*************************************************************************/

View File

@ -84,8 +84,9 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* List node. NULL if it wasn't found. */ /* List node. NULL if it wasn't found. */
/* */ /* */
FT_EXPORT( FT_ListNode ) FT_List_Find( FT_List list, FT_EXPORT( FT_ListNode )
void* data ); FT_List_Find( FT_List list,
void* data );
/*************************************************************************/ /*************************************************************************/
@ -100,8 +101,9 @@ FT_BEGIN_HEADER
/* list :: A pointer to the parent list. */ /* list :: A pointer to the parent list. */
/* node :: The node to append. */ /* node :: The node to append. */
/* */ /* */
FT_EXPORT( void ) FT_List_Add( FT_List list, FT_EXPORT( void )
FT_ListNode node ); FT_List_Add( FT_List list,
FT_ListNode node );
/*************************************************************************/ /*************************************************************************/
@ -116,8 +118,9 @@ FT_BEGIN_HEADER
/* list :: A pointer to parent list. */ /* list :: A pointer to parent list. */
/* node :: The node to insert. */ /* node :: The node to insert. */
/* */ /* */
FT_EXPORT( void ) FT_List_Insert( FT_List list, FT_EXPORT( void )
FT_ListNode node ); FT_List_Insert( FT_List list,
FT_ListNode node );
/*************************************************************************/ /*************************************************************************/
@ -135,8 +138,9 @@ FT_BEGIN_HEADER
/* <InOut> */ /* <InOut> */
/* list :: A pointer to the parent list. */ /* list :: A pointer to the parent list. */
/* */ /* */
FT_EXPORT( void ) FT_List_Remove( FT_List list, FT_EXPORT( void )
FT_ListNode node ); FT_List_Remove( FT_List list,
FT_ListNode node );
/*************************************************************************/ /*************************************************************************/
@ -152,8 +156,9 @@ FT_BEGIN_HEADER
/* list :: A pointer to the parent list. */ /* list :: A pointer to the parent list. */
/* node :: The node to move. */ /* node :: The node to move. */
/* */ /* */
FT_EXPORT( void ) FT_List_Up( FT_List list, FT_EXPORT( void )
FT_ListNode node ); FT_List_Up( FT_List list,
FT_ListNode node );
/*************************************************************************/ /*************************************************************************/
@ -171,8 +176,9 @@ FT_BEGIN_HEADER
/* user :: A typeless pointer passed to FT_List_Iterate(). */ /* user :: A typeless pointer passed to FT_List_Iterate(). */
/* Can be used to point to the iteration's state. */ /* Can be used to point to the iteration's state. */
/* */ /* */
typedef FT_Error (*FT_List_Iterator)( FT_ListNode node, typedef FT_Error
void* user ); (*FT_List_Iterator)( FT_ListNode node,
void* user );
/*************************************************************************/ /*************************************************************************/
@ -195,9 +201,10 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* The result (a FreeType error code) of the last iterator call. */ /* The result (a FreeType error code) of the last iterator call. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_List_Iterate( FT_List list, FT_EXPORT( FT_Error )
FT_List_Iterator iterator, FT_List_Iterate( FT_List list,
void* user ); FT_List_Iterator iterator,
void* user );
/*************************************************************************/ /*************************************************************************/
@ -218,9 +225,10 @@ FT_BEGIN_HEADER
/* user :: A typeless pointer passed to FT_List_Iterate(). It can */ /* user :: A typeless pointer passed to FT_List_Iterate(). It can */
/* be used to point to the iteration's state. */ /* be used to point to the iteration's state. */
/* */ /* */
typedef void (*FT_List_Destructor)( FT_Memory memory, typedef void
void* data, (*FT_List_Destructor)( FT_Memory memory,
void* user ); void* data,
void* user );
/*************************************************************************/ /*************************************************************************/
@ -242,10 +250,11 @@ FT_BEGIN_HEADER
/* user :: A user-supplied field which is passed as the last */ /* user :: A user-supplied field which is passed as the last */
/* argument to the destructor. */ /* argument to the destructor. */
/* */ /* */
FT_EXPORT( void ) FT_List_Finalize( FT_List list, FT_EXPORT( void )
FT_List_Destructor destroy, FT_List_Finalize( FT_List list,
FT_Memory memory, FT_List_Destructor destroy,
void* user ); FT_Memory memory,
void* user );
/* */ /* */

View File

@ -85,10 +85,11 @@ FT_BEGIN_HEADER
/* error = FT_New_Face_From_FOND( library, fond, 0, &face ); */ /* error = FT_New_Face_From_FOND( library, fond, 0, &face ); */
/* } */ /* } */
/* */ /* */
FT_EXPORT( FT_Error ) FT_New_Face_From_FOND( FT_Library library, FT_EXPORT( FT_Error )
Handle fond, FT_New_Face_From_FOND( FT_Library library,
FT_Long face_index, Handle fond,
FT_Face *aface ); FT_Long face_index,
FT_Face *aface );
/* */ /* */

View File

@ -100,16 +100,19 @@ FT_BEGIN_HEADER
/* */ /* */
typedef FT_Error (*FT_Get_MM_Func)( FT_Face face, typedef FT_Error
FT_Multi_Master* master ); (*FT_Get_MM_Func)( FT_Face face,
FT_Multi_Master* master );
typedef FT_Error (*FT_Set_MM_Design_Func)( FT_Face face, typedef FT_Error
FT_UInt num_coords, (*FT_Set_MM_Design_Func)( FT_Face face,
FT_Long* coords ); FT_UInt num_coords,
FT_Long* coords );
typedef FT_Error (*FT_Set_MM_Blend_Func)( FT_Face face, typedef FT_Error
FT_UInt num_coords, (*FT_Set_MM_Blend_Func)( FT_Face face,
FT_Long* coords ); FT_UInt num_coords,
FT_Long* coords );
/*************************************************************************/ /*************************************************************************/
@ -129,8 +132,9 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Get_Multi_Master( FT_Face face, FT_EXPORT( FT_Error )
FT_Multi_Master *amaster ); FT_Get_Multi_Master( FT_Face face,
FT_Multi_Master *amaster );
/*************************************************************************/ /*************************************************************************/
@ -154,10 +158,10 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Set_MM_Design_Coordinates( FT_EXPORT( FT_Error )
FT_Face face, FT_Set_MM_Design_Coordinates( FT_Face face,
FT_UInt num_coords, FT_UInt num_coords,
FT_Long* coords ); FT_Long* coords );
/*************************************************************************/ /*************************************************************************/
@ -182,10 +186,10 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Set_MM_Blend_Coordinates( FT_EXPORT( FT_Error )
FT_Face face, FT_Set_MM_Blend_Coordinates( FT_Face face,
FT_UInt num_coords, FT_UInt num_coords,
FT_Fixed* coords ); FT_Fixed* coords );
/* */ /* */

View File

@ -63,14 +63,18 @@ FT_BEGIN_HEADER
} FT_Module_Flags; } FT_Module_Flags;
typedef void (*FT_Module_Interface)( void ); typedef void
(*FT_Module_Interface)( void );
typedef FT_Error (*FT_Module_Constructor)( FT_Module module ); typedef FT_Error
(*FT_Module_Constructor)( FT_Module module );
typedef void (*FT_Module_Destructor)( FT_Module module ); typedef void
(*FT_Module_Destructor)( FT_Module module );
typedef FT_Module_Interface (*FT_Module_Requester)( FT_Module module, typedef FT_Module_Interface
const char* name ); (*FT_Module_Requester)( FT_Module module,
const char* name );
/*************************************************************************/ /*************************************************************************/
@ -142,8 +146,9 @@ FT_BEGIN_HEADER
/* An error will be returned if a module already exists by that name, */ /* An error will be returned if a module already exists by that name, */
/* or if the module requires a version of FreeType that is too great. */ /* or if the module requires a version of FreeType that is too great. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Add_Module( FT_Library library, FT_EXPORT( FT_Error )
const FT_Module_Class* clazz ); FT_Add_Module( FT_Library library,
const FT_Module_Class* clazz );
/*************************************************************************/ /*************************************************************************/
@ -166,8 +171,9 @@ FT_BEGIN_HEADER
/* You should better be familiar with FreeType internals to know */ /* You should better be familiar with FreeType internals to know */
/* which module to look for :-) */ /* which module to look for :-) */
/* */ /* */
FT_EXPORT( FT_Module ) FT_Get_Module( FT_Library library, FT_EXPORT( FT_Module )
const char* module_name ); FT_Get_Module( FT_Library library,
const char* module_name );
/*************************************************************************/ /*************************************************************************/
@ -190,8 +196,9 @@ FT_BEGIN_HEADER
/* <Note> */ /* <Note> */
/* The module object is destroyed by the function in case of success. */ /* The module object is destroyed by the function in case of success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Remove_Module( FT_Library library, FT_EXPORT( FT_Error )
FT_Module module ); FT_Remove_Module( FT_Library library,
FT_Module module );
/*************************************************************************/ /*************************************************************************/
@ -213,8 +220,9 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_New_Library( FT_Memory memory, FT_EXPORT( FT_Error )
FT_Library *alibrary ); FT_New_Library( FT_Memory memory,
FT_Library *alibrary );
/*************************************************************************/ /*************************************************************************/
@ -232,11 +240,13 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Done_Library( FT_Library library ); FT_EXPORT( FT_Error )
FT_Done_Library( FT_Library library );
typedef void (*FT_DebugHook_Func)( void* arg ); typedef void
(*FT_DebugHook_Func)( void* arg );
/*************************************************************************/ /*************************************************************************/
@ -262,9 +272,10 @@ FT_BEGIN_HEADER
/* Currently, four debug hook slots are available, but only two (for */ /* Currently, four debug hook slots are available, but only two (for */
/* the TrueType and the Type 1 interpreter) are defined. */ /* the TrueType and the Type 1 interpreter) are defined. */
/* */ /* */
FT_EXPORT( void ) FT_Set_Debug_Hook( FT_Library library, FT_EXPORT( void )
FT_UInt hook_index, FT_Set_Debug_Hook( FT_Library library,
FT_DebugHook_Func debug_hook ); FT_UInt hook_index,
FT_DebugHook_Func debug_hook );
@ -281,7 +292,8 @@ FT_BEGIN_HEADER
/* <InOut> */ /* <InOut> */
/* library :: A handle to a new library object. */ /* library :: A handle to a new library object. */
/* */ /* */
FT_EXPORT( void ) FT_Add_Default_Modules( FT_Library library ); FT_EXPORT( void )
FT_Add_Default_Modules( FT_Library library );
/* */ /* */

View File

@ -95,10 +95,10 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means sucess. */ /* FreeType error code. 0 means sucess. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Outline_Decompose( FT_EXPORT( FT_Error )
FT_Outline* outline, FT_Outline_Decompose( FT_Outline* outline,
const FT_Outline_Funcs* interface, const FT_Outline_Funcs* interface,
void* user ); void* user );
/*************************************************************************/ /*************************************************************************/
@ -130,14 +130,15 @@ FT_BEGIN_HEADER
/* The reason why this function takes a `library' parameter is simply */ /* The reason why this function takes a `library' parameter is simply */
/* to use the library's memory allocator. */ /* to use the library's memory allocator. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Outline_New( FT_Library library, FT_EXPORT( FT_Error )
FT_UInt numPoints, FT_Outline_New( FT_Library library,
FT_Int numContours, FT_UInt numPoints,
FT_Outline *anoutline ); FT_Int numContours,
FT_Outline *anoutline );
FT_EXPORT( FT_Error ) FT_Outline_New_Internal( FT_EXPORT( FT_Error )
FT_Memory memory, FT_Outline_New_Internal( FT_Memory memory,
FT_UInt numPoints, FT_UInt numPoints,
FT_Int numContours, FT_Int numContours,
FT_Outline *anoutline ); FT_Outline *anoutline );
@ -167,12 +168,14 @@ FT_BEGIN_HEADER
/* 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_Free(). */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Outline_Done( FT_Library library, FT_EXPORT( FT_Error )
FT_Outline* outline ); FT_Outline_Done( FT_Library library,
FT_Outline* outline );
FT_EXPORT( FT_Error ) FT_Outline_Done_Internal( FT_Memory memory, FT_EXPORT( FT_Error )
FT_Outline* outline ); FT_Outline_Done_Internal( FT_Memory memory,
FT_Outline* outline );
/*************************************************************************/ /*************************************************************************/
@ -198,8 +201,9 @@ FT_BEGIN_HEADER
/* <Output> */ /* <Output> */
/* acbox :: The outline's control box. */ /* acbox :: The outline's control box. */
/* */ /* */
FT_EXPORT( void ) FT_Outline_Get_CBox( FT_Outline* outline, FT_EXPORT( void )
FT_BBox *acbox ); FT_Outline_Get_CBox( FT_Outline* outline,
FT_BBox *acbox );
/*************************************************************************/ /*************************************************************************/
@ -218,9 +222,10 @@ FT_BEGIN_HEADER
/* */ /* */
/* yOffset :: The vertical offset. */ /* yOffset :: The vertical offset. */
/* */ /* */
FT_EXPORT( void ) FT_Outline_Translate( FT_Outline* outline, FT_EXPORT( void )
FT_Pos xOffset, FT_Outline_Translate( FT_Outline* outline,
FT_Pos yOffset ); FT_Pos xOffset,
FT_Pos yOffset );
/*************************************************************************/ /*************************************************************************/
@ -242,8 +247,9 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Outline_Copy( FT_Outline* source, FT_EXPORT( FT_Error )
FT_Outline *target ); FT_Outline_Copy( FT_Outline* source,
FT_Outline *target );
/*************************************************************************/ /*************************************************************************/
@ -265,8 +271,9 @@ FT_BEGIN_HEADER
/* You can use FT_Outline_Translate() if you need to translate the */ /* You can use FT_Outline_Translate() if you need to translate the */
/* outline's points. */ /* outline's points. */
/* */ /* */
FT_EXPORT( void ) FT_Outline_Transform( FT_Outline* outline, FT_EXPORT( void )
FT_Matrix* matrix ); FT_Outline_Transform( FT_Outline* outline,
FT_Matrix* matrix );
/*************************************************************************/ /*************************************************************************/
@ -288,7 +295,8 @@ FT_BEGIN_HEADER
/* It shouldn't be used by a normal client application, unless it */ /* It shouldn't be used by a normal client application, unless it */
/* knows what it is doing. */ /* knows what it is doing. */
/* */ /* */
FT_EXPORT( void ) FT_Outline_Reverse( FT_Outline* outline ); FT_EXPORT( void )
FT_Outline_Reverse( FT_Outline* outline );
/*************************************************************************/ /*************************************************************************/
@ -317,9 +325,10 @@ FT_BEGIN_HEADER
/* */ /* */
/* It will use the raster correponding to the default glyph format. */ /* It will use the raster correponding to the default glyph format. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Outline_Get_Bitmap( FT_Library library, FT_EXPORT( FT_Error )
FT_Outline* outline, FT_Outline_Get_Bitmap( FT_Library library,
FT_Bitmap *abitmap ); FT_Outline* outline,
FT_Bitmap *abitmap );
/*************************************************************************/ /*************************************************************************/
@ -353,9 +362,10 @@ FT_BEGIN_HEADER
/* converter is called, which means that the value you give to it is */ /* converter is called, which means that the value you give to it is */
/* actually ignored. */ /* actually ignored. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Outline_Render( FT_Library library, FT_EXPORT( FT_Error )
FT_Outline* outline, FT_Outline_Render( FT_Library library,
FT_Raster_Params* params ); FT_Outline* outline,
FT_Raster_Params* params );
/* */ /* */

View File

@ -37,24 +37,31 @@ FT_BEGIN_HEADER
/* create a new glyph object */ /* create a new glyph object */
typedef FT_Error (*FT_Glyph_Init_Func) ( FT_Glyph glyph, typedef FT_Error
FT_GlyphSlot slot ); (*FT_Glyph_Init_Func)( FT_Glyph glyph,
FT_GlyphSlot slot );
/* destroys a given glyph object */ /* destroys a given glyph object */
typedef void (*FT_Glyph_Done_Func) ( FT_Glyph glyph ); typedef void
(*FT_Glyph_Done_Func)( FT_Glyph glyph );
typedef void (*FT_Glyph_Transform_Func)( FT_Glyph glyph, typedef void
FT_Matrix* matrix, (*FT_Glyph_Transform_Func)( FT_Glyph glyph,
FT_Vector* delta ); FT_Matrix* matrix,
FT_Vector* delta );
typedef void (*FT_Glyph_BBox_Func) ( FT_Glyph glyph, typedef void
FT_BBox* abbox ); (*FT_Glyph_BBox_Func)( FT_Glyph glyph,
FT_BBox* abbox );
typedef FT_Error (*FT_Glyph_Copy_Func) ( FT_Glyph source, typedef FT_Error
FT_Glyph target ); (*FT_Glyph_Copy_Func)( FT_Glyph source,
FT_Glyph target );
typedef FT_Error
(*FT_Glyph_Prepare_Func)( FT_Glyph glyph,
FT_GlyphSlot slot );
typedef FT_Error (*FT_Glyph_Prepare_Func) ( FT_Glyph glyph,
FT_GlyphSlot slot );
struct FT_Glyph_Class_ struct FT_Glyph_Class_
{ {
@ -69,23 +76,27 @@ FT_BEGIN_HEADER
}; };
typedef FT_Error (*FTRenderer_render) ( FT_Renderer renderer, typedef FT_Error
FT_GlyphSlot slot, (*FTRenderer_render)( FT_Renderer renderer,
FT_UInt mode, FT_GlyphSlot slot,
FT_Vector* origin ); FT_UInt mode,
FT_Vector* origin );
typedef FT_Error (*FTRenderer_transform)( FT_Renderer renderer, typedef FT_Error
FT_GlyphSlot slot, (*FTRenderer_transform)( FT_Renderer renderer,
FT_Matrix* matrix, FT_GlyphSlot slot,
FT_Vector* delta ); FT_Matrix* matrix,
FT_Vector* delta );
typedef void (*FTRenderer_getCBox) ( FT_Renderer renderer, typedef void
FT_GlyphSlot slot, (*FTRenderer_getCBox)( FT_Renderer renderer,
FT_BBox* cbox ); FT_GlyphSlot slot,
FT_BBox* cbox );
typedef FT_Error (*FTRenderer_setMode) ( FT_Renderer renderer, typedef FT_Error
FT_ULong mode_tag, (*FTRenderer_setMode)( FT_Renderer renderer,
FT_Pointer mode_ptr ); FT_ULong mode_tag,
FT_Pointer mode_ptr );
/*************************************************************************/ /*************************************************************************/
@ -152,8 +163,9 @@ FT_BEGIN_HEADER
/* To add a new renderer, simply use FT_Add_Module(). To retrieve a */ /* To add a new renderer, simply use FT_Add_Module(). To retrieve a */
/* renderer by its name, use FT_Get_Module(). */ /* renderer by its name, use FT_Get_Module(). */
/* */ /* */
FT_EXPORT( FT_Renderer ) FT_Get_Renderer( FT_Library library, FT_EXPORT( FT_Renderer )
FT_Glyph_Format format ); FT_Get_Renderer( FT_Library library,
FT_Glyph_Format format );
/*************************************************************************/ /*************************************************************************/
@ -183,10 +195,11 @@ FT_BEGIN_HEADER
/* */ /* */
/* This doesn't change the current renderer for other formats. */ /* This doesn't change the current renderer for other formats. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Set_Renderer( FT_Library library, FT_EXPORT( FT_Error )
FT_Renderer renderer, FT_Set_Renderer( FT_Library library,
FT_UInt num_params, FT_Renderer renderer,
FT_Parameter* parameters ); FT_UInt num_params,
FT_Parameter* parameters );
/* */ /* */

View File

@ -113,7 +113,8 @@ FT_BEGIN_HEADER
/* <Return> */ /* <Return> */
/* The number of strings in the `name' table. */ /* The number of strings in the `name' table. */
/* */ /* */
FT_EXPORT( FT_UInt ) FT_Get_Sfnt_Name_Count( FT_Face face ); FT_EXPORT( FT_UInt )
FT_Get_Sfnt_Name_Count( FT_Face face );
/*************************************************************************/ /*************************************************************************/
@ -143,9 +144,10 @@ FT_BEGIN_HEADER
/* `name' table entries, then do a loop until you get the right */ /* `name' table entries, then do a loop until you get the right */
/* platform, encoding, and name ID. */ /* platform, encoding, and name ID. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_Get_Sfnt_Name( FT_Face face, FT_EXPORT( FT_Error )
FT_UInt index, FT_Get_Sfnt_Name( FT_Face face,
FT_SfntName *aname ); FT_UInt index,
FT_SfntName *aname );
/* */ /* */

View File

@ -48,13 +48,15 @@ FT_BEGIN_HEADER
/* This code is completely experimental -- use with care! */ /* This code is completely experimental -- use with care! */
/* It will probably be completely rewritten in the future */ /* It will probably be completely rewritten in the future */
/* or even integrated into the library. */ /* or even integrated into the library. */
FT_EXPORT( FT_Error ) FT_Outline_Embolden( FT_GlyphSlot original, FT_EXPORT( FT_Error )
FT_Outline* outline, FT_Outline_Embolden( FT_GlyphSlot original,
FT_Pos* advance ); FT_Outline* outline,
FT_Pos* advance );
FT_EXPORT( FT_Error ) FT_Outline_Oblique( FT_GlyphSlot original, FT_EXPORT( FT_Error )
FT_Outline* outline, FT_Outline_Oblique( FT_GlyphSlot original,
FT_Pos* advance ); FT_Outline* outline,
FT_Pos* advance );
FT_END_HEADER FT_END_HEADER

View File

@ -80,8 +80,9 @@ FT_BEGIN_HEADER
/* @return: */ /* @return: */
/* Address of new memory block. 0 in case of failure. */ /* Address of new memory block. 0 in case of failure. */
/* */ /* */
typedef void* (*FT_Alloc_Func)( FT_Memory memory, typedef void*
long size ); (*FT_Alloc_Func)( FT_Memory memory,
long size );
/*************************************************************************/ /*************************************************************************/
@ -97,8 +98,9 @@ FT_BEGIN_HEADER
/* */ /* */
/* block :: The address of the target memory block. */ /* block :: The address of the target memory block. */
/* */ /* */
typedef void (*FT_Free_Func)( FT_Memory memory, typedef void
void* block ); (*FT_Free_Func)( FT_Memory memory,
void* block );
/*************************************************************************/ /*************************************************************************/
@ -124,10 +126,11 @@ FT_BEGIN_HEADER
/* @note: */ /* @note: */
/* In case of error, the old block must still be available. */ /* In case of error, the old block must still be available. */
/* */ /* */
typedef void* (*FT_Realloc_Func)( FT_Memory memory, typedef void*
long cur_size, (*FT_Realloc_Func)( FT_Memory memory,
long new_size, long cur_size,
void* block ); long new_size,
void* block );
/*************************************************************************/ /*************************************************************************/
@ -215,10 +218,11 @@ FT_BEGIN_HEADER
/* This function might be called to perform a seek or skip operation */ /* This function might be called to perform a seek or skip operation */
/* with a `count' of 0. */ /* with a `count' of 0. */
/* */ /* */
typedef unsigned long (*FT_Stream_IO)( FT_Stream stream, typedef unsigned long
unsigned long offset, (*FT_Stream_IO)( FT_Stream stream,
unsigned char* buffer, unsigned long offset,
unsigned long count ); unsigned char* buffer,
unsigned long count );
/*************************************************************************/ /*************************************************************************/
@ -232,7 +236,8 @@ FT_BEGIN_HEADER
/* @input: */ /* @input: */
/* stream :: A handle to the target stream. */ /* stream :: A handle to the target stream. */
/* */ /* */
typedef void (*FT_Stream_Close)( FT_Stream stream ); typedef void
(*FT_Stream_Close)( FT_Stream stream );
/*************************************************************************/ /*************************************************************************/

View File

@ -25,235 +25,251 @@
FT_BEGIN_HEADER FT_BEGIN_HEADER
/*************************************************************************** /*************************************************************************/
* /* */
* @section: /* @section: */
* computations /* computations */
* /* */
*/ /*************************************************************************/
/*************************************************************************** /*************************************************************************/
* /* */
* @type: /* @type: */
* FT_Angle /* FT_Angle */
* /* */
* @description: /* @description: */
* This type is used to model angle values in FreeType. Note that /* This type is used to model angle values in FreeType. Note that */
* the angle is a 16.16 fixed float value expressed in degrees. /* the angle is a 16.16 fixed float value expressed in degrees. */
*/ /* */
typedef FT_Fixed FT_Angle; typedef FT_Fixed FT_Angle;
/*************************************************************************** /*************************************************************************/
* /* */
* @macro: /* @macro: */
* FT_ANGLE_PI /* FT_ANGLE_PI */
* /* */
* @description: /* @description: */
* The angle pi expressed in @FT_Angle units. /* The angle pi expressed in @FT_Angle units. */
*/ /* */
#define FT_ANGLE_PI ( 180L << 16 ) #define FT_ANGLE_PI ( 180L << 16 )
/*************************************************************************** /*************************************************************************/
* /* */
* @macro: /* @macro: */
* FT_ANGLE_2PI /* FT_ANGLE_2PI */
* /* */
* @description: /* @description: */
* The angle 2*pi expressed in @FT_Angle units. /* The angle 2*pi expressed in @FT_Angle units. */
*/ /* */
#define FT_ANGLE_2PI ( FT_ANGLE_PI * 2 ) #define FT_ANGLE_2PI ( FT_ANGLE_PI * 2 )
/*************************************************************************** /*************************************************************************/
* /* */
* @macro: /* @macro: */
* FT_ANGLE_PI2 /* FT_ANGLE_PI2 */
* /* */
* @description: /* @description: */
* The angle pi/2 expressed in @FT_Angle units. /* The angle pi/2 expressed in @FT_Angle units. */
*/ /* */
#define FT_ANGLE_PI2 ( FT_ANGLE_PI / 2 ) #define FT_ANGLE_PI2 ( FT_ANGLE_PI / 2 )
/*************************************************************************** /*************************************************************************/
* /* */
* @macro: /* @macro: */
* FT_ANGLE_PI4 /* FT_ANGLE_PI4 */
* /* */
* @description: /* @description: */
* The angle pi/4 expressed in @FT_Angle units. /* The angle pi/4 expressed in @FT_Angle units. */
*/ /* */
#define FT_ANGLE_PI4 ( FT_ANGLE_PI / 4 ) #define FT_ANGLE_PI4 ( FT_ANGLE_PI / 4 )
/*************************************************************************** /*************************************************************************/
* /* */
* @function: /* @function: */
* FT_Sin /* FT_Sin */
* /* */
* @description: /* @description: */
* Return the sinus of a given angle in fixed point format. /* Return the sinus of a given angle in fixed point format. */
* /* */
* @input: /* @input: */
* angle :: The input angle. /* angle :: The input angle. */
* /* */
* @return: /* @return: */
* The sinus value. /* The sinus value. */
* /* */
* @note: /* @note: */
* If you need both the sinus and cosinus for a given angle, use the /* If you need both the sinus and cosinus for a given angle, use the */
* function @FT_Vector_Unit. /* function @FT_Vector_Unit. */
*/ /* */
FT_EXPORT( FT_Fixed ) FT_Sin( FT_Angle angle ); FT_EXPORT( FT_Fixed )
FT_Sin( FT_Angle angle );
/*************************************************************************** /*************************************************************************/
* /* */
* @function: /* @function: */
* FT_Cos /* FT_Cos */
* /* */
* @description: /* @description: */
* Return the cosinus of a given angle in fixed point format. /* Return the cosinus of a given angle in fixed point format. */
* /* */
* @input: /* @input: */
* angle :: The input angle. /* angle :: The input angle. */
* /* */
* @return: /* @return: */
* The cosinus value. /* The cosinus value. */
* /* */
* @note: /* @note: */
* If you need both the sinus and cosinus for a given angle, use the /* If you need both the sinus and cosinus for a given angle, use the */
* function @FT_Vector_Unit. /* function @FT_Vector_Unit. */
*/ /* */
FT_EXPORT( FT_Fixed ) FT_Cos( FT_Angle angle ); FT_EXPORT( FT_Fixed )
FT_Cos( FT_Angle angle );
/*************************************************************************** /*************************************************************************/
* /* */
* @function: /* @function: */
* FT_Tan /* FT_Tan */
* /* */
* @description: /* @description: */
* Return the tangent of a given angle in fixed point format. /* Return the tangent of a given angle in fixed point format. */
* /* */
* @input: /* @input: */
* angle :: The input angle. /* angle :: The input angle. */
* /* */
* @return: /* @return: */
* The tangent value. /* The tangent value. */
*/ /* */
FT_EXPORT( FT_Fixed ) FT_Tan( FT_Angle angle ); FT_EXPORT( FT_Fixed )
FT_Tan( FT_Angle angle );
/*************************************************************************** /*************************************************************************/
* /* */
* @function: /* @function: */
* FT_Atan2 /* FT_Atan2 */
* /* */
* @description: /* @description: */
* Return the arc-tangent corresponding to a given vector (x,y) in /* Return the arc-tangent corresponding to a given vector (x,y) in */
* the 2d plane. /* the 2d plane. */
* /* */
* @input: /* @input: */
* x :: The horizontal vector coordinate. /* x :: The horizontal vector coordinate. */
* y :: The vertical vector coordinate. /* */
* /* y :: The vertical vector coordinate. */
* @return: /* */
* The arc-tangent value (i.e. angle). /* @return: */
*/ /* The arc-tangent value (i.e. angle). */
FT_EXPORT( FT_Angle ) FT_Atan2( FT_Fixed x, FT_Fixed y ); /* */
FT_EXPORT( FT_Angle )
FT_Atan2( FT_Fixed x,
FT_Fixed y );
/*************************************************************************** /*************************************************************************/
* /* */
* @function: /* @function: */
* FT_Vector_Unit /* FT_Vector_Unit */
* /* */
* @description: /* @description: */
* Return the unit vector corresponding to a given angle. After the call, /* Return the unit vector corresponding to a given angle. After the */
* the value of "vec.x" will be "sin(theta)", and the value of "vec.y" /* call, the value of `vec.x' will be `sin(angle)', and the value of */
* will be "cos(angle)". /* `vec.y' will be `cos(angle)'. */
* /* */
* This function is useful to retrieve both the sinus and cosinus of a /* This function is useful to retrieve both the sinus and cosinus of */
* given angle quickly. /* a given angle quickly. */
* /* */
* @input: /* @output: */
* vec :: The address of target vector. /* vec :: The address of target vector. */
* angle :: The address of angle. /* */
*/ /* @input: */
FT_EXPORT( void ) FT_Vector_Unit( FT_Vector* vec, /* angle :: The address of angle. */
FT_Angle angle ); /* */
FT_EXPORT( void )
FT_Vector_Unit( FT_Vector* vec,
FT_Angle angle );
/*************************************************************************** /*************************************************************************/
* /* */
* @function: /* @function: */
* FT_Vector_Rotate /* FT_Vector_Rotate */
* /* */
* @description: /* @description: */
* Rotate a vector by a given angle. /* Rotate a vector by a given angle. */
* /* */
* @input: /* @inout: */
* vec :: The address of target vector. /* vec :: The address of target vector. */
* angle :: The address of angle. /* */
*/ /* @input: */
FT_EXPORT( void ) FT_Vector_Rotate( FT_Vector* vec, /* angle :: The address of angle. */
FT_Angle angle ); /* */
FT_EXPORT( void )
FT_Vector_Rotate( FT_Vector* vec,
FT_Angle angle );
/*************************************************************************** /*************************************************************************/
* /* */
* @function: /* @function: */
* FT_Vector_Length /* FT_Vector_Length */
* /* */
* @description: /* @description: */
* Return the length of a given vector. /* Return the length of a given vector. */
* /* */
* @input: /* @input: */
* vec :: The address of target vector. /* vec :: The address of target vector. */
* /* */
* @return: /* @return: */
* The vector length, expressed in the same units that the original /* The vector length, expressed in the same units that the original */
* vector coordinates. /* vector coordinates. */
*/ /* */
FT_EXPORT( FT_Fixed ) FT_Vector_Length( FT_Vector* vec ); FT_EXPORT( FT_Fixed )
FT_Vector_Length( FT_Vector* vec );
/*************************************************************************** /*************************************************************************/
* /* */
* @function: /* @function: */
* FT_Vector_Normalize /* FT_Vector_Normalize */
* /* */
* @description: /* @description: */
* Normalize a given vector (i.e. compute the equivalent unit vector). /* Normalize a given vector (i.e. compute the equivalent unit */
* /* vector). */
* @input: /* */
* vec :: The address of target vector. /* @inout: */
*/ /* vec :: The address of target vector. */
FT_EXPORT( void ) FT_Vector_Normalize( FT_Vector* vec ); /* */
FT_EXPORT( void )
FT_Vector_Normalize( FT_Vector* vec );
/*************************************************************************** /*************************************************************************/
* /* */
* @function: /* @function: */
* FT_Vector_Polarize /* FT_Vector_Polarize */
* /* */
* @description: /* @description: */
* Compute both the length and angle of a given vector. /* Compute both the length and angle of a given vector. */
* /* */
* @input: /* @input: */
* vec :: The address of source vector. /* vec :: The address of source vector. */
* /* */
* @output: /* @output: */
* length :: The vector length. /* length :: The vector length. */
* angle :: The vector angle. /* angle :: The vector angle. */
*/ /* */
FT_EXPORT( void ) FT_Vector_Polarize( FT_Vector* vec, FT_EXPORT( void )
FT_Fixed *length, FT_Vector_Polarize( FT_Vector* vec,
FT_Angle *angle ); FT_Fixed *length,
FT_Angle *angle );
/* */ /* */

View File

@ -193,7 +193,7 @@ FT_BEGIN_HEADER
FT_UShort number_Of_HMetrics; FT_UShort number_Of_HMetrics;
/* The following fields are not defined by the TrueType specification */ /* The following fields are not defined by the TrueType specification */
/* but they're used to connect the metrics header to the relevant */ /* but they are used to connect the metrics header to the relevant */
/* `HMTX' table. */ /* `HMTX' table. */
void* long_metrics; void* long_metrics;
@ -293,7 +293,7 @@ FT_BEGIN_HEADER
/* module is able to read both the horizontal and vertical */ /* module is able to read both the horizontal and vertical */
/* headers. */ /* headers. */
/* */ /* */
typedef struct TT_VertHeader_ typedef struct TT_VertHeader_
{ {
FT_Fixed Version; FT_Fixed Version;
FT_Short Ascender; FT_Short Ascender;
@ -428,7 +428,7 @@ FT_BEGIN_HEADER
/* A structure used to model a TrueType PCLT table. All fields */ /* A structure used to model a TrueType PCLT table. All fields */
/* comply to the TrueType table. */ /* comply to the TrueType table. */
/* */ /* */
typedef struct TT_PCLT_ typedef struct TT_PCLT_
{ {
FT_Fixed Version; FT_Fixed Version;
FT_ULong FontNumber; FT_ULong FontNumber;
@ -555,8 +555,9 @@ FT_BEGIN_HEADER
/* internal use only */ /* internal use only */
typedef void* (*FT_Get_Sfnt_Table_Func)( FT_Face face, typedef void*
FT_Sfnt_Tag tag ); (*FT_Get_Sfnt_Table_Func)( FT_Face face,
FT_Sfnt_Tag tag );
/*************************************************************************/ /*************************************************************************/
@ -584,8 +585,9 @@ FT_BEGIN_HEADER
/* by the sfnt/truetype/opentype drivers. See FT_Sfnt_Tag for a */ /* by the sfnt/truetype/opentype drivers. See FT_Sfnt_Tag for a */
/* list. */ /* list. */
/* */ /* */
FT_EXPORT( void* ) FT_Get_Sfnt_Table( FT_Face face, FT_EXPORT( void* )
FT_Sfnt_Tag tag ); FT_Get_Sfnt_Table( FT_Face face,
FT_Sfnt_Tag tag );
/* */ /* */

View File

@ -88,11 +88,11 @@
/* */ /* */
/* They can be implemented by format-specific interfaces. */ /* They can be implemented by format-specific interfaces. */
/* */ /* */
static static FT_Error
FT_Error Get_Kerning( TT_Face face, Get_Kerning( TT_Face face,
FT_UInt left_glyph, FT_UInt left_glyph,
FT_UInt right_glyph, FT_UInt right_glyph,
FT_Vector* kerning ) FT_Vector* kerning )
{ {
TT_Kern_0_Pair* pair; TT_Kern_0_Pair* pair;
@ -183,12 +183,12 @@
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
static static FT_Error
FT_Error Set_Char_Sizes( TT_Size size, Set_Char_Sizes( TT_Size size,
FT_F26Dot6 char_width, FT_F26Dot6 char_width,
FT_F26Dot6 char_height, FT_F26Dot6 char_height,
FT_UInt horz_resolution, FT_UInt horz_resolution,
FT_UInt vert_resolution ) FT_UInt vert_resolution )
{ {
FT_Size_Metrics* metrics = &size->root.metrics; FT_Size_Metrics* metrics = &size->root.metrics;
TT_Face face = (TT_Face)size->root.face; TT_Face face = (TT_Face)size->root.face;
@ -246,10 +246,10 @@
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
static static FT_Error
FT_Error Set_Pixel_Sizes( TT_Size size, Set_Pixel_Sizes( TT_Size size,
FT_UInt pixel_width, FT_UInt pixel_width,
FT_UInt pixel_height ) FT_UInt pixel_height )
{ {
FT_UNUSED( pixel_width ); FT_UNUSED( pixel_width );
FT_UNUSED( pixel_height ); FT_UNUSED( pixel_height );
@ -291,11 +291,11 @@
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
static static FT_Error
FT_Error Load_Glyph( TT_GlyphSlot slot, Load_Glyph( TT_GlyphSlot slot,
TT_Size size, TT_Size size,
FT_UShort glyph_index, FT_UShort glyph_index,
FT_UInt load_flags ) FT_UInt load_flags )
{ {
FT_Error error; FT_Error error;
@ -361,9 +361,9 @@
/* <Return> */ /* <Return> */
/* Glyph index. 0 means `undefined character code'. */ /* Glyph index. 0 means `undefined character code'. */
/* */ /* */
static static FT_UInt
FT_UInt Get_Char_Index( TT_CharMap charmap, Get_Char_Index( TT_CharMap charmap,
FT_Long charcode ) FT_Long charcode )
{ {
FT_Error error; FT_Error error;
TT_Face face; TT_Face face;
@ -406,9 +406,9 @@
/*************************************************************************/ /*************************************************************************/
static static FT_Module_Interface
FT_Module_Interface tt_get_interface( TT_Driver driver, tt_get_interface( TT_Driver driver,
const char* interface ) const char* interface )
{ {
FT_Module sfntd = FT_Get_Module( driver->root.root.library, FT_Module sfntd = FT_Get_Module( driver->root.root.library,
"sfnt" ); "sfnt" );
@ -499,7 +499,8 @@
/* format-specific interface can then be retrieved through the method */ /* format-specific interface can then be retrieved through the method */
/* interface->get_format_interface. */ /* interface->get_format_interface. */
/* */ /* */
FT_EXPORT_DEF( const FT_Driver_Class* ) getDriverClass( void ) FT_EXPORT_DEF( const FT_Driver_Class* )
getDriverClass( void )
{ {
return &tt_driver_class; return &tt_driver_class;
} }

View File

@ -81,11 +81,11 @@
/* This function will much probably move to another component in the */ /* This function will much probably move to another component in the */
/* near future, but I haven't decided which yet. */ /* near future, but I haven't decided which yet. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF void
void TT_Get_Metrics( TT_HoriHeader* header, TT_Get_Metrics( TT_HoriHeader* header,
FT_UInt index, FT_UInt index,
FT_Short* bearing, FT_Short* bearing,
FT_UShort* advance ) FT_UShort* advance )
{ {
TT_LongMetrics* longs_m; TT_LongMetrics* longs_m;
FT_UShort k = header->number_Of_HMetrics; FT_UShort k = header->number_Of_HMetrics;
@ -111,12 +111,12 @@
/* `check' is true, take care of monospaced fonts by returning the */ /* `check' is true, take care of monospaced fonts by returning the */
/* advance width maximum. */ /* advance width maximum. */
/* */ /* */
static static void
void Get_HMetrics( TT_Face face, Get_HMetrics( TT_Face face,
FT_UInt index, FT_UInt index,
FT_Bool check, FT_Bool check,
FT_Short* lsb, FT_Short* lsb,
FT_UShort* aw ) FT_UShort* aw )
{ {
TT_Get_Metrics( &face->horizontal, index, lsb, aw ); TT_Get_Metrics( &face->horizontal, index, lsb, aw );
@ -130,9 +130,9 @@
/* Returns the advance width table for a given pixel size if it is */ /* Returns the advance width table for a given pixel size if it is */
/* found in the font's `hdmx' table (if any). */ /* found in the font's `hdmx' table (if any). */
/* */ /* */
static static FT_Byte*
FT_Byte* Get_Advance_Widths( TT_Face face, Get_Advance_Widths( TT_Face face,
FT_UShort ppem ) FT_UShort ppem )
{ {
FT_UShort n; FT_UShort n;
@ -155,11 +155,11 @@
/* */ /* */
/* Translates an array of coordinates. */ /* Translates an array of coordinates. */
/* */ /* */
static static void
void translate_array( FT_UInt n, translate_array( FT_UInt n,
FT_Vector* coords, FT_Vector* coords,
FT_Pos delta_x, FT_Pos delta_x,
FT_Pos delta_y ) FT_Pos delta_y )
{ {
FT_UInt k; FT_UInt k;
@ -174,11 +174,11 @@
} }
static static void
void tt_prepare_zone( TT_GlyphZone* zone, tt_prepare_zone( TT_GlyphZone* zone,
FT_GlyphLoad* load, FT_GlyphLoad* load,
FT_UInt start_point, FT_UInt start_point,
FT_UInt start_contour ) FT_UInt start_contour )
{ {
zone->n_points = (FT_UShort)( load->outline.n_points - start_point ); zone->n_points = (FT_UShort)( load->outline.n_points - start_point );
zone->n_contours = (FT_Short) ( load->outline.n_contours - start_contour ); zone->n_contours = (FT_Short) ( load->outline.n_contours - start_contour );
@ -201,7 +201,7 @@
/* */ /* */
/*************************************************************************/ /*************************************************************************/
FT_CALLBACK_DEF(FT_Error) FT_CALLBACK_DEF( FT_Error )
TT_Access_Glyph_Frame( TT_Loader* loader, TT_Access_Glyph_Frame( TT_Loader* loader,
FT_UInt glyph_index, FT_UInt glyph_index,
FT_ULong offset, FT_ULong offset,
@ -224,7 +224,7 @@
} }
FT_CALLBACK_DEF(void) FT_CALLBACK_DEF( void )
TT_Forget_Glyph_Frame( TT_Loader* loader ) TT_Forget_Glyph_Frame( TT_Loader* loader )
{ {
FT_Stream stream = loader->stream; FT_Stream stream = loader->stream;
@ -234,7 +234,7 @@
} }
FT_CALLBACK_DEF(FT_Error) FT_CALLBACK_DEF( FT_Error )
TT_Load_Glyph_Header( TT_Loader* loader ) TT_Load_Glyph_Header( TT_Loader* loader )
{ {
FT_Stream stream = loader->stream; FT_Stream stream = loader->stream;
@ -257,7 +257,7 @@
} }
FT_CALLBACK_DEF(FT_Error) FT_CALLBACK_DEF( FT_Error )
TT_Load_Simple_Glyph( TT_Loader* load ) TT_Load_Simple_Glyph( TT_Loader* load )
{ {
FT_Error error; FT_Error error;
@ -416,7 +416,7 @@
} }
FT_CALLBACK_DEF(FT_Error) FT_CALLBACK_DEF( FT_Error )
TT_Load_Composite_Glyph( TT_Loader* loader ) TT_Load_Composite_Glyph( TT_Loader* loader )
{ {
FT_Error error; FT_Error error;
@ -506,8 +506,8 @@
} }
FT_LOCAL_DEF FT_LOCAL_DEF void
void TT_Init_Glyph_Loading( TT_Face face ) TT_Init_Glyph_Loading( TT_Face face )
{ {
face->access_glyph_frame = TT_Access_Glyph_Frame; face->access_glyph_frame = TT_Access_Glyph_Frame;
face->read_glyph_header = TT_Load_Glyph_Header; face->read_glyph_header = TT_Load_Glyph_Header;
@ -527,9 +527,9 @@
/* Usually, this means scaling and hinting through bytecode */ /* Usually, this means scaling and hinting through bytecode */
/* interpretation. */ /* interpretation. */
/* */ /* */
static static FT_Error
FT_Error TT_Process_Simple_Glyph( TT_Loader* load, TT_Process_Simple_Glyph( TT_Loader* load,
FT_Bool debug ) FT_Bool debug )
{ {
FT_GlyphLoader* gloader = load->gloader; FT_GlyphLoader* gloader = load->gloader;
FT_Outline* outline = &gloader->current.outline; FT_Outline* outline = &gloader->current.outline;
@ -657,9 +657,9 @@
/* Loads a given truetype glyph. Handles composites and uses a */ /* Loads a given truetype glyph. Handles composites and uses a */
/* TT_Loader object. */ /* TT_Loader object. */
/* */ /* */
static static FT_Error
FT_Error load_truetype_glyph( TT_Loader* loader, load_truetype_glyph( TT_Loader* loader,
FT_UInt glyph_index ) FT_UInt glyph_index )
{ {
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
@ -1110,9 +1110,9 @@
} }
static static void
void compute_glyph_metrics( TT_Loader* loader, compute_glyph_metrics( TT_Loader* loader,
FT_UInt glyph_index ) FT_UInt glyph_index )
{ {
FT_BBox bbox; FT_BBox bbox;
TT_Face face = (TT_Face)loader->face; TT_Face face = (TT_Face)loader->face;
@ -1313,11 +1313,11 @@
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error TT_Load_Glyph( TT_Size size, TT_Load_Glyph( TT_Size size,
TT_GlyphSlot glyph, TT_GlyphSlot glyph,
FT_UShort glyph_index, FT_UShort glyph_index,
FT_UInt load_flags ) FT_UInt load_flags )
{ {
SFNT_Interface* sfnt; SFNT_Interface* sfnt;
TT_Face face; TT_Face face;

View File

@ -31,20 +31,20 @@
FT_BEGIN_HEADER FT_BEGIN_HEADER
FT_LOCAL FT_LOCAL void
void TT_Get_Metrics( TT_HoriHeader* header, TT_Get_Metrics( TT_HoriHeader* header,
FT_UInt index, FT_UInt index,
FT_Short* bearing, FT_Short* bearing,
FT_UShort* advance ); FT_UShort* advance );
FT_LOCAL FT_LOCAL void
void TT_Init_Glyph_Loading( TT_Face face ); TT_Init_Glyph_Loading( TT_Face face );
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Load_Glyph( TT_Size size, TT_Load_Glyph( TT_Size size,
TT_GlyphSlot glyph, TT_GlyphSlot glyph,
FT_UShort glyph_index, FT_UShort glyph_index,
FT_UInt load_flags ); FT_UInt load_flags );
FT_END_HEADER FT_END_HEADER

File diff suppressed because it is too large Load Diff

View File

@ -67,25 +67,30 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/* Rounding function */ /* Rounding function */
typedef FT_F26Dot6 (*TT_Round_Func)( EXEC_OP_ FT_F26Dot6 distance, typedef FT_F26Dot6
FT_F26Dot6 compensation ); (*TT_Round_Func)( EXEC_OP_ FT_F26Dot6 distance,
FT_F26Dot6 compensation );
/* Point displacement along the freedom vector routine */ /* Point displacement along the freedom vector routine */
typedef void (*TT_Move_Func)( EXEC_OP_ TT_GlyphZone* zone, typedef void
FT_UInt point, (*TT_Move_Func)( EXEC_OP_ TT_GlyphZone* zone,
FT_F26Dot6 distance ); FT_UInt point,
FT_F26Dot6 distance );
/* Distance projection along one of the projection vectors */ /* Distance projection along one of the projection vectors */
typedef FT_F26Dot6 (*TT_Project_Func)( EXEC_OP_ FT_Vector* v1, typedef FT_F26Dot6
FT_Vector* v2 ); (*TT_Project_Func)( EXEC_OP_ FT_Vector* v1,
FT_Vector* v2 );
/* reading a cvt value. Take care of non-square pixels if necessary */ /* reading a cvt value. Take care of non-square pixels if necessary */
typedef FT_F26Dot6 (*TT_Get_CVT_Func)( EXEC_OP_ FT_ULong index ); typedef FT_F26Dot6
(*TT_Get_CVT_Func)( EXEC_OP_ FT_ULong index );
/* setting or moving a cvt value. Take care of non-square pixels */ /* setting or moving a cvt value. Take care of non-square pixels */
/* if necessary */ /* if necessary */
typedef void (*TT_Set_CVT_Func)( EXEC_OP_ FT_ULong index, typedef void
FT_F26Dot6 value ); (*TT_Set_CVT_Func)( EXEC_OP_ FT_ULong index,
FT_F26Dot6 value );
/*************************************************************************/ /*************************************************************************/
@ -219,20 +224,20 @@ FT_BEGIN_HEADER
extern const TT_GraphicsState tt_default_graphics_state; extern const TT_GraphicsState tt_default_graphics_state;
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Goto_CodeRange( TT_ExecContext exec, TT_Goto_CodeRange( TT_ExecContext exec,
FT_Int range, FT_Int range,
FT_Long IP ); FT_Long IP );
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Set_CodeRange( TT_ExecContext exec, TT_Set_CodeRange( TT_ExecContext exec,
FT_Int range, FT_Int range,
void* base, void* base,
FT_Long length ); FT_Long length );
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Clear_CodeRange( TT_ExecContext exec, TT_Clear_CodeRange( TT_ExecContext exec,
FT_Int range ); FT_Int range );
/*************************************************************************/ /*************************************************************************/
@ -254,28 +259,29 @@ FT_BEGIN_HEADER
/* <Note> */ /* <Note> */
/* Only the glyph loader and debugger should call this function. */ /* Only the glyph loader and debugger should call this function. */
/* */ /* */
FT_EXPORT( TT_ExecContext ) TT_New_Context( TT_Face face ); FT_EXPORT( TT_ExecContext )
TT_New_Context( TT_Face face );
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Done_Context( TT_ExecContext exec ); TT_Done_Context( TT_ExecContext exec );
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Destroy_Context( TT_ExecContext exec, TT_Destroy_Context( TT_ExecContext exec,
FT_Memory memory ); FT_Memory memory );
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Load_Context( TT_ExecContext exec, TT_Load_Context( TT_ExecContext exec,
TT_Face face, TT_Face face,
TT_Size size ); TT_Size size );
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Save_Context( TT_ExecContext exec, TT_Save_Context( TT_ExecContext exec,
TT_Size ins ); TT_Size ins );
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Run_Context( TT_ExecContext exec, TT_Run_Context( TT_ExecContext exec,
FT_Bool debug ); FT_Bool debug );
/*************************************************************************/ /*************************************************************************/
@ -299,7 +305,8 @@ FT_BEGIN_HEADER
/* This function is publicly exported because it is directly */ /* This function is publicly exported because it is directly */
/* invoked by the TrueType debugger. */ /* invoked by the TrueType debugger. */
/* */ /* */
FT_EXPORT( FT_Error ) TT_RunIns( TT_ExecContext exec ); FT_EXPORT( FT_Error )
TT_RunIns( TT_ExecContext exec );
FT_END_HEADER FT_END_HEADER

View File

@ -65,8 +65,8 @@
/* <Input> */ /* <Input> */
/* zone :: A pointer to the target glyph zone. */ /* zone :: A pointer to the target glyph zone. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF void
void TT_Done_GlyphZone( TT_GlyphZone* zone ) TT_Done_GlyphZone( TT_GlyphZone* zone )
{ {
FT_Memory memory = zone->memory; FT_Memory memory = zone->memory;
@ -102,11 +102,11 @@
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error TT_New_GlyphZone( FT_Memory memory, TT_New_GlyphZone( FT_Memory memory,
FT_UShort maxPoints, FT_UShort maxPoints,
FT_Short maxContours, FT_Short maxContours,
TT_GlyphZone* zone ) TT_GlyphZone* zone )
{ {
FT_Error error; FT_Error error;
@ -153,12 +153,12 @@
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error TT_Init_Face( FT_Stream stream, TT_Init_Face( FT_Stream stream,
TT_Face face, TT_Face face,
FT_Int face_index, FT_Int face_index,
FT_Int num_params, FT_Int num_params,
FT_Parameter* params ) FT_Parameter* params )
{ {
FT_Error error; FT_Error error;
FT_Library library; FT_Library library;
@ -224,8 +224,8 @@
/* <Input> */ /* <Input> */
/* face :: A pointer to the face object to destroy. */ /* face :: A pointer to the face object to destroy. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF void
void TT_Done_Face( TT_Face face ) TT_Done_Face( TT_Face face )
{ {
FT_Memory memory = face->root.memory; FT_Memory memory = face->root.memory;
FT_Stream stream = face->root.stream; FT_Stream stream = face->root.stream;
@ -277,8 +277,8 @@
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error TT_Init_Size( TT_Size size ) TT_Init_Size( TT_Size size )
{ {
FT_Error error = TT_Err_Ok; FT_Error error = TT_Err_Ok;
@ -464,8 +464,8 @@
/* <Input> */ /* <Input> */
/* size :: A handle to the target size object. */ /* size :: A handle to the target size object. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF void
void TT_Done_Size( TT_Size size ) TT_Done_Size( TT_Size size )
{ {
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
@ -519,8 +519,8 @@
/* <Input> */ /* <Input> */
/* size :: A handle to the target size object. */ /* size :: A handle to the target size object. */
/* */ /* */
static static FT_Error
FT_Error Reset_Outline_Size( TT_Size size ) Reset_Outline_Size( TT_Size size )
{ {
TT_Face face; TT_Face face;
FT_Error error = TT_Err_Ok; FT_Error error = TT_Err_Ok;
@ -670,8 +670,8 @@
/* <Input> */ /* <Input> */
/* size :: A handle to the target size object. */ /* size :: A handle to the target size object. */
/* */ /* */
static static FT_Error
FT_Error Reset_SBit_Size( TT_Size size ) Reset_SBit_Size( TT_Size size )
{ {
TT_Face face; TT_Face face;
FT_Error error = TT_Err_Ok; FT_Error error = TT_Err_Ok;
@ -756,8 +756,8 @@
/* <Input> */ /* <Input> */
/* size :: A handle to the target size object. */ /* size :: A handle to the target size object. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error TT_Reset_Size( TT_Size size ) TT_Reset_Size( TT_Size size )
{ {
FT_Face face; FT_Face face;
FT_Error error = TT_Err_Ok; FT_Error error = TT_Err_Ok;
@ -808,8 +808,8 @@
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error TT_Init_Driver( TT_Driver driver ) TT_Init_Driver( TT_Driver driver )
{ {
FT_Error error; FT_Error error;
@ -839,8 +839,8 @@
/* <Input> */ /* <Input> */
/* driver :: A handle to the target TrueType driver. */ /* driver :: A handle to the target TrueType driver. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF void
void TT_Done_Driver( TT_Driver driver ) TT_Done_Driver( TT_Driver driver )
{ {
/* destroy extensions registry if needed */ /* destroy extensions registry if needed */

View File

@ -107,14 +107,14 @@ FT_BEGIN_HEADER
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER #ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
FT_LOCAL FT_LOCAL void
void TT_Done_GlyphZone( TT_GlyphZone* zone ); TT_Done_GlyphZone( TT_GlyphZone* zone );
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_New_GlyphZone( FT_Memory memory, TT_New_GlyphZone( FT_Memory memory,
FT_UShort maxPoints, FT_UShort maxPoints,
FT_Short maxContours, FT_Short maxContours,
TT_GlyphZone* zone ); TT_GlyphZone* zone );
#endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */ #endif /* TT_CONFIG_OPTION_BYTECODE_INTERPRETER */
@ -378,40 +378,40 @@ FT_BEGIN_HEADER
/* */ /* */
/* Face functions */ /* Face functions */
/* */ /* */
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Init_Face( FT_Stream stream, TT_Init_Face( FT_Stream stream,
TT_Face face, TT_Face face,
FT_Int face_index, FT_Int face_index,
FT_Int num_params, FT_Int num_params,
FT_Parameter* params ); FT_Parameter* params );
FT_LOCAL FT_LOCAL void
void TT_Done_Face( TT_Face face ); TT_Done_Face( TT_Face face );
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* Size functions */ /* Size functions */
/* */ /* */
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Init_Size( TT_Size size ); TT_Init_Size( TT_Size size );
FT_LOCAL FT_LOCAL void
void TT_Done_Size( TT_Size size ); TT_Done_Size( TT_Size size );
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Reset_Size( TT_Size size ); TT_Reset_Size( TT_Size size );
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* Driver functions */ /* Driver functions */
/* */ /* */
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Init_Driver( TT_Driver driver ); TT_Init_Driver( TT_Driver driver );
FT_LOCAL FT_LOCAL void
void TT_Done_Driver( TT_Driver driver ); TT_Done_Driver( TT_Driver driver );
FT_END_HEADER FT_END_HEADER

View File

@ -54,9 +54,9 @@
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error TT_Load_Locations( TT_Face face, TT_Load_Locations( TT_Face face,
FT_Stream stream ) FT_Stream stream )
{ {
FT_Error error; FT_Error error;
FT_Memory memory = stream->memory; FT_Memory memory = stream->memory;
@ -147,9 +147,9 @@
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error TT_Load_CVT( TT_Face face, TT_Load_CVT( TT_Face face,
FT_Stream stream ) FT_Stream stream )
{ {
FT_Error error; FT_Error error;
FT_Memory memory = stream->memory; FT_Memory memory = stream->memory;
@ -214,9 +214,9 @@
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error TT_Load_Programs( TT_Face face, TT_Load_Programs( TT_Face face,
FT_Stream stream ) FT_Stream stream )
{ {
FT_Error error; FT_Error error;
FT_ULong table_len; FT_ULong table_len;

View File

@ -27,17 +27,17 @@
FT_BEGIN_HEADER FT_BEGIN_HEADER
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Load_Locations( TT_Face face, TT_Load_Locations( TT_Face face,
FT_Stream stream ); FT_Stream stream );
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Load_CVT( TT_Face face, TT_Load_CVT( TT_Face face,
FT_Stream stream ); FT_Stream stream );
FT_LOCAL FT_LOCAL FT_Error
FT_Error TT_Load_Programs( TT_Face face, TT_Load_Programs( TT_Face face,
FT_Stream stream ); FT_Stream stream );
FT_END_HEADER FT_END_HEADER

View File

@ -35,9 +35,9 @@
#define FT_COMPONENT trace_t1afm #define FT_COMPONENT trace_t1afm
FT_LOCAL_DEF FT_LOCAL_DEF void
void T1_Done_AFM( FT_Memory memory, T1_Done_AFM( FT_Memory memory,
T1_AFM* afm ) T1_AFM* afm )
{ {
FREE( afm->kern_pairs ); FREE( afm->kern_pairs );
afm->num_pairs = 0; afm->num_pairs = 0;
@ -53,10 +53,10 @@
/* read a glyph name and return the equivalent glyph index */ /* read a glyph name and return the equivalent glyph index */
static static FT_UInt
FT_UInt afm_atoindex( FT_Byte** start, afm_atoindex( FT_Byte** start,
FT_Byte* limit, FT_Byte* limit,
T1_Font* type1 ) T1_Font* type1 )
{ {
FT_Byte* p = *start; FT_Byte* p = *start;
FT_Int len; FT_Int len;
@ -104,9 +104,9 @@
/* read an integer */ /* read an integer */
static static int
int afm_atoi( FT_Byte** start, afm_atoi( FT_Byte** start,
FT_Byte* limit ) FT_Byte* limit )
{ {
FT_Byte* p = *start; FT_Byte* p = *start;
int sum = 0; int sum = 0;
@ -139,7 +139,7 @@
/* compare two kerning pairs */ /* compare two kerning pairs */
FT_CALLBACK_DEF(int) FT_CALLBACK_DEF( int )
compare_kern_pairs( const void* a, compare_kern_pairs( const void* a,
const void* b ) const void* b )
{ {
@ -155,9 +155,9 @@
/* parse an AFM file -- for now, only read the kerning pairs */ /* parse an AFM file -- for now, only read the kerning pairs */
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error T1_Read_AFM( FT_Face t1_face, T1_Read_AFM( FT_Face t1_face,
FT_Stream stream ) FT_Stream stream )
{ {
FT_Error error; FT_Error error;
FT_Memory memory = stream->memory; FT_Memory memory = stream->memory;
@ -241,11 +241,11 @@
/* find the kerning for a given glyph pair */ /* find the kerning for a given glyph pair */
FT_LOCAL_DEF FT_LOCAL_DEF void
void T1_Get_Kerning( T1_AFM* afm, T1_Get_Kerning( T1_AFM* afm,
FT_UInt glyph1, FT_UInt glyph1,
FT_UInt glyph2, FT_UInt glyph2,
FT_Vector* kerning ) FT_Vector* kerning )
{ {
T1_Kern_Pair *min, *mid, *max; T1_Kern_Pair *min, *mid, *max;
FT_ULong index = KERN_INDEX( glyph1, glyph2 ); FT_ULong index = KERN_INDEX( glyph1, glyph2 );

View File

@ -43,19 +43,19 @@ FT_BEGIN_HEADER
} T1_AFM; } T1_AFM;
FT_LOCAL FT_LOCAL FT_Error
FT_Error T1_Read_AFM( FT_Face face, T1_Read_AFM( FT_Face face,
FT_Stream stream ); FT_Stream stream );
FT_LOCAL FT_LOCAL void
void T1_Done_AFM( FT_Memory memory, T1_Done_AFM( FT_Memory memory,
T1_AFM* afm ); T1_AFM* afm );
FT_LOCAL FT_LOCAL void
void T1_Get_Kerning( T1_AFM* afm, T1_Get_Kerning( T1_AFM* afm,
FT_UInt glyph1, FT_UInt glyph1,
FT_UInt glyph2, FT_UInt glyph2,
FT_Vector* kerning ); FT_Vector* kerning );
FT_END_HEADER FT_END_HEADER

View File

@ -44,11 +44,11 @@
#define FT_COMPONENT trace_t1driver #define FT_COMPONENT trace_t1driver
static static FT_Error
FT_Error get_t1_glyph_name( T1_Face face, get_t1_glyph_name( T1_Face face,
FT_UInt glyph_index, FT_UInt glyph_index,
FT_Pointer buffer, FT_Pointer buffer,
FT_UInt buffer_max ) FT_UInt buffer_max )
{ {
FT_String* gname; FT_String* gname;
@ -98,9 +98,9 @@
/* isn't available (i.e., wasn't compiled in the driver at build */ /* isn't available (i.e., wasn't compiled in the driver at build */
/* time). */ /* time). */
/* */ /* */
static static FT_Module_Interface
FT_Module_Interface Get_Interface( FT_Driver driver, Get_Interface( FT_Driver driver,
const FT_String* interface ) const FT_String* interface )
{ {
FT_UNUSED( driver ); FT_UNUSED( driver );
FT_UNUSED( interface ); FT_UNUSED( interface );
@ -156,11 +156,11 @@
/* */ /* */
/* They can be implemented by format-specific interfaces. */ /* They can be implemented by format-specific interfaces. */
/* */ /* */
static static FT_Error
FT_Error Get_Kerning( T1_Face face, Get_Kerning( T1_Face face,
FT_UInt left_glyph, FT_UInt left_glyph,
FT_UInt right_glyph, FT_UInt right_glyph,
FT_Vector* kerning ) FT_Vector* kerning )
{ {
T1_AFM* afm; T1_AFM* afm;
@ -194,9 +194,9 @@
/* <Return> */ /* <Return> */
/* Glyph index. 0 means `undefined character code'. */ /* Glyph index. 0 means `undefined character code'. */
/* */ /* */
static static FT_UInt
FT_UInt Get_Char_Index( FT_CharMap charmap, Get_Char_Index( FT_CharMap charmap,
FT_Long charcode ) FT_Long charcode )
{ {
T1_Face face; T1_Face face;
FT_UInt result = 0; FT_UInt result = 0;
@ -344,7 +344,8 @@
/* format-specific interface can then be retrieved through the method */ /* format-specific interface can then be retrieved through the method */
/* interface->get_format_interface. */ /* interface->get_format_interface. */
/* */ /* */
FT_EXPORT_DEF( const FT_Driver_Class* ) getDriverClass( void ) FT_EXPORT_DEF( const FT_Driver_Class* )
getDriverClass( void )
{ {
return &t1_driver_class; return &t1_driver_class;
} }

View File

@ -55,7 +55,7 @@
/*************************************************************************/ /*************************************************************************/
FT_CALLBACK_DEF(FT_Error) FT_CALLBACK_DEF( FT_Error )
T1_Parse_Glyph( T1_Decoder* decoder, T1_Parse_Glyph( T1_Decoder* decoder,
FT_UInt glyph_index ) FT_UInt glyph_index )
{ {
@ -73,9 +73,9 @@
} }
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error T1_Compute_Max_Advance( T1_Face face, T1_Compute_Max_Advance( T1_Face face,
FT_Int* max_advance ) FT_Int* max_advance )
{ {
FT_Error error; FT_Error error;
T1_Decoder decoder; T1_Decoder decoder;
@ -135,11 +135,11 @@
/*************************************************************************/ /*************************************************************************/
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error T1_Load_Glyph( T1_GlyphSlot glyph, T1_Load_Glyph( T1_GlyphSlot glyph,
T1_Size size, T1_Size size,
FT_Int glyph_index, FT_Int glyph_index,
FT_Int load_flags ) FT_Int load_flags )
{ {
FT_Error error; FT_Error error;
T1_Decoder decoder; T1_Decoder decoder;

View File

@ -27,15 +27,15 @@
FT_BEGIN_HEADER FT_BEGIN_HEADER
FT_LOCAL FT_LOCAL FT_Error
FT_Error T1_Compute_Max_Advance( T1_Face face, T1_Compute_Max_Advance( T1_Face face,
FT_Int* max_advance ); FT_Int* max_advance );
FT_LOCAL FT_LOCAL FT_Error
FT_Error T1_Load_Glyph( T1_GlyphSlot glyph, T1_Load_Glyph( T1_GlyphSlot glyph,
T1_Size size, T1_Size size,
FT_Int glyph_index, FT_Int glyph_index,
FT_Int load_flags ); FT_Int load_flags );
FT_END_HEADER FT_END_HEADER

View File

@ -96,10 +96,10 @@
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
static static FT_Error
FT_Error t1_allocate_blend( T1_Face face, t1_allocate_blend( T1_Face face,
FT_UInt num_designs, FT_UInt num_designs,
FT_UInt num_axis ) FT_UInt num_axis )
{ {
T1_Blend* blend; T1_Blend* blend;
FT_Memory memory = face->root.memory; FT_Memory memory = face->root.memory;
@ -180,9 +180,9 @@
} }
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error T1_Get_Multi_Master( T1_Face face, T1_Get_Multi_Master( T1_Face face,
FT_Multi_Master* master ) FT_Multi_Master* master )
{ {
T1_Blend* blend = face->blend; T1_Blend* blend = face->blend;
FT_UInt n; FT_UInt n;
@ -212,10 +212,10 @@
} }
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error T1_Set_MM_Blend( T1_Face face, T1_Set_MM_Blend( T1_Face face,
FT_UInt num_coords, FT_UInt num_coords,
FT_Fixed* coords ) FT_Fixed* coords )
{ {
T1_Blend* blend = face->blend; T1_Blend* blend = face->blend;
FT_Error error; FT_Error error;
@ -258,10 +258,10 @@
} }
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error T1_Set_MM_Design( T1_Face face, T1_Set_MM_Design( T1_Face face,
FT_UInt num_coords, FT_UInt num_coords,
FT_Long* coords ) FT_Long* coords )
{ {
T1_Blend* blend = face->blend; T1_Blend* blend = face->blend;
FT_Error error; FT_Error error;
@ -328,8 +328,8 @@
} }
FT_LOCAL_DEF FT_LOCAL_DEF void
void T1_Done_Blend( T1_Face face ) T1_Done_Blend( T1_Face face )
{ {
FT_Memory memory = face->root.memory; FT_Memory memory = face->root.memory;
T1_Blend* blend = face->blend; T1_Blend* blend = face->blend;
@ -380,9 +380,9 @@
} }
static static void
void parse_blend_axis_types( T1_Face face, parse_blend_axis_types( T1_Face face,
T1_Loader* loader ) T1_Loader* loader )
{ {
T1_Token axis_tokens[ T1_MAX_MM_AXIS ]; T1_Token axis_tokens[ T1_MAX_MM_AXIS ];
FT_Int n, num_axis; FT_Int n, num_axis;
@ -441,9 +441,9 @@
} }
static static void
void parse_blend_design_positions( T1_Face face, parse_blend_design_positions( T1_Face face,
T1_Loader* loader ) T1_Loader* loader )
{ {
T1_Token design_tokens[ T1_MAX_MM_DESIGNS ]; T1_Token design_tokens[ T1_MAX_MM_DESIGNS ];
FT_Int num_designs; FT_Int num_designs;
@ -523,9 +523,9 @@
} }
static static void
void parse_blend_design_map( T1_Face face, parse_blend_design_map( T1_Face face,
T1_Loader* loader ) T1_Loader* loader )
{ {
FT_Error error = 0; FT_Error error = 0;
T1_ParserRec* parser = &loader->parser; T1_ParserRec* parser = &loader->parser;
@ -604,9 +604,9 @@
} }
static static void
void parse_weight_vector( T1_Face face, parse_weight_vector( T1_Face face,
T1_Loader* loader ) T1_Loader* loader )
{ {
FT_Error error = 0; FT_Error error = 0;
T1_ParserRec* parser = &loader->parser; T1_ParserRec* parser = &loader->parser;
@ -656,9 +656,9 @@
/* with a lot of Postscript garbage behind it (that's completely out */ /* with a lot of Postscript garbage behind it (that's completely out */
/* of spec!); we detect it and terminate the parsing */ /* of spec!); we detect it and terminate the parsing */
/* */ /* */
static static void
void parse_shared_dict( T1_Face face, parse_shared_dict( T1_Face face,
T1_Loader* loader ) T1_Loader* loader )
{ {
T1_ParserRec* parser = &loader->parser; T1_ParserRec* parser = &loader->parser;
@ -689,10 +689,10 @@
/*************************************************************************/ /*************************************************************************/
static static FT_Error
FT_Error t1_load_keyword( T1_Face face, t1_load_keyword( T1_Face face,
T1_Loader* loader, T1_Loader* loader,
T1_Field* field ) T1_Field* field )
{ {
FT_Error error; FT_Error error;
void* dummy_object; void* dummy_object;
@ -756,25 +756,24 @@
} }
static static int
int is_space( FT_Byte c ) is_space( FT_Byte c )
{ {
return ( c == ' ' || c == '\t' || c == '\r' || c == '\n' ); return ( c == ' ' || c == '\t' || c == '\r' || c == '\n' );
} }
static static int
int is_alpha( FT_Byte c ) is_alpha( FT_Byte c )
{ {
return ( isalnum( c ) || c == '.' || c == '_' || c == '-' ); return ( isalnum( c ) || c == '.' || c == '_' || c == '-' );
} }
static int
static read_binary_data( T1_ParserRec* parser,
int read_binary_data( T1_ParserRec* parser, FT_Int* size,
FT_Int* size, FT_Byte** base )
FT_Byte** base )
{ {
FT_Byte* cur; FT_Byte* cur;
FT_Byte* limit = parser->root.limit; FT_Byte* limit = parser->root.limit;
@ -813,9 +812,9 @@
/* the `/Encoding', `/Subrs', and `/CharStrings' */ /* the `/Encoding', `/Subrs', and `/CharStrings' */
/* dictionaries */ /* dictionaries */
static static void
void parse_font_name( T1_Face face, parse_font_name( T1_Face face,
T1_Loader* loader ) T1_Loader* loader )
{ {
T1_ParserRec* parser = &loader->parser; T1_ParserRec* parser = &loader->parser;
FT_Error error; FT_Error error;
@ -855,9 +854,9 @@
} }
static static void
void parse_font_bbox( T1_Face face, parse_font_bbox( T1_Face face,
T1_Loader* loader ) T1_Loader* loader )
{ {
T1_ParserRec* parser = &loader->parser; T1_ParserRec* parser = &loader->parser;
FT_Fixed temp[4]; FT_Fixed temp[4];
@ -872,9 +871,9 @@
} }
static static void
void parse_font_matrix( T1_Face face, parse_font_matrix( T1_Face face,
T1_Loader* loader ) T1_Loader* loader )
{ {
T1_ParserRec* parser = &loader->parser; T1_ParserRec* parser = &loader->parser;
FT_Matrix* matrix = &face->type1.font_matrix; FT_Matrix* matrix = &face->type1.font_matrix;
@ -921,9 +920,9 @@
} }
static static void
void parse_encoding( T1_Face face, parse_encoding( T1_Face face,
T1_Loader* loader ) T1_Loader* loader )
{ {
T1_ParserRec* parser = &loader->parser; T1_ParserRec* parser = &loader->parser;
FT_Byte* cur = parser->root.cursor; FT_Byte* cur = parser->root.cursor;
@ -1081,9 +1080,9 @@
} }
static static void
void parse_subrs( T1_Face face, parse_subrs( T1_Face face,
T1_Loader* loader ) T1_Loader* loader )
{ {
T1_ParserRec* parser = &loader->parser; T1_ParserRec* parser = &loader->parser;
PS_Table* table = &loader->subrs; PS_Table* table = &loader->subrs;
@ -1166,9 +1165,9 @@
} }
static static void
void parse_charstrings( T1_Face face, parse_charstrings( T1_Face face,
T1_Loader* loader ) T1_Loader* loader )
{ {
T1_ParserRec* parser = &loader->parser; T1_ParserRec* parser = &loader->parser;
PS_Table* code_table = &loader->charstrings; PS_Table* code_table = &loader->charstrings;
@ -1448,11 +1447,11 @@
}; };
static static FT_Error
FT_Error parse_dict( T1_Face face, parse_dict( T1_Face face,
T1_Loader* loader, T1_Loader* loader,
FT_Byte* base, FT_Byte* base,
FT_Long size ) FT_Long size )
{ {
T1_ParserRec* parser = &loader->parser; T1_ParserRec* parser = &loader->parser;
@ -1565,9 +1564,9 @@
} }
static static void
void t1_init_loader( T1_Loader* loader, t1_init_loader( T1_Loader* loader,
T1_Face face ) T1_Face face )
{ {
FT_UNUSED( face ); FT_UNUSED( face );
@ -1585,8 +1584,8 @@
} }
static static void
void t1_done_loader( T1_Loader* loader ) t1_done_loader( T1_Loader* loader )
{ {
T1_ParserRec* parser = &loader->parser; T1_ParserRec* parser = &loader->parser;
@ -1603,8 +1602,8 @@
} }
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error T1_Open_Face( T1_Face face ) T1_Open_Face( T1_Face face )
{ {
T1_Loader loader; T1_Loader loader;
T1_ParserRec* parser; T1_ParserRec* parser;

View File

@ -51,27 +51,27 @@ FT_BEGIN_HEADER
} T1_Loader; } T1_Loader;
FT_LOCAL FT_LOCAL FT_Error
FT_Error T1_Open_Face( T1_Face face ); T1_Open_Face( T1_Face face );
#ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT #ifndef T1_CONFIG_OPTION_NO_MM_SUPPORT
FT_LOCAL FT_LOCAL FT_Error
FT_Error T1_Get_Multi_Master( T1_Face face, T1_Get_Multi_Master( T1_Face face,
FT_Multi_Master* master ); FT_Multi_Master* master );
FT_LOCAL FT_LOCAL FT_Error
FT_Error T1_Set_MM_Blend( T1_Face face, T1_Set_MM_Blend( T1_Face face,
FT_UInt num_coords, FT_UInt num_coords,
FT_Fixed* coords ); FT_Fixed* coords );
FT_LOCAL FT_LOCAL FT_Error
FT_Error T1_Set_MM_Design( T1_Face face, T1_Set_MM_Design( T1_Face face,
FT_UInt num_coords, FT_UInt num_coords,
FT_Long* coords ); FT_Long* coords );
FT_LOCAL FT_LOCAL void
void T1_Done_Blend( T1_Face face ); T1_Done_Blend( T1_Face face );
#endif /* !T1_CONFIG_OPTION_NO_MM_SUPPORT */ #endif /* !T1_CONFIG_OPTION_NO_MM_SUPPORT */

View File

@ -63,8 +63,8 @@
/* <Input> */ /* <Input> */
/* face :: A typeless pointer to the face object to destroy. */ /* face :: A typeless pointer to the face object to destroy. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF void
void T1_Done_Face( T1_Face face ) T1_Done_Face( T1_Face face )
{ {
FT_Memory memory; FT_Memory memory;
T1_Font* type1 = &face->type1; T1_Font* type1 = &face->type1;
@ -147,12 +147,12 @@
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error T1_Init_Face( FT_Stream stream, T1_Init_Face( FT_Stream stream,
T1_Face face, T1_Face face,
FT_Int face_index, FT_Int face_index,
FT_Int num_params, FT_Int num_params,
FT_Parameter* params ) FT_Parameter* params )
{ {
FT_Error error; FT_Error error;
PSNames_Interface* psnames; PSNames_Interface* psnames;
@ -386,8 +386,8 @@
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0 means success. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error T1_Init_Driver( T1_Driver driver ) T1_Init_Driver( T1_Driver driver )
{ {
FT_UNUSED( driver ); FT_UNUSED( driver );
@ -406,8 +406,8 @@
/* <Input> */ /* <Input> */
/* driver :: A handle to the target Type 1 driver. */ /* driver :: A handle to the target Type 1 driver. */
/* */ /* */
FT_LOCAL_DEF FT_LOCAL_DEF void
void T1_Done_Driver( T1_Driver driver ) T1_Done_Driver( T1_Driver driver )
{ {
FT_UNUSED( driver ); FT_UNUSED( driver );
} }

View File

@ -135,21 +135,21 @@ FT_BEGIN_HEADER
} T1_GlyphSlotRec; } T1_GlyphSlotRec;
FT_LOCAL FT_LOCAL FT_Error
FT_Error T1_Init_Face( FT_Stream stream, T1_Init_Face( FT_Stream stream,
T1_Face face, T1_Face face,
FT_Int face_index, FT_Int face_index,
FT_Int num_params, FT_Int num_params,
FT_Parameter* params ); FT_Parameter* params );
FT_LOCAL FT_LOCAL void
void T1_Done_Face( T1_Face face ); T1_Done_Face( T1_Face face );
FT_LOCAL FT_LOCAL FT_Error
FT_Error T1_Init_Driver( T1_Driver driver ); T1_Init_Driver( T1_Driver driver );
FT_LOCAL FT_LOCAL void
void T1_Done_Driver( T1_Driver driver ); T1_Done_Driver( T1_Driver driver );
FT_END_HEADER FT_END_HEADER

View File

@ -95,10 +95,10 @@
}; };
static static FT_Error
FT_Error read_pfb_tag( FT_Stream stream, read_pfb_tag( FT_Stream stream,
FT_UShort* tag, FT_UShort* tag,
FT_Long* size ) FT_Long* size )
{ {
FT_Error error; FT_Error error;
PFB_Tag head; PFB_Tag head;
@ -118,11 +118,11 @@
} }
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error T1_New_Parser( T1_ParserRec* parser, T1_New_Parser( T1_ParserRec* parser,
FT_Stream stream, FT_Stream stream,
FT_Memory memory, FT_Memory memory,
PSAux_Interface* psaux ) PSAux_Interface* psaux )
{ {
FT_Error error; FT_Error error;
FT_UShort tag; FT_UShort tag;
@ -227,8 +227,8 @@
} }
FT_LOCAL_DEF FT_LOCAL_DEF void
void T1_Finalize_Parser( T1_ParserRec* parser ) T1_Finalize_Parser( T1_ParserRec* parser )
{ {
FT_Memory memory = parser->root.memory; FT_Memory memory = parser->root.memory;
@ -245,8 +245,8 @@
/* return the value of an hexadecimal digit */ /* return the value of an hexadecimal digit */
static static int
int hexa_value( char c ) hexa_value( char c )
{ {
unsigned int d; unsigned int d;
@ -267,9 +267,9 @@
} }
FT_LOCAL_DEF FT_LOCAL_DEF FT_Error
FT_Error T1_Get_Private_Dict( T1_ParserRec* parser, T1_Get_Private_Dict( T1_ParserRec* parser,
PSAux_Interface* psaux ) PSAux_Interface* psaux )
{ {
FT_Stream stream = parser->stream; FT_Stream stream = parser->stream;
FT_Memory memory = parser->root.memory; FT_Memory memory = parser->root.memory;

View File

@ -112,18 +112,18 @@ FT_BEGIN_HEADER
(p)->root.funcs.load_field_table( &(p)->root, f, o, m, pf ) (p)->root.funcs.load_field_table( &(p)->root, f, o, m, pf )
FT_LOCAL FT_LOCAL FT_Error
FT_Error T1_New_Parser( T1_ParserRec* parser, T1_New_Parser( T1_ParserRec* parser,
FT_Stream stream, FT_Stream stream,
FT_Memory memory, FT_Memory memory,
PSAux_Interface* psaux ); PSAux_Interface* psaux );
FT_LOCAL FT_LOCAL FT_Error
FT_Error T1_Get_Private_Dict( T1_ParserRec* parser, T1_Get_Private_Dict( T1_ParserRec* parser,
PSAux_Interface* psaux ); PSAux_Interface* psaux );
FT_LOCAL FT_LOCAL void
void T1_Finalize_Parser( T1_ParserRec* parser ); T1_Finalize_Parser( T1_ParserRec* parser );
FT_END_HEADER FT_END_HEADER

View File

@ -648,7 +648,8 @@
/* format-specific interface can then be retrieved through the method */ /* format-specific interface can then be retrieved through the method */
/* interface->get_format_interface. */ /* interface->get_format_interface. */
/* */ /* */
FT_EXPORT_DEF( const FT_Driver_Class* ) getDriverClass( void ) FT_EXPORT_DEF( const FT_Driver_Class* )
getDriverClass( void )
{ {
return &winfnt_driver_class; return &winfnt_driver_class;
} }