diff options
author | marha <marha@users.sourceforge.net> | 2012-03-12 10:48:52 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2012-03-12 10:48:52 +0100 |
commit | 485b633824020c557eb60258e1d36975c8c44770 (patch) | |
tree | f48baf73d5a7ae814aae825e7b1405189eab9f0a /freetype/include | |
parent | c84235ee0d9940e6a779ec306e615603b58a79f2 (diff) | |
parent | 41bd254198b8b879a562a85f7dc868c3c0f7fbc1 (diff) | |
download | vcxsrv-485b633824020c557eb60258e1d36975c8c44770.tar.gz vcxsrv-485b633824020c557eb60258e1d36975c8c44770.tar.bz2 vcxsrv-485b633824020c557eb60258e1d36975c8c44770.zip |
Merge remote-tracking branch 'origin/released'
Conflicts:
freetype/src/base/ftrfork.c
freetype/src/cff/cffpic.c
freetype/src/pfr/pfrobjs.c
freetype/src/winfonts/winfnt.c
Diffstat (limited to 'freetype/include')
20 files changed, 701 insertions, 522 deletions
diff --git a/freetype/include/freetype/config/ftconfig.h b/freetype/include/freetype/config/ftconfig.h index a9e767cdb..562856947 100644 --- a/freetype/include/freetype/config/ftconfig.h +++ b/freetype/include/freetype/config/ftconfig.h @@ -120,8 +120,7 @@ FT_BEGIN_HEADER /* This is the only necessary change, so it is defined here instead */ /* providing a new configuration file. */ /* */ -#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \ - ( defined( __MWERKS__ ) && defined( macintosh ) ) +#if defined( __APPLE__ ) || ( defined( __MWERKS__ ) && defined( macintosh ) ) /* no Carbon frameworks for 64bit 10.4.x */ /* AvailabilityMacros.h is available since Mac OS X 10.2, */ /* so guess the system version by maximum errno before inclusion */ @@ -131,9 +130,7 @@ FT_BEGIN_HEADER #endif #if defined( __LP64__ ) && \ ( MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4 ) -#define DARWIN_NO_CARBON 1 -#else -#define FT_MACINTOSH 1 +#undef FT_MACINTOSH #endif #elif defined( __SC__ ) || defined( __MRC__ ) diff --git a/freetype/include/freetype/freetype.h b/freetype/include/freetype/freetype.h index f1f55f09b..63c291af1 100644 --- a/freetype/include/freetype/freetype.h +++ b/freetype/include/freetype/freetype.h @@ -4,7 +4,7 @@ /* */ /* FreeType high-level API and common types (specification only). */ /* */ -/* Copyright 1996-2011 by */ +/* Copyright 1996-2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -958,8 +958,8 @@ FT_BEGIN_HEADER FT_ListRec sizes_list; - FT_Generic autohint; - void* extensions; + FT_Generic autohint; /* face-specific auto-hinter data */ + void* extensions; /* unused */ FT_Face_Internal internal; @@ -1668,6 +1668,9 @@ FT_BEGIN_HEADER /* use @FT_New_Library instead, followed by a call to */ /* @FT_Add_Default_Modules (or a series of calls to @FT_Add_Module). */ /* */ + /* For multi-threading applications each thread should have its own */ + /* FT_Library object. */ + /* */ FT_EXPORT( FT_Error ) FT_Init_FreeType( FT_Library *alibrary ); @@ -1953,6 +1956,10 @@ FT_BEGIN_HEADER /* Each new face object created with this function also owns a */ /* default @FT_Size object, accessible as `face->size'. */ /* */ + /* One @FT_Library instance can have multiple face objects, this is, */ + /* @FT_Open_Face and its siblings can be called multiple times using */ + /* the same `library' argument. */ + /* */ /* See the discussion of reference counters in the description of */ /* @FT_Reference_Face. */ /* */ @@ -2445,6 +2452,11 @@ FT_BEGIN_HEADER * during glyph loading. This is mostly used to detect broken glyphs * in fonts. By default, FreeType tries to handle broken fonts also. * + * In particular, errors from the TrueType bytecode engine are not + * passed to the application if this flag is not set; this might + * result in partially hinted or distorted glyphs in case a glyph's + * bytecode is buggy. + * * FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH :: * Ignored. Deprecated. * @@ -2497,26 +2509,26 @@ FT_BEGIN_HEADER * */ #define FT_LOAD_DEFAULT 0x0 -#define FT_LOAD_NO_SCALE 0x1 -#define FT_LOAD_NO_HINTING 0x2 -#define FT_LOAD_RENDER 0x4 -#define FT_LOAD_NO_BITMAP 0x8 -#define FT_LOAD_VERTICAL_LAYOUT 0x10 -#define FT_LOAD_FORCE_AUTOHINT 0x20 -#define FT_LOAD_CROP_BITMAP 0x40 -#define FT_LOAD_PEDANTIC 0x80 -#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH 0x200 -#define FT_LOAD_NO_RECURSE 0x400 -#define FT_LOAD_IGNORE_TRANSFORM 0x800 -#define FT_LOAD_MONOCHROME 0x1000 -#define FT_LOAD_LINEAR_DESIGN 0x2000 -#define FT_LOAD_NO_AUTOHINT 0x8000U +#define FT_LOAD_NO_SCALE ( 1L << 0 ) +#define FT_LOAD_NO_HINTING ( 1L << 1 ) +#define FT_LOAD_RENDER ( 1L << 2 ) +#define FT_LOAD_NO_BITMAP ( 1L << 3 ) +#define FT_LOAD_VERTICAL_LAYOUT ( 1L << 4 ) +#define FT_LOAD_FORCE_AUTOHINT ( 1L << 5 ) +#define FT_LOAD_CROP_BITMAP ( 1L << 6 ) +#define FT_LOAD_PEDANTIC ( 1L << 7 ) +#define FT_LOAD_IGNORE_GLOBAL_ADVANCE_WIDTH ( 1L << 9 ) +#define FT_LOAD_NO_RECURSE ( 1L << 10 ) +#define FT_LOAD_IGNORE_TRANSFORM ( 1L << 11 ) +#define FT_LOAD_MONOCHROME ( 1L << 12 ) +#define FT_LOAD_LINEAR_DESIGN ( 1L << 13 ) +#define FT_LOAD_NO_AUTOHINT ( 1L << 15 ) /* */ /* used internally only by certain font drivers! */ -#define FT_LOAD_ADVANCE_ONLY 0x100 -#define FT_LOAD_SBITS_ONLY 0x4000 +#define FT_LOAD_ADVANCE_ONLY ( 1L << 8 ) +#define FT_LOAD_SBITS_ONLY ( 1L << 14 ) /************************************************************************** @@ -2869,14 +2881,26 @@ FT_BEGIN_HEADER /* */ /* point_size :: The point size in 16.16 fractional points. */ /* */ - /* degree :: The degree of tightness. */ + /* degree :: The degree of tightness. Increasingly negative */ + /* values represent tighter track kerning, while */ + /* increasingly positive values represent looser track */ + /* kerning. Value zero means no track kerning. */ /* */ /* <Output> */ - /* akerning :: The kerning in 16.16 fractional points. */ + /* akerning :: The kerning in 16.16 fractional points, to be */ + /* uniformly applied between all glyphs. */ /* */ /* <Return> */ /* FreeType error code. 0~means success. */ /* */ + /* <Note> */ + /* Currently, only the Type~1 font driver supports track kerning, */ + /* using data from AFM files (if attached with @FT_Attach_File or */ + /* @FT_Attach_Stream). */ + /* */ + /* Only very few AFM files come with track kerning data; please refer */ + /* to the Adobe's AFM specification for more details. */ + /* */ FT_EXPORT( FT_Error ) FT_Get_Track_Kerning( FT_Face face, FT_Fixed point_size, @@ -3810,7 +3834,7 @@ FT_BEGIN_HEADER */ #define FREETYPE_MAJOR 2 #define FREETYPE_MINOR 4 -#define FREETYPE_PATCH 8 +#define FREETYPE_PATCH 9 /*************************************************************************/ diff --git a/freetype/include/freetype/fterrdef.h b/freetype/include/freetype/fterrdef.h index d4e7287f2..fb4b53bca 100644 --- a/freetype/include/freetype/fterrdef.h +++ b/freetype/include/freetype/fterrdef.h @@ -4,7 +4,7 @@ /* */ /* FreeType error codes (specification). */ /* */ -/* Copyright 2002, 2004, 2006, 2007, 2010 by */ +/* Copyright 2002, 2004, 2006, 2007, 2010-2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -54,6 +54,8 @@ "broken offset within table" ) FT_ERRORDEF_( Array_Too_Large, 0x0A, \ "array allocation size too large" ) + FT_ERRORDEF_( Missing_Module, 0x0B, \ + "missing module" ) /* glyph/character errors */ diff --git a/freetype/include/freetype/fterrors.h b/freetype/include/freetype/fterrors.h index 6600dadd0..a54699f87 100644 --- a/freetype/include/freetype/fterrors.h +++ b/freetype/include/freetype/fterrors.h @@ -192,12 +192,13 @@ #undef FT_NOERRORDEF_ #undef FT_NEED_EXTERN_C -#undef FT_ERR_CONCAT #undef FT_ERR_BASE /* FT_KEEP_ERR_PREFIX is needed for ftvalid.h */ #ifndef FT_KEEP_ERR_PREFIX #undef FT_ERR_PREFIX +#else +#undef FT_KEEP_ERR_PREFIX #endif #endif /* __FTERRORS_H__ */ diff --git a/freetype/include/freetype/fttypes.h b/freetype/include/freetype/fttypes.h index a57ffa69b..325552744 100644 --- a/freetype/include/freetype/fttypes.h +++ b/freetype/include/freetype/fttypes.h @@ -4,7 +4,7 @@ /* */ /* FreeType simple types definitions (specification only). */ /* */ -/* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008 by */ +/* Copyright 1996-2002, 2004, 2006-2009, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -434,7 +434,7 @@ FT_BEGIN_HEADER /* variety of FreeType core objects. For example, a text layout API */ /* might want to associate a glyph cache to a given size object. */ /* */ - /* Most FreeType object contains a `generic' field, of type */ + /* Some FreeType object contains a `generic' field, of type */ /* FT_Generic, which usage is left to client applications and font */ /* servers. */ /* */ diff --git a/freetype/include/freetype/internal/ftdriver.h b/freetype/include/freetype/internal/ftdriver.h index 1d06997bd..6f6b20622 100644 --- a/freetype/include/freetype/internal/ftdriver.h +++ b/freetype/include/freetype/internal/ftdriver.h @@ -4,7 +4,7 @@ /* */ /* FreeType font driver interface (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2006, 2008 by */ +/* Copyright 1996-2003, 2006, 2008, 2011 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -162,10 +162,9 @@ FT_BEGIN_HEADER /* starting at `first'. The `vertical' flag must */ /* be set to get vertical advance heights. The */ /* `advances' buffer is caller-allocated. */ - /* Currently not implemented. The idea of this */ - /* function is to be able to perform */ - /* device-independent text layout without loading */ - /* a single glyph image. */ + /* The idea of this function is to be able to */ + /* perform device-independent text layout without */ + /* loading a single glyph image. */ /* */ /* request_size :: A handle to a function used to request the new */ /* character size. Can be set to 0 if the */ @@ -268,7 +267,9 @@ FT_BEGIN_HEADER /* and initialize any additional global data, like module specific */ /* interface, and put them in the global pic container defined in */ /* ftpic.h. if you don't need them just implement the functions as */ - /* empty to resolve the link error. */ + /* empty to resolve the link error. Also the pic_init and pic_free */ + /* functions should be declared in pic.h, to be referred by driver */ + /* definition calling FT_DEFINE_DRIVER() in following. */ /* */ /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ /* allocated in the global scope (or the scope where the macro */ @@ -285,7 +286,7 @@ FT_BEGIN_HEADER #define FT_DECLARE_DRIVER(class_) \ FT_CALLBACK_TABLE \ - const FT_Driver_ClassRec class_; + const FT_Driver_ClassRec class_; #define FT_DEFINE_DRIVER(class_, \ flags_, size_, name_, version_, requires_, \ @@ -327,7 +328,7 @@ FT_BEGIN_HEADER select_size_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ #ifdef FT_CONFIG_OPTION_OLD_INTERNALS #define FT_DEFINE_DRIVERS_OLD_INTERNALS(a_,b_) \ @@ -348,8 +349,6 @@ FT_BEGIN_HEADER old_set_char_sizes_, old_set_pixel_sizes_, \ load_glyph_, get_kerning_, attach_file_, \ get_advances_, request_size_, select_size_ ) \ - void class_##_pic_free( FT_Library library ); \ - FT_Error class_##_pic_init( FT_Library library ); \ \ void \ FT_Destroy_Class_##class_( FT_Library library, \ @@ -409,7 +408,7 @@ FT_BEGIN_HEADER \ *output_class = (FT_Module_Class*)clazz; \ return FT_Err_Ok; \ - } + } #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/freetype/include/freetype/internal/ftobjs.h b/freetype/include/freetype/internal/ftobjs.h index beae95e31..771278039 100644 --- a/freetype/include/freetype/internal/ftobjs.h +++ b/freetype/include/freetype/internal/ftobjs.h @@ -4,7 +4,7 @@ /* */ /* The FreeType private base classes (specification). */ /* */ -/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2008, 2010 by */ +/* Copyright 1996-2006, 2008, 2010, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -243,7 +243,7 @@ FT_BEGIN_HEADER clazz->variant_list = variant_list_; \ clazz->charvariant_list = charvariant_list_; \ clazz->variantchar_list = variantchar_list_; \ - } + } #endif /* FT_CONFIG_OPTION_PIC */ /* create a new charmap and add it to charmap->face */ @@ -436,19 +436,16 @@ FT_BEGIN_HEADER /* */ /* memory :: A handle to the memory manager. */ /* */ - /* generic :: A generic structure for user-level extensibility (?). */ - /* */ typedef struct FT_ModuleRec_ { FT_Module_Class* clazz; FT_Library library; FT_Memory memory; - FT_Generic generic; } FT_ModuleRec; - /* typecast an object to a FT_Module */ + /* typecast an object to an FT_Module */ #define FT_MODULE( x ) ((FT_Module)( x )) #define FT_MODULE_CLASS( x ) FT_MODULE( x )->clazz #define FT_MODULE_LIBRARY( x ) FT_MODULE( x )->library @@ -711,10 +708,6 @@ FT_BEGIN_HEADER /* faces_list :: The list of faces currently opened by this */ /* driver. */ /* */ - /* extensions :: A typeless pointer to the driver's extensions */ - /* registry, if they are supported through the */ - /* configuration macro FT_CONFIG_OPTION_EXTENSIONS. */ - /* */ /* glyph_loader :: The glyph loader for all faces managed by this */ /* driver. This object isn't defined for unscalable */ /* formats. */ @@ -723,10 +716,7 @@ FT_BEGIN_HEADER { FT_ModuleRec root; FT_Driver_Class clazz; - FT_ListRec faces_list; - void* extensions; - FT_GlyphLoader glyph_loader; } FT_DriverRec; @@ -776,9 +766,6 @@ FT_BEGIN_HEADER /* memory :: The library's memory object. Manages memory */ /* allocation. */ /* */ - /* generic :: Client data variable. Used to extend the */ - /* Library class by higher levels and clients. */ - /* */ /* version_major :: The major version number of the library. */ /* */ /* version_minor :: The minor version number of the library. */ @@ -838,8 +825,6 @@ FT_BEGIN_HEADER { FT_Memory memory; /* library's memory manager */ - FT_Generic generic; - FT_Int version_major; FT_Int version_minor; FT_Int version_patch; @@ -976,7 +961,7 @@ FT_BEGIN_HEADER move_to_, line_to_, conic_to_, cubic_to_, shift_, delta_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ #define FT_DEFINE_OUTLINE_FUNCS(class_, move_to_, line_to_, conic_to_, \ cubic_to_, shift_, delta_) \ @@ -990,9 +975,9 @@ FT_BEGIN_HEADER clazz->shift = shift_; \ clazz->delta = delta_; \ return FT_Err_Ok; \ - } + } -#endif /* FT_CONFIG_OPTION_PIC */ +#endif /* FT_CONFIG_OPTION_PIC */ /*************************************************************************/ /* */ @@ -1018,7 +1003,7 @@ FT_BEGIN_HEADER raster_set_mode_, raster_render_, raster_done_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ #define FT_DEFINE_RASTER_FUNCS(class_, glyph_format_, raster_new_, \ raster_reset_, raster_set_mode_, raster_render_, raster_done_) \ @@ -1031,9 +1016,9 @@ FT_BEGIN_HEADER clazz->raster_set_mode = raster_set_mode_; \ clazz->raster_render = raster_render_; \ clazz->raster_done = raster_done_; \ - } + } -#endif /* FT_CONFIG_OPTION_PIC */ +#endif /* FT_CONFIG_OPTION_PIC */ /*************************************************************************/ /*************************************************************************/ @@ -1072,7 +1057,7 @@ FT_BEGIN_HEADER size_, format_, init_, done_, copy_, transform_, bbox_, prepare_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ #define FT_DEFINE_GLYPH(class_, size_, format_, init_, done_, copy_, \ transform_, bbox_, prepare_) \ @@ -1087,9 +1072,9 @@ FT_BEGIN_HEADER clazz->glyph_transform = transform_; \ clazz->glyph_bbox = bbox_; \ clazz->glyph_prepare = prepare_; \ - } + } -#endif /* FT_CONFIG_OPTION_PIC */ +#endif /* FT_CONFIG_OPTION_PIC */ /*************************************************************************/ /* */ @@ -1119,7 +1104,9 @@ FT_BEGIN_HEADER /* and initialize any additional global data, like module specific */ /* interface, and put them in the global pic container defined in */ /* ftpic.h. if you don't need them just implement the functions as */ - /* empty to resolve the link error. */ + /* empty to resolve the link error. Also the pic_init and pic_free */ + /* functions should be declared in pic.h, to be referred by renderer */ + /* definition calling FT_DEFINE_RENDERER() in following. */ /* */ /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ /* allocated in the global scope (or the scope where the macro */ @@ -1150,7 +1137,7 @@ FT_BEGIN_HEADER raster_class_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ #define FT_DECLARE_RENDERER(class_) FT_DECLARE_MODULE(class_) @@ -1159,8 +1146,6 @@ FT_BEGIN_HEADER interface_, init_, done_, get_interface_, \ glyph_format_, render_glyph_, transform_glyph_, \ get_glyph_cbox_, set_mode_, raster_class_ ) \ - void class_##_pic_free( FT_Library library ); \ - FT_Error class_##_pic_init( FT_Library library ); \ \ void \ FT_Destroy_Class_##class_( FT_Library library, \ @@ -1205,11 +1190,11 @@ FT_BEGIN_HEADER \ *output_class = (FT_Module_Class*)clazz; \ return FT_Err_Ok; \ - } + } -#endif /* FT_CONFIG_OPTION_PIC */ +#endif /* FT_CONFIG_OPTION_PIC */ /*************************************************************************/ /*************************************************************************/ @@ -1290,7 +1275,9 @@ FT_BEGIN_HEADER /* and initialize any additional global data, like module specific */ /* interface, and put them in the global pic container defined in */ /* ftpic.h. if you don't need them just implement the functions as */ - /* empty to resolve the link error. */ + /* empty to resolve the link error. Also the pic_init and pic_free */ + /* functions should be declared in pic.h, to be referred by module */ + /* definition calling FT_DEFINE_MODULE() in following. */ /* */ /* When FT_CONFIG_OPTION_PIC is not defined the struct will be */ /* allocated in the global scope (or the scope where the macro */ @@ -1367,12 +1354,10 @@ FT_BEGIN_HEADER \ clazz->root.module_init = init_; \ clazz->root.module_done = done_; \ - clazz->root.get_interface = get_interface_; + clazz->root.get_interface = get_interface_; #define FT_DEFINE_MODULE(class_, flags_, size_, name_, version_, requires_, \ interface_, init_, done_, get_interface_) \ - void class_##_pic_free( FT_Library library ); \ - FT_Error class_##_pic_init( FT_Library library ); \ \ void \ FT_Destroy_Class_##class_( FT_Library library, \ @@ -1415,7 +1400,7 @@ FT_BEGIN_HEADER \ *output_class = clazz; \ return FT_Err_Ok; \ - } + } #endif /* FT_CONFIG_OPTION_PIC */ diff --git a/freetype/include/freetype/internal/ftrfork.h b/freetype/include/freetype/internal/ftrfork.h index 6d91e1eb2..677944f98 100644 --- a/freetype/include/freetype/internal/ftrfork.h +++ b/freetype/include/freetype/internal/ftrfork.h @@ -48,6 +48,57 @@ FT_BEGIN_HEADER } FT_RFork_Ref; +#ifdef FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK + typedef FT_Error + (*ft_raccess_guess_func)( FT_Library library, + FT_Stream stream, + char *base_file_name, + char **result_file_name, + FT_Long *result_offset ); + + typedef enum FT_RFork_Rule_ { + FT_RFork_Rule_invalid = -2, + FT_RFork_Rule_uknown, /* -1 */ + FT_RFork_Rule_apple_double, + FT_RFork_Rule_apple_single, + FT_RFork_Rule_darwin_ufs_export, + FT_RFork_Rule_darwin_newvfs, + FT_RFork_Rule_darwin_hfsplus, + FT_RFork_Rule_vfat, + FT_RFork_Rule_linux_cap, + FT_RFork_Rule_linux_double, + FT_RFork_Rule_linux_netatalk + } FT_RFork_Rule; + + /* For fast translation between rule index and rule type, + * the macros FT_RFORK_xxx should be kept consistent with + * the raccess_guess_funcs table + */ + typedef struct ft_raccess_guess_rec_ { + ft_raccess_guess_func func; + FT_RFork_Rule type; + } ft_raccess_guess_rec; + +#ifndef FT_CONFIG_OPTION_PIC + /* this array is a storage in non-PIC mode, so ; is needed in END */ +#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \ + const type name[] = { +#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \ + { raccess_guess_##func_suffix, FT_RFork_Rule_##type_suffix }, +#define CONST_FT_RFORK_RULE_ARRAY_END }; +#else /* FT_CONFIG_OPTION_PIC */ + /* this array is a function in PIC mode, so no ; is needed in END */ +#define CONST_FT_RFORK_RULE_ARRAY_BEGIN( name, type ) \ + void FT_Init_##name ( type* storage ) { \ + type *local = storage; \ + int i = 0; +#define CONST_FT_RFORK_RULE_ARRAY_ENTRY( func_suffix, type_suffix ) \ + local[i].func = raccess_guess_##func_suffix; \ + local[i].type = FT_RFork_Rule_##type_suffix; \ + i++; +#define CONST_FT_RFORK_RULE_ARRAY_END } +#endif /* FT_CONFIG_OPTION_PIC */ +#endif /* FT_CONFIG_OPTION_GUESSING_EMBEDDED_RFORK */ /*************************************************************************/ /* */ diff --git a/freetype/include/freetype/internal/ftserv.h b/freetype/include/freetype/internal/ftserv.h index 569b9f7e0..4f481db02 100644 --- a/freetype/include/freetype/internal/ftserv.h +++ b/freetype/include/freetype/internal/ftserv.h @@ -4,7 +4,7 @@ /* */ /* The FreeType services (specification only). */ /* */ -/* Copyright 2003, 2004, 2005, 2006, 2007 by */ +/* Copyright 2003-2007, 2009, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -163,298 +163,366 @@ FT_BEGIN_HEADER typedef const FT_ServiceDescRec* FT_ServiceDesc; + /*************************************************************************/ /* */ /* <Macro> */ /* FT_DEFINE_SERVICEDESCREC1 .. FT_DEFINE_SERVICEDESCREC6 */ /* */ /* <Description> */ - /* Used to initialize an array of FT_ServiceDescRec structs. */ + /* Used to initialize an array of FT_ServiceDescRec structures. */ /* */ - /* When FT_CONFIG_OPTION_PIC is defined a Create funtion will need */ - /* to called with a pointer where the allocated array is returned. */ - /* And when it is no longer needed a Destroy function needs */ - /* to be called to release that allocation. */ + /* When FT_CONFIG_OPTION_PIC is defined a `create' function needs to */ + /* be called with a pointer to return an allocated array. As soon as */ + /* it is no longer needed, a `destroy' function needs to be called to */ + /* release that allocation. */ /* */ - /* These functions should be manyally called from the pic_init and */ - /* pic_free functions of your module (see FT_DEFINE_MODULE) */ + /* These functions should be manually called from the `pic_init' and */ + /* `pic_free' functions of your module (see FT_DEFINE_MODULE). */ /* */ /* When FT_CONFIG_OPTION_PIC is not defined the array will be */ - /* allocated in the global scope (or the scope where the macro */ - /* is used). */ + /* allocated in the global scope (or the scope where the macro is */ + /* used). */ /* */ #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_SERVICEDESCREC1(class_, serv_id_1, serv_data_1) \ - static const FT_ServiceDescRec class_[] = \ - { \ - {serv_id_1, serv_data_1}, \ - {NULL, NULL} \ +#define FT_DEFINE_SERVICEDESCREC1( class_, \ + serv_id_1, serv_data_1 ) \ + static const FT_ServiceDescRec class_[] = \ + { \ + { serv_id_1, serv_data_1 }, \ + { NULL, NULL } \ }; -#define FT_DEFINE_SERVICEDESCREC2(class_, serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2) \ - static const FT_ServiceDescRec class_[] = \ - { \ - {serv_id_1, serv_data_1}, \ - {serv_id_2, serv_data_2}, \ - {NULL, NULL} \ + +#define FT_DEFINE_SERVICEDESCREC2( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2 ) \ + static const FT_ServiceDescRec class_[] = \ + { \ + { serv_id_1, serv_data_1 }, \ + { serv_id_2, serv_data_2 }, \ + { NULL, NULL } \ }; -#define FT_DEFINE_SERVICEDESCREC3(class_, serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, serv_id_3, serv_data_3) \ - static const FT_ServiceDescRec class_[] = \ - { \ - {serv_id_1, serv_data_1}, \ - {serv_id_2, serv_data_2}, \ - {serv_id_3, serv_data_3}, \ - {NULL, NULL} \ + +#define FT_DEFINE_SERVICEDESCREC3( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, \ + serv_id_3, serv_data_3 ) \ + static const FT_ServiceDescRec class_[] = \ + { \ + { serv_id_1, serv_data_1 }, \ + { serv_id_2, serv_data_2 }, \ + { serv_id_3, serv_data_3 }, \ + { NULL, NULL } \ }; -#define FT_DEFINE_SERVICEDESCREC4(class_, serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ - serv_id_4, serv_data_4) \ - static const FT_ServiceDescRec class_[] = \ - { \ - {serv_id_1, serv_data_1}, \ - {serv_id_2, serv_data_2}, \ - {serv_id_3, serv_data_3}, \ - {serv_id_4, serv_data_4}, \ - {NULL, NULL} \ + +#define FT_DEFINE_SERVICEDESCREC4( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, \ + serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4 ) \ + static const FT_ServiceDescRec class_[] = \ + { \ + { serv_id_1, serv_data_1 }, \ + { serv_id_2, serv_data_2 }, \ + { serv_id_3, serv_data_3 }, \ + { serv_id_4, serv_data_4 }, \ + { NULL, NULL } \ }; -#define FT_DEFINE_SERVICEDESCREC5(class_, serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ - serv_id_4, serv_data_4, serv_id_5, serv_data_5) \ - static const FT_ServiceDescRec class_[] = \ - { \ - {serv_id_1, serv_data_1}, \ - {serv_id_2, serv_data_2}, \ - {serv_id_3, serv_data_3}, \ - {serv_id_4, serv_data_4}, \ - {serv_id_5, serv_data_5}, \ - {NULL, NULL} \ + +#define FT_DEFINE_SERVICEDESCREC5( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, \ + serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, \ + serv_id_5, serv_data_5 ) \ + static const FT_ServiceDescRec class_[] = \ + { \ + { serv_id_1, serv_data_1 }, \ + { serv_id_2, serv_data_2 }, \ + { serv_id_3, serv_data_3 }, \ + { serv_id_4, serv_data_4 }, \ + { serv_id_5, serv_data_5 }, \ + { NULL, NULL } \ }; -#define FT_DEFINE_SERVICEDESCREC6(class_, serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ - serv_id_4, serv_data_4, serv_id_5, serv_data_5, \ - serv_id_6, serv_data_6) \ - static const FT_ServiceDescRec class_[] = \ - { \ - {serv_id_1, serv_data_1}, \ - {serv_id_2, serv_data_2}, \ - {serv_id_3, serv_data_3}, \ - {serv_id_4, serv_data_4}, \ - {serv_id_5, serv_data_5}, \ - {serv_id_6, serv_data_6}, \ - {NULL, NULL} \ + +#define FT_DEFINE_SERVICEDESCREC6( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, \ + serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, \ + serv_id_5, serv_data_5, \ + serv_id_6, serv_data_6 ) \ + static const FT_ServiceDescRec class_[] = \ + { \ + { serv_id_1, serv_data_1 }, \ + { serv_id_2, serv_data_2 }, \ + { serv_id_3, serv_data_3 }, \ + { serv_id_4, serv_data_4 }, \ + { serv_id_5, serv_data_5 }, \ + { serv_id_6, serv_data_6 }, \ + { NULL, NULL } \ }; -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICEDESCREC1(class_, serv_id_1, serv_data_1) \ - void \ - FT_Destroy_Class_##class_( FT_Library library, \ - FT_ServiceDescRec* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_##class_( FT_Library library, \ - FT_ServiceDescRec** output_class) \ - { \ - FT_ServiceDescRec* clazz; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - if ( FT_ALLOC( clazz, sizeof(*clazz)*2 ) ) \ - return error; \ - clazz[0].serv_id = serv_id_1; \ - clazz[0].serv_data = serv_data_1; \ - clazz[1].serv_id = NULL; \ - clazz[1].serv_data = NULL; \ - *output_class = clazz; \ - return FT_Err_Ok; \ - } - -#define FT_DEFINE_SERVICEDESCREC2(class_, serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2) \ - void \ - FT_Destroy_Class_##class_( FT_Library library, \ - FT_ServiceDescRec* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_##class_( FT_Library library, \ - FT_ServiceDescRec** output_class) \ - { \ - FT_ServiceDescRec* clazz; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - if ( FT_ALLOC( clazz, sizeof(*clazz)*3 ) ) \ - return error; \ - clazz[0].serv_id = serv_id_1; \ - clazz[0].serv_data = serv_data_1; \ - clazz[1].serv_id = serv_id_2; \ - clazz[1].serv_data = serv_data_2; \ - clazz[2].serv_id = NULL; \ - clazz[2].serv_data = NULL; \ - *output_class = clazz; \ - return FT_Err_Ok; \ - } - -#define FT_DEFINE_SERVICEDESCREC3(class_, serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, serv_id_3, serv_data_3) \ - void \ - FT_Destroy_Class_##class_( FT_Library library, \ - FT_ServiceDescRec* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_##class_( FT_Library library, \ - FT_ServiceDescRec** output_class) \ - { \ - FT_ServiceDescRec* clazz; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - if ( FT_ALLOC( clazz, sizeof(*clazz)*4 ) ) \ - return error; \ - clazz[0].serv_id = serv_id_1; \ - clazz[0].serv_data = serv_data_1; \ - clazz[1].serv_id = serv_id_2; \ - clazz[1].serv_data = serv_data_2; \ - clazz[2].serv_id = serv_id_3; \ - clazz[2].serv_data = serv_data_3; \ - clazz[3].serv_id = NULL; \ - clazz[3].serv_data = NULL; \ - *output_class = clazz; \ - return FT_Err_Ok; \ - } - -#define FT_DEFINE_SERVICEDESCREC4(class_, serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ - serv_id_4, serv_data_4) \ - void \ - FT_Destroy_Class_##class_( FT_Library library, \ - FT_ServiceDescRec* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_##class_( FT_Library library, \ - FT_ServiceDescRec** output_class) \ - { \ - FT_ServiceDescRec* clazz; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - if ( FT_ALLOC( clazz, sizeof(*clazz)*5 ) ) \ - return error; \ - clazz[0].serv_id = serv_id_1; \ - clazz[0].serv_data = serv_data_1; \ - clazz[1].serv_id = serv_id_2; \ - clazz[1].serv_data = serv_data_2; \ - clazz[2].serv_id = serv_id_3; \ - clazz[2].serv_data = serv_data_3; \ - clazz[3].serv_id = serv_id_4; \ - clazz[3].serv_data = serv_data_4; \ - clazz[4].serv_id = NULL; \ - clazz[4].serv_data = NULL; \ - *output_class = clazz; \ - return FT_Err_Ok; \ - } - -#define FT_DEFINE_SERVICEDESCREC5(class_, serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, serv_id_3, serv_data_3, serv_id_4, \ - serv_data_4, serv_id_5, serv_data_5) \ - void \ - FT_Destroy_Class_##class_( FT_Library library, \ - FT_ServiceDescRec* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_##class_( FT_Library library, \ - FT_ServiceDescRec** output_class) \ - { \ - FT_ServiceDescRec* clazz; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - if ( FT_ALLOC( clazz, sizeof(*clazz)*6 ) ) \ - return error; \ - clazz[0].serv_id = serv_id_1; \ - clazz[0].serv_data = serv_data_1; \ - clazz[1].serv_id = serv_id_2; \ - clazz[1].serv_data = serv_data_2; \ - clazz[2].serv_id = serv_id_3; \ - clazz[2].serv_data = serv_data_3; \ - clazz[3].serv_id = serv_id_4; \ - clazz[3].serv_data = serv_data_4; \ - clazz[4].serv_id = serv_id_5; \ - clazz[4].serv_data = serv_data_5; \ - clazz[5].serv_id = NULL; \ - clazz[5].serv_data = NULL; \ - *output_class = clazz; \ - return FT_Err_Ok; \ - } - -#define FT_DEFINE_SERVICEDESCREC6(class_, serv_id_1, serv_data_1, \ - serv_id_2, serv_data_2, serv_id_3, serv_data_3, \ - serv_id_4, serv_data_4, serv_id_5, serv_data_5, \ - serv_id_6, serv_data_6) \ - void \ - FT_Destroy_Class_##class_( FT_Library library, \ - FT_ServiceDescRec* clazz ) \ - { \ - FT_Memory memory = library->memory; \ - if ( clazz ) \ - FT_FREE( clazz ); \ - } \ - \ - FT_Error \ - FT_Create_Class_##class_( FT_Library library, \ - FT_ServiceDescRec** output_class) \ - { \ - FT_ServiceDescRec* clazz; \ - FT_Error error; \ - FT_Memory memory = library->memory; \ - \ - if ( FT_ALLOC( clazz, sizeof(*clazz)*7 ) ) \ - return error; \ - clazz[0].serv_id = serv_id_1; \ - clazz[0].serv_data = serv_data_1; \ - clazz[1].serv_id = serv_id_2; \ - clazz[1].serv_data = serv_data_2; \ - clazz[2].serv_id = serv_id_3; \ - clazz[2].serv_data = serv_data_3; \ - clazz[3].serv_id = serv_id_4; \ - clazz[3].serv_data = serv_data_4; \ - clazz[4].serv_id = serv_id_5; \ - clazz[4].serv_data = serv_data_5; \ - clazz[5].serv_id = serv_id_6; \ - clazz[5].serv_data = serv_data_6; \ - clazz[6].serv_id = NULL; \ - clazz[6].serv_data = NULL; \ - *output_class = clazz; \ - return FT_Err_Ok; \ - } -#endif /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICEDESCREC1( class_, \ + serv_id_1, serv_data_1 ) \ + void \ + FT_Destroy_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + \ + \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec** output_class ) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + \ + if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 2 ) ) \ + return error; \ + \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = NULL; \ + clazz[1].serv_data = NULL; \ + \ + *output_class = clazz; \ + \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC2( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2 ) \ + void \ + FT_Destroy_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + \ + \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec** output_class ) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + \ + if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 3 ) ) \ + return error; \ + \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = NULL; \ + clazz[2].serv_data = NULL; \ + \ + *output_class = clazz; \ + \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC3( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, \ + serv_id_3, serv_data_3 ) \ + void \ + FT_Destroy_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + \ + \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec** output_class ) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + \ + if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 4 ) ) \ + return error; \ + \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = NULL; \ + clazz[3].serv_data = NULL; \ + \ + *output_class = clazz; \ + \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC4( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, \ + serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4 ) \ + void \ + FT_Destroy_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + \ + \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec** output_class ) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + \ + if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 5 ) ) \ + return error; \ + \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = serv_id_4; \ + clazz[3].serv_data = serv_data_4; \ + clazz[4].serv_id = NULL; \ + clazz[4].serv_data = NULL; \ + \ + *output_class = clazz; \ + \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC5( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, \ + serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, \ + serv_id_5, serv_data_5 ) \ + void \ + FT_Destroy_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + \ + \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec** output_class ) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + \ + if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 6 ) ) \ + return error; \ + \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = serv_id_4; \ + clazz[3].serv_data = serv_data_4; \ + clazz[4].serv_id = serv_id_5; \ + clazz[4].serv_data = serv_data_5; \ + clazz[5].serv_id = NULL; \ + clazz[5].serv_data = NULL; \ + \ + *output_class = clazz; \ + \ + return FT_Err_Ok; \ + } + +#define FT_DEFINE_SERVICEDESCREC6( class_, \ + serv_id_1, serv_data_1, \ + serv_id_2, serv_data_2, \ + serv_id_3, serv_data_3, \ + serv_id_4, serv_data_4, \ + serv_id_5, serv_data_5, \ + serv_id_6, serv_data_6 ) \ + void \ + FT_Destroy_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec* clazz ) \ + { \ + FT_Memory memory = library->memory; \ + \ + \ + if ( clazz ) \ + FT_FREE( clazz ); \ + } \ + \ + FT_Error \ + FT_Create_Class_ ## class_( FT_Library library, \ + FT_ServiceDescRec** output_class) \ + { \ + FT_ServiceDescRec* clazz; \ + FT_Error error; \ + FT_Memory memory = library->memory; \ + \ + \ + if ( FT_ALLOC( clazz, sizeof ( *clazz ) * 7 ) ) \ + return error; \ + \ + clazz[0].serv_id = serv_id_1; \ + clazz[0].serv_data = serv_data_1; \ + clazz[1].serv_id = serv_id_2; \ + clazz[1].serv_data = serv_data_2; \ + clazz[2].serv_id = serv_id_3; \ + clazz[2].serv_data = serv_data_3; \ + clazz[3].serv_id = serv_id_4; \ + clazz[3].serv_data = serv_data_4; \ + clazz[4].serv_id = serv_id_5; \ + clazz[4].serv_data = serv_data_5; \ + clazz[5].serv_id = serv_id_6; \ + clazz[5].serv_data = serv_data_6; \ + clazz[6].serv_id = NULL; \ + clazz[6].serv_data = NULL; \ + \ + *output_class = clazz; \ + \ + return FT_Err_Ok; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ + /* * Parse a list of FT_ServiceDescRec descriptors and look for diff --git a/freetype/include/freetype/internal/services/svbdf.h b/freetype/include/freetype/internal/services/svbdf.h index 83e7d6238..08575aaf4 100644 --- a/freetype/include/freetype/internal/services/svbdf.h +++ b/freetype/include/freetype/internal/services/svbdf.h @@ -4,7 +4,7 @@ /* */ /* The FreeType BDF services (specification). */ /* */ -/* Copyright 2003 by */ +/* Copyright 2003, 2009, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -45,25 +45,30 @@ FT_BEGIN_HEADER FT_BDF_GetPropertyFunc get_property; }; + #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_SERVICE_BDFRec(class_, get_charset_id_, get_property_) \ - static const FT_Service_BDFRec class_ = \ +#define FT_DEFINE_SERVICE_BDFRec( class_, \ + get_charset_id_, \ + get_property_ ) \ + static const FT_Service_BDFRec class_ = \ { \ get_charset_id_, get_property_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ -#define FT_DEFINE_SERVICE_BDFRec(class_, get_charset_id_, get_property_) \ +#define FT_DEFINE_SERVICE_BDFRec( class_, \ + get_charset_id_, \ + get_property_ ) \ void \ - FT_Init_Class_##class_( FT_Service_BDFRec* clazz ) \ + FT_Init_Class_ ## class_( FT_Service_BDFRec* clazz ) \ { \ clazz->get_charset_id = get_charset_id_; \ - clazz->get_property = get_property_; \ - } + clazz->get_property = get_property_; \ + } -#endif /* FT_CONFIG_OPTION_PIC */ +#endif /* FT_CONFIG_OPTION_PIC */ /* */ diff --git a/freetype/include/freetype/internal/services/svcid.h b/freetype/include/freetype/internal/services/svcid.h index 62dae58a0..646ce1283 100644 --- a/freetype/include/freetype/internal/services/svcid.h +++ b/freetype/include/freetype/internal/services/svcid.h @@ -4,7 +4,7 @@ /* */ /* The FreeType CID font services (specification). */ /* */ -/* Copyright 2007, 2009 by Derek Clegg, Michael Toftdal. */ +/* Copyright 2007, 2009, 2012 by Derek Clegg, Michael Toftdal. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ @@ -46,30 +46,36 @@ FT_BEGIN_HEADER FT_CID_GetCIDFromGlyphIndexFunc get_cid_from_glyph_index; }; + #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_SERVICE_CIDREC(class_, get_ros_, \ - get_is_cid_, get_cid_from_glyph_index_ ) \ - static const FT_Service_CIDRec class_ = \ - { \ - get_ros_, get_is_cid_, get_cid_from_glyph_index_ \ +#define FT_DEFINE_SERVICE_CIDREC( class_, \ + get_ros_, \ + get_is_cid_, \ + get_cid_from_glyph_index_ ) \ + static const FT_Service_CIDRec class_ = \ + { \ + get_ros_, get_is_cid_, get_cid_from_glyph_index_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_CIDREC(class_, get_ros_, \ - get_is_cid_, get_cid_from_glyph_index_ ) \ - void \ - FT_Init_Class_##class_( FT_Library library, \ - FT_Service_CIDRec* clazz) \ - { \ - FT_UNUSED(library); \ - clazz->get_ros = get_ros_; \ - clazz->get_is_cid = get_is_cid_; \ - clazz->get_cid_from_glyph_index = get_cid_from_glyph_index_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_CIDREC( class_, \ + get_ros_, \ + get_is_cid_, \ + get_cid_from_glyph_index_ ) \ + void \ + FT_Init_Class_ ## class_( FT_Library library, \ + FT_Service_CIDRec* clazz ) \ + { \ + FT_UNUSED( library ); \ + \ + clazz->get_ros = get_ros_; \ + clazz->get_is_cid = get_is_cid_; \ + clazz->get_cid_from_glyph_index = get_cid_from_glyph_index_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ /* */ diff --git a/freetype/include/freetype/internal/services/svgldict.h b/freetype/include/freetype/internal/services/svgldict.h index 2a5541e5b..4d3c58f8c 100644 --- a/freetype/include/freetype/internal/services/svgldict.h +++ b/freetype/include/freetype/internal/services/svgldict.h @@ -4,7 +4,7 @@ /* */ /* The FreeType glyph dictionary services (specification). */ /* */ -/* Copyright 2003 by */ +/* Copyright 2003, 2009, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -51,27 +51,33 @@ FT_BEGIN_HEADER FT_GlyphDict_NameIndexFunc name_index; /* optional */ }; + #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \ - static const FT_Service_GlyphDictRec class_ = \ +#define FT_DEFINE_SERVICE_GLYPHDICTREC( class_, \ + get_name_, \ + name_index_) \ + static const FT_Service_GlyphDictRec class_ = \ { \ get_name_, name_index_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ -#define FT_DEFINE_SERVICE_GLYPHDICTREC(class_, get_name_, name_index_) \ +#define FT_DEFINE_SERVICE_GLYPHDICTREC( class_, \ + get_name_, \ + name_index_) \ void \ - FT_Init_Class_##class_( FT_Library library, \ - FT_Service_GlyphDictRec* clazz) \ + FT_Init_Class_ ## class_( FT_Library library, \ + FT_Service_GlyphDictRec* clazz ) \ { \ - FT_UNUSED(library); \ - clazz->get_name = get_name_; \ + FT_UNUSED( library ); \ + \ + clazz->get_name = get_name_; \ clazz->name_index = name_index_; \ - } + } -#endif /* FT_CONFIG_OPTION_PIC */ +#endif /* FT_CONFIG_OPTION_PIC */ /* */ diff --git a/freetype/include/freetype/internal/services/svmm.h b/freetype/include/freetype/internal/services/svmm.h index 077b40260..4c1b960b4 100644 --- a/freetype/include/freetype/internal/services/svmm.h +++ b/freetype/include/freetype/internal/services/svmm.h @@ -4,7 +4,7 @@ /* */ /* The FreeType Multiple Masters and GX var services (specification). */ /* */ -/* Copyright 2003, 2004 by */ +/* Copyright 2003, 2004, 2009, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -68,30 +68,39 @@ FT_BEGIN_HEADER FT_Set_Var_Design_Func set_var_design; }; + #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_SERVICE_MULTIMASTERSREC(class_, get_mm_, set_mm_design_, \ - set_mm_blend_, get_mm_var_, set_var_design_) \ - static const FT_Service_MultiMastersRec class_ = \ - { \ - get_mm_, set_mm_design_, set_mm_blend_, get_mm_var_, set_var_design_ \ +#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_, \ + get_mm_, \ + set_mm_design_, \ + set_mm_blend_, \ + get_mm_var_, \ + set_var_design_ ) \ + static const FT_Service_MultiMastersRec class_ = \ + { \ + get_mm_, set_mm_design_, set_mm_blend_, get_mm_var_, set_var_design_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_MULTIMASTERSREC(class_, get_mm_, set_mm_design_, \ - set_mm_blend_, get_mm_var_, set_var_design_) \ - void \ - FT_Init_Class_##class_( FT_Service_MultiMastersRec* clazz ) \ - { \ - clazz->get_mm = get_mm_; \ - clazz->set_mm_design = set_mm_design_; \ - clazz->set_mm_blend = set_mm_blend_; \ - clazz->get_mm_var = get_mm_var_; \ - clazz->set_var_design = set_var_design_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_MULTIMASTERSREC( class_, \ + get_mm_, \ + set_mm_design_, \ + set_mm_blend_, \ + get_mm_var_, \ + set_var_design_ ) \ + void \ + FT_Init_Class_ ## class_( FT_Service_MultiMastersRec* clazz ) \ + { \ + clazz->get_mm = get_mm_; \ + clazz->set_mm_design = set_mm_design_; \ + clazz->set_mm_blend = set_mm_blend_; \ + clazz->get_mm_var = get_mm_var_; \ + clazz->set_var_design = set_var_design_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ /* */ diff --git a/freetype/include/freetype/internal/services/svpostnm.h b/freetype/include/freetype/internal/services/svpostnm.h index cb36a2c3d..1476dea48 100644 --- a/freetype/include/freetype/internal/services/svpostnm.h +++ b/freetype/include/freetype/internal/services/svpostnm.h @@ -4,7 +4,7 @@ /* */ /* The FreeType PostScript name services (specification). */ /* */ -/* Copyright 2003, 2007 by */ +/* Copyright 2003, 2007, 2009, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -46,26 +46,28 @@ FT_BEGIN_HEADER FT_PsName_GetFunc get_ps_font_name; }; + #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_) \ - static const FT_Service_PsFontNameRec class_ = \ - { \ - get_ps_font_name_ \ +#define FT_DEFINE_SERVICE_PSFONTNAMEREC( class_, get_ps_font_name_ ) \ + static const FT_Service_PsFontNameRec class_ = \ + { \ + get_ps_font_name_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ -#define FT_DEFINE_SERVICE_PSFONTNAMEREC(class_, get_ps_font_name_) \ - void \ - FT_Init_Class_##class_( FT_Library library, \ - FT_Service_PsFontNameRec* clazz) \ - { \ - FT_UNUSED(library); \ - clazz->get_ps_font_name = get_ps_font_name_; \ - } +#define FT_DEFINE_SERVICE_PSFONTNAMEREC( class_, get_ps_font_name_ ) \ + void \ + FT_Init_Class_ ## class_( FT_Library library, \ + FT_Service_PsFontNameRec* clazz ) \ + { \ + FT_UNUSED( library ); \ + \ + clazz->get_ps_font_name = get_ps_font_name_; \ + } -#endif /* FT_CONFIG_OPTION_PIC */ +#endif /* FT_CONFIG_OPTION_PIC */ /* */ diff --git a/freetype/include/freetype/internal/services/svpscmap.h b/freetype/include/freetype/internal/services/svpscmap.h index 3b398aea3..3cb15a2a6 100644 --- a/freetype/include/freetype/internal/services/svpscmap.h +++ b/freetype/include/freetype/internal/services/svpscmap.h @@ -4,7 +4,7 @@ /* */ /* The FreeType PostScript charmap service (specification). */ /* */ -/* Copyright 2003, 2006 by */ +/* Copyright 2003, 2006, 2009, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -120,37 +120,50 @@ FT_BEGIN_HEADER #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_SERVICE_PSCMAPSREC(class_, unicode_value_, unicodes_init_, \ - unicodes_char_index_, unicodes_char_next_, macintosh_name_, \ - adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_) \ - static const FT_Service_PsCMapsRec class_ = \ - { \ - unicode_value_, unicodes_init_, \ - unicodes_char_index_, unicodes_char_next_, macintosh_name_, \ - adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_ \ +#define FT_DEFINE_SERVICE_PSCMAPSREC( class_, \ + unicode_value_, \ + unicodes_init_, \ + unicodes_char_index_, \ + unicodes_char_next_, \ + macintosh_name_, \ + adobe_std_strings_, \ + adobe_std_encoding_, \ + adobe_expert_encoding_ ) \ + static const FT_Service_PsCMapsRec class_ = \ + { \ + unicode_value_, unicodes_init_, \ + unicodes_char_index_, unicodes_char_next_, macintosh_name_, \ + adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ - -#define FT_DEFINE_SERVICE_PSCMAPSREC(class_, unicode_value_, unicodes_init_, \ - unicodes_char_index_, unicodes_char_next_, macintosh_name_, \ - adobe_std_strings_, adobe_std_encoding_, adobe_expert_encoding_) \ - void \ - FT_Init_Class_##class_( FT_Library library, \ - FT_Service_PsCMapsRec* clazz) \ - { \ - FT_UNUSED(library); \ - clazz->unicode_value = unicode_value_; \ - clazz->unicodes_init = unicodes_init_; \ - clazz->unicodes_char_index = unicodes_char_index_; \ - clazz->unicodes_char_next = unicodes_char_next_; \ - clazz->macintosh_name = macintosh_name_; \ - clazz->adobe_std_strings = adobe_std_strings_; \ - clazz->adobe_std_encoding = adobe_std_encoding_; \ - clazz->adobe_expert_encoding = adobe_expert_encoding_; \ - } - -#endif /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ + +#define FT_DEFINE_SERVICE_PSCMAPSREC( class_, \ + unicode_value_, \ + unicodes_init_, \ + unicodes_char_index_, \ + unicodes_char_next_, \ + macintosh_name_, \ + adobe_std_strings_, \ + adobe_std_encoding_, \ + adobe_expert_encoding_ ) \ + void \ + FT_Init_Class_ ## class_( FT_Library library, \ + FT_Service_PsCMapsRec* clazz ) \ + { \ + FT_UNUSED( library ); \ + \ + clazz->unicode_value = unicode_value_; \ + clazz->unicodes_init = unicodes_init_; \ + clazz->unicodes_char_index = unicodes_char_index_; \ + clazz->unicodes_char_next = unicodes_char_next_; \ + clazz->macintosh_name = macintosh_name_; \ + clazz->adobe_std_strings = adobe_std_strings_; \ + clazz->adobe_std_encoding = adobe_std_encoding_; \ + clazz->adobe_expert_encoding = adobe_expert_encoding_; \ + } + +#endif /* FT_CONFIG_OPTION_PIC */ /* */ diff --git a/freetype/include/freetype/internal/services/svpsinfo.h b/freetype/include/freetype/internal/services/svpsinfo.h index 9a6ce246c..ca3bbc114 100644 --- a/freetype/include/freetype/internal/services/svpsinfo.h +++ b/freetype/include/freetype/internal/services/svpsinfo.h @@ -4,7 +4,7 @@ /* */ /* The FreeType PostScript info service (specification). */ /* */ -/* Copyright 2003, 2004, 2009, 2011 by */ +/* Copyright 2003, 2004, 2009, 2011, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -38,7 +38,7 @@ FT_BEGIN_HEADER PS_FontExtraRec* afont_extra ); typedef FT_Int - (*PS_HasGlyphNamesFunc)( FT_Face face ); + (*PS_HasGlyphNamesFunc)( FT_Face face ); typedef FT_Error (*PS_GetFontPrivateFunc)( FT_Face face, @@ -61,35 +61,43 @@ FT_BEGIN_HEADER PS_GetFontValueFunc ps_get_font_value; }; + #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_SERVICE_PSINFOREC(class_, get_font_info_, \ - ps_get_font_extra_, has_glyph_names_, get_font_private_, \ - get_font_value_) \ - static const FT_Service_PsInfoRec class_ = \ +#define FT_DEFINE_SERVICE_PSINFOREC( class_, \ + get_font_info_, \ + ps_get_font_extra_, \ + has_glyph_names_, \ + get_font_private_, \ + get_font_value_ ) \ + static const FT_Service_PsInfoRec class_ = \ { \ get_font_info_, ps_get_font_extra_, has_glyph_names_, \ get_font_private_, get_font_value_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ -#define FT_DEFINE_SERVICE_PSINFOREC(class_, get_font_info_, \ - ps_get_font_extra_, has_glyph_names_, get_font_private_, \ - get_font_value_) \ +#define FT_DEFINE_SERVICE_PSINFOREC( class_, \ + get_font_info_, \ + ps_get_font_extra_, \ + has_glyph_names_, \ + get_font_private_, \ + get_font_value_ ) \ void \ - FT_Init_Class_##class_( FT_Library library, \ - FT_Service_PsInfoRec* clazz) \ + FT_Init_Class_ ## class_( FT_Library library, \ + FT_Service_PsInfoRec* clazz ) \ { \ - FT_UNUSED(library); \ - clazz->ps_get_font_info = get_font_info_; \ - clazz->ps_get_font_extra = ps_get_font_extra_; \ - clazz->ps_has_glyph_names = has_glyph_names_; \ + FT_UNUSED( library ); \ + \ + clazz->ps_get_font_info = get_font_info_; \ + clazz->ps_get_font_extra = ps_get_font_extra_; \ + clazz->ps_has_glyph_names = has_glyph_names_; \ clazz->ps_get_font_private = get_font_private_; \ - clazz->ps_get_font_value = get_font_value_; \ - } + clazz->ps_get_font_value = get_font_value_; \ + } -#endif /* FT_CONFIG_OPTION_PIC */ +#endif /* FT_CONFIG_OPTION_PIC */ /* */ diff --git a/freetype/include/freetype/internal/services/svsfnt.h b/freetype/include/freetype/internal/services/svsfnt.h index 679b5f081..9a328d0a4 100644 --- a/freetype/include/freetype/internal/services/svsfnt.h +++ b/freetype/include/freetype/internal/services/svsfnt.h @@ -4,7 +4,7 @@ /* */ /* The FreeType SFNT table loading service (specification). */ /* */ -/* Copyright 2003, 2004 by */ +/* Copyright 2003, 2004, 2009, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -69,26 +69,27 @@ FT_BEGIN_HEADER FT_SFNT_TableInfoFunc table_info; }; + #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_SERVICE_SFNT_TABLEREC(class_, load_, get_, info_) \ - static const FT_Service_SFNT_TableRec class_ = \ - { \ - load_, get_, info_ \ +#define FT_DEFINE_SERVICE_SFNT_TABLEREC( class_, load_, get_, info_ ) \ + static const FT_Service_SFNT_TableRec class_ = \ + { \ + load_, get_, info_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ -#define FT_DEFINE_SERVICE_SFNT_TABLEREC(class_, load_, get_, info_) \ - void \ - FT_Init_Class_##class_( FT_Service_SFNT_TableRec* clazz ) \ - { \ - clazz->load_table = load_; \ - clazz->get_table = get_; \ - clazz->table_info = info_; \ - } +#define FT_DEFINE_SERVICE_SFNT_TABLEREC( class_, load_, get_, info_ ) \ + void \ + FT_Init_Class_ ## class_( FT_Service_SFNT_TableRec* clazz ) \ + { \ + clazz->load_table = load_; \ + clazz->get_table = get_; \ + clazz->table_info = info_; \ + } -#endif /* FT_CONFIG_OPTION_PIC */ +#endif /* FT_CONFIG_OPTION_PIC */ /* */ diff --git a/freetype/include/freetype/internal/services/svttcmap.h b/freetype/include/freetype/internal/services/svttcmap.h index 263330774..5d6f9bc7a 100644 --- a/freetype/include/freetype/internal/services/svttcmap.h +++ b/freetype/include/freetype/internal/services/svttcmap.h @@ -7,7 +7,7 @@ /* Copyright 2003 by */ /* Masatake YAMATO, Redhat K.K. */ /* */ -/* Copyright 2003, 2008 by */ +/* Copyright 2003, 2008, 2009, 2012 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */ /* This file is part of the FreeType project, and may only be used, */ @@ -31,7 +31,7 @@ FT_BEGIN_HEADER -#define FT_SERVICE_ID_TT_CMAP "tt-cmaps" +#define FT_SERVICE_ID_TT_CMAP "tt-cmaps" /*************************************************************************/ @@ -58,8 +58,8 @@ FT_BEGIN_HEADER /* */ typedef struct TT_CMapInfo_ { - FT_ULong language; - FT_Long format; + FT_ULong language; + FT_Long format; } TT_CMapInfo; @@ -76,24 +76,25 @@ FT_BEGIN_HEADER #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_SERVICE_TTCMAPSREC(class_, get_cmap_info_) \ - static const FT_Service_TTCMapsRec class_ = \ - { \ - get_cmap_info_ \ +#define FT_DEFINE_SERVICE_TTCMAPSREC( class_, get_cmap_info_ ) \ + static const FT_Service_TTCMapsRec class_ = \ + { \ + get_cmap_info_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ -#define FT_DEFINE_SERVICE_TTCMAPSREC(class_, get_cmap_info_) \ - void \ - FT_Init_Class_##class_( FT_Library library, \ - FT_Service_TTCMapsRec* clazz) \ - { \ - FT_UNUSED(library); \ - clazz->get_cmap_info = get_cmap_info_; \ - } +#define FT_DEFINE_SERVICE_TTCMAPSREC( class_, get_cmap_info_ ) \ + void \ + FT_Init_Class_ ## class_( FT_Library library, \ + FT_Service_TTCMapsRec* clazz ) \ + { \ + FT_UNUSED( library ); \ + \ + clazz->get_cmap_info = get_cmap_info_; \ + } -#endif /* FT_CONFIG_OPTION_PIC */ +#endif /* FT_CONFIG_OPTION_PIC */ /* */ diff --git a/freetype/include/freetype/internal/services/svttglyf.h b/freetype/include/freetype/internal/services/svttglyf.h index 2998491bf..3bb087445 100644 --- a/freetype/include/freetype/internal/services/svttglyf.h +++ b/freetype/include/freetype/internal/services/svttglyf.h @@ -4,7 +4,7 @@ /* */ /* The FreeType TrueType glyph service. */ /* */ -/* Copyright 2007 by David Turner. */ +/* Copyright 2007, 2009, 2012 by David Turner. */ /* */ /* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */ @@ -24,7 +24,7 @@ FT_BEGIN_HEADER -#define FT_SERVICE_ID_TT_GLYF "tt-glyf" +#define FT_SERVICE_ID_TT_GLYF "tt-glyf" typedef FT_ULong @@ -37,24 +37,25 @@ FT_BEGIN_HEADER TT_Glyf_GetLocationFunc get_location; }; + #ifndef FT_CONFIG_OPTION_PIC -#define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \ - static const FT_Service_TTGlyfRec class_ = \ +#define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ ) \ + static const FT_Service_TTGlyfRec class_ = \ { \ get_location_ \ }; -#else /* FT_CONFIG_OPTION_PIC */ +#else /* FT_CONFIG_OPTION_PIC */ -#define FT_DEFINE_SERVICE_TTGLYFREC(class_, get_location_ ) \ +#define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ ) \ void \ - FT_Init_Class_##class_( FT_Service_TTGlyfRec* clazz ) \ + FT_Init_Class_ ## class_( FT_Service_TTGlyfRec* clazz ) \ { \ clazz->get_location = get_location_; \ - } + } -#endif /* FT_CONFIG_OPTION_PIC */ +#endif /* FT_CONFIG_OPTION_PIC */ /* */ diff --git a/freetype/include/freetype/t1tables.h b/freetype/include/freetype/t1tables.h index 74d4db8e5..4045bbd34 100644 --- a/freetype/include/freetype/t1tables.h +++ b/freetype/include/freetype/t1tables.h @@ -570,7 +570,7 @@ FT_BEGIN_HEADER PS_DICT_NOTICE, /* FT_String* */ PS_DICT_FULL_NAME, /* FT_String* */ PS_DICT_FAMILY_NAME, /* FT_String* */ - PS_DICT_WEIGHT, /* FT_String */ + PS_DICT_WEIGHT, /* FT_String* */ PS_DICT_IS_FIXED_PITCH, /* FT_Bool */ PS_DICT_UNDERLINE_POSITION, /* FT_Short */ PS_DICT_UNDERLINE_THICKNESS, /* FT_UShort */ |