Formatting.

This commit is contained in:
Werner Lemberg 2000-07-18 06:50:03 +00:00
parent 2f8f154241
commit 0959a8777a
8 changed files with 360 additions and 313 deletions

View File

@ -7,8 +7,8 @@
/* Copyright 1996-2000 by */ /* Copyright 1996-2000 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used */ /* This file is part of the FreeType project, and may only be used, */
/* modified and distributed under the terms of the FreeType project */ /* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */ /* this file you indicate that you have read the license and */
/* understand and accept it fully. */ /* understand and accept it fully. */
@ -37,6 +37,7 @@
#define DIV_64( x, y ) ( (x) / (y) ) #define DIV_64( x, y ) ( (x) / (y) )
#ifdef FT_CONFIG_OPTION_OLD_CALCS #ifdef FT_CONFIG_OPTION_OLD_CALCS
#define SQRT_64( z ) FT_Sqrt64( z ) #define SQRT_64( z ) FT_Sqrt64( z )
@ -45,6 +46,7 @@
#endif /* FT_CONFIG_OPTION_OLD_CALCS */ #endif /* FT_CONFIG_OPTION_OLD_CALCS */
#else /* LONG64 */ #else /* LONG64 */
@ -55,10 +57,12 @@
} FT_Int64; } FT_Int64;
#define ADD_64( x, y, z ) FT_Add64( &x, &y, &z ) #define ADD_64( x, y, z ) FT_Add64( &x, &y, &z )
#define MUL_64( x, y, z ) FT_MulTo64( x, y, &z ) #define MUL_64( x, y, z ) FT_MulTo64( x, y, &z )
#define DIV_64( x, y ) FT_Div64by32( &x, y ) #define DIV_64( x, y ) FT_Div64by32( &x, y )
FT_EXPORT_DEF( void ) FT_Add64( FT_Int64* x, FT_EXPORT_DEF( void ) FT_Add64( FT_Int64* x,
FT_Int64* y, FT_Int64* y,
FT_Int64* z ); FT_Int64* z );
@ -70,13 +74,15 @@
FT_EXPORT_DEF( FT_Int32 ) FT_Div64by32( FT_Int64* x, FT_EXPORT_DEF( FT_Int32 ) FT_Div64by32( FT_Int64* x,
FT_Int32 y ); FT_Int32 y );
#ifdef FT_CONFIG_OPTION_OLD_CALCS #ifdef FT_CONFIG_OPTION_OLD_CALCS
#define SQRT_64( z ) FT_Sqrt64( &z ) #define SQRT_64( z ) FT_Sqrt64( &z )
FT_EXPORT_DEF( FT_Int32 ) FT_Sqrt64( FT_Int64* x ); FT_EXPORT_DEF( FT_Int32 ) FT_Sqrt64( FT_Int64* x );
#endif /* OLD_CALC */ #endif /* FT_CONFIG_OPTION_OLD_CALCS */
#endif /* LONG64 */ #endif /* LONG64 */
@ -87,7 +93,7 @@
BASE_DEF( FT_Int32 ) FT_Sqrt32( FT_Int32 x ); BASE_DEF( FT_Int32 ) FT_Sqrt32( FT_Int32 x );
#endif /* FT_CONFIG_OPTION_OLD_CALCS */ #endif /* !FT_CONFIG_OPTION_OLD_CALCS */
/*************************************************************************/ /*************************************************************************/
@ -106,6 +112,7 @@
#define ROUND_F26DOT6( x ) ( x >= 0 ? ( ( (x) + 32 ) & -64 ) \ #define ROUND_F26DOT6( x ) ( x >= 0 ? ( ( (x) + 32 ) & -64 ) \
: ( -( ( 32 - (x) ) & -64 ) ) ) : ( -( ( 32 - (x) ) & -64 ) ) )
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -7,8 +7,8 @@
/* Copyright 1996-2000 by */ /* Copyright 1996-2000 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used */ /* This file is part of the FreeType project, and may only be used, */
/* modified and distributed under the terms of the FreeType project */ /* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */ /* this file you indicate that you have read the license and */
/* understand and accept it fully. */ /* understand and accept it fully. */
@ -110,13 +110,12 @@
/* Windows fonts component */ /* Windows fonts component */
trace_winfnt, trace_winfnt,
/* other trace levels */
/* the last level must always be `trace_max' */ /* the last level must always be `trace_max' */
trace_max trace_max
} FT_Trace; } FT_Trace;
/* declared in ftdebug.c */ /* declared in ftdebug.c */
extern char ft_trace_levels[trace_max]; extern char ft_trace_levels[trace_max];

View File

@ -7,39 +7,39 @@
/* Copyright 1996-2000 by */ /* Copyright 1996-2000 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used */ /* This file is part of the FreeType project, and may only be used, */
/* modified and distributed under the terms of the FreeType project */ /* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */ /* this file you indicate that you have read the license and */
/* understand and accept it fully. */ /* understand and accept it fully. */
/* */ /* */
/***************************************************************************/ /***************************************************************************/
#ifndef FTDRIVER_H #ifndef FTDRIVER_H
#define FTDRIVER_H #define FTDRIVER_H
#include <freetype/ftmodule.h> #include <freetype/ftmodule.h>
#include <freetype/config/ftconfig.h> #include <freetype/config/ftconfig.h>
typedef FT_Error (*FTDriver_initFace)( FT_Stream stream, typedef FT_Error (*FTDriver_initFace)( FT_Stream stream,
FT_Face face, FT_Face face,
FT_Int typeface_index, FT_Int typeface_index,
FT_Int num_params, FT_Int num_params,
FT_Parameter* parameters ); FT_Parameter* parameters );
typedef void (*FTDriver_doneFace)( FT_Face face ); typedef void (*FTDriver_doneFace)( FT_Face face );
typedef FT_Error (*FTDriver_initSize)( FT_Size size ); typedef FT_Error (*FTDriver_initSize)( FT_Size size );
typedef void (*FTDriver_doneSize)( FT_Size size ); typedef void (*FTDriver_doneSize)( FT_Size size );
typedef FT_Error (*FTDriver_initGlyphSlot)( FT_GlyphSlot slot ); typedef FT_Error (*FTDriver_initGlyphSlot)( FT_GlyphSlot slot );
typedef void (*FTDriver_doneGlyphSlot)( FT_GlyphSlot slot ); typedef void (*FTDriver_doneGlyphSlot)( FT_GlyphSlot slot );
@ -68,7 +68,8 @@
FT_Vector* kerning ); FT_Vector* kerning );
typedef FT_Error (*FTDriver_attachFile)( FT_Face face, FT_Stream stream ); typedef FT_Error (*FTDriver_attachFile)( FT_Face face,
FT_Stream stream );
typedef FT_Error (*FTDriver_getAdvances)( FT_Face face, typedef FT_Error (*FTDriver_getAdvances)( FT_Face face,
@ -78,68 +79,72 @@
FT_UShort* advances ); FT_UShort* advances );
/************************************************************************* /*************************************************************************/
* /* */
* <Struct> /* <Struct> */
* FT_Driver_Class /* FT_Driver_Class */
* /* */
* <Description> /* <Description> */
* The font driver class. This structure mostly contains pointers to /* The font driver class. This structure mostly contains pointers to */
* driver methods. /* driver methods. */
* /* */
* <Fields> /* <Fields> */
* face_object_size :: size of a face object in bytes /* root :: The parent module. */
* size_object_size :: size of a size object in bytes /* */
* slot_object_size :: size of a glyph object in bytes /* face_object_size :: The size of a face object in bytes. */
* /* */
* init_face :: format-specific face constructor /* size_object_size :: The size of a size object in bytes. */
* done_face :: format-specific face destructor /* */
* /* slot_object_size :: The size of a glyph object in bytes. */
* init_size :: format-specific size constructor /* */
* done_size :: format-specific size destructor /* init_face :: The format-specific face constructor. */
* /* */
* init_slot :: format-specific slot constructor /* done_face :: The format-specific face destructor. */
* done_slot :: format-specific slot destructor /* */
* /* init_size :: The format-specific size constructor. */
* set_char_sizes :: handle to a function used to set the new character /* */
* size in points + resolution. can be set to 0 to /* done_size :: The format-specific size destructor. */
* indicate default behaviour /* */
* /* init_slot :: The format-specific slot constructor. */
* set_pixel_sizes :: handme to function used to set the new character /* */
* size in pixels. can be set to 0 to indicate /* done_slot :: The format-specific slot destructor. */
* default behaviour /* */
* /* set_char_sizes :: A handle to a function used to set the new */
* load_glyph :: load a given glyph image in a slot. This field /* character size in points + resolution. Can be */
* is mandatory ! /* set to 0 to indicate default behaviour. */
* /* */
* get_char_index :: return the glyph index of a given character /* set_pixel_sizes :: A handle to a function used to set the new */
* for a given charmap. This field is mandatory ! /* character size in pixels. Can be set to 0 to */
* /* indicate default behaviour. */
* get_kerning :: return the unscaled kerning for a given pair /* */
* of glyphs. can be set to 0 if the format doesn't /* load_glyph :: A function handle to load a given glyph image */
* support kerning. /* in a slot. This field is mandatory! */
* /* */
* attach_file :: reads additional data for a face from another /* get_char_index :: A function handle to return the glyph index of */
* file/stream. For example, this can be used /* a given character for a given charmap. This */
* to add data from AFM or PFM files on a Type 1 /* field is mandatory! */
* face, or a CIDMap on a CID-keyed face.. /* */
* /* get_kerning :: A function handle to return the unscaled */
* get_advances :: a function used to return the advances of 'count' /* kerning for a given pair of glyphs. Can be */
* glyphs, starting at 'index'. the "vertical" flags /* set to 0 if the format doesn't support */
* must be set when vertical advances are queried. /* kerning. */
* the advances buffer is caller-allocated /* */
* /* attach_file :: This function handle is used to read */
* get_bboxes :: a function used to return the bounding box of /* additional data for a face from another */
* 'count' glyphs, starting at 'index'. the bbox /* file/stream. For example, this can be used to */
* buffer is caller-allocated /* add data from AFM or PFM files on a Type 1 */
* /* face, or a CIDMap on a CID-keyed face. */
* <Note> /* */
* Most function pointers, with the exception of "load_glyph" and /* get_advances :: A function handle used to return the advances */
* "get_char_index" can be set to 0 to indicate a the default behaviour /* of 'count' glyphs, starting at `index'. the */
* /* `vertical' flags must be set when vertical */
* /* advances are queried. The advances buffer is */
*************************************************************************/ /* caller-allocated. */
/* */
/* <Note> */
/* Most function pointers, with the exception of `load_glyph' and */
/* `get_char_index' can be set to 0 to indicate a default behaviour. */
/* */
typedef struct FT_Driver_Class_ typedef struct FT_Driver_Class_
{ {
FT_Module_Class root; FT_Module_Class root;

View File

@ -7,17 +7,19 @@
/* Copyright 1996-2000 by */ /* Copyright 1996-2000 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used */ /* This file is part of the FreeType project, and may only be used, */
/* modified and distributed under the terms of the FreeType project */ /* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */ /* this file you indicate that you have read the license and */
/* understand and accept it fully. */ /* understand and accept it fully. */
/* */ /* */
/***************************************************************************/ /***************************************************************************/
#ifndef FTEXTEND_H #ifndef FTEXTEND_H
#define FTEXTEND_H #define FTEXTEND_H
#include <freetype/internal/ftobjs.h> #include <freetype/internal/ftobjs.h>
@ -25,6 +27,7 @@
extern "C" { extern "C" {
#endif #endif
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* The extensions don't need to be integrated at compile time into the */ /* The extensions don't need to be integrated at compile time into the */
@ -32,6 +35,7 @@
/* */ /* */
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
@ -44,6 +48,7 @@
/* */ /* */
/* <InOut> */ /* <InOut> */
/* ext :: A typeless pointer to the extension data. */ /* ext :: A typeless pointer to the extension data. */
/* */
/* face :: A handle to the source face object the extension is */ /* face :: A handle to the source face object the extension is */
/* associated with. */ /* associated with. */
/* */ /* */
@ -72,6 +77,7 @@
/* */ /* */
/* <InOut> */ /* <InOut> */
/* ext :: A typeless pointer to the extension data. */ /* ext :: A typeless pointer to the extension data. */
/* */
/* face :: A handle to the source face object the extension is */ /* face :: A handle to the source face object the extension is */
/* associated with. */ /* associated with. */
/* */ /* */
@ -93,10 +99,14 @@
/* id :: The extension's ID. This is a normal C string that */ /* id :: The extension's ID. This is a normal C string that */
/* is used to uniquely reference the extension's */ /* is used to uniquely reference the extension's */
/* interface. */ /* interface. */
/* */
/* size :: The size in bytes of the extension data that must be */ /* size :: The size in bytes of the extension data that must be */
/* associated with each face object. */ /* associated with each face object. */
/* */
/* init :: A pointer to the extension data's initializer. */ /* init :: A pointer to the extension data's initializer. */
/* */
/* finalize :: A pointer to the extension data's finalizer. */ /* finalize :: A pointer to the extension data's finalizer. */
/* */
/* interface :: This pointer can be anything, but should usually */ /* interface :: This pointer can be anything, but should usually */
/* point to a table of function pointers which implement */ /* point to a table of function pointers which implement */
/* the extension's interface. */ /* the extension's interface. */
@ -120,7 +130,8 @@
} FT_Extension_Class; } FT_Extension_Class;
FT_EXPORT_DEF(FT_Error) FT_Register_Extension( FT_Driver driver, FT_EXPORT_DEF( FT_Error ) FT_Register_Extension(
FT_Driver driver,
FT_Extension_Class* clazz ); FT_Extension_Class* clazz );
@ -149,11 +160,13 @@
#endif #endif
/* Returns an extension's data & interface according to its ID */ /* return an extension's data & interface according to its ID */
FT_EXPORT_DEF(void*) FT_Get_Extension( FT_Face face, FT_EXPORT_DEF( void* ) FT_Get_Extension(
FT_Face face,
const char* extension_id, const char* extension_id,
void** extension_interface ); void** extension_interface );
#ifdef __cplusplus #ifdef __cplusplus
} }
#endif #endif

View File

@ -7,14 +7,15 @@
/* Copyright 1996-2000 by */ /* Copyright 1996-2000 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used */ /* This file is part of the FreeType project, and may only be used, */
/* modified and distributed under the terms of the FreeType project */ /* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */ /* this file you indicate that you have read the license and */
/* understand and accept it fully. */ /* understand and accept it fully. */
/* */ /* */
/***************************************************************************/ /***************************************************************************/
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* This file implements functions relative to list processing. Its */ /* This file implements functions relative to list processing. Its */
@ -60,6 +61,7 @@
/* */ /* */
/* <Input> */ /* <Input> */
/* node :: The current iteration list node. */ /* node :: The current iteration list node. */
/* */
/* 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. */
/* */ /* */
@ -84,7 +86,9 @@
/* */ /* */
/* <Input> */ /* <Input> */
/* system :: The current system object. */ /* system :: The current system object. */
/* */
/* data :: The current object to destroy. */ /* data :: The current object to destroy. */
/* */
/* 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. */
/* */ /* */

View File

@ -2,25 +2,28 @@
/* */ /* */
/* ftmemory.h */ /* ftmemory.h */
/* */ /* */
/* The FreeType memory management macros */ /* The FreeType memory management macros (specification). */
/* */ /* */
/* Copyright 1996-2000 by */ /* Copyright 1996-2000 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */ /* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */ /* */
/* This file is part of the FreeType project, and may only be used */ /* This file is part of the FreeType project, and may only be used, */
/* modified and distributed under the terms of the FreeType project */ /* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */ /* this file you indicate that you have read the license and */
/* understand and accept it fully. */ /* understand and accept it fully. */
/* */ /* */
/***************************************************************************/ /***************************************************************************/
#ifndef FTMEMORY_H #ifndef FTMEMORY_H
#define FTMEMORY_H #define FTMEMORY_H
#include <freetype/config/ftconfig.h> #include <freetype/config/ftconfig.h>
#include <freetype/fttypes.h> #include <freetype/fttypes.h>
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Macro> */ /* <Macro> */
@ -62,8 +65,8 @@
/* This include is needed by the MEM_xxx() macros, it should be */ /* This `#include' is needed by the MEM_xxx() macros; it should be */
/* available on every platform we know !! */ /* available on all platforms we know of. */
#include <string.h> #include <string.h>
#define MEM_Set( dest, byte, count ) memset( dest, byte, count ) #define MEM_Set( dest, byte, count ) memset( dest, byte, count )
@ -86,16 +89,12 @@
/* ALLOC_ARRAY() now use an implicit variable, `memory'. It must be */ /* ALLOC_ARRAY() now use an implicit variable, `memory'. It must be */
/* defined at all locations where a memory operation is queried. */ /* defined at all locations where a memory operation is queried. */
/* */ /* */
/* */
/* Note that ALL memory allocation functions need an IMPLICIT argument */
/* called `memory' to point to the current memory object. */
/* */
#define MEM_Alloc( _pointer_, _size_ ) \ #define MEM_Alloc( _pointer_, _size_ ) \
FT_Alloc( memory, _size_, (void**)&(_pointer_) ) FT_Alloc( memory, _size_, (void**)&(_pointer_) )
#define MEM_Alloc_Array( _pointer_, _count_, _type_ ) \ #define MEM_Alloc_Array( _pointer_, _count_, _type_ ) \
FT_Alloc( memory, (_count_)*sizeof(_type_), (void**)&(_pointer_) ) FT_Alloc( memory, (_count_)*sizeof ( _type_ ), \
(void**)&(_pointer_) )
#define MEM_Realloc( _pointer_, _current_, _size_ ) \ #define MEM_Realloc( _pointer_, _current_, _size_ ) \
FT_Realloc( memory, _current_, _size_, (void**)&(_pointer_) ) FT_Realloc( memory, _current_, _size_, (void**)&(_pointer_) )
@ -111,14 +110,18 @@
FT_SET_ERROR( MEM_Realloc( _pointer_, _current_, _size_ ) ) FT_SET_ERROR( MEM_Realloc( _pointer_, _current_, _size_ ) )
#define ALLOC_ARRAY( _pointer_, _count_, _type_ ) \ #define ALLOC_ARRAY( _pointer_, _count_, _type_ ) \
FT_SET_ERROR( MEM_Alloc( _pointer_, (_count_)*sizeof (_type_) ) ) FT_SET_ERROR( MEM_Alloc( _pointer_, \
(_count_)*sizeof ( _type_ ) ) )
#define REALLOC_ARRAY( _pointer_, _current_, _count_, _type_ ) \ #define REALLOC_ARRAY( _pointer_, _current_, _count_, _type_ ) \
FT_SET_ERROR( MEM_Realloc( _pointer_, (_current_)*sizeof(_type_), \ FT_SET_ERROR( MEM_Realloc( _pointer_, \
(_current_)*sizeof ( _type_ ), \
(_count_)*sizeof ( _type_ ) ) ) (_count_)*sizeof ( _type_ ) ) )
#define FREE( _pointer_ ) FT_Free( memory, (void**)&(_pointer_) ) #define FREE( _pointer_ ) FT_Free( memory, (void**)&(_pointer_) )
#endif /* FTMEMORY_H */ #endif /* FTMEMORY_H */
/* END */ /* END */

View File

@ -22,6 +22,7 @@
/* */ /* */
/*************************************************************************/ /*************************************************************************/
#ifndef FTOBJS_H #ifndef FTOBJS_H
#define FTOBJS_H #define FTOBJS_H
@ -87,22 +88,24 @@
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
/************************************************************************
*
* <Struct>
* FT_ModuleRec
*
* <Description>
* A module object instance.
*
* <Fields>
* clazz :: pointer to module's class
* library :: handle to parent library object
* memory :: handle to memory manager
* generic :: generic structure for user-level extensibility (?)
*
************************************************************************/
/*************************************************************************/
/* */
/* <Struct> */
/* FT_ModuleRec */
/* */
/* <Description> */
/* A module object instance. */
/* */
/* <Fields> */
/* clazz :: A pointer to the module's class. */
/* */
/* library :: A handle to the parent library object. */
/* */
/* memory :: A handle to the memory manager. */
/* */
/* generic :: A generic structure for user-level extensibility (?). */
/* */
typedef struct FT_ModuleRec_ typedef struct FT_ModuleRec_
{ {
FT_Module_Class* clazz; FT_Module_Class* clazz;
@ -112,6 +115,7 @@
} FT_ModuleRec; } FT_ModuleRec;
/* typecast an object to a FT_Module */ /* typecast an object to a FT_Module */
#define FT_MODULE( x ) ((FT_Module)(x)) #define FT_MODULE( x ) ((FT_Module)(x))
#define FT_MODULE_CLASS( x ) FT_MODULE(x)->clazz #define FT_MODULE_CLASS( x ) FT_MODULE(x)->clazz
@ -182,9 +186,9 @@
/* a few macros used to perform easy typecasts with minimal brain damage */ /* a few macros used to perform easy typecasts with minimal brain damage */
#define FT_FACE(x) ((FT_Face)x) #define FT_FACE( x ) ((FT_Face)(x))
#define FT_SIZE(x) ((FT_Size)x) #define FT_SIZE( x ) ((FT_Size)(x))
#define FT_SLOT(x) ((FT_GlyphSlot)x) #define FT_SLOT( x ) ((FT_GlyphSlot)(x))
#define FT_FACE_DRIVER( x ) FT_FACE( x )->driver #define FT_FACE_DRIVER( x ) FT_FACE( x )->driver
#define FT_FACE_LIBRARY( x ) FT_FACE_DRIVER( x )->root.library #define FT_FACE_LIBRARY( x ) FT_FACE_DRIVER( x )->root.library
@ -197,9 +201,9 @@
#define FT_FACE_SIZE( x ) FT_FACE( x )->size #define FT_FACE_SIZE( x ) FT_FACE( x )->size
/* this must be kept exported - this will be used later in our own */ /* this must be kept exported -- tt will be used later in our own */
/* high-level caching font manager called SemTex (way after the */ /* high-level caching font manager called SemTex (way after the */
/* 2.0 release though.. */ /* 2.0 release though */
FT_EXPORT_DEF( FT_Error ) FT_New_Size( FT_Face face, FT_EXPORT_DEF( FT_Error ) FT_New_Size( FT_Face face,
FT_Size* size ); FT_Size* size );
@ -212,7 +216,6 @@
FT_EXPORT_DEF( void ) FT_Done_GlyphSlot( FT_GlyphSlot slot ); FT_EXPORT_DEF( void ) FT_Done_GlyphSlot( FT_GlyphSlot slot );
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
@ -256,7 +259,7 @@
FT_Outline outline; /* outline */ FT_Outline outline; /* outline */
FT_UInt num_subglyphs; /* number of subglyphs */ FT_UInt num_subglyphs; /* number of subglyphs */
FT_SubGlyph* subglyphs; /* subglyphs */ FT_SubGlyph* subglyphs; /* subglyphs */
FT_Vector* extra_points; /* extra points table.. */ FT_Vector* extra_points; /* extra points table */
} FT_GlyphLoad; } FT_GlyphLoad;
@ -280,7 +283,8 @@
BASE_DEF( FT_Error ) FT_GlyphLoader_New( FT_Memory memory, BASE_DEF( FT_Error ) FT_GlyphLoader_New( FT_Memory memory,
FT_GlyphLoader** aloader ); FT_GlyphLoader** aloader );
BASE_DEF(FT_Error) FT_GlyphLoader_Create_Extra( FT_GlyphLoader* loader ); BASE_DEF( FT_Error ) FT_GlyphLoader_Create_Extra(
FT_GlyphLoader* loader );
BASE_DEF( void ) FT_GlyphLoader_Done( FT_GlyphLoader* loader ); BASE_DEF( void ) FT_GlyphLoader_Done( FT_GlyphLoader* loader );
@ -288,21 +292,23 @@
BASE_DEF( void ) FT_GlyphLoader_Rewind( FT_GlyphLoader* loader ); BASE_DEF( void ) FT_GlyphLoader_Rewind( FT_GlyphLoader* loader );
BASE_DEF(FT_Error) FT_GlyphLoader_Check_Points( FT_GlyphLoader* loader, BASE_DEF( FT_Error ) FT_GlyphLoader_Check_Points(
FT_GlyphLoader* loader,
FT_UInt n_points, FT_UInt n_points,
FT_UInt n_contours ); FT_UInt n_contours );
BASE_DEF(FT_Error) FT_GlyphLoader_Check_Subglyphs( FT_GlyphLoader* loader, BASE_DEF( FT_Error ) FT_GlyphLoader_Check_Subglyphs(
FT_GlyphLoader* loader,
FT_UInt n_subs ); FT_UInt n_subs );
BASE_DEF( void ) FT_GlyphLoader_Prepare( FT_GlyphLoader* loader ); BASE_DEF( void ) FT_GlyphLoader_Prepare( FT_GlyphLoader* loader );
BASE_DEF( void ) FT_GlyphLoader_Add( FT_GlyphLoader* loader ); BASE_DEF( void ) FT_GlyphLoader_Add( FT_GlyphLoader* loader );
BASE_DEF( FT_Error ) FT_GlyphLoader_Copy_Points( FT_GlyphLoader* target, BASE_DEF( FT_Error ) FT_GlyphLoader_Copy_Points( FT_GlyphLoader* target,
FT_GlyphLoader* source ); FT_GlyphLoader* source );
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
@ -315,11 +321,13 @@
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
#define FT_RENDERER( x ) ((FT_Renderer)( x )) #define FT_RENDERER( x ) ((FT_Renderer)( x ))
#define FT_GLYPH( x ) ((FT_Glyph)( x )) #define FT_GLYPH( x ) ((FT_Glyph)( x ))
#define FT_BITMAP_GLYPH( x ) ((FT_BitmapGlyph)( x )) #define FT_BITMAP_GLYPH( x ) ((FT_BitmapGlyph)( x ))
#define FT_OUTLINE_GLYPH( x ) ((FT_OutlineGlyph)( x )) #define FT_OUTLINE_GLYPH( x ) ((FT_OutlineGlyph)( x ))
typedef struct FT_RendererRec_ typedef struct FT_RendererRec_
{ {
FT_ModuleRec root; FT_ModuleRec root;
@ -333,6 +341,7 @@
} FT_RendererRec; } FT_RendererRec;
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
@ -345,12 +354,14 @@
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
/* typecast a module into a driver easily */ /* typecast a module into a driver easily */
#define FT_DRIVER( x ) ((FT_Driver)(x)) #define FT_DRIVER( x ) ((FT_Driver)(x))
/* typecast a module as a driver, and get its driver class */ /* typecast a module as a driver, and get its driver class */
#define FT_DRIVER_CLASS( x ) FT_DRIVER( x )->clazz #define FT_DRIVER_CLASS( x ) FT_DRIVER( x )->clazz
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Struct> */ /* <Struct> */
@ -361,20 +372,22 @@
/* managing and loading font files of a given format. */ /* managing and loading font files of a given format. */
/* */ /* */
/* <Fields> */ /* <Fields> */
/* root :: contains the fields of the root module class */ /* root :: Contains the fields of the root module class. */
/* */ /* */
/* clazz :: a pointer to the font driver's class. Note that */ /* clazz :: A pointer to the font driver's class. Note that */
/* this is NOT root.clazz. 'class' wasn't used */ /* this is NOT root.clazz. `class' wasn't used */
/* as it's a reserved word in C++ */ /* as it is a reserved word in C++. */
/* */ /* */
/* faces_list :: The list of faces currently opened by this driver. */ /* faces_list :: The list of faces currently opened by this */
/* driver. */
/* */ /* */
/* extensions :: a typeless pointer to the driver's extensions */ /* extensions :: A typeless pointer to the driver's extensions */
/* registry, when they are supported through the */ /* registry, if they are supported through the */
/* config macro FT_CONFIG_OPTION_EXTENSIONS */ /* configuration macro FT_CONFIG_OPTION_EXTENSIONS. */
/* */ /* */
/* glyph_loader :: glyph loader for all faces managed by this driver */ /* glyph_loader :: The glyph loader for all faces managed by this */
/* this object isn't defined for unscalable formats */ /* driver. This object isn't defined for unscalable */
/* formats. */
/* */ /* */
typedef struct FT_DriverRec_ typedef struct FT_DriverRec_
{ {
@ -401,9 +414,11 @@
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
#define FT_DEBUG_HOOK_TRUETYPE 0 #define FT_DEBUG_HOOK_TRUETYPE 0
#define FT_DEBUG_HOOK_TYPE1 1 #define FT_DEBUG_HOOK_TYPE1 1
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Struct> */ /* <Struct> */
@ -416,7 +431,7 @@
/* */ /* */
/* <Fields> */ /* <Fields> */
/* memory :: The library's memory object. Manages memory */ /* memory :: The library's memory object. Manages memory */
/* allocation */ /* allocation. */
/* */ /* */
/* generic :: Client data variable. Used to extend the */ /* generic :: Client data variable. Used to extend the */
/* Library class by higher levels and clients. */ /* Library class by higher levels and clients. */
@ -430,24 +445,20 @@
/* registered modules. Note that each font driver */ /* registered modules. Note that each font driver */
/* contains a list of its opened faces. */ /* contains a list of its opened faces. */
/* */ /* */
/* renderers :: the list of renderers currently registered */ /* renderers :: The list of renderers currently registered */
/* within the library. */ /* within the library. */
/* */ /* */
/* cur_renderer :: current outline renderer. This is a short cut */ /* cur_renderer :: The current outline renderer. This is a */
/* used to avoid parsing the list on each call to */ /* shortcut used to avoid parsing the list on */
/* FT_Outline_Render. It is a handle to the current */ /* each call to FT_Outline_Render(). It is a */
/* renderer for the ft_glyph_format_outline format. */ /* handle to the current renderer for the */
/* ft_glyph_format_outline format. */
/* */ /* */
/* raster_pool :: The raster object's render pool. This can */ /* raster_pool :: The raster object's render pool. This can */
/* ideally be changed dynamically at run-time. */ /* ideally be changed dynamically at run-time. */
/* */ /* */
/* raster_pool_size :: size of the render pool in bytes */ /* raster_pool_size :: The size of the render pool in bytes. */
/* */ /* */
/* */
/* */
/* */
typedef struct FT_LibraryRec_ typedef struct FT_LibraryRec_
{ {
FT_Memory memory; /* library's memory manager */ FT_Memory memory; /* library's memory manager */
@ -461,7 +472,8 @@
FT_Renderer cur_renderer; /* current outline renderer */ FT_Renderer cur_renderer; /* current outline renderer */
FT_Module auto_hinter; FT_Module auto_hinter;
FT_Byte* raster_pool; /* scan-line conversion render pool */ FT_Byte* raster_pool; /* scan-line conversion */
/* render pool */
FT_ULong raster_pool_size; /* size of render pool in bytes */ FT_ULong raster_pool_size; /* size of render pool in bytes */
FT_DebugHook_Func debug_hooks[4]; FT_DebugHook_Func debug_hooks[4];
@ -480,6 +492,7 @@
#ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM #ifndef FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM
FT_EXPORT_DEF( FT_Error ) FT_New_Stream( const char* filepathname, FT_EXPORT_DEF( FT_Error ) FT_New_Stream( const char* filepathname,
FT_Stream astream ); FT_Stream astream );
@ -487,13 +500,16 @@
FT_EXPORT_DEF( FT_Memory ) FT_New_Memory( void ); FT_EXPORT_DEF( FT_Memory ) FT_New_Memory( void );
#endif
#endif /* !FT_CONFIG_OPTION_NO_DEFAULT_SYSTEM */
/* Define default raster's interface. The default raster is located in `src/base/ftraster.c' */ /* Define default raster's interface. The default raster is located in */
/* */ /* `src/base/ftraster.c' */
/* Client applications can register new rasters through the FT_Set_Raster API.. */
/* */ /* */
/* Client applications can register new rasters through the */
/* FT_Set_Raster() API. */
#ifndef FT_NO_DEFAULT_RASTER #ifndef FT_NO_DEFAULT_RASTER
FT_EXPORT_VAR( FT_Raster_Funcs ) ft_default_raster; FT_EXPORT_VAR( FT_Raster_Funcs ) ft_default_raster;
#endif #endif