Switched to the latest version of FreeType (2.4.3) and recompiled the VC++ version with /MD

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1582 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
LaurentGom 2010-10-15 19:33:58 +00:00
parent bfcc54db3d
commit 5e73228b5e
19 changed files with 9669 additions and 8028 deletions

View File

@ -1,11 +1,10 @@
/* ftconfig.h. Generated by configure. */
/***************************************************************************/ /***************************************************************************/
/* */ /* */
/* ftconfig.in */ /* ftconfig.h */
/* */ /* */
/* UNIX-specific configuration file (specification only). */ /* ANSI-specific configuration file (specification only). */
/* */ /* */
/* Copyright 1996-2001, 2002, 2003, 2004 by */ /* Copyright 1996-2001, 2002, 2003, 2004, 2006, 2007, 2008, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */
@ -32,9 +31,10 @@
/* contains system-specific files that are always included first when */ /* contains system-specific files that are always included first when */
/* building the library. */ /* building the library. */
/* */ /* */
/* This ANSI version should stay in `include/freetype/config'. */
/* */
/*************************************************************************/ /*************************************************************************/
#ifndef __FTCONFIG_H__ #ifndef __FTCONFIG_H__
#define __FTCONFIG_H__ #define __FTCONFIG_H__
@ -58,17 +58,42 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
#define HAVE_UNISTD_H 1 /* There are systems (like the Texas Instruments 'C54x) where a `char' */
#define HAVE_FCNTL_H 1 /* has 16 bits. ANSI C says that sizeof(char) is always 1. Since an */
/* `int' has 16 bits also for this system, sizeof(int) gives 1 which */
#define SIZEOF_INT 4 /* is probably unexpected. */
#define SIZEOF_LONG 4 /* */
/* `CHAR_BIT' (defined in limits.h) gives the number of bits in a */
/* `char' type. */
#define FT_SIZEOF_INT SIZEOF_INT
#define FT_SIZEOF_LONG SIZEOF_LONG
#ifndef FT_CHAR_BIT
#define FT_CHAR_BIT CHAR_BIT #define FT_CHAR_BIT CHAR_BIT
#endif
/* The size of an `int' type. */
#if FT_UINT_MAX == 0xFFFFUL
#define FT_SIZEOF_INT (16 / FT_CHAR_BIT)
#elif FT_UINT_MAX == 0xFFFFFFFFUL
#define FT_SIZEOF_INT (32 / FT_CHAR_BIT)
#elif FT_UINT_MAX > 0xFFFFFFFFUL && FT_UINT_MAX == 0xFFFFFFFFFFFFFFFFUL
#define FT_SIZEOF_INT (64 / FT_CHAR_BIT)
#else
#error "Unsupported size of `int' type!"
#endif
/* The size of a `long' type. A five-byte `long' (as used e.g. on the */
/* DM642) is recognized but avoided. */
#if FT_ULONG_MAX == 0xFFFFFFFFUL
#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFUL
#define FT_SIZEOF_LONG (32 / FT_CHAR_BIT)
#elif FT_ULONG_MAX > 0xFFFFFFFFUL && FT_ULONG_MAX == 0xFFFFFFFFFFFFFFFFUL
#define FT_SIZEOF_LONG (64 / FT_CHAR_BIT)
#else
#error "Unsupported size of `long' type!"
#endif
/* Preferred alignment of data */ /* Preferred alignment of data */
#define FT_ALIGNMENT 8 #define FT_ALIGNMENT 8
@ -101,25 +126,92 @@ FT_BEGIN_HEADER
/* */ /* */
#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \ #if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
( defined( __MWERKS__ ) && defined( macintosh ) ) ( defined( __MWERKS__ ) && defined( macintosh ) )
/* no Carbon frameworks for 64bit 10.4.x */
#include "AvailabilityMacros.h"
#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 #define FT_MACINTOSH 1
#endif
#elif defined( __SC__ ) || defined( __MRC__ )
/* Classic MacOS compilers */
#include "ConditionalMacros.h"
#if TARGET_OS_MAC
#define FT_MACINTOSH 1
#endif
#endif #endif
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* IntN types */ /* <Section> */
/* basic_types */
/* */ /* */
/* Used to guarantee the size of some specific integers. */ /*************************************************************************/
/*************************************************************************/
/* */
/* <Type> */
/* FT_Int16 */
/* */
/* <Description> */
/* A typedef for a 16bit signed integer type. */
/* */
typedef signed short FT_Int16;
/*************************************************************************/
/* */
/* <Type> */
/* FT_UInt16 */
/* */
/* <Description> */
/* A typedef for a 16bit unsigned integer type. */
/* */ /* */
typedef signed short FT_Int16;
typedef unsigned short FT_UInt16; typedef unsigned short FT_UInt16;
#if FT_SIZEOF_INT == 4 /* */
/* this #if 0 ... #endif clause is for documentation purposes */
#if 0
/*************************************************************************/
/* */
/* <Type> */
/* FT_Int32 */
/* */
/* <Description> */
/* A typedef for a 32bit signed integer type. The size depends on */
/* the configuration. */
/* */
typedef signed XXX FT_Int32;
/*************************************************************************/
/* */
/* <Type> */
/* FT_UInt32 */
/* */
/* A typedef for a 32bit unsigned integer type. The size depends on */
/* the configuration. */
/* */
typedef unsigned XXX FT_UInt32;
/* */
#endif
#if FT_SIZEOF_INT == (32 / FT_CHAR_BIT)
typedef signed int FT_Int32; typedef signed int FT_Int32;
typedef unsigned int FT_UInt32; typedef unsigned int FT_UInt32;
#elif FT_SIZEOF_LONG == 4 #elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT)
typedef signed long FT_Int32; typedef signed long FT_Int32;
typedef unsigned long FT_UInt32; typedef unsigned long FT_UInt32;
@ -130,12 +222,12 @@ FT_BEGIN_HEADER
/* look up an integer type that is at least 32 bits */ /* look up an integer type that is at least 32 bits */
#if FT_SIZEOF_INT >= 4 #if FT_SIZEOF_INT >= (32 / FT_CHAR_BIT)
typedef int FT_Fast; typedef int FT_Fast;
typedef unsigned int FT_UFast; typedef unsigned int FT_UFast;
#elif FT_SIZEOF_LONG >= 4 #elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT)
typedef long FT_Fast; typedef long FT_Fast;
typedef unsigned long FT_UFast; typedef unsigned long FT_UFast;
@ -145,7 +237,7 @@ FT_BEGIN_HEADER
/* determine whether we have a 64-bit int type for platforms without */ /* determine whether we have a 64-bit int type for platforms without */
/* Autoconf */ /* Autoconf */
#if FT_SIZEOF_LONG == 8 #if FT_SIZEOF_LONG == (64 / FT_CHAR_BIT)
/* FT_LONG64 must be defined if a 64-bit type is available */ /* FT_LONG64 must be defined if a 64-bit type is available */
#define FT_LONG64 #define FT_LONG64
@ -177,11 +269,31 @@ FT_BEGIN_HEADER
#elif defined( __GNUC__ ) #elif defined( __GNUC__ )
/* GCC provides the "long long" type */ /* GCC provides the `long long' type */
#define FT_LONG64 #define FT_LONG64
#define FT_INT64 long long int #define FT_INT64 long long int
#endif /* FT_SIZEOF_LONG == 8 */ #endif /* FT_SIZEOF_LONG == (64 / FT_CHAR_BIT) */
/*************************************************************************/
/* */
/* A 64-bit data type will create compilation problems if you compile */
/* in strict ANSI mode. To avoid them, we disable its use if __STDC__ */
/* is defined. You can however ignore this rule by defining the */
/* FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
/* */
#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
#ifdef __STDC__
/* undefine the 64-bit macros in strict ANSI compilation mode */
#undef FT_LONG64
#undef FT_INT64
#endif /* __STDC__ */
#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
#define FT_BEGIN_STMNT do { #define FT_BEGIN_STMNT do {
@ -189,27 +301,108 @@ FT_BEGIN_HEADER
#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT #define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
/*************************************************************************/ #ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
/* */ /* Provide assembler fragments for performance-critical functions. */
/* A 64-bit data type will create compilation problems if you compile */ /* These must be defined `static __inline__' with GCC. */
/* in strict ANSI mode. To avoid them, we disable their use if */
/* __STDC__ is defined. You can however ignore this rule by */
/* defining the FT_CONFIG_OPTION_FORCE_INT64 configuration macro. */
/* */
#if defined( FT_LONG64 ) && !defined( FT_CONFIG_OPTION_FORCE_INT64 )
#ifdef __STDC__ #if defined( __CC_ARM ) || defined( __ARMCC__ ) /* RVCT */
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
/* Undefine the 64-bit macros in strict ANSI compilation mode. */ /* documentation is in freetype.h */
/* Since `#undef' doesn't survive in configuration header files */
/* we use the postprocessing facility of AC_CONFIG_HEADERS to */
/* replace the leading `/' with `#'. */
#undef FT_LONG64
#undef FT_INT64
#endif /* __STDC__ */ static __inline FT_Int32
FT_MulFix_arm( FT_Int32 a,
FT_Int32 b )
{
register FT_Int32 t, t2;
#endif /* FT_LONG64 && !FT_CONFIG_OPTION_FORCE_INT64 */
__asm
{
smull t2, t, b, a /* (lo=t2,hi=t) = a*b */
mov a, t, asr #31 /* a = (hi >> 31) */
add a, a, #0x8000 /* a += 0x8000 */
adds t2, t2, a /* t2 += a */
adc t, t, #0 /* t += carry */
mov a, t2, lsr #16 /* a = t2 >> 16 */
orr a, a, t, lsl #16 /* a |= t << 16 */
}
return a;
}
#endif /* __CC_ARM || __ARMCC__ */
#ifdef __GNUC__
#if defined( __arm__ ) && !defined( __thumb__ ) && \
!( defined( __CC_ARM ) || defined( __ARMCC__ ) )
#define FT_MULFIX_ASSEMBLER FT_MulFix_arm
/* documentation is in freetype.h */
static __inline__ FT_Int32
FT_MulFix_arm( FT_Int32 a,
FT_Int32 b )
{
register FT_Int32 t, t2;
asm __volatile__ (
"smull %1, %2, %4, %3\n\t" /* (lo=%1,hi=%2) = a*b */
"mov %0, %2, asr #31\n\t" /* %0 = (hi >> 31) */
"add %0, %0, #0x8000\n\t" /* %0 += 0x8000 */
"adds %1, %1, %0\n\t" /* %1 += %0 */
"adc %2, %2, #0\n\t" /* %2 += carry */
"mov %0, %1, lsr #16\n\t" /* %0 = %1 >> 16 */
"orr %0, %2, lsl #16\n\t" /* %0 |= %2 << 16 */
: "=r"(a), "=&r"(t2), "=&r"(t)
: "r"(a), "r"(b) );
return a;
}
#endif /* __arm__ && !__thumb__ && !( __CC_ARM || __ARMCC__ ) */
#if defined( __i386__ )
#define FT_MULFIX_ASSEMBLER FT_MulFix_i386
/* documentation is in freetype.h */
static __inline__ FT_Int32
FT_MulFix_i386( FT_Int32 a,
FT_Int32 b )
{
register FT_Int32 result;
__asm__ __volatile__ (
"imul %%edx\n"
"movl %%edx, %%ecx\n"
"sarl $31, %%ecx\n"
"addl $0x8000, %%ecx\n"
"addl %%ecx, %%eax\n"
"adcl $0, %%edx\n"
"shrl $16, %%eax\n"
"shll $16, %%edx\n"
"addl %%edx, %%eax\n"
: "=a"(result), "=d"(b)
: "a"(a), "d"(b)
: "%ecx", "cc" );
return result;
}
#endif /* i386 */
#endif /* __GNUC__ */
#endif /* !FT_CONFIG_OPTION_NO_ASSEMBLER */
#ifdef FT_CONFIG_OPTION_INLINE_MULFIX
#ifdef FT_MULFIX_ASSEMBLER
#define FT_MULFIX_INLINED FT_MULFIX_ASSEMBLER
#endif
#endif
#ifdef FT_MAKE_OPTION_SINGLE_OBJECT #ifdef FT_MAKE_OPTION_SINGLE_OBJECT
@ -244,9 +437,9 @@ FT_BEGIN_HEADER
#ifndef FT_BASE_DEF #ifndef FT_BASE_DEF
#ifdef __cplusplus #ifdef __cplusplus
#define FT_BASE_DEF( x ) extern "C" x #define FT_BASE_DEF( x ) x
#else #else
#define FT_BASE_DEF( x ) extern x #define FT_BASE_DEF( x ) x
#endif #endif
#endif /* !FT_BASE_DEF */ #endif /* !FT_BASE_DEF */

File diff suppressed because it is too large Load Diff

View File

@ -1,19 +1,32 @@
FT_USE_MODULE(autofit_module_class) /*
FT_USE_MODULE(tt_driver_class) * This file registers the FreeType modules compiled into the library.
FT_USE_MODULE(t1_driver_class) *
FT_USE_MODULE(cff_driver_class) * If you use GNU make, this file IS NOT USED! Instead, it is created in
FT_USE_MODULE(t1cid_driver_class) * the objects directory (normally `<topdir>/objs/') based on information
FT_USE_MODULE(pfr_driver_class) * from `<topdir>/modules.cfg'.
FT_USE_MODULE(t42_driver_class) *
FT_USE_MODULE(winfnt_driver_class) * Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile
FT_USE_MODULE(pcf_driver_class) * FreeType without GNU make.
FT_USE_MODULE(psaux_module_class) *
FT_USE_MODULE(psnames_module_class) */
FT_USE_MODULE(pshinter_module_class)
FT_USE_MODULE(ft_raster1_renderer_class) FT_USE_MODULE( FT_Module_Class, autofit_module_class )
FT_USE_MODULE(sfnt_module_class) FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
FT_USE_MODULE(ft_smooth_renderer_class) FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
FT_USE_MODULE(ft_smooth_lcd_renderer_class) FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
FT_USE_MODULE(ft_smooth_lcdv_renderer_class) FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
FT_USE_MODULE(otv_module_class) FT_USE_MODULE( FT_Driver_ClassRec, pfr_driver_class )
FT_USE_MODULE(bdf_driver_class) FT_USE_MODULE( FT_Driver_ClassRec, t42_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, winfnt_driver_class )
FT_USE_MODULE( FT_Driver_ClassRec, pcf_driver_class )
FT_USE_MODULE( FT_Module_Class, psaux_module_class )
FT_USE_MODULE( FT_Module_Class, psnames_module_class )
FT_USE_MODULE( FT_Module_Class, pshinter_module_class )
FT_USE_MODULE( FT_Renderer_Class, ft_raster1_renderer_class )
FT_USE_MODULE( FT_Module_Class, sfnt_module_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_renderer_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcd_renderer_class )
FT_USE_MODULE( FT_Renderer_Class, ft_smooth_lcdv_renderer_class )
FT_USE_MODULE( FT_Driver_ClassRec, bdf_driver_class )
/* EOF */

View File

@ -4,7 +4,8 @@
/* */ /* */
/* User-selectable configuration macros (specification only). */ /* User-selectable configuration macros (specification only). */
/* */ /* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */ /* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, */
/* 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */
@ -38,22 +39,22 @@ FT_BEGIN_HEADER
/* library from a single source directory. */ /* library from a single source directory. */
/* */ /* */
/* - You can put a copy of this file in your build directory, more */ /* - You can put a copy of this file in your build directory, more */
/* precisely in "$BUILD/freetype/config/ftoption.h", where "$BUILD" */ /* precisely in `$BUILD/freetype/config/ftoption.h', where `$BUILD' */
/* is the name of a directory that is included _before_ the FreeType */ /* is the name of a directory that is included _before_ the FreeType */
/* include path during compilation. */ /* include path during compilation. */
/* */ /* */
/* The default FreeType Makefiles and Jamfiles use the build */ /* The default FreeType Makefiles and Jamfiles use the build */
/* directory "builds/<system>" by default, but you can easily change */ /* directory `builds/<system>' by default, but you can easily change */
/* that for your own projects. */ /* that for your own projects. */
/* */ /* */
/* - Copy the file <ft2build.h> to "$BUILD/ft2build.h" and modify it */ /* - Copy the file <ft2build.h> to `$BUILD/ft2build.h' and modify it */
/* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */ /* slightly to pre-define the macro FT_CONFIG_OPTIONS_H used to */
/* locate this file during the build. For example, */ /* locate this file during the build. For example, */
/* */ /* */
/* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */ /* #define FT_CONFIG_OPTIONS_H <myftoptions.h> */
/* #include <freetype/config/ftheader.h> */ /* #include <freetype/config/ftheader.h> */
/* */ /* */
/* will use "$BUILD/myftoptions.h" instead of this file for macro */ /* will use `$BUILD/myftoptions.h' instead of this file for macro */
/* definitions. */ /* definitions. */
/* */ /* */
/* Note also that you can similarly pre-define the macro */ /* Note also that you can similarly pre-define the macro */
@ -75,6 +76,26 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/
/* */
/* Uncomment the line below if you want to activate sub-pixel rendering */
/* (a.k.a. LCD rendering, or ClearType) in this build of the library. */
/* */
/* Note that this feature is covered by several Microsoft patents */
/* and should not be activated in any default build of the library. */
/* */
/* This macro has no impact on the FreeType API, only on its */
/* _implementation_. For example, using FT_RENDER_MODE_LCD when calling */
/* FT_Render_Glyph still generates a bitmap that is 3 times wider than */
/* the original size in case this macro isn't defined; however, each */
/* triplet of subpixels has R=G=B. */
/* */
/* This is done to allow FreeType clients to run unmodified, forcing */
/* them to display normal gray-level anti-aliased glyphs. */
/* */
/* #define FT_CONFIG_OPTION_SUBPIXEL_RENDERING */
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* Many compilers provide a non-ANSI 64-bit data type that can be used */ /* Many compilers provide a non-ANSI 64-bit data type that can be used */
@ -89,10 +110,31 @@ FT_BEGIN_HEADER
/* building the library. */ /* building the library. */
/* */ /* */
/* ObNote: The compiler-specific 64-bit integers are detected in the */ /* ObNote: The compiler-specific 64-bit integers are detected in the */
/* file "ftconfig.h" either statically or through the */ /* file `ftconfig.h' either statically or through the */
/* `configure' script on supported platforms. */ /* `configure' script on supported platforms. */
/* */ /* */
#undef FT_CONFIG_OPTION_FORCE_INT64 #undef FT_CONFIG_OPTION_FORCE_INT64
/*************************************************************************/
/* */
/* If this macro is defined, do not try to use an assembler version of */
/* performance-critical functions (e.g. FT_MulFix). You should only do */
/* that to verify that the assembler function works properly, or to */
/* execute benchmark tests of the various implementations. */
/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */
/*************************************************************************/
/* */
/* If this macro is defined, try to use an inlined assembler version of */
/* the `FT_MulFix' function, which is a `hotspot' when loading and */
/* hinting glyphs, and which should be executed as fast as possible. */
/* */
/* Note that if your compiler or CPU is not supported, this will default */
/* to the standard and portable implementation found in `ftcalc.c'. */
/* */
#define FT_CONFIG_OPTION_INLINE_MULFIX
/*************************************************************************/ /*************************************************************************/
@ -100,7 +142,7 @@ FT_BEGIN_HEADER
/* LZW-compressed file support. */ /* LZW-compressed file support. */
/* */ /* */
/* FreeType now handles font files that have been compressed with the */ /* FreeType now handles font files that have been compressed with the */
/* 'compress' program. This is mostly used to parse many of the PCF */ /* `compress' program. This is mostly used to parse many of the PCF */
/* files that come with various X11 distributions. The implementation */ /* files that come with various X11 distributions. The implementation */
/* uses NetBSD's `zopen' to partially uncompress the file on the fly */ /* uses NetBSD's `zopen' to partially uncompress the file on the fly */
/* (see src/lzw/ftgzip.c). */ /* (see src/lzw/ftgzip.c). */
@ -115,7 +157,7 @@ FT_BEGIN_HEADER
/* Gzip-compressed file support. */ /* Gzip-compressed file support. */
/* */ /* */
/* FreeType now handles font files that have been compressed with the */ /* FreeType now handles font files that have been compressed with the */
/* 'gzip' program. This is mostly used to parse many of the PCF files */ /* `gzip' program. This is mostly used to parse many of the PCF files */
/* that come with XFree86. The implementation uses `zlib' to */ /* that come with XFree86. The implementation uses `zlib' to */
/* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */ /* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */
/* */ /* */
@ -143,7 +185,7 @@ FT_BEGIN_HEADER
/* Do not #undef this macro here since the build system might define */ /* Do not #undef this macro here since the build system might define */
/* it for certain configurations only. */ /* it for certain configurations only. */
/* */ /* */
/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */ /* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
/*************************************************************************/ /*************************************************************************/
@ -184,27 +226,27 @@ FT_BEGIN_HEADER
/* Do not #undef these macros here since the build system might define */ /* Do not #undef these macros here since the build system might define */
/* them for certain configurations only. */ /* them for certain configurations only. */
/* */ /* */
/* #define FT_EXPORT(x) extern x */ /* #define FT_EXPORT(x) extern x */
/* #define FT_EXPORT_DEF(x) x */ /* #define FT_EXPORT_DEF(x) x */
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* Glyph Postscript Names handling */ /* Glyph Postscript Names handling */
/* */ /* */
/* By default, FreeType 2 is compiled with the `PSNames' module. This */ /* By default, FreeType 2 is compiled with the `psnames' module. This */
/* module is in charge of converting a glyph name string into a */ /* module is in charge of converting a glyph name string into a */
/* Unicode value, or return a Macintosh standard glyph name for the */ /* Unicode value, or return a Macintosh standard glyph name for the */
/* use with the TrueType `post' table. */ /* use with the TrueType `post' table. */
/* */ /* */
/* Undefine this macro if you do not want `PSNames' compiled in your */ /* Undefine this macro if you do not want `psnames' compiled in your */
/* build of FreeType. This has the following effects: */ /* build of FreeType. This has the following effects: */
/* */ /* */
/* - The TrueType driver will provide its own set of glyph names, */ /* - The TrueType driver will provide its own set of glyph names, */
/* if you build it to support postscript names in the TrueType */ /* if you build it to support postscript names in the TrueType */
/* `post' table. */ /* `post' table. */
/* */ /* */
/* - The Type 1 driver will not be able to synthetize a Unicode */ /* - The Type 1 driver will not be able to synthesize a Unicode */
/* charmap out of the glyphs found in the fonts. */ /* charmap out of the glyphs found in the fonts. */
/* */ /* */
/* You would normally undefine this configuration macro when building */ /* You would normally undefine this configuration macro when building */
@ -220,12 +262,12 @@ FT_BEGIN_HEADER
/* By default, FreeType 2 is built with the `PSNames' module compiled */ /* By default, FreeType 2 is built with the `PSNames' module compiled */
/* in. Among other things, the module is used to convert a glyph name */ /* in. Among other things, the module is used to convert a glyph name */
/* into a Unicode value. This is especially useful in order to */ /* into a Unicode value. This is especially useful in order to */
/* synthetize on the fly a Unicode charmap from the CFF/Type 1 driver */ /* synthesize on the fly a Unicode charmap from the CFF/Type 1 driver */
/* through a big table named the `Adobe Glyph List' (AGL). */ /* through a big table named the `Adobe Glyph List' (AGL). */
/* */ /* */
/* Undefine this macro if you do not want the Adobe Glyph List */ /* Undefine this macro if you do not want the Adobe Glyph List */
/* compiled in your `PSNames' module. The Type 1 driver will not be */ /* compiled in your `PSNames' module. The Type 1 driver will not be */
/* able to synthetize a Unicode charmap out of the glyphs found in the */ /* able to synthesize a Unicode charmap out of the glyphs found in the */
/* fonts. */ /* fonts. */
/* */ /* */
#define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST #define FT_CONFIG_OPTION_ADOBE_GLYPH_LIST
@ -271,10 +313,11 @@ FT_BEGIN_HEADER
/* */ /* */
/* Allow the use of FT_Incremental_Interface to load typefaces that */ /* Allow the use of FT_Incremental_Interface to load typefaces that */
/* contain no glyph data, but supply it via a callback function. */ /* contain no glyph data, but supply it via a callback function. */
/* This allows FreeType to be used with the PostScript language, using */ /* This is required by clients supporting document formats which */
/* the GhostScript interpreter. */ /* supply font data incrementally as the document is parsed, such */
/* as the Ghostscript interpreter for the PostScript language. */
/* */ /* */
/* #define FT_CONFIG_OPTION_INCREMENTAL */ #define FT_CONFIG_OPTION_INCREMENTAL
/*************************************************************************/ /*************************************************************************/
@ -282,7 +325,9 @@ FT_BEGIN_HEADER
/* The size in bytes of the render pool used by the scan-line converter */ /* The size in bytes of the render pool used by the scan-line converter */
/* to do all of its work. */ /* to do all of its work. */
/* */ /* */
/* This must be greater than 4KByte. */ /* This must be greater than 4KByte if you use FreeType to rasterize */
/* glyphs; otherwise, you may set it to zero to avoid unnecessary */
/* allocation of the render pool. */
/* */ /* */
#define FT_RENDER_POOL_SIZE 16384L #define FT_RENDER_POOL_SIZE 16384L
@ -328,7 +373,7 @@ FT_BEGIN_HEADER
/* should define FT_DEBUG_MEMORY here. */ /* should define FT_DEBUG_MEMORY here. */
/* */ /* */
/* Note that the memory debugger is only activated at runtime when */ /* Note that the memory debugger is only activated at runtime when */
/* when the _environment_ variable "FT2_DEBUG_MEMORY" is defined also! */ /* when the _environment_ variable `FT2_DEBUG_MEMORY' is defined also! */
/* */ /* */
/* Do not #undef this macro here since the build system might define */ /* Do not #undef this macro here since the build system might define */
/* it for certain configurations only. */ /* it for certain configurations only. */
@ -353,6 +398,20 @@ FT_BEGIN_HEADER
#undef FT_CONFIG_OPTION_USE_MODULE_ERRORS #undef FT_CONFIG_OPTION_USE_MODULE_ERRORS
/*************************************************************************/
/* */
/* Position Independent Code */
/* */
/* If this macro is set (which is _not_ the default), FreeType2 will */
/* avoid creating constants that require address fixups. Instead the */
/* constants will be moved into a struct and additional intialization */
/* code will be used. */
/* */
/* Setting this macro is needed for systems that prohibit address */
/* fixups, such as BREW. */
/* */
/* #define FT_CONFIG_OPTION_PIC */
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
@ -396,7 +455,7 @@ FT_BEGIN_HEADER
/* does not contain any glyph name though. */ /* does not contain any glyph name though. */
/* */ /* */
/* Accessing SFNT names is done through the functions declared in */ /* Accessing SFNT names is done through the functions declared in */
/* `freetype/ftnames.h'. */ /* `freetype/ftsnames.h'. */
/* */ /* */
#define TT_CONFIG_OPTION_SFNT_NAMES #define TT_CONFIG_OPTION_SFNT_NAMES
@ -414,6 +473,8 @@ FT_BEGIN_HEADER
#define TT_CONFIG_CMAP_FORMAT_8 #define TT_CONFIG_CMAP_FORMAT_8
#define TT_CONFIG_CMAP_FORMAT_10 #define TT_CONFIG_CMAP_FORMAT_10
#define TT_CONFIG_CMAP_FORMAT_12 #define TT_CONFIG_CMAP_FORMAT_12
#define TT_CONFIG_CMAP_FORMAT_13
#define TT_CONFIG_CMAP_FORMAT_14
/*************************************************************************/ /*************************************************************************/
@ -427,8 +488,7 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */ /* Define TT_CONFIG_OPTION_BYTECODE_INTERPRETER if you want to compile */
/* a bytecode interpreter in the TrueType driver. Note that there are */ /* a bytecode interpreter in the TrueType driver. */
/* important patent issues related to the use of the interpreter. */
/* */ /* */
/* By undefining this, you will only compile the code necessary to load */ /* By undefining this, you will only compile the code necessary to load */
/* TrueType glyphs without hinting. */ /* TrueType glyphs without hinting. */
@ -436,19 +496,57 @@ FT_BEGIN_HEADER
/* Do not #undef this macro here, since the build system might */ /* Do not #undef this macro here, since the build system might */
/* define it for certain configurations only. */ /* define it for certain configurations only. */
/* */ /* */
/* #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER */ #define TT_CONFIG_OPTION_BYTECODE_INTERPRETER
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* Define TT_CONFIG_OPTION_UNPATENTED_HINTING (in addition to */ /* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
/* TT_CONFIG_OPTION_BYTECODE_INTERPRETER) to compile the unpatented */ /* of the TrueType bytecode interpreter is used that doesn't implement */
/* work-around hinting system. Note that for the moment, the algorithm */ /* any of the patented opcodes and algorithms. The patents related to */
/* is only used when selected at runtime through the parameter tag */ /* TrueType hinting have expired worldwide since May 2010; this option */
/* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook */ /* is now deprecated. */
/* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally activated. */
/* */ /* */
#define TT_CONFIG_OPTION_UNPATENTED_HINTING /* Note that the TT_CONFIG_OPTION_UNPATENTED_HINTING macro is *ignored* */
/* if you define TT_CONFIG_OPTION_BYTECODE_INTERPRETER; in other words, */
/* either define TT_CONFIG_OPTION_BYTECODE_INTERPRETER or */
/* TT_CONFIG_OPTION_UNPATENTED_HINTING but not both at the same time. */
/* */
/* This macro is only useful for a small number of font files (mostly */
/* for Asian scripts) that require bytecode interpretation to properly */
/* load glyphs. For all other fonts, this produces unpleasant results, */
/* thus the unpatented interpreter is never used to load glyphs from */
/* TrueType fonts unless one of the following two options is used. */
/* */
/* - The unpatented interpreter is explicitly activated by the user */
/* through the FT_PARAM_TAG_UNPATENTED_HINTING parameter tag */
/* when opening the FT_Face. */
/* */
/* - FreeType detects that the FT_Face corresponds to one of the */
/* `trick' fonts (e.g., `Mingliu') it knows about. The font engine */
/* contains a hard-coded list of font names and other matching */
/* parameters (see function `tt_face_init' in file */
/* `src/truetype/ttobjs.c'). */
/* */
/* Here a sample code snippet for using FT_PARAM_TAG_UNPATENTED_HINTING. */
/* */
/* { */
/* FT_Parameter parameter; */
/* FT_Open_Args open_args; */
/* */
/* */
/* parameter.tag = FT_PARAM_TAG_UNPATENTED_HINTING; */
/* */
/* open_args.flags = FT_OPEN_PATHNAME | FT_OPEN_PARAMS; */
/* open_args.pathname = my_font_pathname; */
/* open_args.num_params = 1; */
/* open_args.params = &parameter; */
/* */
/* error = FT_Open_Face( library, &open_args, index, &face ); */
/* ... */
/* } */
/* */
/* #define TT_CONFIG_OPTION_UNPATENTED_HINTING */
/*************************************************************************/ /*************************************************************************/
@ -471,7 +569,7 @@ FT_BEGIN_HEADER
/* component offsets in composite glyphs. */ /* component offsets in composite glyphs. */
/* */ /* */
/* Apple and MS disagree on the default behavior of component offsets */ /* Apple and MS disagree on the default behavior of component offsets */
/* in composites. Apple says that they should be scaled by the scale */ /* in composites. Apple says that they should be scaled by the scaling */
/* factors in the transformation matrix (roughly, it's more complex) */ /* factors in the transformation matrix (roughly, it's more complex) */
/* while MS says they should not. OpenType defines two bits in the */ /* while MS says they should not. OpenType defines two bits in the */
/* composite flags array which can be used to disambiguate, but old */ /* composite flags array which can be used to disambiguate, but old */
@ -493,6 +591,14 @@ FT_BEGIN_HEADER
#define TT_CONFIG_OPTION_GX_VAR_SUPPORT #define TT_CONFIG_OPTION_GX_VAR_SUPPORT
/*************************************************************************/
/* */
/* Define TT_CONFIG_OPTION_BDF if you want to include support for */
/* an embedded `BDF ' table within SFNT-based bitmap formats. */
/* */
#define TT_CONFIG_OPTION_BDF
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
/**** ****/ /**** ****/
@ -547,14 +653,76 @@ FT_BEGIN_HEADER
/* */ /* */
#undef T1_CONFIG_OPTION_NO_MM_SUPPORT #undef T1_CONFIG_OPTION_NO_MM_SUPPORT
/* */
/* /*************************************************************************/
* This temporary macro is used to control various optimizations for /*************************************************************************/
* reducing the heap footprint of memory-mapped TrueType files. /**** ****/
* /**** A U T O F I T M O D U L E C O N F I G U R A T I O N ****/
*/ /**** ****/
/* #define FT_OPTIMIZE_MEMORY */ /*************************************************************************/
/*************************************************************************/
/*************************************************************************/
/* */
/* Compile autofit module with CJK (Chinese, Japanese, Korean) script */
/* support. */
/* */
#define AF_CONFIG_OPTION_CJK
/*************************************************************************/
/* */
/* Compile autofit module with Indic script support. */
/* */
#define AF_CONFIG_OPTION_INDIC
/* */
/*
* Define this variable if you want to keep the layout of internal
* structures that was used prior to FreeType 2.2. This also compiles in
* a few obsolete functions to avoid linking problems on typical Unix
* distributions.
*
* For embedded systems or building a new distribution from scratch, it
* is recommended to disable the macro since it reduces the library's code
* size and activates a few memory-saving optimizations as well.
*/
#define FT_CONFIG_OPTION_OLD_INTERNALS
/*
* To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
* we restrict the number of charmaps in a font. The current API of
* FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
* takes charcode only. To determine the passed value is for cmap_index
* or charcode, the possible cmap_index is restricted not to exceed
* the minimum possible charcode by a rogue client. It is also very
* unlikely that a rogue client is interested in Unicode values 0 to 15.
*
* NOTE: The original threshold was 4 deduced from popular number of
* cmap subtables in UCS-4 TrueType fonts, but now it is not
* irregular for OpenType fonts to have more than 4 subtables,
* because variation selector subtables are available for Apple
* and Microsoft platforms.
*/
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
#define FT_MAX_CHARMAP_CACHEABLE 15
#endif
/*
* This macro is defined if either unpatented or native TrueType
* hinting is requested by the definitions above.
*/
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
#define TT_USE_BYTECODE_INTERPRETER
#undef TT_CONFIG_OPTION_UNPATENTED_HINTING
#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
#define TT_USE_BYTECODE_INTERPRETER
#endif
FT_END_HEADER FT_END_HEADER

View File

@ -1,150 +1,173 @@
/***************************************************************************/ /***************************************************************************/
/* */ /* */
/* ftstdlib.h */ /* ftstdlib.h */
/* */ /* */
/* ANSI-specific library and header configuration file (specification */ /* ANSI-specific library and header configuration file (specification */
/* only). */ /* only). */
/* */ /* */
/* Copyright 2002, 2003, 2004 by */ /* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */ /* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */ /* this file you indicate that you have read the license and */
/* understand and accept it fully. */ /* understand and accept it fully. */
/* */ /* */
/***************************************************************************/ /***************************************************************************/
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* This file is used to group all #includes to the ANSI C library that */ /* This file is used to group all #includes to the ANSI C library that */
/* FreeType normally requires. It also defines macros to rename the */ /* FreeType normally requires. It also defines macros to rename the */
/* standard functions within the FreeType source code. */ /* standard functions within the FreeType source code. */
/* */ /* */
/* Load a file which defines __FTSTDLIB_H__ before this one to override */ /* Load a file which defines __FTSTDLIB_H__ before this one to override */
/* it. */ /* it. */
/* */ /* */
/*************************************************************************/ /*************************************************************************/
#ifndef __FTSTDLIB_H__ #ifndef __FTSTDLIB_H__
#define __FTSTDLIB_H__ #define __FTSTDLIB_H__
#include <stddef.h> #include <stddef.h>
#define ft_ptrdiff_t ptrdiff_t #define ft_ptrdiff_t ptrdiff_t
/**********************************************************************/ /**********************************************************************/
/* */ /* */
/* integer limits */ /* integer limits */
/* */ /* */
/* UINT_MAX and ULONG_MAX are used to automatically compute the size */ /* UINT_MAX and ULONG_MAX are used to automatically compute the size */
/* of `int' and `long' in bytes at compile-time. So far, this works */ /* of `int' and `long' in bytes at compile-time. So far, this works */
/* for all platforms the library has been tested on. */ /* for all platforms the library has been tested on. */
/* */ /* */
/* Note that on the extremely rare platforms that do not provide */ /* Note that on the extremely rare platforms that do not provide */
/* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */ /* integer types that are _exactly_ 16 and 32 bits wide (e.g. some */
/* old Crays where `int' is 36 bits), we do not make any guarantee */ /* old Crays where `int' is 36 bits), we do not make any guarantee */
/* about the correct behaviour of FT2 with all fonts. */ /* about the correct behaviour of FT2 with all fonts. */
/* */ /* */
/* In these case, "ftconfig.h" will refuse to compile anyway with a */ /* In these case, `ftconfig.h' will refuse to compile anyway with a */
/* message like "couldn't find 32-bit type" or something similar. */ /* message like `couldn't find 32-bit type' or something similar. */
/* */ /* */
/* IMPORTANT NOTE: We do not define aliases for heap management and */ /**********************************************************************/
/* i/o routines (i.e. malloc/free/fopen/fread/...) */
/* since these functions should all be encapsulated */
/* by platform-specific implementations of */ #include <limits.h>
/* "ftsystem.c". */
/* */ #define FT_CHAR_BIT CHAR_BIT
/**********************************************************************/ #define FT_INT_MAX INT_MAX
#define FT_INT_MIN INT_MIN
#define FT_UINT_MAX UINT_MAX
#include <limits.h> #define FT_ULONG_MAX ULONG_MAX
#define FT_UINT_MAX UINT_MAX
#define FT_INT_MAX INT_MAX /**********************************************************************/
#define FT_ULONG_MAX ULONG_MAX /* */
/* character and string processing */
/* */
/**********************************************************************/ /**********************************************************************/
/* */
/* character and string processing */
/* */ #include <string.h>
/**********************************************************************/
#define ft_memchr memchr
#define ft_memcmp memcmp
#include <ctype.h> #define ft_memcpy memcpy
#define ft_memmove memmove
#define ft_isalnum isalnum #define ft_memset memset
#define ft_isupper isupper #define ft_strcat strcat
#define ft_islower islower #define ft_strcmp strcmp
#define ft_isdigit isdigit #define ft_strcpy strcpy
#define ft_isxdigit isxdigit #define ft_strlen strlen
#define ft_strncmp strncmp
#define ft_strncpy strncpy
#include <string.h> #define ft_strrchr strrchr
#define ft_strstr strstr
#define ft_memcmp memcmp
#define ft_memcpy memcpy
#define ft_memmove memmove /**********************************************************************/
#define ft_memset memset /* */
#define ft_strcat strcat /* file handling */
#define ft_strcmp strcmp /* */
#define ft_strcpy strcpy /**********************************************************************/
#define ft_strlen strlen
#define ft_strncmp strncmp
#define ft_strncpy strncpy #include <stdio.h>
#define ft_strrchr strrchr
#define FT_FILE FILE
#define ft_fclose fclose
#include <stdio.h> #define ft_fopen fopen
#define ft_fread fread
#define ft_sprintf sprintf #define ft_fseek fseek
#define ft_ftell ftell
#define ft_sprintf sprintf
/**********************************************************************/
/* */
/* sorting */ /**********************************************************************/
/* */ /* */
/**********************************************************************/ /* sorting */
/* */
/**********************************************************************/
#include <stdlib.h>
#define ft_qsort qsort #include <stdlib.h>
#define ft_exit exit /* only used to exit from unhandled exceptions */
#define ft_qsort qsort
#define ft_atol atol
/**********************************************************************/
/**********************************************************************/ /* */
/* */ /* memory allocation */
/* execution control */ /* */
/* */ /**********************************************************************/
/**********************************************************************/
#define ft_scalloc calloc
#include <setjmp.h> #define ft_sfree free
#define ft_smalloc malloc
#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */ #define ft_srealloc realloc
/* jmp_buf is defined as a macro */
/* on certain platforms */
/**********************************************************************/
#define ft_setjmp setjmp /* same thing here */ /* */
#define ft_longjmp longjmp /* " */ /* miscellaneous */
/* */
/**********************************************************************/
/* the following is only used for debugging purposes, i.e. when */
/* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */
/* */ #define ft_atol atol
#include <stdarg.h> #define ft_labs labs
#endif /* __FTSTDLIB_H__ */ /**********************************************************************/
/* */
/* execution control */
/* END */ /* */
/**********************************************************************/
#include <setjmp.h>
#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */
/* jmp_buf is defined as a macro */
/* on certain platforms */
#define ft_longjmp longjmp
#define ft_setjmp( b ) setjmp( *(jmp_buf*) &(b) ) /* same thing here */
/* the following is only used for debugging purposes, i.e., if */
/* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */
#include <stdarg.h>
#endif /* __FTSTDLIB_H__ */
/* END */

File diff suppressed because it is too large Load Diff

View File

@ -1,206 +1,227 @@
/***************************************************************************/ /***************************************************************************/
/* */ /* */
/* ftbitmap.h */ /* ftbitmap.h */
/* */ /* */
/* FreeType utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp */ /* FreeType utility functions for bitmaps (specification). */
/* bitmaps into 8bpp format (specification). */ /* */
/* */ /* Copyright 2004, 2005, 2006, 2008 by */
/* Copyright 2004, 2005 by */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* */
/* */ /* This file is part of the FreeType project, and may only be used, */
/* This file is part of the FreeType project, and may only be used, */ /* modified, and distributed under the terms of the FreeType project */
/* modified, and distributed under the terms of the FreeType project */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* this file you indicate that you have read the license and */
/* this file you indicate that you have read the license and */ /* understand and accept it fully. */
/* understand and accept it fully. */ /* */
/* */ /***************************************************************************/
/***************************************************************************/
#ifndef __FTBITMAP_H__
#ifndef __FTBITMAP_H__ #define __FTBITMAP_H__
#define __FTBITMAP_H__
#include <ft2build.h>
#include <ft2build.h> #include FT_FREETYPE_H
#include FT_FREETYPE_H
#ifdef FREETYPE_H
#ifdef FREETYPE_H #error "freetype.h of FreeType 1 has been loaded!"
#error "freetype.h of FreeType 1 has been loaded!" #error "Please fix the directory search order for header files"
#error "Please fix the directory search order for header files" #error "so that freetype.h of FreeType 2 is found first."
#error "so that freetype.h of FreeType 2 is found first." #endif
#endif
FT_BEGIN_HEADER
FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/ /* */
/* */ /* <Section> */
/* <Section> */ /* bitmap_handling */
/* bitmap_handling */ /* */
/* */ /* <Title> */
/* <Title> */ /* Bitmap Handling */
/* Bitmap Handling */ /* */
/* */ /* <Abstract> */
/* <Abstract> */ /* Handling FT_Bitmap objects. */
/* Handling FT_Bitmap objects. */ /* */
/* */ /* <Description> */
/* <Description> */ /* This section contains functions for converting FT_Bitmap objects. */
/* This section contains functions for converting FT_Bitmap objects. */ /* */
/* */ /*************************************************************************/
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/ /* */
/* */ /* <Function> */
/* <Function> */ /* FT_Bitmap_New */
/* FT_Bitmap_New */ /* */
/* */ /* <Description> */
/* <Description> */ /* Initialize a pointer to an @FT_Bitmap structure. */
/* Initialize a pointer to an FT_Bitmap structure. */ /* */
/* */ /* <InOut> */
/* <InOut> */ /* abitmap :: A pointer to the bitmap structure. */
/* abitmap :: A pointer to the bitmap structure. */ /* */
/* */ FT_EXPORT( void )
FT_EXPORT( void ) FT_Bitmap_New( FT_Bitmap *abitmap );
FT_Bitmap_New( FT_Bitmap *abitmap );
/*************************************************************************/
/*************************************************************************/ /* */
/* */ /* <Function> */
/* <Function> */ /* FT_Bitmap_Copy */
/* FT_Bitmap_Copy */ /* */
/* */ /* <Description> */
/* <Description> */ /* Copy a bitmap into another one. */
/* Copies an bitmap into another one. */ /* */
/* */ /* <Input> */
/* <Input> */ /* library :: A handle to a library object. */
/* library :: A handle to a library object. */ /* */
/* */ /* source :: A handle to the source bitmap. */
/* source :: A handle to the source bitmap. */ /* */
/* */ /* <Output> */
/* <Output> */ /* target :: A handle to the target bitmap. */
/* target :: A handle to the target bitmap. */ /* */
/* */ /* <Return> */
/* <Return> */ /* FreeType error code. 0~means success. */
/* FreeType error code. 0 means success. */ /* */
/* */ FT_EXPORT( FT_Error )
FT_EXPORT_DEF( FT_Error ) FT_Bitmap_Copy( FT_Library library,
FT_Bitmap_Copy( FT_Library library, const FT_Bitmap *source,
const FT_Bitmap *source, FT_Bitmap *target);
FT_Bitmap *target);
/*************************************************************************/
/*************************************************************************/ /* */
/* */ /* <Function> */
/* <Function> */ /* FT_Bitmap_Embolden */
/* FT_Bitmap_Embolden */ /* */
/* */ /* <Description> */
/* <Description> */ /* Embolden a bitmap. The new bitmap will be about `xStrength' */
/* Embolden a bitmap. The new bitmap will be about `xStrength' */ /* pixels wider and `yStrength' pixels higher. The left and bottom */
/* pixels wider and `yStrength' pixels higher. The left and bottom */ /* borders are kept unchanged. */
/* borders are kept unchanged. */ /* */
/* */ /* <Input> */
/* <Input> */ /* library :: A handle to a library object. */
/* library :: A handle to a library object. */ /* */
/* */ /* xStrength :: How strong the glyph is emboldened horizontally. */
/* xStrength :: How strong the glyph is emboldened horizontally. */ /* Expressed in 26.6 pixel format. */
/* Expressed in 26.6 pixel format. */ /* */
/* */ /* yStrength :: How strong the glyph is emboldened vertically. */
/* yStrength :: How strong the glyph is emboldened vertically. */ /* Expressed in 26.6 pixel format. */
/* Expressed in 26.6 pixel format. */ /* */
/* */ /* <InOut> */
/* <InOut> */ /* bitmap :: A handle to the target bitmap. */
/* bitmap :: A handle to the target bitmap. */ /* */
/* */ /* <Return> */
/* <Return> */ /* FreeType error code. 0~means success. */
/* FreeType error code. 0 means success. */ /* */
/* */ /* <Note> */
/* <Note> */ /* The current implementation restricts `xStrength' to be less than */
/* The current implementation restricts `xStrength' to be less than */ /* or equal to~8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO. */
/* or equal to 8 if bitmap is of pixel_mode @FT_PIXEL_MODE_MONO. */ /* */
/* */ /* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */
/* Don't embolden the bitmap owned by a @FT_GlyphSlot directly! Call */ /* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */
/* @FT_Bitmap_Copy to get a copy and work on the copy instead. */ /* */
/* */ FT_EXPORT( FT_Error )
FT_EXPORT_DEF( FT_Error ) FT_Bitmap_Embolden( FT_Library library,
FT_Bitmap_Embolden( FT_Library library, FT_Bitmap* bitmap,
FT_Bitmap* bitmap, FT_Pos xStrength,
FT_Pos xStrength, FT_Pos yStrength );
FT_Pos yStrength );
/*************************************************************************/
/*************************************************************************/ /* */
/* */ /* <Function> */
/* <Function> */ /* FT_Bitmap_Convert */
/* FT_Bitmap_Convert */ /* */
/* */ /* <Description> */
/* <Description> */ /* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a */
/* Convert a bitmap object with depth 1bpp, 2bpp, 4bpp, or 8bpp to a */ /* bitmap object with depth 8bpp, making the number of used bytes per */
/* bitmap object with depth 8bpp, making the number of used bytes per */ /* line (a.k.a. the `pitch') a multiple of `alignment'. */
/* line (a.k.a. the `pitch') a multiple of `alignment'. */ /* */
/* */ /* <Input> */
/* <Input> */ /* library :: A handle to a library object. */
/* library :: A handle to a library object. */ /* */
/* */ /* source :: The source bitmap. */
/* source :: The source bitmap. */ /* */
/* */ /* alignment :: The pitch of the bitmap is a multiple of this */
/* alignment :: The pitch of the bitmap is a multiple of this */ /* parameter. Common values are 1, 2, or 4. */
/* parameter. Common values are 1, 2, or 4. */ /* */
/* */ /* <Output> */
/* <Output> */ /* target :: The target bitmap. */
/* target :: The target bitmap. */ /* */
/* */ /* <Return> */
/* <Return> */ /* FreeType error code. 0~means success. */
/* FreeType error code. 0 means success. */ /* */
/* */ /* <Note> */
/* <Note> */ /* It is possible to call @FT_Bitmap_Convert multiple times without */
/* It is possible to call @FT_Bitmap_Convert multiple times without */ /* calling @FT_Bitmap_Done (the memory is simply reallocated). */
/* calling @FT_Bitmap_Done (the memory is simply reallocated). */ /* */
/* */ /* Use @FT_Bitmap_Done to finally remove the bitmap object. */
/* Use @FT_Bitmap_Done to finally remove the bitmap object. */ /* */
/* */ /* The `library' argument is taken to have access to FreeType's */
/* The `library' argument is taken to have access to FreeType's */ /* memory handling functions. */
/* memory handling functions. */ /* */
/* */ FT_EXPORT( FT_Error )
FT_EXPORT( FT_Error ) FT_Bitmap_Convert( FT_Library library,
FT_Bitmap_Convert( FT_Library library, const FT_Bitmap *source,
const FT_Bitmap *source, FT_Bitmap *target,
FT_Bitmap *target, FT_Int alignment );
FT_Int alignment );
/*************************************************************************/
/*************************************************************************/ /* */
/* */ /* <Function> */
/* <Function> */ /* FT_GlyphSlot_Own_Bitmap */
/* FT_Bitmap_Done */ /* */
/* */ /* <Description> */
/* <Description> */ /* Make sure that a glyph slot owns `slot->bitmap'. */
/* Destroy a bitmap object created with @FT_Bitmap_New. */ /* */
/* */ /* <Input> */
/* <Input> */ /* slot :: The glyph slot. */
/* library :: A handle to a library object. */ /* */
/* */ /* <Return> */
/* bitmap :: The bitmap object to be freed. */ /* FreeType error code. 0~means success. */
/* */ /* */
/* <Return> */ /* <Note> */
/* FreeType error code. 0 means success. */ /* This function is to be used in combination with */
/* */ /* @FT_Bitmap_Embolden. */
/* <Note> */ /* */
/* The `library' argument is taken to have access to FreeType's */ FT_EXPORT( FT_Error )
/* memory handling functions. */ FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot );
/* */
FT_EXPORT( FT_Error )
FT_Bitmap_Done( FT_Library library, /*************************************************************************/
FT_Bitmap *bitmap ); /* */
/* <Function> */
/* FT_Bitmap_Done */
/* */ /* */
/* <Description> */
/* Destroy a bitmap object created with @FT_Bitmap_New. */
FT_END_HEADER /* */
/* <Input> */
#endif /* __FTBITMAP_H__ */ /* library :: A handle to a library object. */
/* */
/* bitmap :: The bitmap object to be freed. */
/* END */ /* */
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
/* <Note> */
/* The `library' argument is taken to have access to FreeType's */
/* memory handling functions. */
/* */
FT_EXPORT( FT_Error )
FT_Bitmap_Done( FT_Library library,
FT_Bitmap *bitmap );
/* */
FT_END_HEADER
#endif /* __FTBITMAP_H__ */
/* END */

View File

@ -1,231 +1,244 @@
/***************************************************************************/ /***************************************************************************/
/* */ /* */
/* fterrdef.h */ /* fterrdef.h */
/* */ /* */
/* FreeType error codes (specification). */ /* FreeType error codes (specification). */
/* */ /* */
/* Copyright 2002, 2004 by */ /* Copyright 2002, 2004, 2006, 2007, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */ /* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */ /* this file you indicate that you have read the license and */
/* understand and accept it fully. */ /* understand and accept it fully. */
/* */ /* */
/***************************************************************************/ /***************************************************************************/
/*******************************************************************/ /*******************************************************************/
/*******************************************************************/ /*******************************************************************/
/***** *****/ /***** *****/
/***** LIST OF ERROR CODES/MESSAGES *****/ /***** LIST OF ERROR CODES/MESSAGES *****/
/***** *****/ /***** *****/
/*******************************************************************/ /*******************************************************************/
/*******************************************************************/ /*******************************************************************/
/* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */ /* You need to define both FT_ERRORDEF_ and FT_NOERRORDEF_ before */
/* including this file. */ /* including this file. */
/* generic errors */ /* generic errors */
FT_NOERRORDEF_( Ok, 0x00, \ FT_NOERRORDEF_( Ok, 0x00, \
"no error" ) "no error" )
FT_ERRORDEF_( Cannot_Open_Resource, 0x01, \ FT_ERRORDEF_( Cannot_Open_Resource, 0x01, \
"cannot open resource" ) "cannot open resource" )
FT_ERRORDEF_( Unknown_File_Format, 0x02, \ FT_ERRORDEF_( Unknown_File_Format, 0x02, \
"unknown file format" ) "unknown file format" )
FT_ERRORDEF_( Invalid_File_Format, 0x03, \ FT_ERRORDEF_( Invalid_File_Format, 0x03, \
"broken file" ) "broken file" )
FT_ERRORDEF_( Invalid_Version, 0x04, \ FT_ERRORDEF_( Invalid_Version, 0x04, \
"invalid FreeType version" ) "invalid FreeType version" )
FT_ERRORDEF_( Lower_Module_Version, 0x05, \ FT_ERRORDEF_( Lower_Module_Version, 0x05, \
"module version is too low" ) "module version is too low" )
FT_ERRORDEF_( Invalid_Argument, 0x06, \ FT_ERRORDEF_( Invalid_Argument, 0x06, \
"invalid argument" ) "invalid argument" )
FT_ERRORDEF_( Unimplemented_Feature, 0x07, \ FT_ERRORDEF_( Unimplemented_Feature, 0x07, \
"unimplemented feature" ) "unimplemented feature" )
FT_ERRORDEF_( Invalid_Table, 0x08, \ FT_ERRORDEF_( Invalid_Table, 0x08, \
"broken table" ) "broken table" )
FT_ERRORDEF_( Invalid_Offset, 0x09, \ FT_ERRORDEF_( Invalid_Offset, 0x09, \
"broken offset within table" ) "broken offset within table" )
FT_ERRORDEF_( Array_Too_Large, 0x0A, \
/* glyph/character errors */ "array allocation size too large" )
FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, \ /* glyph/character errors */
"invalid glyph index" )
FT_ERRORDEF_( Invalid_Character_Code, 0x11, \ FT_ERRORDEF_( Invalid_Glyph_Index, 0x10, \
"invalid character code" ) "invalid glyph index" )
FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, \ FT_ERRORDEF_( Invalid_Character_Code, 0x11, \
"unsupported glyph image format" ) "invalid character code" )
FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, \ FT_ERRORDEF_( Invalid_Glyph_Format, 0x12, \
"cannot render this glyph format" ) "unsupported glyph image format" )
FT_ERRORDEF_( Invalid_Outline, 0x14, \ FT_ERRORDEF_( Cannot_Render_Glyph, 0x13, \
"invalid outline" ) "cannot render this glyph format" )
FT_ERRORDEF_( Invalid_Composite, 0x15, \ FT_ERRORDEF_( Invalid_Outline, 0x14, \
"invalid composite glyph" ) "invalid outline" )
FT_ERRORDEF_( Too_Many_Hints, 0x16, \ FT_ERRORDEF_( Invalid_Composite, 0x15, \
"too many hints" ) "invalid composite glyph" )
FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, \ FT_ERRORDEF_( Too_Many_Hints, 0x16, \
"invalid pixel size" ) "too many hints" )
FT_ERRORDEF_( Invalid_Pixel_Size, 0x17, \
/* handle errors */ "invalid pixel size" )
FT_ERRORDEF_( Invalid_Handle, 0x20, \ /* handle errors */
"invalid object handle" )
FT_ERRORDEF_( Invalid_Library_Handle, 0x21, \ FT_ERRORDEF_( Invalid_Handle, 0x20, \
"invalid library handle" ) "invalid object handle" )
FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, \ FT_ERRORDEF_( Invalid_Library_Handle, 0x21, \
"invalid module handle" ) "invalid library handle" )
FT_ERRORDEF_( Invalid_Face_Handle, 0x23, \ FT_ERRORDEF_( Invalid_Driver_Handle, 0x22, \
"invalid face handle" ) "invalid module handle" )
FT_ERRORDEF_( Invalid_Size_Handle, 0x24, \ FT_ERRORDEF_( Invalid_Face_Handle, 0x23, \
"invalid size handle" ) "invalid face handle" )
FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, \ FT_ERRORDEF_( Invalid_Size_Handle, 0x24, \
"invalid glyph slot handle" ) "invalid size handle" )
FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, \ FT_ERRORDEF_( Invalid_Slot_Handle, 0x25, \
"invalid charmap handle" ) "invalid glyph slot handle" )
FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, \ FT_ERRORDEF_( Invalid_CharMap_Handle, 0x26, \
"invalid cache manager handle" ) "invalid charmap handle" )
FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, \ FT_ERRORDEF_( Invalid_Cache_Handle, 0x27, \
"invalid stream handle" ) "invalid cache manager handle" )
FT_ERRORDEF_( Invalid_Stream_Handle, 0x28, \
/* driver errors */ "invalid stream handle" )
FT_ERRORDEF_( Too_Many_Drivers, 0x30, \ /* driver errors */
"too many modules" )
FT_ERRORDEF_( Too_Many_Extensions, 0x31, \ FT_ERRORDEF_( Too_Many_Drivers, 0x30, \
"too many extensions" ) "too many modules" )
FT_ERRORDEF_( Too_Many_Extensions, 0x31, \
/* memory errors */ "too many extensions" )
FT_ERRORDEF_( Out_Of_Memory, 0x40, \ /* memory errors */
"out of memory" )
FT_ERRORDEF_( Unlisted_Object, 0x41, \ FT_ERRORDEF_( Out_Of_Memory, 0x40, \
"unlisted object" ) "out of memory" )
FT_ERRORDEF_( Unlisted_Object, 0x41, \
/* stream errors */ "unlisted object" )
FT_ERRORDEF_( Cannot_Open_Stream, 0x51, \ /* stream errors */
"cannot open stream" )
FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, \ FT_ERRORDEF_( Cannot_Open_Stream, 0x51, \
"invalid stream seek" ) "cannot open stream" )
FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, \ FT_ERRORDEF_( Invalid_Stream_Seek, 0x52, \
"invalid stream skip" ) "invalid stream seek" )
FT_ERRORDEF_( Invalid_Stream_Read, 0x54, \ FT_ERRORDEF_( Invalid_Stream_Skip, 0x53, \
"invalid stream read" ) "invalid stream skip" )
FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, \ FT_ERRORDEF_( Invalid_Stream_Read, 0x54, \
"invalid stream operation" ) "invalid stream read" )
FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, \ FT_ERRORDEF_( Invalid_Stream_Operation, 0x55, \
"invalid frame operation" ) "invalid stream operation" )
FT_ERRORDEF_( Nested_Frame_Access, 0x57, \ FT_ERRORDEF_( Invalid_Frame_Operation, 0x56, \
"nested frame access" ) "invalid frame operation" )
FT_ERRORDEF_( Invalid_Frame_Read, 0x58, \ FT_ERRORDEF_( Nested_Frame_Access, 0x57, \
"invalid frame read" ) "nested frame access" )
FT_ERRORDEF_( Invalid_Frame_Read, 0x58, \
/* raster errors */ "invalid frame read" )
FT_ERRORDEF_( Raster_Uninitialized, 0x60, \ /* raster errors */
"raster uninitialized" )
FT_ERRORDEF_( Raster_Corrupted, 0x61, \ FT_ERRORDEF_( Raster_Uninitialized, 0x60, \
"raster corrupted" ) "raster uninitialized" )
FT_ERRORDEF_( Raster_Overflow, 0x62, \ FT_ERRORDEF_( Raster_Corrupted, 0x61, \
"raster overflow" ) "raster corrupted" )
FT_ERRORDEF_( Raster_Negative_Height, 0x63, \ FT_ERRORDEF_( Raster_Overflow, 0x62, \
"negative height while rastering" ) "raster overflow" )
FT_ERRORDEF_( Raster_Negative_Height, 0x63, \
/* cache errors */ "negative height while rastering" )
FT_ERRORDEF_( Too_Many_Caches, 0x70, \ /* cache errors */
"too many registered caches" )
FT_ERRORDEF_( Too_Many_Caches, 0x70, \
/* TrueType and SFNT errors */ "too many registered caches" )
FT_ERRORDEF_( Invalid_Opcode, 0x80, \ /* TrueType and SFNT errors */
"invalid opcode" )
FT_ERRORDEF_( Too_Few_Arguments, 0x81, \ FT_ERRORDEF_( Invalid_Opcode, 0x80, \
"too few arguments" ) "invalid opcode" )
FT_ERRORDEF_( Stack_Overflow, 0x82, \ FT_ERRORDEF_( Too_Few_Arguments, 0x81, \
"stack overflow" ) "too few arguments" )
FT_ERRORDEF_( Code_Overflow, 0x83, \ FT_ERRORDEF_( Stack_Overflow, 0x82, \
"code overflow" ) "stack overflow" )
FT_ERRORDEF_( Bad_Argument, 0x84, \ FT_ERRORDEF_( Code_Overflow, 0x83, \
"bad argument" ) "code overflow" )
FT_ERRORDEF_( Divide_By_Zero, 0x85, \ FT_ERRORDEF_( Bad_Argument, 0x84, \
"division by zero" ) "bad argument" )
FT_ERRORDEF_( Invalid_Reference, 0x86, \ FT_ERRORDEF_( Divide_By_Zero, 0x85, \
"invalid reference" ) "division by zero" )
FT_ERRORDEF_( Debug_OpCode, 0x87, \ FT_ERRORDEF_( Invalid_Reference, 0x86, \
"found debug opcode" ) "invalid reference" )
FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, \ FT_ERRORDEF_( Debug_OpCode, 0x87, \
"found ENDF opcode in execution stream" ) "found debug opcode" )
FT_ERRORDEF_( Nested_DEFS, 0x89, \ FT_ERRORDEF_( ENDF_In_Exec_Stream, 0x88, \
"nested DEFS" ) "found ENDF opcode in execution stream" )
FT_ERRORDEF_( Invalid_CodeRange, 0x8A, \ FT_ERRORDEF_( Nested_DEFS, 0x89, \
"invalid code range" ) "nested DEFS" )
FT_ERRORDEF_( Execution_Too_Long, 0x8B, \ FT_ERRORDEF_( Invalid_CodeRange, 0x8A, \
"execution context too long" ) "invalid code range" )
FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, \ FT_ERRORDEF_( Execution_Too_Long, 0x8B, \
"too many function definitions" ) "execution context too long" )
FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, \ FT_ERRORDEF_( Too_Many_Function_Defs, 0x8C, \
"too many instruction definitions" ) "too many function definitions" )
FT_ERRORDEF_( Table_Missing, 0x8E, \ FT_ERRORDEF_( Too_Many_Instruction_Defs, 0x8D, \
"SFNT font table missing" ) "too many instruction definitions" )
FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, \ FT_ERRORDEF_( Table_Missing, 0x8E, \
"horizontal header (hhea) table missing" ) "SFNT font table missing" )
FT_ERRORDEF_( Locations_Missing, 0x90, \ FT_ERRORDEF_( Horiz_Header_Missing, 0x8F, \
"locations (loca) table missing" ) "horizontal header (hhea) table missing" )
FT_ERRORDEF_( Name_Table_Missing, 0x91, \ FT_ERRORDEF_( Locations_Missing, 0x90, \
"name table missing" ) "locations (loca) table missing" )
FT_ERRORDEF_( CMap_Table_Missing, 0x92, \ FT_ERRORDEF_( Name_Table_Missing, 0x91, \
"character map (cmap) table missing" ) "name table missing" )
FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, \ FT_ERRORDEF_( CMap_Table_Missing, 0x92, \
"horizontal metrics (hmtx) table missing" ) "character map (cmap) table missing" )
FT_ERRORDEF_( Post_Table_Missing, 0x94, \ FT_ERRORDEF_( Hmtx_Table_Missing, 0x93, \
"PostScript (post) table missing" ) "horizontal metrics (hmtx) table missing" )
FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, \ FT_ERRORDEF_( Post_Table_Missing, 0x94, \
"invalid horizontal metrics" ) "PostScript (post) table missing" )
FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, \ FT_ERRORDEF_( Invalid_Horiz_Metrics, 0x95, \
"invalid character map (cmap) format" ) "invalid horizontal metrics" )
FT_ERRORDEF_( Invalid_PPem, 0x97, \ FT_ERRORDEF_( Invalid_CharMap_Format, 0x96, \
"invalid ppem value" ) "invalid character map (cmap) format" )
FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, \ FT_ERRORDEF_( Invalid_PPem, 0x97, \
"invalid vertical metrics" ) "invalid ppem value" )
FT_ERRORDEF_( Could_Not_Find_Context, 0x99, \ FT_ERRORDEF_( Invalid_Vert_Metrics, 0x98, \
"could not find context" ) "invalid vertical metrics" )
FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, \ FT_ERRORDEF_( Could_Not_Find_Context, 0x99, \
"invalid PostScript (post) table format" ) "could not find context" )
FT_ERRORDEF_( Invalid_Post_Table, 0x9B, \ FT_ERRORDEF_( Invalid_Post_Table_Format, 0x9A, \
"invalid PostScript (post) table" ) "invalid PostScript (post) table format" )
FT_ERRORDEF_( Invalid_Post_Table, 0x9B, \
/* CFF, CID, and Type 1 errors */ "invalid PostScript (post) table" )
FT_ERRORDEF_( Syntax_Error, 0xA0, \ /* CFF, CID, and Type 1 errors */
"opcode syntax error" )
FT_ERRORDEF_( Stack_Underflow, 0xA1, \ FT_ERRORDEF_( Syntax_Error, 0xA0, \
"argument stack underflow" ) "opcode syntax error" )
FT_ERRORDEF_( Ignore, 0xA2, \ FT_ERRORDEF_( Stack_Underflow, 0xA1, \
"ignore" ) "argument stack underflow" )
FT_ERRORDEF_( Ignore, 0xA2, \
/* BDF errors */ "ignore" )
FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \
FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, \ "no Unicode glyph name found" )
"`STARTFONT' field missing" )
FT_ERRORDEF_( Missing_Font_Field, 0xB1, \
"`FONT' field missing" ) /* BDF errors */
FT_ERRORDEF_( Missing_Size_Field, 0xB2, \
"`SIZE' field missing" ) FT_ERRORDEF_( Missing_Startfont_Field, 0xB0, \
FT_ERRORDEF_( Missing_Chars_Field, 0xB3, \ "`STARTFONT' field missing" )
"`CHARS' field missing" ) FT_ERRORDEF_( Missing_Font_Field, 0xB1, \
FT_ERRORDEF_( Missing_Startchar_Field, 0xB4, \ "`FONT' field missing" )
"`STARTCHAR' field missing" ) FT_ERRORDEF_( Missing_Size_Field, 0xB2, \
FT_ERRORDEF_( Missing_Encoding_Field, 0xB5, \ "`SIZE' field missing" )
"`ENCODING' field missing" ) FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, \
FT_ERRORDEF_( Missing_Bbx_Field, 0xB6, \ "`FONTBOUNDINGBOX' field missing" )
"`BBX' field missing" ) FT_ERRORDEF_( Missing_Chars_Field, 0xB4, \
"`CHARS' field missing" )
FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, \
/* END */ "`STARTCHAR' field missing" )
FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, \
"`ENCODING' field missing" )
FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, \
"`BBX' field missing" )
FT_ERRORDEF_( Bbx_Too_Big, 0xB8, \
"`BBX' too big" )
FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, \
"Font header corrupted or missing fields" )
FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, \
"Font glyphs corrupted or missing fields" )
/* END */

View File

@ -1,206 +1,206 @@
/***************************************************************************/ /***************************************************************************/
/* */ /* */
/* fterrors.h */ /* fterrors.h */
/* */ /* */
/* FreeType error code handling (specification). */ /* FreeType error code handling (specification). */
/* */ /* */
/* Copyright 1996-2001, 2002, 2004 by */ /* Copyright 1996-2001, 2002, 2004, 2007 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */ /* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */ /* this file you indicate that you have read the license and */
/* understand and accept it fully. */ /* understand and accept it fully. */
/* */ /* */
/***************************************************************************/ /***************************************************************************/
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* This special header file is used to define the handling of FT2 */ /* This special header file is used to define the handling of FT2 */
/* enumeration constants. It can also be used to generate error message */ /* enumeration constants. It can also be used to generate error message */
/* strings with a small macro trick explained below. */ /* strings with a small macro trick explained below. */
/* */ /* */
/* I - Error Formats */ /* I - Error Formats */
/* ----------------- */ /* ----------------- */
/* */ /* */
/* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */ /* The configuration macro FT_CONFIG_OPTION_USE_MODULE_ERRORS can be */
/* defined in ftoption.h in order to make the higher byte indicate */ /* defined in ftoption.h in order to make the higher byte indicate */
/* the module where the error has happened (this is not compatible */ /* the module where the error has happened (this is not compatible */
/* with standard builds of FreeType 2). You can then use the macro */ /* with standard builds of FreeType 2). You can then use the macro */
/* FT_ERROR_BASE macro to extract the generic error code from an */ /* FT_ERROR_BASE macro to extract the generic error code from an */
/* FT_Error value. */ /* FT_Error value. */
/* */ /* */
/* */ /* */
/* II - Error Message strings */ /* II - Error Message strings */
/* -------------------------- */ /* -------------------------- */
/* */ /* */
/* The error definitions below are made through special macros that */ /* The error definitions below are made through special macros that */
/* allow client applications to build a table of error message strings */ /* allow client applications to build a table of error message strings */
/* if they need it. The strings are not included in a normal build of */ /* if they need it. The strings are not included in a normal build of */
/* FreeType 2 to save space (most client applications do not use */ /* FreeType 2 to save space (most client applications do not use */
/* them). */ /* them). */
/* */ /* */
/* To do so, you have to define the following macros before including */ /* To do so, you have to define the following macros before including */
/* this file: */ /* this file: */
/* */ /* */
/* FT_ERROR_START_LIST :: */ /* FT_ERROR_START_LIST :: */
/* This macro is called before anything else to define the start of */ /* This macro is called before anything else to define the start of */
/* the error list. It is followed by several FT_ERROR_DEF calls */ /* the error list. It is followed by several FT_ERROR_DEF calls */
/* (see below). */ /* (see below). */
/* */ /* */
/* FT_ERROR_DEF( e, v, s ) :: */ /* FT_ERROR_DEF( e, v, s ) :: */
/* This macro is called to define one single error. */ /* This macro is called to define one single error. */
/* `e' is the error code identifier (e.g. FT_Err_Invalid_Argument). */ /* `e' is the error code identifier (e.g. FT_Err_Invalid_Argument). */
/* `v' is the error numerical value. */ /* `v' is the error numerical value. */
/* `s' is the corresponding error string. */ /* `s' is the corresponding error string. */
/* */ /* */
/* FT_ERROR_END_LIST :: */ /* FT_ERROR_END_LIST :: */
/* This macro ends the list. */ /* This macro ends the list. */
/* */ /* */
/* Additionally, you have to undefine __FTERRORS_H__ before #including */ /* Additionally, you have to undefine __FTERRORS_H__ before #including */
/* this file. */ /* this file. */
/* */ /* */
/* Here is a simple example: */ /* Here is a simple example: */
/* */ /* */
/* { */ /* { */
/* #undef __FTERRORS_H__ */ /* #undef __FTERRORS_H__ */
/* #define FT_ERRORDEF( e, v, s ) { e, s }, */ /* #define FT_ERRORDEF( e, v, s ) { e, s }, */
/* #define FT_ERROR_START_LIST { */ /* #define FT_ERROR_START_LIST { */
/* #define FT_ERROR_END_LIST { 0, 0 } }; */ /* #define FT_ERROR_END_LIST { 0, 0 } }; */
/* */ /* */
/* const struct */ /* const struct */
/* { */ /* { */
/* int err_code; */ /* int err_code; */
/* const char* err_msg */ /* const char* err_msg; */
/* } ft_errors[] = */ /* } ft_errors[] = */
/* */ /* */
/* #include FT_ERRORS_H */ /* #include FT_ERRORS_H */
/* } */ /* } */
/* */ /* */
/*************************************************************************/ /*************************************************************************/
#ifndef __FTERRORS_H__ #ifndef __FTERRORS_H__
#define __FTERRORS_H__ #define __FTERRORS_H__
/* include module base error codes */ /* include module base error codes */
#include FT_MODULE_ERRORS_H #include FT_MODULE_ERRORS_H
/*******************************************************************/ /*******************************************************************/
/*******************************************************************/ /*******************************************************************/
/***** *****/ /***** *****/
/***** SETUP MACROS *****/ /***** SETUP MACROS *****/
/***** *****/ /***** *****/
/*******************************************************************/ /*******************************************************************/
/*******************************************************************/ /*******************************************************************/
#undef FT_NEED_EXTERN_C #undef FT_NEED_EXTERN_C
#undef FT_ERR_XCAT #undef FT_ERR_XCAT
#undef FT_ERR_CAT #undef FT_ERR_CAT
#define FT_ERR_XCAT( x, y ) x ## y #define FT_ERR_XCAT( x, y ) x ## y
#define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y ) #define FT_ERR_CAT( x, y ) FT_ERR_XCAT( x, y )
/* FT_ERR_PREFIX is used as a prefix for error identifiers. */ /* FT_ERR_PREFIX is used as a prefix for error identifiers. */
/* By default, we use `FT_Err_'. */ /* By default, we use `FT_Err_'. */
/* */ /* */
#ifndef FT_ERR_PREFIX #ifndef FT_ERR_PREFIX
#define FT_ERR_PREFIX FT_Err_ #define FT_ERR_PREFIX FT_Err_
#endif #endif
/* FT_ERR_BASE is used as the base for module-specific errors. */ /* FT_ERR_BASE is used as the base for module-specific errors. */
/* */ /* */
#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS #ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
#ifndef FT_ERR_BASE #ifndef FT_ERR_BASE
#define FT_ERR_BASE FT_Mod_Err_Base #define FT_ERR_BASE FT_Mod_Err_Base
#endif #endif
#else #else
#undef FT_ERR_BASE #undef FT_ERR_BASE
#define FT_ERR_BASE 0 #define FT_ERR_BASE 0
#endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */ #endif /* FT_CONFIG_OPTION_USE_MODULE_ERRORS */
/* If FT_ERRORDEF is not defined, we need to define a simple */ /* If FT_ERRORDEF is not defined, we need to define a simple */
/* enumeration type. */ /* enumeration type. */
/* */ /* */
#ifndef FT_ERRORDEF #ifndef FT_ERRORDEF
#define FT_ERRORDEF( e, v, s ) e = v, #define FT_ERRORDEF( e, v, s ) e = v,
#define FT_ERROR_START_LIST enum { #define FT_ERROR_START_LIST enum {
#define FT_ERROR_END_LIST FT_ERR_CAT( FT_ERR_PREFIX, Max ) }; #define FT_ERROR_END_LIST FT_ERR_CAT( FT_ERR_PREFIX, Max ) };
#ifdef __cplusplus #ifdef __cplusplus
#define FT_NEED_EXTERN_C #define FT_NEED_EXTERN_C
extern "C" { extern "C" {
#endif #endif
#endif /* !FT_ERRORDEF */ #endif /* !FT_ERRORDEF */
/* this macro is used to define an error */ /* this macro is used to define an error */
#define FT_ERRORDEF_( e, v, s ) \ #define FT_ERRORDEF_( e, v, s ) \
FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s ) FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v + FT_ERR_BASE, s )
/* this is only used for <module>_Err_Ok, which must be 0! */ /* this is only used for <module>_Err_Ok, which must be 0! */
#define FT_NOERRORDEF_( e, v, s ) \ #define FT_NOERRORDEF_( e, v, s ) \
FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s ) FT_ERRORDEF( FT_ERR_CAT( FT_ERR_PREFIX, e ), v, s )
#ifdef FT_ERROR_START_LIST #ifdef FT_ERROR_START_LIST
FT_ERROR_START_LIST FT_ERROR_START_LIST
#endif #endif
/* now include the error codes */ /* now include the error codes */
#include FT_ERROR_DEFINITIONS_H #include FT_ERROR_DEFINITIONS_H
#ifdef FT_ERROR_END_LIST #ifdef FT_ERROR_END_LIST
FT_ERROR_END_LIST FT_ERROR_END_LIST
#endif #endif
/*******************************************************************/ /*******************************************************************/
/*******************************************************************/ /*******************************************************************/
/***** *****/ /***** *****/
/***** SIMPLE CLEANUP *****/ /***** SIMPLE CLEANUP *****/
/***** *****/ /***** *****/
/*******************************************************************/ /*******************************************************************/
/*******************************************************************/ /*******************************************************************/
#ifdef FT_NEED_EXTERN_C #ifdef FT_NEED_EXTERN_C
} }
#endif #endif
#undef FT_ERROR_START_LIST #undef FT_ERROR_START_LIST
#undef FT_ERROR_END_LIST #undef FT_ERROR_END_LIST
#undef FT_ERRORDEF #undef FT_ERRORDEF
#undef FT_ERRORDEF_ #undef FT_ERRORDEF_
#undef FT_NOERRORDEF_ #undef FT_NOERRORDEF_
#undef FT_NEED_EXTERN_C #undef FT_NEED_EXTERN_C
#undef FT_ERR_CONCAT #undef FT_ERR_CONCAT
#undef FT_ERR_BASE #undef FT_ERR_BASE
/* FT_KEEP_ERR_PREFIX is needed for ftvalid.h */ /* FT_KEEP_ERR_PREFIX is needed for ftvalid.h */
#ifndef FT_KEEP_ERR_PREFIX #ifndef FT_KEEP_ERR_PREFIX
#undef FT_ERR_PREFIX #undef FT_ERR_PREFIX
#endif #endif
#endif /* __FTERRORS_H__ */ #endif /* __FTERRORS_H__ */
/* END */ /* END */

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,155 +1,155 @@
/***************************************************************************/ /***************************************************************************/
/* */ /* */
/* ftmoderr.h */ /* ftmoderr.h */
/* */ /* */
/* FreeType module error offsets (specification). */ /* FreeType module error offsets (specification). */
/* */ /* */
/* Copyright 2001, 2002, 2003, 2004, 2005 by */ /* Copyright 2001, 2002, 2003, 2004, 2005 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */ /* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */ /* this file you indicate that you have read the license and */
/* understand and accept it fully. */ /* understand and accept it fully. */
/* */ /* */
/***************************************************************************/ /***************************************************************************/
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* This file is used to define the FreeType module error offsets. */ /* This file is used to define the FreeType module error offsets. */
/* */ /* */
/* The lower byte gives the error code, the higher byte gives the */ /* The lower byte gives the error code, the higher byte gives the */
/* module. The base module has error offset 0. For example, the error */ /* module. The base module has error offset 0. For example, the error */
/* `FT_Err_Invalid_File_Format' has value 0x003, the error */ /* `FT_Err_Invalid_File_Format' has value 0x003, the error */
/* `TT_Err_Invalid_File_Format' has value 0x1103, the error */ /* `TT_Err_Invalid_File_Format' has value 0x1103, the error */
/* `T1_Err_Invalid_File_Format' has value 0x1203, etc. */ /* `T1_Err_Invalid_File_Format' has value 0x1203, etc. */
/* */ /* */
/* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h */ /* Undefine the macro FT_CONFIG_OPTION_USE_MODULE_ERRORS in ftoption.h */
/* to make the higher byte always zero (disabling the module error */ /* to make the higher byte always zero (disabling the module error */
/* mechanism). */ /* mechanism). */
/* */ /* */
/* It can also be used to create a module error message table easily */ /* It can also be used to create a module error message table easily */
/* with something like */ /* with something like */
/* */ /* */
/* { */ /* { */
/* #undef __FTMODERR_H__ */ /* #undef __FTMODERR_H__ */
/* #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, */ /* #define FT_MODERRDEF( e, v, s ) { FT_Mod_Err_ ## e, s }, */
/* #define FT_MODERR_START_LIST { */ /* #define FT_MODERR_START_LIST { */
/* #define FT_MODERR_END_LIST { 0, 0 } }; */ /* #define FT_MODERR_END_LIST { 0, 0 } }; */
/* */ /* */
/* const struct */ /* const struct */
/* { */ /* { */
/* int mod_err_offset; */ /* int mod_err_offset; */
/* const char* mod_err_msg */ /* const char* mod_err_msg */
/* } ft_mod_errors[] = */ /* } ft_mod_errors[] = */
/* */ /* */
/* #include FT_MODULE_ERRORS_H */ /* #include FT_MODULE_ERRORS_H */
/* } */ /* } */
/* */ /* */
/* To use such a table, all errors must be ANDed with 0xFF00 to remove */ /* To use such a table, all errors must be ANDed with 0xFF00 to remove */
/* the error code. */ /* the error code. */
/* */ /* */
/*************************************************************************/ /*************************************************************************/
#ifndef __FTMODERR_H__ #ifndef __FTMODERR_H__
#define __FTMODERR_H__ #define __FTMODERR_H__
/*******************************************************************/ /*******************************************************************/
/*******************************************************************/ /*******************************************************************/
/***** *****/ /***** *****/
/***** SETUP MACROS *****/ /***** SETUP MACROS *****/
/***** *****/ /***** *****/
/*******************************************************************/ /*******************************************************************/
/*******************************************************************/ /*******************************************************************/
#undef FT_NEED_EXTERN_C #undef FT_NEED_EXTERN_C
#ifndef FT_MODERRDEF #ifndef FT_MODERRDEF
#ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS #ifdef FT_CONFIG_OPTION_USE_MODULE_ERRORS
#define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = v, #define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = v,
#else #else
#define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = 0, #define FT_MODERRDEF( e, v, s ) FT_Mod_Err_ ## e = 0,
#endif #endif
#define FT_MODERR_START_LIST enum { #define FT_MODERR_START_LIST enum {
#define FT_MODERR_END_LIST FT_Mod_Err_Max }; #define FT_MODERR_END_LIST FT_Mod_Err_Max };
#ifdef __cplusplus #ifdef __cplusplus
#define FT_NEED_EXTERN_C #define FT_NEED_EXTERN_C
extern "C" { extern "C" {
#endif #endif
#endif /* !FT_MODERRDEF */ #endif /* !FT_MODERRDEF */
/*******************************************************************/ /*******************************************************************/
/*******************************************************************/ /*******************************************************************/
/***** *****/ /***** *****/
/***** LIST MODULE ERROR BASES *****/ /***** LIST MODULE ERROR BASES *****/
/***** *****/ /***** *****/
/*******************************************************************/ /*******************************************************************/
/*******************************************************************/ /*******************************************************************/
#ifdef FT_MODERR_START_LIST #ifdef FT_MODERR_START_LIST
FT_MODERR_START_LIST FT_MODERR_START_LIST
#endif #endif
FT_MODERRDEF( Base, 0x000, "base module" ) FT_MODERRDEF( Base, 0x000, "base module" )
FT_MODERRDEF( Autofit, 0x100, "autofitter module" ) FT_MODERRDEF( Autofit, 0x100, "autofitter module" )
FT_MODERRDEF( BDF, 0x200, "BDF module" ) FT_MODERRDEF( BDF, 0x200, "BDF module" )
FT_MODERRDEF( Cache, 0x300, "cache module" ) FT_MODERRDEF( Cache, 0x300, "cache module" )
FT_MODERRDEF( CFF, 0x400, "CFF module" ) FT_MODERRDEF( CFF, 0x400, "CFF module" )
FT_MODERRDEF( CID, 0x500, "CID module" ) FT_MODERRDEF( CID, 0x500, "CID module" )
FT_MODERRDEF( Gzip, 0x600, "Gzip module" ) FT_MODERRDEF( Gzip, 0x600, "Gzip module" )
FT_MODERRDEF( LZW, 0x700, "LZW module" ) FT_MODERRDEF( LZW, 0x700, "LZW module" )
FT_MODERRDEF( OTvalid, 0x800, "OpenType validation module" ) FT_MODERRDEF( OTvalid, 0x800, "OpenType validation module" )
FT_MODERRDEF( PCF, 0x900, "PCF module" ) FT_MODERRDEF( PCF, 0x900, "PCF module" )
FT_MODERRDEF( PFR, 0xA00, "PFR module" ) FT_MODERRDEF( PFR, 0xA00, "PFR module" )
FT_MODERRDEF( PSaux, 0xB00, "PS auxiliary module" ) FT_MODERRDEF( PSaux, 0xB00, "PS auxiliary module" )
FT_MODERRDEF( PShinter, 0xC00, "PS hinter module" ) FT_MODERRDEF( PShinter, 0xC00, "PS hinter module" )
FT_MODERRDEF( PSnames, 0xD00, "PS names module" ) FT_MODERRDEF( PSnames, 0xD00, "PS names module" )
FT_MODERRDEF( Raster, 0xE00, "raster module" ) FT_MODERRDEF( Raster, 0xE00, "raster module" )
FT_MODERRDEF( SFNT, 0xF00, "SFNT module" ) FT_MODERRDEF( SFNT, 0xF00, "SFNT module" )
FT_MODERRDEF( Smooth, 0x1000, "smooth raster module" ) FT_MODERRDEF( Smooth, 0x1000, "smooth raster module" )
FT_MODERRDEF( TrueType, 0x1100, "TrueType module" ) FT_MODERRDEF( TrueType, 0x1100, "TrueType module" )
FT_MODERRDEF( Type1, 0x1200, "Type 1 module" ) FT_MODERRDEF( Type1, 0x1200, "Type 1 module" )
FT_MODERRDEF( Type42, 0x1300, "Type 42 module" ) FT_MODERRDEF( Type42, 0x1300, "Type 42 module" )
FT_MODERRDEF( Winfonts, 0x1400, "Windows FON/FNT module" ) FT_MODERRDEF( Winfonts, 0x1400, "Windows FON/FNT module" )
#ifdef FT_MODERR_END_LIST #ifdef FT_MODERR_END_LIST
FT_MODERR_END_LIST FT_MODERR_END_LIST
#endif #endif
/*******************************************************************/ /*******************************************************************/
/*******************************************************************/ /*******************************************************************/
/***** *****/ /***** *****/
/***** CLEANUP *****/ /***** CLEANUP *****/
/***** *****/ /***** *****/
/*******************************************************************/ /*******************************************************************/
/*******************************************************************/ /*******************************************************************/
#ifdef FT_NEED_EXTERN_C #ifdef FT_NEED_EXTERN_C
} }
#endif #endif
#undef FT_MODERR_START_LIST #undef FT_MODERR_START_LIST
#undef FT_MODERR_END_LIST #undef FT_MODERR_END_LIST
#undef FT_MODERRDEF #undef FT_MODERRDEF
#undef FT_NEED_EXTERN_C #undef FT_NEED_EXTERN_C
#endif /* __FTMODERR_H__ */ #endif /* __FTMODERR_H__ */
/* END */ /* END */

File diff suppressed because it is too large Load Diff

View File

@ -1,309 +1,347 @@
/***************************************************************************/ /***************************************************************************/
/* */ /* */
/* ftsystem.h */ /* ftsystem.h */
/* */ /* */
/* FreeType low-level system interface definition (specification). */ /* FreeType low-level system interface definition (specification). */
/* */ /* */
/* Copyright 1996-2001, 2002 by */ /* Copyright 1996-2001, 2002, 2005, 2010 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */ /* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */ /* this file you indicate that you have read the license and */
/* understand and accept it fully. */ /* understand and accept it fully. */
/* */ /* */
/***************************************************************************/ /***************************************************************************/
#ifndef __FTSYSTEM_H__ #ifndef __FTSYSTEM_H__
#define __FTSYSTEM_H__ #define __FTSYSTEM_H__
#include <ft2build.h> #include <ft2build.h>
FT_BEGIN_HEADER FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Section> */ /* <Section> */
/* system_interface */ /* system_interface */
/* */ /* */
/* <Title> */ /* <Title> */
/* System Interface */ /* System Interface */
/* */ /* */
/* <Abstract> */ /* <Abstract> */
/* How FreeType manages memory and i/o. */ /* How FreeType manages memory and i/o. */
/* */ /* */
/* <Description> */ /* <Description> */
/* This section contains various definitions related to memory */ /* This section contains various definitions related to memory */
/* management and i/o access. You need to understand this */ /* management and i/o access. You need to understand this */
/* information if you want to use a custom memory manager or you own */ /* information if you want to use a custom memory manager or you own */
/* input i/o streams. */ /* i/o streams. */
/* */ /* */
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* M E M O R Y M A N A G E M E N T */ /* M E M O R Y M A N A G E M E N T */
/* */ /* */
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************
/* */ *
/* @type: */ * @type:
/* FT_Memory */ * FT_Memory
/* */ *
/* @description: */ * @description:
/* A handle to a given memory manager object, defined with a */ * A handle to a given memory manager object, defined with an
/* @FT_MemoryRec structure. */ * @FT_MemoryRec structure.
/* */ *
typedef struct FT_MemoryRec_* FT_Memory; */
typedef struct FT_MemoryRec_* FT_Memory;
/*************************************************************************/
/* */ /*************************************************************************
/* @functype: */ *
/* FT_Alloc_Func */ * @functype:
/* */ * FT_Alloc_Func
/* @description: */ *
/* A function used to allocate `size' bytes from `memory'. */ * @description:
/* */ * A function used to allocate `size' bytes from `memory'.
/* @input: */ *
/* memory :: A handle to the source memory manager. */ * @input:
/* */ * memory ::
/* size :: The size in bytes to allocate. */ * A handle to the source memory manager.
/* */ *
/* @return: */ * size ::
/* Address of new memory block. 0 in case of failure. */ * The size in bytes to allocate.
/* */ *
typedef void* * @return:
(*FT_Alloc_Func)( FT_Memory memory, * Address of new memory block. 0~in case of failure.
long size ); *
*/
typedef void*
/*************************************************************************/ (*FT_Alloc_Func)( FT_Memory memory,
/* */ long size );
/* @functype: */
/* FT_Free_Func */
/* */ /*************************************************************************
/* @description: */ *
/* A function used to release a given block of memory. */ * @functype:
/* */ * FT_Free_Func
/* @input: */ *
/* memory :: A handle to the source memory manager. */ * @description:
/* */ * A function used to release a given block of memory.
/* block :: The address of the target memory block. */ *
/* */ * @input:
typedef void * memory ::
(*FT_Free_Func)( FT_Memory memory, * A handle to the source memory manager.
void* block ); *
* block ::
* The address of the target memory block.
/*************************************************************************/ *
/* */ */
/* @functype: */ typedef void
/* FT_Realloc_Func */ (*FT_Free_Func)( FT_Memory memory,
/* */ void* block );
/* @description: */
/* a function used to re-allocate a given block of memory. */
/* */ /*************************************************************************
/* @input: */ *
/* memory :: A handle to the source memory manager. */ * @functype:
/* */ * FT_Realloc_Func
/* cur_size :: The block's current size in bytes. */ *
/* */ * @description:
/* new_size :: The block's requested new size. */ * A function used to re-allocate a given block of memory.
/* */ *
/* block :: The block's current address. */ * @input:
/* */ * memory ::
/* @return: */ * A handle to the source memory manager.
/* New block address. 0 in case of memory shortage. */ *
/* */ * cur_size ::
/* @note: */ * The block's current size in bytes.
/* In case of error, the old block must still be available. */ *
/* */ * new_size ::
typedef void* * The block's requested new size.
(*FT_Realloc_Func)( FT_Memory memory, *
long cur_size, * block ::
long new_size, * The block's current address.
void* block ); *
* @return:
* New block address. 0~in case of memory shortage.
/*************************************************************************/ *
/* */ * @note:
/* @struct: */ * In case of error, the old block must still be available.
/* FT_MemoryRec */ *
/* */ */
/* @description: */ typedef void*
/* A structure used to describe a given memory manager to FreeType 2. */ (*FT_Realloc_Func)( FT_Memory memory,
/* */ long cur_size,
/* @fields: */ long new_size,
/* user :: A generic typeless pointer for user data. */ void* block );
/* */
/* alloc :: A pointer type to an allocation function. */
/* */ /*************************************************************************
/* free :: A pointer type to an memory freeing function. */ *
/* */ * @struct:
/* realloc :: A pointer type to a reallocation function. */ * FT_MemoryRec
/* */ *
struct FT_MemoryRec_ * @description:
{ * A structure used to describe a given memory manager to FreeType~2.
void* user; *
FT_Alloc_Func alloc; * @fields:
FT_Free_Func free; * user ::
FT_Realloc_Func realloc; * A generic typeless pointer for user data.
}; *
* alloc ::
* A pointer type to an allocation function.
/*************************************************************************/ *
/* */ * free ::
/* I / O M A N A G E M E N T */ * A pointer type to an memory freeing function.
/* */ *
/*************************************************************************/ * realloc ::
* A pointer type to a reallocation function.
*
/*************************************************************************/ */
/* */ struct FT_MemoryRec_
/* @type: */ {
/* FT_Stream */ void* user;
/* */ FT_Alloc_Func alloc;
/* @description: */ FT_Free_Func free;
/* A handle to an input stream. */ FT_Realloc_Func realloc;
/* */ };
typedef struct FT_StreamRec_* FT_Stream;
/*************************************************************************/
/*************************************************************************/ /* */
/* */ /* I / O M A N A G E M E N T */
/* @struct: */ /* */
/* FT_StreamDesc */ /*************************************************************************/
/* */
/* @description: */
/* A union type used to store either a long or a pointer. This is */ /*************************************************************************
/* used to store a file descriptor or a FILE* in an input stream. */ *
/* */ * @type:
typedef union FT_StreamDesc_ * FT_Stream
{ *
long value; * @description:
void* pointer; * A handle to an input stream.
*
} FT_StreamDesc; */
typedef struct FT_StreamRec_* FT_Stream;
/*************************************************************************/
/* */ /*************************************************************************
/* @functype: */ *
/* FT_Stream_IoFunc */ * @struct:
/* */ * FT_StreamDesc
/* @description: */ *
/* A function used to seek and read data from a given input stream. */ * @description:
/* */ * A union type used to store either a long or a pointer. This is used
/* @input: */ * to store a file descriptor or a `FILE*' in an input stream.
/* stream :: A handle to the source stream. */ *
/* */ */
/* offset :: The offset of read in stream (always from start). */ typedef union FT_StreamDesc_
/* */ {
/* buffer :: The address of the read buffer. */ long value;
/* */ void* pointer;
/* count :: The number of bytes to read from the stream. */
/* */ } FT_StreamDesc;
/* @return: */
/* The number of bytes effectively read by the stream. */
/* */ /*************************************************************************
/* @note: */ *
/* This function might be called to perform a seek or skip operation */ * @functype:
/* with a `count' of 0. */ * FT_Stream_IoFunc
/* */ *
typedef unsigned long * @description:
(*FT_Stream_IoFunc)( FT_Stream stream, * A function used to seek and read data from a given input stream.
unsigned long offset, *
unsigned char* buffer, * @input:
unsigned long count ); * stream ::
* A handle to the source stream.
*
/*************************************************************************/ * offset ::
/* */ * The offset of read in stream (always from start).
/* @functype: */ *
/* FT_Stream_CloseFunc */ * buffer ::
/* */ * The address of the read buffer.
/* @description: */ *
/* A function used to close a given input stream. */ * count ::
/* */ * The number of bytes to read from the stream.
/* @input: */ *
/* stream :: A handle to the target stream. */ * @return:
/* */ * The number of bytes effectively read by the stream.
typedef void *
(*FT_Stream_CloseFunc)( FT_Stream stream ); * @note:
* This function might be called to perform a seek or skip operation
* with a `count' of~0. A non-zero return value then indicates an
/*************************************************************************/ * error.
/* */ *
/* @struct: */ */
/* FT_StreamRec */ typedef unsigned long
/* */ (*FT_Stream_IoFunc)( FT_Stream stream,
/* @description: */ unsigned long offset,
/* A structure used to describe an input stream. */ unsigned char* buffer,
/* */ unsigned long count );
/* @input: */
/* base :: For memory-based streams, this is the address of the */
/* first stream byte in memory. This field should */ /*************************************************************************
/* always be set to NULL for disk-based streams. */ *
/* */ * @functype:
/* size :: The stream size in bytes. */ * FT_Stream_CloseFunc
/* */ *
/* pos :: The current position within the stream. */ * @description:
/* */ * A function used to close a given input stream.
/* descriptor :: This field is a union that can hold an integer or a */ *
/* pointer. It is used by stream implementations to */ * @input:
/* store file descriptors or FILE* pointers. */ * stream ::
/* */ * A handle to the target stream.
/* pathname :: This field is completely ignored by FreeType. */ *
/* However, it is often useful during debugging to use */ */
/* it to store the stream's filename (where available). */ typedef void
/* */ (*FT_Stream_CloseFunc)( FT_Stream stream );
/* read :: The stream's input function. */
/* */
/* close :: The stream;s close function. */ /*************************************************************************
/* */ *
/* memory :: The memory manager to use to preload frames. This is */ * @struct:
/* set internally by FreeType and shouldn't be touched */ * FT_StreamRec
/* by stream implementations. */ *
/* */ * @description:
/* cursor :: This field is set and used internally by FreeType */ * A structure used to describe an input stream.
/* when parsing frames. */ *
/* */ * @input:
/* limit :: This field is set and used internally by FreeType */ * base ::
/* when parsing frames. */ * For memory-based streams, this is the address of the first stream
/* */ * byte in memory. This field should always be set to NULL for
typedef struct FT_StreamRec_ * disk-based streams.
{ *
unsigned char* base; * size ::
unsigned long size; * The stream size in bytes.
unsigned long pos; *
* pos ::
FT_StreamDesc descriptor; * The current position within the stream.
FT_StreamDesc pathname; *
FT_Stream_IoFunc read; * descriptor ::
FT_Stream_CloseFunc close; * This field is a union that can hold an integer or a pointer. It is
* used by stream implementations to store file descriptors or `FILE*'
FT_Memory memory; * pointers.
unsigned char* cursor; *
unsigned char* limit; * pathname ::
* This field is completely ignored by FreeType. However, it is often
} FT_StreamRec; * useful during debugging to use it to store the stream's filename
* (where available).
*
/* */ * read ::
* The stream's input function.
*
FT_END_HEADER * close ::
* The stream's close function.
#endif /* __FTSYSTEM_H__ */ *
* memory ::
* The memory manager to use to preload frames. This is set
/* END */ * internally by FreeType and shouldn't be touched by stream
* implementations.
*
* cursor ::
* This field is set and used internally by FreeType when parsing
* frames.
*
* limit ::
* This field is set and used internally by FreeType when parsing
* frames.
*
*/
typedef struct FT_StreamRec_
{
unsigned char* base;
unsigned long size;
unsigned long pos;
FT_StreamDesc descriptor;
FT_StreamDesc pathname;
FT_Stream_IoFunc read;
FT_Stream_CloseFunc close;
FT_Memory memory;
unsigned char* cursor;
unsigned char* limit;
} FT_StreamRec;
/* */
FT_END_HEADER
#endif /* __FTSYSTEM_H__ */
/* END */

File diff suppressed because it is too large Load Diff

View File

@ -1,50 +1,51 @@
/***************************************************************************/ /***************************************************************************/
/* */ /* */
/* internal.h */ /* internal.h */
/* */ /* */
/* Internal header files (specification only). */ /* Internal header files (specification only). */
/* */ /* */
/* Copyright 1996-2001, 2002, 2003, 2004 by */ /* Copyright 1996-2001, 2002, 2003, 2004 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */ /* */
/* This file is part of the FreeType project, and may only be used, */ /* This file is part of the FreeType project, and may only be used, */
/* modified, and distributed under the terms of the FreeType project */ /* modified, and distributed under the terms of the FreeType project */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* this file you indicate that you have read the license and */ /* this file you indicate that you have read the license and */
/* understand and accept it fully. */ /* understand and accept it fully. */
/* */ /* */
/***************************************************************************/ /***************************************************************************/
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* This file is automatically included by `ft2build.h'. */ /* This file is automatically included by `ft2build.h'. */
/* Do not include it manually! */ /* Do not include it manually! */
/* */ /* */
/*************************************************************************/ /*************************************************************************/
#define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h> #define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h>
#define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h> #define FT_INTERNAL_PIC_H <freetype/internal/ftpic.h>
#define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h> #define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h>
#define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h> #define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h>
#define FT_INTERNAL_CALC_H <freetype/internal/ftcalc.h> #define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h>
#define FT_INTERNAL_DRIVER_H <freetype/internal/ftdriver.h> #define FT_INTERNAL_CALC_H <freetype/internal/ftcalc.h>
#define FT_INTERNAL_TRACE_H <freetype/internal/fttrace.h> #define FT_INTERNAL_DRIVER_H <freetype/internal/ftdriver.h>
#define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h> #define FT_INTERNAL_TRACE_H <freetype/internal/fttrace.h>
#define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h> #define FT_INTERNAL_GLYPH_LOADER_H <freetype/internal/ftgloadr.h>
#define FT_INTERNAL_SERVICE_H <freetype/internal/ftserv.h> #define FT_INTERNAL_SFNT_H <freetype/internal/sfnt.h>
#define FT_INTERNAL_RFORK_H <freetype/internal/ftrfork.h> #define FT_INTERNAL_SERVICE_H <freetype/internal/ftserv.h>
#define FT_INTERNAL_VALIDATE_H <freetype/internal/ftvalid.h> #define FT_INTERNAL_RFORK_H <freetype/internal/ftrfork.h>
#define FT_INTERNAL_VALIDATE_H <freetype/internal/ftvalid.h>
#define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h>
#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h> #define FT_INTERNAL_TRUETYPE_TYPES_H <freetype/internal/tttypes.h>
#define FT_INTERNAL_TYPE1_TYPES_H <freetype/internal/t1types.h>
#define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h>
#define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h> #define FT_INTERNAL_POSTSCRIPT_AUX_H <freetype/internal/psaux.h>
#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H <freetype/internal/psglobal.h> #define FT_INTERNAL_POSTSCRIPT_HINTS_H <freetype/internal/pshints.h>
#define FT_INTERNAL_POSTSCRIPT_GLOBALS_H <freetype/internal/psglobal.h>
#define FT_INTERNAL_AUTOHINT_H <freetype/internal/autohint.h>
#define FT_INTERNAL_AUTOHINT_H <freetype/internal/autohint.h>
/* END */
/* END */

View File

@ -1,61 +1,39 @@
/***************************************************************************/ /***************************************************************************/
/* */ /* */
/* ft2build.h */ /* ft2build.h */
/* */ /* */
/* Build macros of the FreeType 2 library. */ /* FreeType 2 build and setup macros. */
/* */ /* (Generic version) */
/* Copyright 1996-2001, 2003 by */ /* */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */ /* Copyright 1996-2001, 2006 by */
/* */ /* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* This file is part of the FreeType project, and may only be used, */ /* */
/* modified, and distributed under the terms of the FreeType project */ /* This file is part of the FreeType project, and may only be used, */
/* license, LICENSE.TXT. By continuing to use, modify, or distribute */ /* modified, and distributed under the terms of the FreeType project */
/* this file you indicate that you have read the license and */ /* license, LICENSE.TXT. By continuing to use, modify, or distribute */
/* understand and accept it fully. */ /* this file you indicate that you have read the license and */
/* */ /* understand and accept it fully. */
/***************************************************************************/ /* */
/***************************************************************************/
/*************************************************************************/
/* */ /*************************************************************************/
/* This is a Unix-specific version of <ft2build.h> that should be used */ /* */
/* exclusively *after* installation of the library. */ /* This file corresponds to the default `ft2build.h' file for */
/* */ /* FreeType 2. It uses the `freetype' include root. */
/* It assumes that "/usr/local/include/freetype2" (or whatever is */ /* */
/* returned by the "freetype-config --cflags" or "pkg-config --cflags" */ /* Note that specific platforms might use a different configuration. */
/* command) is in your compilation include path. */ /* See builds/unix/ft2unix.h for an example. */
/* */ /* */
/* We don't need to do anything special in this release. However, for */ /*************************************************************************/
/* a future FreeType 2 release, the following installation changes will */
/* be performed: */
/* */ #ifndef __FT2_BUILD_GENERIC_H__
/* - The contents of "freetype-2.x/include/freetype" will be installed */ #define __FT2_BUILD_GENERIC_H__
/* to "/usr/local/include/freetype2" instead of */
/* "/usr/local/include/freetype2/freetype". */ #include <freetype/config/ftheader.h>
/* */
/* - This file will #include <freetype2/config/ftheader.h>, instead */ #endif /* __FT2_BUILD_GENERIC_H__ */
/* of <freetype/config/ftheader.h>. */
/* */
/* - The contents of "ftheader.h" will be processed with `sed' to */ /* END */
/* replace all "<freetype/xxx>" with "<freetype2/xxx>". */
/* */
/* - Adding "/usr/local/include/freetype2" to your compilation include */
/* path will not be necessary anymore. */
/* */
/* These changes will be transparent to client applications which use */
/* freetype-config (or pkg-config). No modifications will be necessary */
/* to compile with the new scheme. */
/* */
/*************************************************************************/
#ifndef __FT2_BUILD_UNIX_H__
#define __FT2_BUILD_UNIX_H__
/* "<prefix>/include/freetype2" must be in your current inclusion path */
#include <freetype/config/ftheader.h>
#endif /* __FT2_BUILD_UNIX_H__ */
/* END */

Binary file not shown.

Binary file not shown.