diff --git a/include/freetype/internal/services/svbdf.h b/include/freetype/internal/services/svbdf.h index 2aae41fa4..0974752a7 100644 --- a/include/freetype/internal/services/svbdf.h +++ b/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,22 +45,27 @@ 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 */ -#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 */ diff --git a/include/freetype/internal/services/svcid.h b/include/freetype/internal/services/svcid.h index e176f9b40..6be3f9374 100644 --- a/include/freetype/internal/services/svcid.h +++ b/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,27 +46,33 @@ 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_; \ +#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/include/freetype/internal/services/svgldict.h b/include/freetype/internal/services/svgldict.h index d49ca25ca..1d1253472 100644 --- a/include/freetype/internal/services/svgldict.h +++ b/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,23 +51,29 @@ 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 */ -#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_; \ } diff --git a/include/freetype/internal/services/svmm.h b/include/freetype/internal/services/svmm.h index 358ba74ab..b08a663d6 100644 --- a/include/freetype/internal/services/svmm.h +++ b/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,27 +68,36 @@ 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_; \ +#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/include/freetype/internal/services/svpostnm.h b/include/freetype/internal/services/svpostnm.h index 5d8729fd9..a76b4fe05 100644 --- a/include/freetype/internal/services/svpostnm.h +++ b/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,23 +46,25 @@ 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 */ -#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 */ diff --git a/include/freetype/internal/services/svpscmap.h b/include/freetype/internal/services/svpscmap.h index fdfa588da..030948ea6 100644 --- a/include/freetype/internal/services/svpscmap.h +++ b/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,34 +120,47 @@ 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_; \ +#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/include/freetype/internal/services/svpsinfo.h b/include/freetype/internal/services/svpsinfo.h index 59b626bb8..4bfb50671 100644 --- a/include/freetype/internal/services/svpsinfo.h +++ b/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,12 +61,16 @@ 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_ \ @@ -74,19 +78,23 @@ FT_BEGIN_HEADER #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 */ diff --git a/include/freetype/internal/services/svsfnt.h b/include/freetype/internal/services/svsfnt.h index b4c1e0fce..d3835aa1c 100644 --- a/include/freetype/internal/services/svsfnt.h +++ b/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,23 +69,24 @@ 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 */ -#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 */ diff --git a/include/freetype/internal/services/svttcmap.h b/include/freetype/internal/services/svttcmap.h index cab3d248a..83994aaf8 100644 --- a/include/freetype/internal/services/svttcmap.h +++ b/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,21 +76,22 @@ 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 */ -#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 */ diff --git a/include/freetype/internal/services/svttglyf.h b/include/freetype/internal/services/svttglyf.h index ac25c5b40..369eb8421 100644 --- a/include/freetype/internal/services/svttglyf.h +++ b/include/freetype/internal/services/svttglyf.h @@ -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,6 +37,7 @@ FT_BEGIN_HEADER TT_Glyf_GetLocationFunc get_location; }; + #ifndef FT_CONFIG_OPTION_PIC #define FT_DEFINE_SERVICE_TTGLYFREC( class_, get_location_ ) \