Permalink
Browse files

Update to freetype 2.4.9

This was done by applying the entire 2.4.9 except for the following exceptions:
- files that were new, or were not present originally in the version of
freetype we were using (meaning that they are present in 2.4.8, and in
2.4.9, but were never integrated into the Android tree because they are
not used in the Android tree).
- ftmodule.h: given that we support fewer modules than in upstream 2.4.9
(same as Android), the file was left unchanged (and there were no changes
from the official 2.4.8 to 2.4.9
- ftoption.h: same reasons as ftmodule.h

Change-Id: Id251f2cc5ca1c864f9a4cc0c67b94025ee3ccc4a
  • Loading branch information...
1 parent 2781190 commit 41371e1e39c8528eb0c4bc40683c736e6683e60c Eric Vannier committed with gcondra Mar 22, 2012
Showing with 1,802 additions and 1,239 deletions.
  1. +2 −5 include/freetype/config/ftconfig.h
  2. +46 −22 include/freetype/freetype.h
  3. +3 −1 include/freetype/fterrdef.h
  4. +2 −1 include/freetype/fterrors.h
  5. +2 −2 include/freetype/ftgasp.h
  6. +14 −14 include/freetype/ftstroke.h
  7. +2 −2 include/freetype/fttypes.h
  8. +3 −3 include/freetype/internal/autohint.h
  9. +10 −11 include/freetype/internal/ftdriver.h
  10. +23 −38 include/freetype/internal/ftobjs.h
  11. +9 −9 include/freetype/internal/ftpic.h
  12. +51 −0 include/freetype/internal/ftrfork.h
  13. +341 −273 include/freetype/internal/ftserv.h
  14. +3 −3 include/freetype/internal/pshints.h
  15. +14 −9 include/freetype/internal/services/svbdf.h
  16. +27 −21 include/freetype/internal/services/svcid.h
  17. +17 −11 include/freetype/internal/services/svgldict.h
  18. +30 −21 include/freetype/internal/services/svmm.h
  19. +17 −15 include/freetype/internal/services/svpostnm.h
  20. +43 −30 include/freetype/internal/services/svpscmap.h
  21. +27 −19 include/freetype/internal/services/svpsinfo.h
  22. +16 −15 include/freetype/internal/services/svsfnt.h
  23. +19 −18 include/freetype/internal/services/svttcmap.h
  24. +10 −9 include/freetype/internal/services/svttglyf.h
  25. +5 −5 include/freetype/internal/sfnt.h
  26. +1 −1 include/freetype/internal/tttypes.h
  27. +1 −1 include/freetype/t1tables.h
  28. +6 −6 src/autofit/afcjk.c
  29. +1 −1 src/autofit/afdummy.c
  30. +2 −1 src/autofit/aferrors.h
  31. +1 −1 src/autofit/afglobal.c
  32. +4 −4 src/autofit/afindic.c
  33. +2 −2 src/autofit/aflatin.c
  34. +5 −5 src/autofit/aflatin2.c
  35. +13 −6 src/autofit/afloader.c
  36. +2 −2 src/autofit/afloader.h
  37. +7 −3 src/autofit/afpic.c
  38. +10 −3 src/autofit/afpic.h
  39. +1 −1 src/autofit/aftypes.h
  40. +1 −1 src/autofit/afwarp.c
  41. +27 −17 src/base/basepic.c
  42. +18 −3 src/base/basepic.h
  43. +6 −9 src/base/ftadvanc.c
  44. +1 −1 src/base/ftbase.c
  45. +3 −3 src/base/ftbase.h
  46. +1 −1 src/base/ftbitmap.c
  47. +10 −9 src/base/ftcalc.c
  48. +13 −13 src/base/ftglyph.c
  49. +66 −37 src/base/ftinit.c
  50. +12 −15 src/base/ftobjs.c
  51. +2 −2 src/base/ftoutln.c
  52. +6 −6 src/base/ftpic.c
  53. +28 −52 src/base/ftrfork.c
  54. +2 −2 src/cache/ftcbasic.c
  55. +1 −1 src/cache/ftccmap.c
  56. +38 −21 src/cff/cffdrivr.c
  57. +2 −1 src/cff/cfferrs.h
  58. +10 −15 src/cff/cffgload.c
  59. +2 −2 src/cff/cffload.c
  60. +1 −1 src/cff/cffload.h
  61. +22 −18 src/cff/cffobjs.c
  62. +80 −33 src/cff/cffpic.c
  63. +8 −1 src/cff/cffpic.h
  64. +1 −1 src/cff/cfftypes.h
  65. +2 −5 src/psaux/afmparse.c
  66. +2 −1 src/psaux/psauxerr.h
  67. +1 −1 src/psaux/psauxmod.c
  68. +1 −1 src/psaux/psauxmod.h
  69. +12 −4 src/psaux/psconv.c
  70. +2 −2 src/psaux/psobjs.c
  71. +4 −4 src/psaux/t1cmap.c
  72. +4 −4 src/psaux/t1decode.c
  73. +2 −1 src/pshinter/pshnterr.h
  74. +14 −8 src/pshinter/pshpic.c
  75. +7 −1 src/pshinter/pshpic.h
  76. +16 −4 src/psnames/psmodule.c
  77. +2 −1 src/psnames/psnamerr.h
  78. +30 −15 src/psnames/pspic.c
  79. +8 −1 src/psnames/pspic.h
  80. +44 −33 src/raster/ftraster.c
  81. +6 −7 src/raster/ftrend1.c
  82. +2 −1 src/raster/rasterrs.h
  83. +23 −16 src/raster/rastpic.c
  84. +14 −1 src/raster/rastpic.h
  85. +18 −7 src/sfnt/sfdriver.c
  86. +2 −1 src/sfnt/sferrors.h
  87. +74 −30 src/sfnt/sfntpic.c
  88. +8 −1 src/sfnt/sfntpic.h
  89. +9 −1 src/sfnt/sfobjs.c
  90. +1 −1 src/sfnt/ttcmap.c
  91. +3 −3 src/sfnt/ttcmap.h
  92. +56 −44 src/smooth/ftgrays.c
  93. +2 −1 src/smooth/ftsmerrs.h
  94. +13 −13 src/smooth/ftsmooth.c
  95. +29 −20 src/smooth/ftspic.c
  96. +20 −1 src/smooth/ftspic.h
  97. +32 −17 src/truetype/ttdriver.c
  98. +2 −1 src/truetype/tterrors.h
  99. +9 −12 src/truetype/ttgload.c
  100. +108 −84 src/truetype/ttinterp.c
  101. +1 −0 src/truetype/ttinterp.h
  102. +11 −4 src/truetype/ttobjs.c
  103. +2 −1 src/truetype/ttobjs.h
  104. +36 −17 src/truetype/ttpic.c
  105. +8 −1 src/truetype/ttpic.h
  106. +9 −9 src/truetype/ttpload.c
View
7 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__ )
View
68 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
/*************************************************************************/
View
4 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 */
View
3 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__ */
View
4 include/freetype/ftgasp.h
@@ -62,12 +62,12 @@
* It is up to the client to decide what to do.
*
* FT_GASP_DO_GRIDFIT ::
- * Grid-fitting and hinting should be performed at the specified ppem.
+ * Grid-fitting and hinting should be performed at the specified ppem.
* This *really* means TrueType bytecode interpretation. If this bit
* is not set, no hinting gets applied.
*
* FT_GASP_DO_GRAY ::
- * Anti-aliased rendering should be performed at the specified ppem.
+ * Anti-aliased rendering should be performed at the specified ppem.
* If not set, do monochrome rendering.
*
* FT_GASP_SYMMETRIC_SMOOTHING ::
View
28 include/freetype/ftstroke.h
@@ -85,25 +85,25 @@ FT_BEGIN_HEADER
* miter limit is exceeded. The outer edges of the strokes
* for the two segments are extended until they meet at an
* angle. If the segments meet at too sharp an angle (such
- * that the miter would extend from the intersection of the
- * segments a distance greater than the product of the miter
- * limit value and the border radius), then a bevel join (see
- * above) is used instead. This prevents long spikes being
- * created. FT_STROKER_LINEJOIN_MITER_FIXED generates a miter
+ * that the miter would extend from the intersection of the
+ * segments a distance greater than the product of the miter
+ * limit value and the border radius), then a bevel join (see
+ * above) is used instead. This prevents long spikes being
+ * created. FT_STROKER_LINEJOIN_MITER_FIXED generates a miter
* line join as used in PostScript and PDF.
*
* FT_STROKER_LINEJOIN_MITER_VARIABLE ::
* FT_STROKER_LINEJOIN_MITER ::
* Used to render mitered line joins, with variable bevels if
- * the miter limit is exceeded. The intersection of the
- * strokes is clipped at a line perpendicular to the bisector
- * of the angle between the strokes, at the distance from the
- * intersection of the segments equal to the product of the
- * miter limit value and the border radius. This prevents
- * long spikes being created.
- * FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line
- * join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias
- * for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for
+ * the miter limit is exceeded. The intersection of the
+ * strokes is clipped at a line perpendicular to the bisector
+ * of the angle between the strokes, at the distance from the
+ * intersection of the segments equal to the product of the
+ * miter limit value and the border radius. This prevents
+ * long spikes being created.
+ * FT_STROKER_LINEJOIN_MITER_VARIABLE generates a mitered line
+ * join as used in XPS. FT_STROKER_LINEJOIN_MITER is an alias
+ * for FT_STROKER_LINEJOIN_MITER_VARIABLE, retained for
* backwards compatibility.
*/
typedef enum FT_Stroker_LineJoin_
View
4 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. */
/* */
View
6 include/freetype/internal/autohint.h
@@ -206,7 +206,7 @@ FT_BEGIN_HEADER
reset_face_, get_global_hints_, done_global_hints_, load_glyph_ \
};
-#else /* FT_CONFIG_OPTION_PIC */
+#else /* FT_CONFIG_OPTION_PIC */
#define FT_DEFINE_AUTOHINTER_SERVICE(class_, reset_face_, get_global_hints_, \
done_global_hints_, load_glyph_) \
@@ -219,9 +219,9 @@ FT_BEGIN_HEADER
clazz->get_global_hints = get_global_hints_; \
clazz->done_global_hints = done_global_hints_; \
clazz->load_glyph = load_glyph_; \
- }
+ }
-#endif /* FT_CONFIG_OPTION_PIC */
+#endif /* FT_CONFIG_OPTION_PIC */
FT_END_HEADER
View
21 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 */
View
61 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 */
View
18 include/freetype/internal/ftpic.h
@@ -26,7 +26,7 @@
#ifndef __FTPIC_H__
#define __FTPIC_H__
-
+
FT_BEGIN_HEADER
#ifdef FT_CONFIG_OPTION_PIC
@@ -36,14 +36,14 @@ FT_BEGIN_HEADER
/* pic containers for base */
void* base;
/* pic containers for modules */
- void* autofit;
- void* cff;
- void* pshinter;
- void* psnames;
- void* raster;
- void* sfnt;
- void* smooth;
- void* truetype;
+ void* autofit;
+ void* cff;
+ void* pshinter;
+ void* psnames;
+ void* raster;
+ void* sfnt;
+ void* smooth;
+ void* truetype;
} FT_PIC_Container;
/* Initialize the various function tables, structs, etc. stored in the container. */
View
51 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 */
/*************************************************************************/
/* */
View
614 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
View
6 include/freetype/internal/pshints.h
@@ -688,7 +688,7 @@ FT_BEGIN_HEADER
get_globals_funcs_, get_t1_funcs_, get_t2_funcs_ \
};
-#else /* FT_CONFIG_OPTION_PIC */
+#else /* FT_CONFIG_OPTION_PIC */
#define FT_DEFINE_PSHINTER_INTERFACE(class_, get_globals_funcs_, \
get_t1_funcs_, get_t2_funcs_) \
@@ -700,9 +700,9 @@ FT_BEGIN_HEADER
clazz->get_globals_funcs = get_globals_funcs_; \
clazz->get_t1_funcs = get_t1_funcs_; \
clazz->get_t2_funcs = get_t2_funcs_; \
- }
+ }
-#endif /* FT_CONFIG_OPTION_PIC */
+#endif /* FT_CONFIG_OPTION_PIC */
FT_END_HEADER
View
23 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 */
/* */
View
48 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 */
/* */
View
28 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 */
/* */
View
51 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 */
/* */
View
32 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 */
/* */
View
73 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 */
/* */
View
46 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 */
/* */
View
31 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 */
/* */
View
37 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;