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; typedef signed short FT_Int16;
/*************************************************************************/
/* */
/* <Type> */
/* FT_UInt16 */
/* */
/* <Description> */
/* A typedef for a 16bit unsigned integer type. */
/* */
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,18 +110,39 @@ 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
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* 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). */
/* */ /* */
@ -192,19 +234,19 @@ FT_BEGIN_HEADER
/* */ /* */
/* 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
/*************************************************************************/
/*************************************************************************/
/**** ****/
/**** 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 ****/
/**** ****/
/*************************************************************************/
/*************************************************************************/
/*************************************************************************/
/* */
/* 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
/* */ /* */
/*
* This temporary macro is used to control various optimizations for /*
* reducing the heap footprint of memory-mapped TrueType files. * 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_OPTIMIZE_MEMORY */ #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

@ -5,7 +5,7 @@
/* 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, */
@ -51,22 +51,18 @@
/* 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 */
/* "ftsystem.c". */
/* */ /* */
/**********************************************************************/ /**********************************************************************/
#include <limits.h> #include <limits.h>
#define FT_UINT_MAX UINT_MAX #define FT_CHAR_BIT CHAR_BIT
#define FT_INT_MAX INT_MAX #define FT_INT_MAX INT_MAX
#define FT_INT_MIN INT_MIN
#define FT_UINT_MAX UINT_MAX
#define FT_ULONG_MAX ULONG_MAX #define FT_ULONG_MAX ULONG_MAX
@ -77,17 +73,9 @@
/**********************************************************************/ /**********************************************************************/
#include <ctype.h>
#define ft_isalnum isalnum
#define ft_isupper isupper
#define ft_islower islower
#define ft_isdigit isdigit
#define ft_isxdigit isxdigit
#include <string.h> #include <string.h>
#define ft_memchr memchr
#define ft_memcmp memcmp #define ft_memcmp memcmp
#define ft_memcpy memcpy #define ft_memcpy memcpy
#define ft_memmove memmove #define ft_memmove memmove
@ -99,10 +87,24 @@
#define ft_strncmp strncmp #define ft_strncmp strncmp
#define ft_strncpy strncpy #define ft_strncpy strncpy
#define ft_strrchr strrchr #define ft_strrchr strrchr
#define ft_strstr strstr
/**********************************************************************/
/* */
/* file handling */
/* */
/**********************************************************************/
#include <stdio.h> #include <stdio.h>
#define FT_FILE FILE
#define ft_fclose fclose
#define ft_fopen fopen
#define ft_fread fread
#define ft_fseek fseek
#define ft_ftell ftell
#define ft_sprintf sprintf #define ft_sprintf sprintf
@ -116,9 +118,30 @@
#include <stdlib.h> #include <stdlib.h>
#define ft_qsort qsort #define ft_qsort qsort
#define ft_exit exit /* only used to exit from unhandled exceptions */
/**********************************************************************/
/* */
/* memory allocation */
/* */
/**********************************************************************/
#define ft_scalloc calloc
#define ft_sfree free
#define ft_smalloc malloc
#define ft_srealloc realloc
/**********************************************************************/
/* */
/* miscellaneous */
/* */
/**********************************************************************/
#define ft_atol atol #define ft_atol atol
#define ft_labs labs
/**********************************************************************/ /**********************************************************************/
@ -134,13 +157,13 @@
/* jmp_buf is defined as a macro */ /* jmp_buf is defined as a macro */
/* on certain platforms */ /* on certain platforms */
#define ft_setjmp setjmp /* same thing here */ #define ft_longjmp longjmp
#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. when */ /* the following is only used for debugging purposes, i.e., if */
/* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */ /* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */
/* */
#include <stdarg.h> #include <stdarg.h>

File diff suppressed because it is too large Load Diff

View File

@ -2,10 +2,9 @@
/* */ /* */
/* 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 by */ /* Copyright 2004, 2005, 2006, 2008 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, */
@ -57,7 +56,7 @@ FT_BEGIN_HEADER
/* 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. */
@ -72,7 +71,7 @@ FT_BEGIN_HEADER
/* FT_Bitmap_Copy */ /* FT_Bitmap_Copy */
/* */ /* */
/* <Description> */ /* <Description> */
/* Copies an bitmap into another one. */ /* Copy a bitmap into another one. */
/* */ /* */
/* <Input> */ /* <Input> */
/* library :: A handle to a library object. */ /* library :: A handle to a library object. */
@ -83,9 +82,9 @@ FT_BEGIN_HEADER
/* 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_DEF( FT_Error ) FT_EXPORT( 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);
@ -114,16 +113,16 @@ FT_BEGIN_HEADER
/* 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. */
/* */ /* */
/* Don't embolden the bitmap owned by a @FT_GlyphSlot directly! Call */ /* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */
/* @FT_Bitmap_Copy to get a copy and work on the copy instead. */ /* you should call @FT_GlyphSlot_Own_Bitmap on the slot first. */
/* */ /* */
FT_EXPORT_DEF( FT_Error ) FT_EXPORT( 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,
@ -152,7 +151,7 @@ FT_BEGIN_HEADER
/* 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 */
@ -170,6 +169,28 @@ FT_BEGIN_HEADER
FT_Int alignment ); FT_Int alignment );
/*************************************************************************/
/* */
/* <Function> */
/* FT_GlyphSlot_Own_Bitmap */
/* */
/* <Description> */
/* Make sure that a glyph slot owns `slot->bitmap'. */
/* */
/* <Input> */
/* slot :: The glyph slot. */
/* */
/* <Return> */
/* FreeType error code. 0~means success. */
/* */
/* <Note> */
/* This function is to be used in combination with */
/* @FT_Bitmap_Embolden. */
/* */
FT_EXPORT( FT_Error )
FT_GlyphSlot_Own_Bitmap( FT_GlyphSlot slot );
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Function> */ /* <Function> */
@ -184,7 +205,7 @@ FT_BEGIN_HEADER
/* bitmap :: The bitmap object to be freed. */ /* bitmap :: The bitmap object to be freed. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0~means success. */
/* */ /* */
/* <Note> */ /* <Note> */
/* The `library' argument is taken to have access to FreeType's */ /* The `library' argument is taken to have access to FreeType's */

View File

@ -4,7 +4,7 @@
/* */ /* */
/* 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, */
@ -52,6 +52,8 @@
"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, \
"array allocation size too large" )
/* glyph/character errors */ /* glyph/character errors */
@ -209,6 +211,9 @@
"argument stack underflow" ) "argument stack underflow" )
FT_ERRORDEF_( Ignore, 0xA2, \ FT_ERRORDEF_( Ignore, 0xA2, \
"ignore" ) "ignore" )
FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \
"no Unicode glyph name found" )
/* BDF errors */ /* BDF errors */
@ -218,14 +223,22 @@
"`FONT' field missing" ) "`FONT' field missing" )
FT_ERRORDEF_( Missing_Size_Field, 0xB2, \ FT_ERRORDEF_( Missing_Size_Field, 0xB2, \
"`SIZE' field missing" ) "`SIZE' field missing" )
FT_ERRORDEF_( Missing_Chars_Field, 0xB3, \ FT_ERRORDEF_( Missing_Fontboundingbox_Field, 0xB3, \
"`FONTBOUNDINGBOX' field missing" )
FT_ERRORDEF_( Missing_Chars_Field, 0xB4, \
"`CHARS' field missing" ) "`CHARS' field missing" )
FT_ERRORDEF_( Missing_Startchar_Field, 0xB4, \ FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, \
"`STARTCHAR' field missing" ) "`STARTCHAR' field missing" )
FT_ERRORDEF_( Missing_Encoding_Field, 0xB5, \ FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, \
"`ENCODING' field missing" ) "`ENCODING' field missing" )
FT_ERRORDEF_( Missing_Bbx_Field, 0xB6, \ FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, \
"`BBX' field missing" ) "`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 */ /* END */

View File

@ -4,7 +4,7 @@
/* */ /* */
/* 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, */
@ -73,7 +73,7 @@
/* 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 */

View File

@ -4,7 +4,7 @@
/* */ /* */
/* FreeType convenience functions to handle glyphs (specification). */ /* FreeType convenience functions to handle glyphs (specification). */
/* */ /* */
/* Copyright 1996-2001, 2002, 2003 by */ /* Copyright 1996-2001, 2002, 2003, 2006, 2008, 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, */
@ -134,10 +134,10 @@ FT_BEGIN_HEADER
/* */ /* */
/* <Description> */ /* <Description> */
/* A structure used for bitmap glyph images. This really is a */ /* A structure used for bitmap glyph images. This really is a */
/* `sub-class' of `FT_GlyphRec'. */ /* `sub-class' of @FT_GlyphRec. */
/* */ /* */
/* <Fields> */ /* <Fields> */
/* root :: The root FT_Glyph fields. */ /* root :: The root @FT_Glyph fields. */
/* */ /* */
/* left :: The left-side bearing, i.e., the horizontal distance */ /* left :: The left-side bearing, i.e., the horizontal distance */
/* from the current pen position to the left border of the */ /* from the current pen position to the left border of the */
@ -145,16 +145,16 @@ FT_BEGIN_HEADER
/* */ /* */
/* top :: The top-side bearing, i.e., the vertical distance from */ /* top :: The top-side bearing, i.e., the vertical distance from */
/* the current pen position to the top border of the glyph */ /* the current pen position to the top border of the glyph */
/* bitmap. This distance is positive for upwards-y! */ /* bitmap. This distance is positive for upwards~y! */
/* */ /* */
/* bitmap :: A descriptor for the bitmap. */ /* bitmap :: A descriptor for the bitmap. */
/* */ /* */
/* <Note> */ /* <Note> */
/* You can typecast FT_Glyph to FT_BitmapGlyph if you have */ /* You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have */
/* glyph->format == FT_GLYPH_FORMAT_BITMAP. This lets you access */ /* `glyph->format == FT_GLYPH_FORMAT_BITMAP'. This lets you access */
/* the bitmap's contents easily. */ /* the bitmap's contents easily. */
/* */ /* */
/* The corresponding pixel buffer is always owned by the BitmapGlyph */ /* The corresponding pixel buffer is always owned by @FT_BitmapGlyph */
/* and is thus created and destroyed with it. */ /* and is thus created and destroyed with it. */
/* */ /* */
typedef struct FT_BitmapGlyphRec_ typedef struct FT_BitmapGlyphRec_
@ -186,21 +186,21 @@ FT_BEGIN_HEADER
/* */ /* */
/* <Description> */ /* <Description> */
/* A structure used for outline (vectorial) glyph images. This */ /* A structure used for outline (vectorial) glyph images. This */
/* really is a `sub-class' of `FT_GlyphRec'. */ /* really is a `sub-class' of @FT_GlyphRec. */
/* */ /* */
/* <Fields> */ /* <Fields> */
/* root :: The root FT_Glyph fields. */ /* root :: The root @FT_Glyph fields. */
/* */ /* */
/* outline :: A descriptor for the outline. */ /* outline :: A descriptor for the outline. */
/* */ /* */
/* <Note> */ /* <Note> */
/* You can typecast FT_Glyph to FT_OutlineGlyph if you have */ /* You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have */
/* glyph->format == FT_GLYPH_FORMAT_OUTLINE. This lets you access */ /* `glyph->format == FT_GLYPH_FORMAT_OUTLINE'. This lets you access */
/* the outline's content easily. */ /* the outline's content easily. */
/* */ /* */
/* As the outline is extracted from a glyph slot, its coordinates are */ /* As the outline is extracted from a glyph slot, its coordinates are */
/* expressed normally in 26.6 pixels, unless the flag */ /* expressed normally in 26.6 pixels, unless the flag */
/* FT_LOAD_NO_SCALE was used in FT_Load_Glyph() or FT_Load_Char(). */ /* @FT_LOAD_NO_SCALE was used in @FT_Load_Glyph() or @FT_Load_Char(). */
/* */ /* */
/* The outline's tables are always owned by the object and are */ /* The outline's tables are always owned by the object and are */
/* destroyed with it. */ /* destroyed with it. */
@ -219,7 +219,8 @@ FT_BEGIN_HEADER
/* FT_Get_Glyph */ /* FT_Get_Glyph */
/* */ /* */
/* <Description> */ /* <Description> */
/* A function used to extract a glyph image from a slot. */ /* A function used to extract a glyph image from a slot. Note that */
/* the created @FT_Glyph object must be released with @FT_Done_Glyph. */
/* */ /* */
/* <Input> */ /* <Input> */
/* slot :: A handle to the source glyph slot. */ /* slot :: A handle to the source glyph slot. */
@ -228,7 +229,7 @@ FT_BEGIN_HEADER
/* aglyph :: A handle to the glyph object. */ /* aglyph :: A handle to the glyph object. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0~means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Get_Glyph( FT_GlyphSlot slot, FT_Get_Glyph( FT_GlyphSlot slot,
@ -248,11 +249,11 @@ FT_BEGIN_HEADER
/* source :: A handle to the source glyph object. */ /* source :: A handle to the source glyph object. */
/* */ /* */
/* <Output> */ /* <Output> */
/* target :: A handle to the target glyph object. 0 in case of */ /* target :: A handle to the target glyph object. 0~in case of */
/* error. */ /* error. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0~means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Glyph_Copy( FT_Glyph source, FT_Glyph_Copy( FT_Glyph source,
@ -265,7 +266,7 @@ FT_BEGIN_HEADER
/* FT_Glyph_Transform */ /* FT_Glyph_Transform */
/* */ /* */
/* <Description> */ /* <Description> */
/* Transforms a glyph image if its format is scalable. */ /* Transform a glyph image if its format is scalable. */
/* */ /* */
/* <InOut> */ /* <InOut> */
/* glyph :: A handle to the target glyph object. */ /* glyph :: A handle to the target glyph object. */
@ -277,8 +278,7 @@ FT_BEGIN_HEADER
/* expressed in 1/64th of a pixel. */ /* expressed in 1/64th of a pixel. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code (the glyph format is not scalable if it is */ /* FreeType error code (if not 0, the glyph format is not scalable). */
/* not zero). */
/* */ /* */
/* <Note> */ /* <Note> */
/* The 2x2 transformation matrix is also applied to the glyph's */ /* The 2x2 transformation matrix is also applied to the glyph's */
@ -335,11 +335,11 @@ FT_BEGIN_HEADER
/* @FT_Glyph_BBox_Mode values instead. */ /* @FT_Glyph_BBox_Mode values instead. */
/* */ /* */
/* <Values> */ /* <Values> */
/* ft_glyph_bbox_unscaled :: see @FT_GLYPH_BBOX_UNSCALED */ /* ft_glyph_bbox_unscaled :: See @FT_GLYPH_BBOX_UNSCALED. */
/* ft_glyph_bbox_subpixels :: see @FT_GLYPH_BBOX_SUBPIXELS */ /* ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS. */
/* ft_glyph_bbox_gridfit :: see @FT_GLYPH_BBOX_GRIDFIT */ /* ft_glyph_bbox_gridfit :: See @FT_GLYPH_BBOX_GRIDFIT. */
/* ft_glyph_bbox_truncate :: see @FT_GLYPH_BBOX_TRUNCATE */ /* ft_glyph_bbox_truncate :: See @FT_GLYPH_BBOX_TRUNCATE. */
/* ft_glyph_bbox_pixels :: see @FT_GLYPH_BBOX_PIXELS */ /* ft_glyph_bbox_pixels :: See @FT_GLYPH_BBOX_PIXELS. */
/* */ /* */
#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED #define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED
#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS #define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS
@ -354,11 +354,11 @@ FT_BEGIN_HEADER
/* FT_Glyph_Get_CBox */ /* FT_Glyph_Get_CBox */
/* */ /* */
/* <Description> */ /* <Description> */
/* Returns a glyph's `control box'. The control box encloses all the */ /* Return a glyph's `control box'. The control box encloses all the */
/* outline's points, including Bezier control points. Though it */ /* outline's points, including Bézier control points. Though it */
/* coincides with the exact bounding box for most glyphs, it can be */ /* coincides with the exact bounding box for most glyphs, it can be */
/* slightly larger in some situations (like when rotating an outline */ /* slightly larger in some situations (like when rotating an outline */
/* which contains Bezier outside arcs). */ /* which contains Bézier outside arcs). */
/* */ /* */
/* Computing the control box is very fast, while getting the bounding */ /* Computing the control box is very fast, while getting the bounding */
/* box can take much more time as it needs to walk over all segments */ /* box can take much more time as it needs to walk over all segments */
@ -376,35 +376,39 @@ FT_BEGIN_HEADER
/* expressed in 1/64th of pixels if it is grid-fitted. */ /* expressed in 1/64th of pixels if it is grid-fitted. */
/* */ /* */
/* <Note> */ /* <Note> */
/* Coordinates are relative to the glyph origin, using the Y-upwards */ /* Coordinates are relative to the glyph origin, using the y~upwards */
/* convention. */ /* convention. */
/* */ /* */
/* If the glyph has been loaded with FT_LOAD_NO_SCALE, `bbox_mode' */ /* If the glyph has been loaded with @FT_LOAD_NO_SCALE, `bbox_mode' */
/* must be set to `FT_GLYPH_BBOX_UNSCALED' to get unscaled font */ /* must be set to @FT_GLYPH_BBOX_UNSCALED to get unscaled font */
/* units in 26.6 pixel format. The value `FT_GLYPH_BBOX_SUBPIXELS' */ /* units in 26.6 pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS */
/* is another name for this constant. */ /* is another name for this constant. */
/* */ /* */
/* Note that the maximum coordinates are exclusive, which means that */ /* Note that the maximum coordinates are exclusive, which means that */
/* one can compute the width and height of the glyph image (be it in */ /* one can compute the width and height of the glyph image (be it in */
/* integer or 26.6 pixels) as: */ /* integer or 26.6 pixels) as: */
/* */ /* */
/* { */
/* width = bbox.xMax - bbox.xMin; */ /* width = bbox.xMax - bbox.xMin; */
/* height = bbox.yMax - bbox.yMin; */ /* height = bbox.yMax - bbox.yMin; */
/* } */
/* */ /* */
/* Note also that for 26.6 coordinates, if `bbox_mode' is set to */ /* Note also that for 26.6 coordinates, if `bbox_mode' is set to */
/* `FT_GLYPH_BBOX_GRIDFIT', the coordinates will also be grid-fitted, */ /* @FT_GLYPH_BBOX_GRIDFIT, the coordinates will also be grid-fitted, */
/* which corresponds to: */ /* which corresponds to: */
/* */ /* */
/* { */
/* bbox.xMin = FLOOR(bbox.xMin); */ /* bbox.xMin = FLOOR(bbox.xMin); */
/* bbox.yMin = FLOOR(bbox.yMin); */ /* bbox.yMin = FLOOR(bbox.yMin); */
/* bbox.xMax = CEILING(bbox.xMax); */ /* bbox.xMax = CEILING(bbox.xMax); */
/* bbox.yMax = CEILING(bbox.yMax); */ /* bbox.yMax = CEILING(bbox.yMax); */
/* } */
/* */ /* */
/* To get the bbox in pixel coordinates, set `bbox_mode' to */ /* To get the bbox in pixel coordinates, set `bbox_mode' to */
/* `FT_GLYPH_BBOX_TRUNCATE'. */ /* @FT_GLYPH_BBOX_TRUNCATE. */
/* */ /* */
/* To get the bbox in grid-fitted pixel coordinates, set `bbox_mode' */ /* To get the bbox in grid-fitted pixel coordinates, set `bbox_mode' */
/* to `FT_GLYPH_BBOX_PIXELS'. */ /* to @FT_GLYPH_BBOX_PIXELS. */
/* */ /* */
FT_EXPORT( void ) FT_EXPORT( void )
FT_Glyph_Get_CBox( FT_Glyph glyph, FT_Glyph_Get_CBox( FT_Glyph glyph,
@ -418,17 +422,17 @@ FT_BEGIN_HEADER
/* FT_Glyph_To_Bitmap */ /* FT_Glyph_To_Bitmap */
/* */ /* */
/* <Description> */ /* <Description> */
/* Converts a given glyph object to a bitmap glyph object. */ /* Convert a given glyph object to a bitmap glyph object. */
/* */ /* */
/* <InOut> */ /* <InOut> */
/* the_glyph :: A pointer to a handle to the target glyph. */ /* the_glyph :: A pointer to a handle to the target glyph. */
/* */ /* */
/* <Input> */ /* <Input> */
/* render_mode :: An enumeration that describe how the data is */ /* render_mode :: An enumeration that describes how the data is */
/* rendered. */ /* rendered. */
/* */ /* */
/* origin :: A pointer to a vector used to translate the glyph */ /* origin :: A pointer to a vector used to translate the glyph */
/* image before rendering. Can be 0 (if no */ /* image before rendering. Can be~0 (if no */
/* translation). The origin is expressed in */ /* translation). The origin is expressed in */
/* 26.6 pixels. */ /* 26.6 pixels. */
/* */ /* */
@ -437,15 +441,17 @@ FT_BEGIN_HEADER
/* never destroyed in case of error. */ /* never destroyed in case of error. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0~means success. */
/* */ /* */
/* <Note> */ /* <Note> */
/* This function does nothing if the glyph format isn't scalable. */
/* */
/* The glyph image is translated with the `origin' vector before */ /* The glyph image is translated with the `origin' vector before */
/* rendering. */ /* rendering. */
/* */ /* */
/* The first parameter is a pointer to a FT_Glyph handle, that will */ /* The first parameter is a pointer to an @FT_Glyph handle, that will */
/* be replaced by this function. Typically, you would use (omitting */ /* be _replaced_ by this function (with newly allocated data). */
/* error handling): */ /* Typically, you would use (omitting error handling): */
/* */ /* */
/* */ /* */
/* { */ /* { */
@ -459,12 +465,12 @@ FT_BEGIN_HEADER
/* // extract glyph image */ /* // extract glyph image */
/* error = FT_Get_Glyph( face->glyph, &glyph ); */ /* error = FT_Get_Glyph( face->glyph, &glyph ); */
/* */ /* */
/* // convert to a bitmap (default render mode + destroy old) */ /* // convert to a bitmap (default render mode + destroying old) */
/* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */ /* if ( glyph->format != FT_GLYPH_FORMAT_BITMAP ) */
/* { */ /* { */
/* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_DEFAULT, */ /* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, */
/* 0, 1 ); */ /* 0, 1 ); */
/* if ( error ) // glyph unchanged */ /* if ( error ) // `glyph' unchanged */
/* ... */ /* ... */
/* } */ /* } */
/* */ /* */
@ -479,7 +485,42 @@ FT_BEGIN_HEADER
/* } */ /* } */
/* */ /* */
/* */ /* */
/* This function does nothing if the glyph format isn't scalable. */ /* Here another example, again without error handling: */
/* */
/* */
/* { */
/* FT_Glyph glyphs[MAX_GLYPHS] */
/* */
/* */
/* ... */
/* */
/* for ( idx = 0; i < MAX_GLYPHS; i++ ) */
/* error = FT_Load_Glyph( face, idx, FT_LOAD_DEFAULT ) || */
/* FT_Get_Glyph ( face->glyph, &glyph[idx] ); */
/* */
/* ... */
/* */
/* for ( idx = 0; i < MAX_GLYPHS; i++ ) */
/* { */
/* FT_Glyph bitmap = glyphs[idx]; */
/* */
/* */
/* ... */
/* */
/* // after this call, `bitmap' no longer points into */
/* // the `glyphs' array (and the old value isn't destroyed) */
/* FT_Glyph_To_Bitmap( &bitmap, FT_RENDER_MODE_MONO, 0, 0 ); */
/* */
/* ... */
/* */
/* FT_Done_Glyph( bitmap ); */
/* } */
/* */
/* ... */
/* */
/* for ( idx = 0; i < MAX_GLYPHS; i++ ) */
/* FT_Done_Glyph( glyphs[idx] ); */
/* } */
/* */ /* */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Glyph_To_Bitmap( FT_Glyph* the_glyph, FT_Glyph_To_Bitmap( FT_Glyph* the_glyph,
@ -494,7 +535,7 @@ FT_BEGIN_HEADER
/* FT_Done_Glyph */ /* FT_Done_Glyph */
/* */ /* */
/* <Description> */ /* <Description> */
/* Destroys a given glyph. */ /* Destroy a given glyph. */
/* */ /* */
/* <Input> */ /* <Input> */
/* glyph :: A handle to the target glyph object. */ /* glyph :: A handle to the target glyph object. */
@ -502,6 +543,8 @@ FT_BEGIN_HEADER
FT_EXPORT( void ) FT_EXPORT( void )
FT_Done_Glyph( FT_Glyph glyph ); FT_Done_Glyph( FT_Glyph glyph );
/* */
/* other helpful functions */ /* other helpful functions */
@ -519,7 +562,7 @@ FT_BEGIN_HEADER
/* FT_Matrix_Multiply */ /* FT_Matrix_Multiply */
/* */ /* */
/* <Description> */ /* <Description> */
/* Performs the matrix operation `b = a*b'. */ /* Perform the matrix operation `b = a*b'. */
/* */ /* */
/* <Input> */ /* <Input> */
/* a :: A pointer to matrix `a'. */ /* a :: A pointer to matrix `a'. */
@ -541,14 +584,14 @@ FT_BEGIN_HEADER
/* FT_Matrix_Invert */ /* FT_Matrix_Invert */
/* */ /* */
/* <Description> */ /* <Description> */
/* Inverts a 2x2 matrix. Returns an error if it can't be inverted. */ /* Invert a 2x2 matrix. Return an error if it can't be inverted. */
/* */ /* */
/* <InOut> */ /* <InOut> */
/* matrix :: A pointer to the target matrix. Remains untouched in */ /* matrix :: A pointer to the target matrix. Remains untouched in */
/* case of error. */ /* case of error. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0~means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Matrix_Invert( FT_Matrix* matrix ); FT_Matrix_Invert( FT_Matrix* matrix );
@ -563,3 +606,8 @@ FT_END_HEADER
/* END */ /* END */
/* Local Variables: */
/* coding: utf-8 */
/* End: */

View File

@ -5,7 +5,8 @@
/* FreeType glyph image formats and default raster interface */ /* FreeType glyph image formats and default raster interface */
/* (specification). */ /* (specification). */
/* */ /* */
/* 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, */
@ -28,7 +29,7 @@
#define __FTIMAGE_H__ #define __FTIMAGE_H__
/* _STANDALONE_ is from ftgrays.c */ /* _STANDALONE_ is from ftgrays.c */
#ifndef _STANDALONE_ #ifndef _STANDALONE_
#include <ft2build.h> #include <ft2build.h>
#endif #endif
@ -51,10 +52,9 @@ FT_BEGIN_HEADER
/* FT_Pos */ /* FT_Pos */
/* */ /* */
/* <Description> */ /* <Description> */
/* The type FT_Pos is a 32-bit integer used to store vectorial */ /* The type FT_Pos is used to store vectorial coordinates. Depending */
/* coordinates. Depending on the context, these can represent */ /* on the context, these can represent distances in integer font */
/* distances in integer font units, or 16,16, or 26.6 fixed float */ /* units, or 16.16, or 26.6 fixed float pixel coordinates. */
/* pixel coordinates. */
/* */ /* */
typedef signed long FT_Pos; typedef signed long FT_Pos;
@ -99,6 +99,20 @@ FT_BEGIN_HEADER
/* */ /* */
/* yMax :: The vertical maximum (top-most). */ /* yMax :: The vertical maximum (top-most). */
/* */ /* */
/* <Note> */
/* The bounding box is specified with the coordinates of the lower */
/* left and the upper right corner. In PostScript, those values are */
/* often called (llx,lly) and (urx,ury), respectively. */
/* */
/* If `yMin' is negative, this value gives the glyph's descender. */
/* Otherwise, the glyph doesn't descend below the baseline. */
/* Similarly, if `ymax' is positive, this value gives the glyph's */
/* ascender. */
/* */
/* `xMin' gives the horizontal distance from the glyph's origin to */
/* the left edge of the glyph's bounding box. If `xMin' is negative, */
/* the glyph extends to the left of the origin. */
/* */
typedef struct FT_BBox_ typedef struct FT_BBox_
{ {
FT_Pos xMin, yMin; FT_Pos xMin, yMin;
@ -119,40 +133,41 @@ FT_BEGIN_HEADER
/* */ /* */
/* <Values> */ /* <Values> */
/* FT_PIXEL_MODE_NONE :: */ /* FT_PIXEL_MODE_NONE :: */
/* Value 0 is reserved. */ /* Value~0 is reserved. */
/* */ /* */
/* FT_PIXEL_MODE_MONO :: */ /* FT_PIXEL_MODE_MONO :: */
/* A monochrome bitmap, using 1 bit per pixel. Note that pixels */ /* A monochrome bitmap, using 1~bit per pixel. Note that pixels */
/* are stored in most-significant order (MSB), which means that */ /* are stored in most-significant order (MSB), which means that */
/* the left-most pixel in a byte has value 128. */ /* the left-most pixel in a byte has value 128. */
/* */ /* */
/* FT_PIXEL_MODE_GRAY :: */ /* FT_PIXEL_MODE_GRAY :: */
/* An 8-bit bitmap, generally used to represent anti-aliased glyph */ /* An 8-bit bitmap, generally used to represent anti-aliased glyph */
/* images. Each pixel is stored in one byte. Note that the number */ /* images. Each pixel is stored in one byte. Note that the number */
/* of value "gray" levels is stored in the `num_bytes' field of */ /* of `gray' levels is stored in the `num_grays' field of the */
/* the @FT_Bitmap structure (it generally is 256). */ /* @FT_Bitmap structure (it generally is 256). */
/* */ /* */
/* FT_PIXEL_MODE_GRAY2 :: */ /* FT_PIXEL_MODE_GRAY2 :: */
/* A 2-bit/pixel bitmap, used to represent embedded anti-aliased */ /* A 2-bit per pixel bitmap, used to represent embedded */
/* bitmaps in font files according to the OpenType specification. */ /* anti-aliased bitmaps in font files according to the OpenType */
/* We haven't found a single font using this format, however. */ /* specification. We haven't found a single font using this */
/* format, however. */
/* */ /* */
/* FT_PIXEL_MODE_GRAY4 :: */ /* FT_PIXEL_MODE_GRAY4 :: */
/* A 4-bit/pixel bitmap, used to represent embedded anti-aliased */ /* A 4-bit per pixel bitmap, representing embedded anti-aliased */
/* bitmaps in font files according to the OpenType specification. */ /* bitmaps in font files according to the OpenType specification. */
/* We haven't found a single font using this format, however. */ /* We haven't found a single font using this format, however. */
/* */ /* */
/* FT_PIXEL_MODE_LCD :: */ /* FT_PIXEL_MODE_LCD :: */
/* An 8-bit bitmap, used to represent RGB or BGR decimated glyph */ /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */
/* images used for display on LCD displays; the bitmap's width is */ /* used for display on LCD displays; the bitmap is three times */
/* three times wider than the original glyph image. See also */ /* wider than the original glyph image. See also */
/* @FT_RENDER_MODE_LCD. */ /* @FT_RENDER_MODE_LCD. */
/* */ /* */
/* FT_PIXEL_MODE_LCD_V :: */ /* FT_PIXEL_MODE_LCD_V :: */
/* An 8-bit bitmap, used to represent RGB or BGR decimated glyph */ /* An 8-bit bitmap, representing RGB or BGR decimated glyph images */
/* images used for display on rotated LCD displays; the bitmap's */ /* used for display on rotated LCD displays; the bitmap is three */
/* height is three times taller than the original glyph image. */ /* times taller than the original glyph image. See also */
/* See also @FT_RENDER_MODE_LCD_V. */ /* @FT_RENDER_MODE_LCD_V. */
/* */ /* */
typedef enum FT_Pixel_Mode_ typedef enum FT_Pixel_Mode_
{ {
@ -179,11 +194,11 @@ FT_BEGIN_HEADER
/* @FT_Pixel_Mode values instead. */ /* @FT_Pixel_Mode values instead. */
/* */ /* */
/* <Values> */ /* <Values> */
/* ft_pixel_mode_none :: see @FT_PIXEL_MODE_NONE */ /* ft_pixel_mode_none :: See @FT_PIXEL_MODE_NONE. */
/* ft_pixel_mode_mono :: see @FT_PIXEL_MODE_MONO */ /* ft_pixel_mode_mono :: See @FT_PIXEL_MODE_MONO. */
/* ft_pixel_mode_grays :: see @FT_PIXEL_MODE_GRAY */ /* ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY. */
/* ft_pixel_mode_pal2 :: see @FT_PIXEL_MODE_GRAY2 */ /* ft_pixel_mode_pal2 :: See @FT_PIXEL_MODE_GRAY2. */
/* ft_pixel_mode_pal4 :: see @FT_PIXEL_MODE_GRAY4 */ /* ft_pixel_mode_pal4 :: See @FT_PIXEL_MODE_GRAY4. */
/* */ /* */
#define ft_pixel_mode_none FT_PIXEL_MODE_NONE #define ft_pixel_mode_none FT_PIXEL_MODE_NONE
#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO #define ft_pixel_mode_mono FT_PIXEL_MODE_MONO
@ -203,14 +218,14 @@ FT_BEGIN_HEADER
/* <Description> */ /* <Description> */
/* THIS TYPE IS DEPRECATED. DO NOT USE IT! */ /* THIS TYPE IS DEPRECATED. DO NOT USE IT! */
/* */ /* */
/* An enumeration type used to describe the format of a bitmap */ /* An enumeration type to describe the format of a bitmap palette, */
/* palette, used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */ /* used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */
/* */ /* */
/* <Fields> */ /* <Values> */
/* ft_palette_mode_rgb :: The palette is an array of 3-bytes RGB */ /* ft_palette_mode_rgb :: The palette is an array of 3-byte RGB */
/* records. */ /* records. */
/* */ /* */
/* ft_palette_mode_rgba :: The palette is an array of 4-bytes RGBA */ /* ft_palette_mode_rgba :: The palette is an array of 4-byte RGBA */
/* records. */ /* records. */
/* */ /* */
/* <Note> */ /* <Note> */
@ -222,7 +237,7 @@ FT_BEGIN_HEADER
ft_palette_mode_rgb = 0, ft_palette_mode_rgb = 0,
ft_palette_mode_rgba, ft_palette_mode_rgba,
ft_palettte_mode_max /* do not remove */ ft_palette_mode_max /* do not remove */
} FT_Palette_Mode; } FT_Palette_Mode;
@ -253,12 +268,27 @@ FT_BEGIN_HEADER
/* flow. In all cases, the pitch is an offset to add */ /* flow. In all cases, the pitch is an offset to add */
/* to a bitmap pointer in order to go down one row. */ /* to a bitmap pointer in order to go down one row. */
/* */ /* */
/* Note that `padding' means the alignment of a */
/* bitmap to a byte border, and FreeType functions */
/* normally align to the smallest possible integer */
/* value. */
/* */
/* For the B/W rasterizer, `pitch' is always an even */
/* number. */
/* */
/* To change the pitch of a bitmap (say, to make it a */
/* multiple of 4), use @FT_Bitmap_Convert. */
/* Alternatively, you might use callback functions to */
/* directly render to the application's surface; see */
/* the file `example2.cpp' in the tutorial for a */
/* demonstration. */
/* */
/* buffer :: A typeless pointer to the bitmap buffer. This */ /* buffer :: A typeless pointer to the bitmap buffer. This */
/* value should be aligned on 32-bit boundaries in */ /* value should be aligned on 32-bit boundaries in */
/* most cases. */ /* most cases. */
/* */ /* */
/* num_grays :: This field is only used with */ /* num_grays :: This field is only used with */
/* `FT_PIXEL_MODE_GRAY'; it gives the number of gray */ /* @FT_PIXEL_MODE_GRAY; it gives the number of gray */
/* levels used in the bitmap. */ /* levels used in the bitmap. */
/* */ /* */
/* pixel_mode :: The pixel mode, i.e., how pixel bits are stored. */ /* pixel_mode :: The pixel mode, i.e., how pixel bits are stored. */
@ -313,18 +343,27 @@ FT_BEGIN_HEADER
/* */ /* */
/* n_points :: The number of points in the outline. */ /* n_points :: The number of points in the outline. */
/* */ /* */
/* points :: A pointer to an array of `n_points' FT_Vector */ /* points :: A pointer to an array of `n_points' @FT_Vector */
/* elements, giving the outline's point coordinates. */ /* elements, giving the outline's point coordinates. */
/* */ /* */
/* tags :: A pointer to an array of `n_points' chars, giving */ /* tags :: A pointer to an array of `n_points' chars, giving */
/* each outline point's type. If bit 0 is unset, the */ /* each outline point's type. */
/* point is `off' the curve, i.e. a Bezier control */
/* point, while it is `on' when set. */
/* */ /* */
/* Bit 1 is meaningful for `off' points only. If set, */ /* If bit~0 is unset, the point is `off' the curve, */
/* it indicates a third-order Bezier arc control point; */ /* i.e., a Bézier control point, while it is `on' if */
/* set. */
/* */
/* Bit~1 is meaningful for `off' points only. If set, */
/* it indicates a third-order Bézier arc control point; */
/* and a second-order control point if unset. */ /* and a second-order control point if unset. */
/* */ /* */
/* If bit~2 is set, bits 5-7 contain the drop-out mode */
/* (as defined in the OpenType specification; the value */
/* is the same as the argument to the SCANMODE */
/* instruction). */
/* */
/* Bits 3 and~4 are reserved for internal purposes. */
/* */
/* contours :: An array of `n_contours' shorts, giving the end */ /* contours :: An array of `n_contours' shorts, giving the end */
/* point of each contour within the outline. For */ /* point of each contour within the outline. For */
/* example, the first contour is defined by the points */ /* example, the first contour is defined by the points */
@ -333,7 +372,13 @@ FT_BEGIN_HEADER
/* */ /* */
/* flags :: A set of bit flags used to characterize the outline */ /* flags :: A set of bit flags used to characterize the outline */
/* and give hints to the scan-converter and hinter on */ /* and give hints to the scan-converter and hinter on */
/* how to convert/grid-fit it. See FT_Outline_Flags. */ /* how to convert/grid-fit it. See @FT_OUTLINE_FLAGS. */
/* */
/* <Note> */
/* The B/W rasterizer only checks bit~2 in the `tags' array for the */
/* first point of each contour. The drop-out mode as given with */
/* @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, and */
/* @FT_OUTLINE_INCLUDE_STUBS in `flags' is then overridden. */
/* */ /* */
typedef struct FT_Outline_ typedef struct FT_Outline_
{ {
@ -348,6 +393,11 @@ FT_BEGIN_HEADER
} FT_Outline; } FT_Outline;
/* Following limits must be consistent with */
/* FT_Outline.{n_contours,n_points} */
#define FT_OUTLINE_CONTOURS_MAX SHRT_MAX
#define FT_OUTLINE_POINTS_MAX SHRT_MAX
/*************************************************************************/ /*************************************************************************/
/* */ /* */
@ -359,61 +409,75 @@ FT_BEGIN_HEADER
/* `flags' field. */ /* `flags' field. */
/* */ /* */
/* <Values> */ /* <Values> */
/* FT_OUTLINE_NONE :: Value 0 is reserved. */ /* FT_OUTLINE_NONE :: */
/* Value~0 is reserved. */
/* */ /* */
/* FT_OUTLINE_OWNER :: If set, this flag indicates that the */ /* FT_OUTLINE_OWNER :: */
/* outline's field arrays (i.e. */ /* If set, this flag indicates that the outline's field arrays */
/* `points', `flags' & `contours') are */ /* (i.e., `points', `flags', and `contours') are `owned' by the */
/* `owned' by the outline object, and */ /* outline object, and should thus be freed when it is destroyed. */
/* should thus be freed when it is */
/* destroyed. */
/* */ /* */
/* FT_OUTLINE_EVEN_ODD_FILL :: By default, outlines are filled using */ /* FT_OUTLINE_EVEN_ODD_FILL :: */
/* the non-zero winding rule. If set to */ /* By default, outlines are filled using the non-zero winding rule. */
/* 1, the outline will be filled using */ /* If set to 1, the outline will be filled using the even-odd fill */
/* the even-odd fill rule (only works */ /* rule (only works with the smooth rasterizer). */
/* with the smooth raster). */
/* */ /* */
/* FT_OUTLINE_REVERSE_FILL :: By default, outside contours of an */ /* FT_OUTLINE_REVERSE_FILL :: */
/* outline are oriented in clock-wise */ /* By default, outside contours of an outline are oriented in */
/* direction, as defined in the TrueType */ /* clock-wise direction, as defined in the TrueType specification. */
/* specification. This flag is set if */ /* This flag is set if the outline uses the opposite direction */
/* the outline uses the opposite */ /* (typically for Type~1 fonts). This flag is ignored by the scan */
/* direction (typically for Type 1 */ /* converter. */
/* fonts). This flag is ignored by the */
/* scan-converter. However, it is very */
/* important for the auto-hinter. */
/* */ /* */
/* FT_OUTLINE_IGNORE_DROPOUTS :: By default, the scan converter will */ /* FT_OUTLINE_IGNORE_DROPOUTS :: */
/* try to detect drop-outs in an outline */ /* By default, the scan converter will try to detect drop-outs in */
/* and correct the glyph bitmap to */ /* an outline and correct the glyph bitmap to ensure consistent */
/* ensure consistent shape continuity. */ /* shape continuity. If set, this flag hints the scan-line */
/* If set, this flag hints the scan-line */ /* converter to ignore such cases. See below for more information. */
/* converter to ignore such cases. */
/* */ /* */
/* FT_OUTLINE_HIGH_PRECISION :: This flag indicates that the */ /* FT_OUTLINE_SMART_DROPOUTS :: */
/* scan-line converter should try to */ /* Select smart dropout control. If unset, use simple dropout */
/* convert this outline to bitmaps with */ /* control. Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See */
/* the highest possible quality. It is */ /* below for more information. */
/* typically set for small character */
/* sizes. Note that this is only a */
/* hint, that might be completely */
/* ignored by a given scan-converter. */
/* */ /* */
/* FT_OUTLINE_SINGLE_PASS :: This flag is set to force a given */ /* FT_OUTLINE_INCLUDE_STUBS :: */
/* scan-converter to only use a single */ /* If set, turn pixels on for `stubs', otherwise exclude them. */
/* pass over the outline to render a */ /* Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for */
/* bitmap glyph image. Normally, it is */ /* more information. */
/* set for very large character sizes. */ /* */
/* It is only a hint, that might be */ /* FT_OUTLINE_HIGH_PRECISION :: */
/* completely ignored by a given */ /* This flag indicates that the scan-line converter should try to */
/* convert this outline to bitmaps with the highest possible */
/* quality. It is typically set for small character sizes. Note */
/* that this is only a hint that might be completely ignored by a */
/* given scan-converter. */
/* */
/* FT_OUTLINE_SINGLE_PASS :: */
/* This flag is set to force a given scan-converter to only use a */
/* single pass over the outline to render a bitmap glyph image. */
/* Normally, it is set for very large character sizes. It is only */
/* a hint that might be completely ignored by a given */
/* scan-converter. */ /* scan-converter. */
/* */ /* */
/* <Note> */
/* The flags @FT_OUTLINE_IGNORE_DROPOUTS, @FT_OUTLINE_SMART_DROPOUTS, */
/* and @FT_OUTLINE_INCLUDE_STUBS are ignored by the smooth */
/* rasterizer. */
/* */
/* There exists a second mechanism to pass the drop-out mode to the */
/* B/W rasterizer; see the `tags' field in @FT_Outline. */
/* */
/* Please refer to the description of the `SCANTYPE' instruction in */
/* the OpenType specification (in file `ttinst1.doc') how simple */
/* drop-outs, smart drop-outs, and stubs are defined. */
/* */
#define FT_OUTLINE_NONE 0x0 #define FT_OUTLINE_NONE 0x0
#define FT_OUTLINE_OWNER 0x1 #define FT_OUTLINE_OWNER 0x1
#define FT_OUTLINE_EVEN_ODD_FILL 0x2 #define FT_OUTLINE_EVEN_ODD_FILL 0x2
#define FT_OUTLINE_REVERSE_FILL 0x4 #define FT_OUTLINE_REVERSE_FILL 0x4
#define FT_OUTLINE_IGNORE_DROPOUTS 0x8 #define FT_OUTLINE_IGNORE_DROPOUTS 0x8
#define FT_OUTLINE_SMART_DROPOUTS 0x10
#define FT_OUTLINE_INCLUDE_STUBS 0x20
#define FT_OUTLINE_HIGH_PRECISION 0x100 #define FT_OUTLINE_HIGH_PRECISION 0x100
#define FT_OUTLINE_SINGLE_PASS 0x200 #define FT_OUTLINE_SINGLE_PASS 0x200
@ -453,6 +517,8 @@ FT_BEGIN_HEADER
#define FT_CURVE_TAG_CONIC 0 #define FT_CURVE_TAG_CONIC 0
#define FT_CURVE_TAG_CUBIC 2 #define FT_CURVE_TAG_CUBIC 2
#define FT_CURVE_TAG_HAS_SCANMODE 4
#define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */ #define FT_CURVE_TAG_TOUCH_X 8 /* reserved for the TrueType hinter */
#define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */ #define FT_CURVE_TAG_TOUCH_Y 16 /* reserved for the TrueType hinter */
@ -465,6 +531,7 @@ FT_BEGIN_HEADER
#define FT_Curve_Tag_Touch_X FT_CURVE_TAG_TOUCH_X #define FT_Curve_Tag_Touch_X FT_CURVE_TAG_TOUCH_X
#define FT_Curve_Tag_Touch_Y FT_CURVE_TAG_TOUCH_Y #define FT_Curve_Tag_Touch_Y FT_CURVE_TAG_TOUCH_Y
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
@ -483,14 +550,15 @@ FT_BEGIN_HEADER
/* decomposition function. */ /* decomposition function. */
/* */ /* */
/* <Return> */ /* <Return> */
/* Error code. 0 means success. */ /* Error code. 0~means success. */
/* */ /* */
typedef int typedef int
(*FT_Outline_MoveToFunc)( FT_Vector* to, (*FT_Outline_MoveToFunc)( const FT_Vector* to,
void* user ); void* user );
#define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc #define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
@ -509,24 +577,25 @@ FT_BEGIN_HEADER
/* decomposition function. */ /* decomposition function. */
/* */ /* */
/* <Return> */ /* <Return> */
/* Error code. 0 means success. */ /* Error code. 0~means success. */
/* */ /* */
typedef int typedef int
(*FT_Outline_LineToFunc)( FT_Vector* to, (*FT_Outline_LineToFunc)( const FT_Vector* to,
void* user ); void* user );
#define FT_Outline_LineTo_Func FT_Outline_LineToFunc #define FT_Outline_LineTo_Func FT_Outline_LineToFunc
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
/* FT_Outline_ConicToFunc */ /* FT_Outline_ConicToFunc */
/* */ /* */
/* <Description> */ /* <Description> */
/* A function pointer type use to describe the signature of a `conic */ /* A function pointer type used to describe the signature of a `conic */
/* to' function during outline walking/decomposition. */ /* to' function during outline walking or decomposition. */
/* */ /* */
/* A `conic to' is emitted to indicate a second-order Bezier arc in */ /* A `conic to' is emitted to indicate a second-order Bézier arc in */
/* the outline. */ /* the outline. */
/* */ /* */
/* <Input> */ /* <Input> */
@ -539,15 +608,16 @@ FT_BEGIN_HEADER
/* the decomposition function. */ /* the decomposition function. */
/* */ /* */
/* <Return> */ /* <Return> */
/* Error code. 0 means success. */ /* Error code. 0~means success. */
/* */ /* */
typedef int typedef int
(*FT_Outline_ConicToFunc)( FT_Vector* control, (*FT_Outline_ConicToFunc)( const FT_Vector* control,
FT_Vector* to, const FT_Vector* to,
void* user ); void* user );
#define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc #define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
@ -555,14 +625,14 @@ FT_BEGIN_HEADER
/* */ /* */
/* <Description> */ /* <Description> */
/* A function pointer type used to describe the signature of a `cubic */ /* A function pointer type used to describe the signature of a `cubic */
/* to' function during outline walking/decomposition. */ /* to' function during outline walking or decomposition. */
/* */ /* */
/* A `cubic to' is emitted to indicate a third-order Bezier arc. */ /* A `cubic to' is emitted to indicate a third-order Bézier arc. */
/* */ /* */
/* <Input> */ /* <Input> */
/* control1 :: A pointer to the first Bezier control point. */ /* control1 :: A pointer to the first Bézier control point. */
/* */ /* */
/* control2 :: A pointer to the second Bezier control point. */ /* control2 :: A pointer to the second Bézier control point. */
/* */ /* */
/* to :: A pointer to the target end point. */ /* to :: A pointer to the target end point. */
/* */ /* */
@ -570,12 +640,12 @@ FT_BEGIN_HEADER
/* the decomposition function. */ /* the decomposition function. */
/* */ /* */
/* <Return> */ /* <Return> */
/* Error code. 0 means success. */ /* Error code. 0~means success. */
/* */ /* */
typedef int typedef int
(*FT_Outline_CubicToFunc)( FT_Vector* control1, (*FT_Outline_CubicToFunc)( const FT_Vector* control1,
FT_Vector* control2, const FT_Vector* control2,
FT_Vector* to, const FT_Vector* to,
void* user ); void* user );
#define FT_Outline_CubicTo_Func FT_Outline_CubicToFunc #define FT_Outline_CubicTo_Func FT_Outline_CubicToFunc
@ -588,17 +658,16 @@ FT_BEGIN_HEADER
/* */ /* */
/* <Description> */ /* <Description> */
/* A structure to hold various function pointers used during outline */ /* A structure to hold various function pointers used during outline */
/* decomposition in order to emit segments, conic, and cubic Beziers, */ /* decomposition in order to emit segments, conic, and cubic Béziers. */
/* as well as `move to' and `close to' operations. */
/* */ /* */
/* <Fields> */ /* <Fields> */
/* move_to :: The `move to' emitter. */ /* move_to :: The `move to' emitter. */
/* */ /* */
/* line_to :: The segment emitter. */ /* line_to :: The segment emitter. */
/* */ /* */
/* conic_to :: The second-order Bezier arc emitter. */ /* conic_to :: The second-order Bézier arc emitter. */
/* */ /* */
/* cubic_to :: The third-order Bezier arc emitter. */ /* cubic_to :: The third-order Bézier arc emitter. */
/* */ /* */
/* shift :: The shift that is applied to coordinates before they */ /* shift :: The shift that is applied to coordinates before they */
/* are sent to the emitter. */ /* are sent to the emitter. */
@ -611,10 +680,12 @@ FT_BEGIN_HEADER
/* version of the original coordinates (this is important for high */ /* version of the original coordinates (this is important for high */
/* accuracy during scan-conversion). The transformation is simple: */ /* accuracy during scan-conversion). The transformation is simple: */
/* */ /* */
/* { */
/* x' = (x << shift) - delta */ /* x' = (x << shift) - delta */
/* y' = (x << shift) - delta */ /* y' = (x << shift) - delta */
/* } */
/* */ /* */
/* Set the value of `shift' and `delta' to 0 to get the original */ /* Set the values of `shift' and `delta' to~0 to get the original */
/* point coordinates. */ /* point coordinates. */
/* */ /* */
typedef struct FT_Outline_Funcs_ typedef struct FT_Outline_Funcs_
@ -644,14 +715,16 @@ FT_BEGIN_HEADER
/* FT_IMAGE_TAG */ /* FT_IMAGE_TAG */
/* */ /* */
/* <Description> */ /* <Description> */
/* This macro converts four letter tags into an unsigned long. */ /* This macro converts four-letter tags to an unsigned long type. */
/* */ /* */
/* <Note> */ /* <Note> */
/* Since many 16bit compilers don't like 32bit enumerations, you */ /* Since many 16-bit compilers don't like 32-bit enumerations, you */
/* should redefine this macro in case of problems to something like */ /* should redefine this macro in case of problems to something like */
/* this: */ /* this: */
/* */ /* */
/* { */
/* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value */ /* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value */
/* } */
/* */ /* */
/* to get a simple enumeration without assigning special numbers. */ /* to get a simple enumeration without assigning special numbers. */
/* */ /* */
@ -677,7 +750,7 @@ FT_BEGIN_HEADER
/* */ /* */
/* <Values> */ /* <Values> */
/* FT_GLYPH_FORMAT_NONE :: */ /* FT_GLYPH_FORMAT_NONE :: */
/* The value 0 is reserved and does describe a glyph format. */ /* The value~0 is reserved. */
/* */ /* */
/* FT_GLYPH_FORMAT_COMPOSITE :: */ /* FT_GLYPH_FORMAT_COMPOSITE :: */
/* The glyph image is a composite of several other images. This */ /* The glyph image is a composite of several other images. This */
@ -690,14 +763,14 @@ FT_BEGIN_HEADER
/* the @FT_GlyphSlotRec structure to read it. */ /* the @FT_GlyphSlotRec structure to read it. */
/* */ /* */
/* FT_GLYPH_FORMAT_OUTLINE :: */ /* FT_GLYPH_FORMAT_OUTLINE :: */
/* The glyph image is a vertorial outline made of line segments */ /* The glyph image is a vectorial outline made of line segments */
/* and Bezier arcs; it can be described as an @FT_Outline; you */ /* and Bézier arcs; it can be described as an @FT_Outline; you */
/* generally want to access the `outline' field of the */ /* generally want to access the `outline' field of the */
/* @FT_GlyphSlotRec structure to read it. */ /* @FT_GlyphSlotRec structure to read it. */
/* */ /* */
/* FT_GLYPH_FORMAT_PLOTTER :: */ /* FT_GLYPH_FORMAT_PLOTTER :: */
/* The glyph image is a vectorial path with no inside/outside */ /* The glyph image is a vectorial path with no inside and outside */
/* contours. Some Type 1 fonts, like those in the Hershey family, */ /* contours. Some Type~1 fonts, like those in the Hershey family, */
/* contain glyphs in this format. These are described as */ /* contain glyphs in this format. These are described as */
/* @FT_Outline, but FreeType isn't currently capable of rendering */ /* @FT_Outline, but FreeType isn't currently capable of rendering */
/* them correctly. */ /* them correctly. */
@ -720,15 +793,15 @@ FT_BEGIN_HEADER
/* ft_glyph_format_xxx */ /* ft_glyph_format_xxx */
/* */ /* */
/* <Description> */ /* <Description> */
/* A list of decprecated constants. Use the corresponding */ /* A list of deprecated constants. Use the corresponding */
/* @FT_Glyph_Format values instead. */ /* @FT_Glyph_Format values instead. */
/* */ /* */
/* <Values> */ /* <Values> */
/* ft_glyph_format_none :: see @FT_GLYPH_FORMAT_NONE */ /* ft_glyph_format_none :: See @FT_GLYPH_FORMAT_NONE. */
/* ft_glyph_format_composite :: see @FT_GLYPH_FORMAT_COMPOSITE */ /* ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE. */
/* ft_glyph_format_bitmap :: see @FT_GLYPH_FORMAT_BITMAP */ /* ft_glyph_format_bitmap :: See @FT_GLYPH_FORMAT_BITMAP. */
/* ft_glyph_format_outline :: see @FT_GLYPH_FORMAT_OUTLINE */ /* ft_glyph_format_outline :: See @FT_GLYPH_FORMAT_OUTLINE. */
/* ft_glyph_format_plotter :: see @FT_GLYPH_FORMAT_PLOTTER */ /* ft_glyph_format_plotter :: See @FT_GLYPH_FORMAT_PLOTTER. */
/* */ /* */
#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE #define ft_glyph_format_none FT_GLYPH_FORMAT_NONE
#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE #define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE
@ -809,11 +882,11 @@ FT_BEGIN_HEADER
/* */ /* */
/* <Note> */ /* <Note> */
/* This structure is used by the span drawing callback type named */ /* This structure is used by the span drawing callback type named */
/* FT_SpanFunc which takes the y-coordinate of the span as a */ /* @FT_SpanFunc which takes the y~coordinate of the span as a */
/* a parameter. */ /* a parameter. */
/* */ /* */
/* The coverage value is always between 0 and 255, even if the number */ /* The coverage value is always between 0 and 255. If you want less */
/* of gray levels have been set through FT_Set_Gray_Levels(). */ /* gray values, the callback function has to reduce them. */
/* */ /* */
typedef struct FT_Span_ typedef struct FT_Span_
{ {
@ -835,7 +908,7 @@ FT_BEGIN_HEADER
/* spans on each scan line. */ /* spans on each scan line. */
/* */ /* */
/* <Input> */ /* <Input> */
/* y :: The scanline's y-coordinate. */ /* y :: The scanline's y~coordinate. */
/* */ /* */
/* count :: The number of spans to draw on this scanline. */ /* count :: The number of spans to draw on this scanline. */
/* */ /* */
@ -851,11 +924,11 @@ FT_BEGIN_HEADER
/* given background bitmap, and even perform translucency. */ /* given background bitmap, and even perform translucency. */
/* */ /* */
/* Note that the `count' field cannot be greater than a fixed value */ /* Note that the `count' field cannot be greater than a fixed value */
/* defined by the FT_MAX_GRAY_SPANS configuration macro in */ /* defined by the `FT_MAX_GRAY_SPANS' configuration macro in */
/* ftoption.h. By default, this value is set to 32, which means that */ /* `ftoption.h'. By default, this value is set to~32, which means */
/* if there are more than 32 spans on a given scanline, the callback */ /* that if there are more than 32~spans on a given scanline, the */
/* will be called several times with the same `y' parameter in order */ /* callback is called several times with the same `y' parameter in */
/* to draw all callbacks. */ /* order to draw all callbacks. */
/* */ /* */
/* Otherwise, the callback is only called once per scan-line, and */ /* Otherwise, the callback is only called once per scan-line, and */
/* only for those scanlines that do have `gray' pixels on them. */ /* only for those scanlines that do have `gray' pixels on them. */
@ -863,7 +936,7 @@ FT_BEGIN_HEADER
typedef void typedef void
(*FT_SpanFunc)( int y, (*FT_SpanFunc)( int y,
int count, int count,
FT_Span* spans, const FT_Span* spans,
void* user ); void* user );
#define FT_Raster_Span_Func FT_SpanFunc #define FT_Raster_Span_Func FT_SpanFunc
@ -883,14 +956,14 @@ FT_BEGIN_HEADER
/* per-se the TrueType spec. */ /* per-se the TrueType spec. */
/* */ /* */
/* <Input> */ /* <Input> */
/* y :: The pixel's y-coordinate. */ /* y :: The pixel's y~coordinate. */
/* */ /* */
/* x :: The pixel's x-coordinate. */ /* x :: The pixel's x~coordinate. */
/* */ /* */
/* user :: User-supplied data that is passed to the callback. */ /* user :: User-supplied data that is passed to the callback. */
/* */ /* */
/* <Return> */ /* <Return> */
/* 1 if the pixel is `set', 0 otherwise. */ /* 1~if the pixel is `set', 0~otherwise. */
/* */ /* */
typedef int typedef int
(*FT_Raster_BitTest_Func)( int y, (*FT_Raster_BitTest_Func)( int y,
@ -911,14 +984,14 @@ FT_BEGIN_HEADER
/* drop-out control according to the TrueType specification. */ /* drop-out control according to the TrueType specification. */
/* */ /* */
/* <Input> */ /* <Input> */
/* y :: The pixel's y-coordinate. */ /* y :: The pixel's y~coordinate. */
/* */ /* */
/* x :: The pixel's x-coordinate. */ /* x :: The pixel's x~coordinate. */
/* */ /* */
/* user :: User-supplied data that is passed to the callback. */ /* user :: User-supplied data that is passed to the callback. */
/* */ /* */
/* <Return> */ /* <Return> */
/* 1 if the pixel is `set', 0 otherwise. */ /* 1~if the pixel is `set', 0~otherwise. */
/* */ /* */
typedef void typedef void
(*FT_Raster_BitSet_Func)( int y, (*FT_Raster_BitSet_Func)( int y,
@ -958,8 +1031,8 @@ FT_BEGIN_HEADER
/* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */ /* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */
/* rendering mode. If set, the output will */ /* rendering mode. If set, the output will */
/* be clipped to a box specified in the */ /* be clipped to a box specified in the */
/* "clip_box" field of the FT_Raster_Params */ /* `clip_box' field of the */
/* structure. */ /* @FT_Raster_Params structure. */
/* */ /* */
/* Note that by default, the glyph bitmap */ /* Note that by default, the glyph bitmap */
/* is clipped to the target pixmap, except */ /* is clipped to the target pixmap, except */
@ -990,14 +1063,14 @@ FT_BEGIN_HEADER
/* <Fields> */ /* <Fields> */
/* target :: The target bitmap. */ /* target :: The target bitmap. */
/* */ /* */
/* source :: A pointer to the source glyph image (e.g. an */ /* source :: A pointer to the source glyph image (e.g., an */
/* FT_Outline). */ /* @FT_Outline). */
/* */ /* */
/* flags :: The rendering flags. */ /* flags :: The rendering flags. */
/* */ /* */
/* gray_spans :: The gray span drawing callback. */ /* gray_spans :: The gray span drawing callback. */
/* */ /* */
/* black_spans :: The black span drawing callback. */ /* black_spans :: The black span drawing callback. UNIMPLEMENTED! */
/* */ /* */
/* bit_test :: The bit test callback. UNIMPLEMENTED! */ /* bit_test :: The bit test callback. UNIMPLEMENTED! */
/* */ /* */
@ -1012,11 +1085,11 @@ FT_BEGIN_HEADER
/* 26.6 fixed-point units). */ /* 26.6 fixed-point units). */
/* */ /* */
/* <Note> */ /* <Note> */
/* An anti-aliased glyph bitmap is drawn if the FT_RASTER_FLAG_AA bit */ /* An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA */
/* flag is set in the `flags' field, otherwise a monochrome bitmap */ /* bit flag is set in the `flags' field, otherwise a monochrome */
/* will be generated. */ /* bitmap is generated. */
/* */ /* */
/* If the FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */ /* If the @FT_RASTER_FLAG_DIRECT bit flag is set in `flags', the */
/* raster will call the `gray_spans' callback to draw gray pixel */ /* raster will call the `gray_spans' callback to draw gray pixel */
/* spans, in the case of an aa glyph bitmap, it will call */ /* spans, in the case of an aa glyph bitmap, it will call */
/* `black_spans', and `bit_test' and `bit_set' in the case of a */ /* `black_spans', and `bit_test' and `bit_set' in the case of a */
@ -1034,7 +1107,7 @@ FT_BEGIN_HEADER
const void* source; const void* source;
int flags; int flags;
FT_SpanFunc gray_spans; FT_SpanFunc gray_spans;
FT_SpanFunc black_spans; FT_SpanFunc black_spans; /* doesn't work! */
FT_Raster_BitTest_Func bit_test; /* doesn't work! */ FT_Raster_BitTest_Func bit_test; /* doesn't work! */
FT_Raster_BitSet_Func bit_set; /* doesn't work! */ FT_Raster_BitSet_Func bit_set; /* doesn't work! */
void* user; void* user;
@ -1058,14 +1131,14 @@ FT_BEGIN_HEADER
/* raster :: A handle to the new raster object. */ /* raster :: A handle to the new raster object. */
/* */ /* */
/* <Return> */ /* <Return> */
/* Error code. 0 means success. */ /* Error code. 0~means success. */
/* */ /* */
/* <Note> */ /* <Note> */
/* The `memory' parameter is a typeless pointer in order to avoid */ /* The `memory' parameter is a typeless pointer in order to avoid */
/* un-wanted dependencies on the rest of the FreeType code. In */ /* un-wanted dependencies on the rest of the FreeType code. In */
/* practice, it is a FT_Memory, i.e., a handle to the standard */ /* practice, it is an @FT_Memory object, i.e., a handle to the */
/* FreeType memory allocator. However, this field can be completely */ /* standard FreeType memory allocator. However, this field can be */
/* ignored by a given raster implementation. */ /* completely ignored by a given raster implementation. */
/* */ /* */
typedef int typedef int
(*FT_Raster_NewFunc)( void* memory, (*FT_Raster_NewFunc)( void* memory,
@ -1073,6 +1146,7 @@ FT_BEGIN_HEADER
#define FT_Raster_New_Func FT_Raster_NewFunc #define FT_Raster_New_Func FT_Raster_NewFunc
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
@ -1089,6 +1163,7 @@ FT_BEGIN_HEADER
#define FT_Raster_Done_Func FT_Raster_DoneFunc #define FT_Raster_Done_Func FT_Raster_DoneFunc
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
@ -1123,6 +1198,7 @@ FT_BEGIN_HEADER
#define FT_Raster_Reset_Func FT_Raster_ResetFunc #define FT_Raster_Reset_Func FT_Raster_ResetFunc
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
@ -1148,46 +1224,48 @@ FT_BEGIN_HEADER
#define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc #define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <FuncType> */ /* <FuncType> */
/* FT_Raster_RenderFunc */ /* FT_Raster_RenderFunc */
/* */ /* */
/* <Description> */ /* <Description> */
/* Invokes a given raster to scan-convert a given glyph image into a */ /* Invoke a given raster to scan-convert a given glyph image into a */
/* target bitmap. */ /* target bitmap. */
/* */ /* */
/* <Input> */ /* <Input> */
/* raster :: A handle to the raster object. */ /* raster :: A handle to the raster object. */
/* */ /* */
/* params :: A pointer to a FT_Raster_Params structure used to store */ /* params :: A pointer to an @FT_Raster_Params structure used to */
/* the rendering parameters. */ /* store the rendering parameters. */
/* */ /* */
/* <Return> */ /* <Return> */
/* Error code. 0 means success. */ /* Error code. 0~means success. */
/* */ /* */
/* <Note> */ /* <Note> */
/* The exact format of the source image depends on the raster's glyph */ /* The exact format of the source image depends on the raster's glyph */
/* format defined in its FT_Raster_Funcs structure. It can be an */ /* format defined in its @FT_Raster_Funcs structure. It can be an */
/* FT_Outline or anything else in order to support a large array of */ /* @FT_Outline or anything else in order to support a large array of */
/* glyph formats. */ /* glyph formats. */
/* */ /* */
/* Note also that the render function can fail and return a */ /* Note also that the render function can fail and return a */
/* FT_Err_Unimplemented_Feature error code if the raster used does */ /* `FT_Err_Unimplemented_Feature' error code if the raster used does */
/* not support direct composition. */ /* not support direct composition. */
/* */ /* */
/* XXX: For now, the standard raster doesn't support direct */ /* XXX: For now, the standard raster doesn't support direct */
/* composition but this should change for the final release (see */ /* composition but this should change for the final release (see */
/* the files demos/src/ftgrays.c and demos/src/ftgrays2.c for */ /* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */
/* examples of distinct implementations which support direct */ /* for examples of distinct implementations which support direct */
/* composition). */ /* composition). */
/* */ /* */
typedef int typedef int
(*FT_Raster_RenderFunc)( FT_Raster raster, (*FT_Raster_RenderFunc)( FT_Raster raster,
FT_Raster_Params* params ); const FT_Raster_Params* params );
#define FT_Raster_Render_Func FT_Raster_RenderFunc #define FT_Raster_Render_Func FT_Raster_RenderFunc
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* <Struct> */ /* <Struct> */
@ -1228,3 +1306,8 @@ FT_END_HEADER
/* END */ /* END */
/* Local Variables: */
/* coding: utf-8 */
/* End: */

View File

@ -5,7 +5,7 @@
/* Support for the FT_Outline type used to store glyph shapes of */ /* Support for the FT_Outline type used to store glyph shapes of */
/* most scalable font formats (specification). */ /* most scalable font formats (specification). */
/* */ /* */
/* Copyright 1996-2001, 2002, 2003, 2005 by */ /* Copyright 1996-2001, 2002, 2003, 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, */
@ -84,15 +84,14 @@ FT_BEGIN_HEADER
/* FT_Outline_Decompose */ /* FT_Outline_Decompose */
/* */ /* */
/* <Description> */ /* <Description> */
/* Walks over an outline's structure to decompose it into individual */ /* Walk over an outline's structure to decompose it into individual */
/* segments and Bezier arcs. This function is also able to emit */ /* segments and Bézier arcs. This function also emits `move to' */
/* `move to' and `close to' operations to indicate the start and end */ /* operations to indicate the start of new contours in the outline. */
/* of new contours in the outline. */
/* */ /* */
/* <Input> */ /* <Input> */
/* outline :: A pointer to the source target. */ /* outline :: A pointer to the source target. */
/* */ /* */
/* func_interface :: A table of `emitters', i.e,. function pointers */ /* func_interface :: A table of `emitters', i.e., function pointers */
/* called during decomposition to indicate path */ /* called during decomposition to indicate path */
/* operations. */ /* operations. */
/* */ /* */
@ -103,7 +102,7 @@ FT_BEGIN_HEADER
/* decomposition. */ /* decomposition. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means sucess. */ /* FreeType error code. 0~means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Outline_Decompose( FT_Outline* outline, FT_Outline_Decompose( FT_Outline* outline,
@ -117,24 +116,23 @@ FT_BEGIN_HEADER
/* FT_Outline_New */ /* FT_Outline_New */
/* */ /* */
/* <Description> */ /* <Description> */
/* Creates a new outline of a given size. */ /* Create a new outline of a given size. */
/* */ /* */
/* <Input> */ /* <Input> */
/* library :: A handle to the library object from where the */ /* library :: A handle to the library object from where the */
/* outline is allocated. Note however that the new */ /* outline is allocated. Note however that the new */
/* outline will NOT necessarily be FREED, when */ /* outline will *not* necessarily be *freed*, when */
/* destroying the library, by FT_Done_FreeType(). */ /* destroying the library, by @FT_Done_FreeType. */
/* */ /* */
/* numPoints :: The maximal number of points within the outline. */ /* numPoints :: The maximal number of points within the outline. */
/* */ /* */
/* numContours :: The maximal number of contours within the outline. */ /* numContours :: The maximal number of contours within the outline. */
/* */ /* */
/* <Output> */ /* <Output> */
/* anoutline :: A handle to the new outline. NULL in case of */ /* anoutline :: A handle to the new outline. */
/* error. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0~means success. */
/* */ /* */
/* <Note> */ /* <Note> */
/* The reason why this function takes a `library' parameter is simply */ /* The reason why this function takes a `library' parameter is simply */
@ -160,7 +158,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Done */ /* FT_Outline_Done */
/* */ /* */
/* <Description> */ /* <Description> */
/* Destroys an outline created with FT_Outline_New(). */ /* Destroy an outline created with @FT_Outline_New. */
/* */ /* */
/* <Input> */ /* <Input> */
/* library :: A handle of the library object used to allocate the */ /* library :: A handle of the library object used to allocate the */
@ -169,14 +167,14 @@ FT_BEGIN_HEADER
/* outline :: A pointer to the outline object to be discarded. */ /* outline :: A pointer to the outline object to be discarded. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0~means success. */
/* */ /* */
/* <Note> */ /* <Note> */
/* If the outline's `owner' field is not set, only the outline */ /* If the outline's `owner' field is not set, only the outline */
/* descriptor will be released. */ /* descriptor will be released. */
/* */ /* */
/* The reason why this function takes an `library' parameter is */ /* The reason why this function takes an `library' parameter is */
/* simply to use FT_Free(). */ /* simply to use ft_mem_free(). */
/* */ /* */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Outline_Done( FT_Library library, FT_Outline_Done( FT_Library library,
@ -200,7 +198,7 @@ FT_BEGIN_HEADER
/* outline :: A handle to a source outline. */ /* outline :: A handle to a source outline. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0~means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Outline_Check( FT_Outline* outline ); FT_Outline_Check( FT_Outline* outline );
@ -212,11 +210,11 @@ FT_BEGIN_HEADER
/* FT_Outline_Get_CBox */ /* FT_Outline_Get_CBox */
/* */ /* */
/* <Description> */ /* <Description> */
/* Returns an outline's `control box'. The control box encloses all */ /* Return an outline's `control box'. The control box encloses all */
/* the outline's points, including Bezier control points. Though it */ /* the outline's points, including Bézier control points. Though it */
/* coincides with the exact bounding box for most glyphs, it can be */ /* coincides with the exact bounding box for most glyphs, it can be */
/* slightly larger in some situations (like when rotating an outline */ /* slightly larger in some situations (like when rotating an outline */
/* which contains Bezier outside arcs). */ /* which contains Bézier outside arcs). */
/* */ /* */
/* Computing the control box is very fast, while getting the bounding */ /* Computing the control box is very fast, while getting the bounding */
/* box can take much more time as it needs to walk over all segments */ /* box can take much more time as it needs to walk over all segments */
@ -240,7 +238,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Translate */ /* FT_Outline_Translate */
/* */ /* */
/* <Description> */ /* <Description> */
/* Applies a simple translation to the points of an outline. */ /* Apply a simple translation to the points of an outline. */
/* */ /* */
/* <InOut> */ /* <InOut> */
/* outline :: A pointer to the target outline descriptor. */ /* outline :: A pointer to the target outline descriptor. */
@ -262,7 +260,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Copy */ /* FT_Outline_Copy */
/* */ /* */
/* <Description> */ /* <Description> */
/* Copies an outline into another one. Both objects must have the */ /* Copy an outline into another one. Both objects must have the */
/* same sizes (number of points & number of contours) when this */ /* same sizes (number of points & number of contours) when this */
/* function is called. */ /* function is called. */
/* */ /* */
@ -273,7 +271,7 @@ FT_BEGIN_HEADER
/* target :: A handle to the target outline. */ /* target :: A handle to the target outline. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0~means success. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Outline_Copy( const FT_Outline* source, FT_Outline_Copy( const FT_Outline* source,
@ -286,7 +284,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Transform */ /* FT_Outline_Transform */
/* */ /* */
/* <Description> */ /* <Description> */
/* Applies a simple 2x2 matrix to all of an outline's points. Useful */ /* Apply a simple 2x2 matrix to all of an outline's points. Useful */
/* for applying rotations, slanting, flipping, etc. */ /* for applying rotations, slanting, flipping, etc. */
/* */ /* */
/* <InOut> */ /* <InOut> */
@ -296,7 +294,7 @@ FT_BEGIN_HEADER
/* matrix :: A pointer to the transformation matrix. */ /* matrix :: A pointer to the transformation matrix. */
/* */ /* */
/* <Note> */ /* <Note> */
/* You can use FT_Outline_Translate() if you need to translate the */ /* You can use @FT_Outline_Translate if you need to translate the */
/* outline's points. */ /* outline's points. */
/* */ /* */
FT_EXPORT( void ) FT_EXPORT( void )
@ -310,10 +308,13 @@ FT_BEGIN_HEADER
/* FT_Outline_Embolden */ /* FT_Outline_Embolden */
/* */ /* */
/* <Description> */ /* <Description> */
/* Emboldens an outline. The new outline will be at most 4 times */ /* Embolden an outline. The new outline will be at most 4~times */
/* `strength' pixels wider and higher. You may think of the left and */ /* `strength' pixels wider and higher. You may think of the left and */
/* bottom borders as unchanged. */ /* bottom borders as unchanged. */
/* */ /* */
/* Negative `strength' values to reduce the outline thickness are */
/* possible also. */
/* */
/* <InOut> */ /* <InOut> */
/* outline :: A handle to the target outline. */ /* outline :: A handle to the target outline. */
/* */ /* */
@ -322,9 +323,26 @@ FT_BEGIN_HEADER
/* 26.6 pixel format. */ /* 26.6 pixel format. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0~means success. */
/* */ /* */
FT_EXPORT_DEF( FT_Error ) /* <Note> */
/* The used algorithm to increase or decrease the thickness of the */
/* glyph doesn't change the number of points; this means that certain */
/* situations like acute angles or intersections are sometimes */
/* handled incorrectly. */
/* */
/* If you need `better' metrics values you should call */
/* @FT_Outline_Get_CBox ot @FT_Outline_Get_BBox. */
/* */
/* Example call: */
/* */
/* { */
/* FT_Load_Glyph( face, index, FT_LOAD_DEFAULT ); */
/* if ( face->slot->format == FT_GLYPH_FORMAT_OUTLINE ) */
/* FT_Outline_Embolden( &face->slot->outline, strength ); */
/* } */
/* */
FT_EXPORT( FT_Error )
FT_Outline_Embolden( FT_Outline* outline, FT_Outline_Embolden( FT_Outline* outline,
FT_Pos strength ); FT_Pos strength );
@ -335,14 +353,14 @@ FT_BEGIN_HEADER
/* FT_Outline_Reverse */ /* FT_Outline_Reverse */
/* */ /* */
/* <Description> */ /* <Description> */
/* Reverses the drawing direction of an outline. This is used to */ /* Reverse the drawing direction of an outline. This is used to */
/* ensure consistent fill conventions for mirrored glyphs. */ /* ensure consistent fill conventions for mirrored glyphs. */
/* */ /* */
/* <InOut> */ /* <InOut> */
/* outline :: A pointer to the target outline descriptor. */ /* outline :: A pointer to the target outline descriptor. */
/* */ /* */
/* <Note> */ /* <Note> */
/* This functions toggles the bit flag `FT_OUTLINE_REVERSE_FILL' in */ /* This function toggles the bit flag @FT_OUTLINE_REVERSE_FILL in */
/* the outline's `flags' field. */ /* the outline's `flags' field. */
/* */ /* */
/* It shouldn't be used by a normal client application, unless it */ /* It shouldn't be used by a normal client application, unless it */
@ -358,7 +376,7 @@ FT_BEGIN_HEADER
/* FT_Outline_Get_Bitmap */ /* FT_Outline_Get_Bitmap */
/* */ /* */
/* <Description> */ /* <Description> */
/* Renders an outline within a bitmap. The outline's image is simply */ /* Render an outline within a bitmap. The outline's image is simply */
/* OR-ed to the target bitmap. */ /* OR-ed to the target bitmap. */
/* */ /* */
/* <Input> */ /* <Input> */
@ -366,17 +384,22 @@ FT_BEGIN_HEADER
/* */ /* */
/* outline :: A pointer to the source outline descriptor. */ /* outline :: A pointer to the source outline descriptor. */
/* */ /* */
/* <Output> */ /* <InOut> */
/* abitmap :: A pointer to the target bitmap descriptor. */ /* abitmap :: A pointer to the target bitmap descriptor. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0~means success. */
/* */ /* */
/* <Note> */ /* <Note> */
/* This function does NOT CREATE the bitmap, it only renders an */ /* This function does NOT CREATE the bitmap, it only renders an */
/* outline image within the one you pass to it! */ /* outline image within the one you pass to it! Consequently, the */
/* various fields in `abitmap' should be set accordingly. */
/* */ /* */
/* It will use the raster correponding to the default glyph format. */ /* It will use the raster corresponding to the default glyph format. */
/* */
/* The value of the `num_grays' field in `abitmap' is ignored. If */
/* you select the gray-level rasterizer, and you want less than 256 */
/* gray levels, you have to use @FT_Outline_Render directly. */
/* */ /* */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Outline_Get_Bitmap( FT_Library library, FT_Outline_Get_Bitmap( FT_Library library,
@ -390,8 +413,8 @@ FT_BEGIN_HEADER
/* FT_Outline_Render */ /* FT_Outline_Render */
/* */ /* */
/* <Description> */ /* <Description> */
/* Renders an outline within a bitmap using the current scan-convert. */ /* Render an outline within a bitmap using the current scan-convert. */
/* This functions uses an FT_Raster_Params structure as an argument, */ /* This function uses an @FT_Raster_Params structure as an argument, */
/* allowing advanced features like direct composition, translucency, */ /* allowing advanced features like direct composition, translucency, */
/* etc. */ /* etc. */
/* */ /* */
@ -401,20 +424,25 @@ FT_BEGIN_HEADER
/* outline :: A pointer to the source outline descriptor. */ /* outline :: A pointer to the source outline descriptor. */
/* */ /* */
/* <InOut> */ /* <InOut> */
/* params :: A pointer to a FT_Raster_Params structure used to */ /* params :: A pointer to an @FT_Raster_Params structure used to */
/* describe the rendering operation. */ /* describe the rendering operation. */
/* */ /* */
/* <Return> */ /* <Return> */
/* FreeType error code. 0 means success. */ /* FreeType error code. 0~means success. */
/* */ /* */
/* <Note> */ /* <Note> */
/* You should know what you are doing and how FT_Raster_Params works */ /* You should know what you are doing and how @FT_Raster_Params works */
/* to use this function. */ /* to use this function. */
/* */ /* */
/* The field `params.source' will be set to `outline' before the scan */ /* The field `params.source' will be set to `outline' before the scan */
/* converter is called, which means that the value you give to it is */ /* converter is called, which means that the value you give to it is */
/* actually ignored. */ /* actually ignored. */
/* */ /* */
/* The gray-level rasterizer always uses 256 gray levels. If you */
/* want less gray levels, you have to provide your own span callback. */
/* See the @FT_RASTER_FLAG_DIRECT value of the `flags' field in the */
/* @FT_Raster_Params structure for more details. */
/* */
FT_EXPORT( FT_Error ) FT_EXPORT( FT_Error )
FT_Outline_Render( FT_Library library, FT_Outline_Render( FT_Library library,
FT_Outline* outline, FT_Outline* outline,
@ -429,7 +457,7 @@ FT_BEGIN_HEADER
* @description: * @description:
* A list of values used to describe an outline's contour orientation. * A list of values used to describe an outline's contour orientation.
* *
* The TrueType and Postscript specifications use different conventions * The TrueType and PostScript specifications use different conventions
* to determine whether outline contours should be filled or unfilled. * to determine whether outline contours should be filled or unfilled.
* *
* @values: * @values:
@ -438,7 +466,7 @@ FT_BEGIN_HEADER
* be filled, and counter-clockwise ones must be unfilled. * be filled, and counter-clockwise ones must be unfilled.
* *
* FT_ORIENTATION_POSTSCRIPT :: * FT_ORIENTATION_POSTSCRIPT ::
* According to the Postscript specification, counter-clockwise contours * According to the PostScript specification, counter-clockwise contours
* must be filled, and clockwise ones must be unfilled. * must be filled, and clockwise ones must be unfilled.
* *
* FT_ORIENTATION_FILL_RIGHT :: * FT_ORIENTATION_FILL_RIGHT ::
@ -448,15 +476,21 @@ FT_BEGIN_HEADER
* *
* FT_ORIENTATION_FILL_LEFT :: * FT_ORIENTATION_FILL_LEFT ::
* This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to * This is identical to @FT_ORIENTATION_POSTSCRIPT, but is used to
* remember that in Postscript, everything that is to the left of * remember that in PostScript, everything that is to the left of
* the drawing direction of a contour must be filled. * the drawing direction of a contour must be filled.
*
* FT_ORIENTATION_NONE ::
* The orientation cannot be determined. That is, different parts of
* the glyph have different orientation.
*
*/ */
typedef enum typedef enum FT_Orientation_
{ {
FT_ORIENTATION_TRUETYPE = 0, FT_ORIENTATION_TRUETYPE = 0,
FT_ORIENTATION_POSTSCRIPT = 1, FT_ORIENTATION_POSTSCRIPT = 1,
FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE, FT_ORIENTATION_FILL_RIGHT = FT_ORIENTATION_TRUETYPE,
FT_ORIENTATION_FILL_LEFT = FT_ORIENTATION_POSTSCRIPT FT_ORIENTATION_FILL_LEFT = FT_ORIENTATION_POSTSCRIPT,
FT_ORIENTATION_NONE
} FT_Orientation; } FT_Orientation;
@ -496,3 +530,8 @@ FT_END_HEADER
/* END */ /* END */
/* Local Variables: */
/* coding: utf-8 */
/* End: */

View File

@ -4,7 +4,7 @@
/* */ /* */
/* 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, */
@ -41,7 +41,7 @@ FT_BEGIN_HEADER
/* 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. */
/* */ /* */
/*************************************************************************/ /*************************************************************************/
@ -53,80 +53,92 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************
/* */ *
/* @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: */ * @functype:
/* FT_Alloc_Func */ * FT_Alloc_Func
/* */ *
/* @description: */ * @description:
/* A function used to allocate `size' bytes from `memory'. */ * A function used to allocate `size' bytes from `memory'.
/* */ *
/* @input: */ * @input:
/* memory :: A handle to the source memory manager. */ * memory ::
/* */ * A handle to the source memory manager.
/* size :: The size in bytes to allocate. */ *
/* */ * size ::
/* @return: */ * The size in bytes to allocate.
/* Address of new memory block. 0 in case of failure. */ *
/* */ * @return:
* Address of new memory block. 0~in case of failure.
*
*/
typedef void* typedef void*
(*FT_Alloc_Func)( FT_Memory memory, (*FT_Alloc_Func)( FT_Memory memory,
long size ); long size );
/*************************************************************************/ /*************************************************************************
/* */ *
/* @functype: */ * @functype:
/* FT_Free_Func */ * FT_Free_Func
/* */ *
/* @description: */ * @description:
/* A function used to release a given block of memory. */ * A function used to release a given block of memory.
/* */ *
/* @input: */ * @input:
/* memory :: A handle to the source memory manager. */ * memory ::
/* */ * A handle to the source memory manager.
/* block :: The address of the target memory block. */ *
/* */ * block ::
* The address of the target memory block.
*
*/
typedef void typedef void
(*FT_Free_Func)( FT_Memory memory, (*FT_Free_Func)( FT_Memory memory,
void* block ); void* block );
/*************************************************************************/ /*************************************************************************
/* */ *
/* @functype: */ * @functype:
/* FT_Realloc_Func */ * FT_Realloc_Func
/* */ *
/* @description: */ * @description:
/* a function used to re-allocate a given block of memory. */ * A function used to re-allocate a given block of memory.
/* */ *
/* @input: */ * @input:
/* memory :: A handle to the source memory manager. */ * memory ::
/* */ * A handle to the source memory manager.
/* cur_size :: The block's current size in bytes. */ *
/* */ * cur_size ::
/* new_size :: The block's requested new size. */ * The block's current size in bytes.
/* */ *
/* block :: The block's current address. */ * new_size ::
/* */ * The block's requested new size.
/* @return: */ *
/* New block address. 0 in case of memory shortage. */ * block ::
/* */ * The block's current address.
/* @note: */ *
/* In case of error, the old block must still be available. */ * @return:
/* */ * New block address. 0~in case of memory shortage.
*
* @note:
* In case of error, the old block must still be available.
*
*/
typedef void* typedef void*
(*FT_Realloc_Func)( FT_Memory memory, (*FT_Realloc_Func)( FT_Memory memory,
long cur_size, long cur_size,
@ -134,23 +146,28 @@ FT_BEGIN_HEADER
void* block ); void* block );
/*************************************************************************/ /*************************************************************************
/* */ *
/* @struct: */ * @struct:
/* FT_MemoryRec */ * FT_MemoryRec
/* */ *
/* @description: */ * @description:
/* A structure used to describe a given memory manager to FreeType 2. */ * A structure used to describe a given memory manager to FreeType~2.
/* */ *
/* @fields: */ * @fields:
/* user :: A generic typeless pointer for user data. */ * user ::
/* */ * A generic typeless pointer for user data.
/* alloc :: A pointer type to an allocation function. */ *
/* */ * alloc ::
/* free :: A pointer type to an memory freeing function. */ * A pointer type to an allocation function.
/* */ *
/* realloc :: A pointer type to a reallocation function. */ * free ::
/* */ * A pointer type to an memory freeing function.
*
* realloc ::
* A pointer type to a reallocation function.
*
*/
struct FT_MemoryRec_ struct FT_MemoryRec_
{ {
void* user; void* user;
@ -167,26 +184,28 @@ FT_BEGIN_HEADER
/*************************************************************************/ /*************************************************************************/
/*************************************************************************/ /*************************************************************************
/* */ *
/* @type: */ * @type:
/* FT_Stream */ * FT_Stream
/* */ *
/* @description: */ * @description:
/* A handle to an input stream. */ * A handle to an input stream.
/* */ *
*/
typedef struct FT_StreamRec_* FT_Stream; typedef struct FT_StreamRec_* FT_Stream;
/*************************************************************************/ /*************************************************************************
/* */ *
/* @struct: */ * @struct:
/* FT_StreamDesc */ * FT_StreamDesc
/* */ *
/* @description: */ * @description:
/* A union type used to store either a long or a pointer. This is */ * A union type used to store either a long or a pointer. This is used
/* used to store a file descriptor or a FILE* in an input stream. */ * to store a file descriptor or a `FILE*' in an input stream.
/* */ *
*/
typedef union FT_StreamDesc_ typedef union FT_StreamDesc_
{ {
long value; long value;
@ -195,30 +214,36 @@ FT_BEGIN_HEADER
} FT_StreamDesc; } FT_StreamDesc;
/*************************************************************************/ /*************************************************************************
/* */ *
/* @functype: */ * @functype:
/* FT_Stream_IoFunc */ * FT_Stream_IoFunc
/* */ *
/* @description: */ * @description:
/* A function used to seek and read data from a given input stream. */ * A function used to seek and read data from a given input stream.
/* */ *
/* @input: */ * @input:
/* stream :: A handle to the source stream. */ * stream ::
/* */ * A handle to the source stream.
/* offset :: The offset of read in stream (always from start). */ *
/* */ * offset ::
/* buffer :: The address of the read buffer. */ * The offset of read in stream (always from start).
/* */ *
/* count :: The number of bytes to read from the stream. */ * buffer ::
/* */ * The address of the read buffer.
/* @return: */ *
/* The number of bytes effectively read by the stream. */ * count ::
/* */ * The number of bytes to read from the stream.
/* @note: */ *
/* This function might be called to perform a seek or skip operation */ * @return:
/* with a `count' of 0. */ * The number of bytes effectively read by the 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.
*
*/
typedef unsigned long typedef unsigned long
(*FT_Stream_IoFunc)( FT_Stream stream, (*FT_Stream_IoFunc)( FT_Stream stream,
unsigned long offset, unsigned long offset,
@ -226,60 +251,73 @@ FT_BEGIN_HEADER
unsigned long count ); unsigned long count );
/*************************************************************************/ /*************************************************************************
/* */ *
/* @functype: */ * @functype:
/* FT_Stream_CloseFunc */ * FT_Stream_CloseFunc
/* */ *
/* @description: */ * @description:
/* A function used to close a given input stream. */ * A function used to close a given input stream.
/* */ *
/* @input: */ * @input:
/* stream :: A handle to the target stream. */ * stream ::
/* */ * A handle to the target stream.
*
*/
typedef void typedef void
(*FT_Stream_CloseFunc)( FT_Stream stream ); (*FT_Stream_CloseFunc)( FT_Stream stream );
/*************************************************************************/ /*************************************************************************
/* */ *
/* @struct: */ * @struct:
/* FT_StreamRec */ * FT_StreamRec
/* */ *
/* @description: */ * @description:
/* A structure used to describe an input stream. */ * A structure used to describe an input stream.
/* */ *
/* @input: */ * @input:
/* base :: For memory-based streams, this is the address of the */ * base ::
/* first stream byte in memory. This field should */ * For memory-based streams, this is the address of the first stream
/* always be set to NULL for disk-based streams. */ * byte in memory. This field should always be set to NULL for
/* */ * disk-based streams.
/* size :: The stream size in bytes. */ *
/* */ * size ::
/* pos :: The current position within the stream. */ * The stream size in bytes.
/* */ *
/* descriptor :: This field is a union that can hold an integer or a */ * pos ::
/* pointer. It is used by stream implementations to */ * The current position within the stream.
/* store file descriptors or FILE* pointers. */ *
/* */ * descriptor ::
/* pathname :: This field is completely ignored by FreeType. */ * This field is a union that can hold an integer or a pointer. It is
/* However, it is often useful during debugging to use */ * used by stream implementations to store file descriptors or `FILE*'
/* it to store the stream's filename (where available). */ * pointers.
/* */ *
/* read :: The stream's input function. */ * pathname ::
/* */ * This field is completely ignored by FreeType. However, it is often
/* close :: The stream;s close function. */ * useful during debugging to use it to store the stream's filename
/* */ * (where available).
/* memory :: The memory manager to use to preload frames. This is */ *
/* set internally by FreeType and shouldn't be touched */ * read ::
/* by stream implementations. */ * The stream's input function.
/* */ *
/* cursor :: This field is set and used internally by FreeType */ * close ::
/* when parsing frames. */ * The stream's close function.
/* */ *
/* limit :: This field is set and used internally by FreeType */ * memory ::
/* when parsing frames. */ * The memory manager to use to preload frames. This is set
/* */ * 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_ typedef struct FT_StreamRec_
{ {
unsigned char* base; unsigned char* base;

View File

@ -4,7 +4,7 @@
/* */ /* */
/* FreeType simple types definitions (specification only). */ /* FreeType simple types definitions (specification only). */
/* */ /* */
/* Copyright 1996-2001, 2002, 2004 by */ /* Copyright 1996-2001, 2002, 2004, 2006, 2007, 2008 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, */
@ -43,7 +43,7 @@ FT_BEGIN_HEADER
/* The basic data types defined by the library. */ /* The basic data types defined by the library. */
/* */ /* */
/* <Description> */ /* <Description> */
/* This section contains the basic data types defined by FreeType 2, */ /* This section contains the basic data types defined by FreeType~2, */
/* ranging from simple scalar types to bitmap descriptors. More */ /* ranging from simple scalar types to bitmap descriptors. More */
/* font-specific structures are defined in a different section. */ /* font-specific structures are defined in a different section. */
/* */ /* */
@ -53,6 +53,10 @@ FT_BEGIN_HEADER
/* FT_Char */ /* FT_Char */
/* FT_Int */ /* FT_Int */
/* FT_UInt */ /* FT_UInt */
/* FT_Int16 */
/* FT_UInt16 */
/* FT_Int32 */
/* FT_UInt32 */
/* FT_Short */ /* FT_Short */
/* FT_UShort */ /* FT_UShort */
/* FT_Long */ /* FT_Long */
@ -94,7 +98,8 @@ FT_BEGIN_HEADER
/* FT_Bool */ /* FT_Bool */
/* */ /* */
/* <Description> */ /* <Description> */
/* A typedef of unsigned char, used for simple booleans. */ /* A typedef of unsigned char, used for simple booleans. As usual, */
/* values 1 and~0 represent true and false, respectively. */
/* */ /* */
typedef unsigned char FT_Bool; typedef unsigned char FT_Bool;
@ -162,7 +167,7 @@ FT_BEGIN_HEADER
/* FT_Tag */ /* FT_Tag */
/* */ /* */
/* <Description> */ /* <Description> */
/* A typedef for 32bit tags (as used in the SFNT format). */ /* A typedef for 32-bit tags (as used in the SFNT format). */
/* */ /* */
typedef FT_UInt32 FT_Tag; typedef FT_UInt32 FT_Tag;
@ -273,8 +278,8 @@ FT_BEGIN_HEADER
/* FT_Fixed */ /* FT_Fixed */
/* */ /* */
/* <Description> */ /* <Description> */
/* This type is used to store 16.16 fixed float values, like scales */ /* This type is used to store 16.16 fixed float values, like scaling */
/* or matrix coefficients. */ /* values or matrix coefficients. */
/* */ /* */
typedef signed long FT_Fixed; typedef signed long FT_Fixed;
@ -285,7 +290,7 @@ FT_BEGIN_HEADER
/* FT_Error */ /* FT_Error */
/* */ /* */
/* <Description> */ /* <Description> */
/* The FreeType error code type. A value of 0 is always interpreted */ /* The FreeType error code type. A value of~0 is always interpreted */
/* as a successful operation. */ /* as a successful operation. */
/* */ /* */
typedef int FT_Error; typedef int FT_Error;
@ -308,7 +313,7 @@ FT_BEGIN_HEADER
/* FT_Offset */ /* FT_Offset */
/* */ /* */
/* <Description> */ /* <Description> */
/* This is equivalent to the ANSI C `size_t' type, i.e. the largest */ /* This is equivalent to the ANSI~C `size_t' type, i.e., the largest */
/* _unsigned_ integer type used to express a file size or position, */ /* _unsigned_ integer type used to express a file size or position, */
/* or a memory block size. */ /* or a memory block size. */
/* */ /* */
@ -321,7 +326,7 @@ FT_BEGIN_HEADER
/* FT_PtrDist */ /* FT_PtrDist */
/* */ /* */
/* <Description> */ /* <Description> */
/* This is equivalent to the ANSI C `ptrdiff_t' type, i.e. the */ /* This is equivalent to the ANSI~C `ptrdiff_t' type, i.e., the */
/* largest _signed_ integer type used to express the distance */ /* largest _signed_ integer type used to express the distance */
/* between two pointers. */ /* between two pointers. */
/* */ /* */
@ -408,8 +413,8 @@ FT_BEGIN_HEADER
/* FT_Generic_Finalizer */ /* FT_Generic_Finalizer */
/* */ /* */
/* <Description> */ /* <Description> */
/* Describes a function used to destroy the `client' data of any */ /* Describe a function used to destroy the `client' data of any */
/* FreeType object. See the description of the FT_Generic type for */ /* FreeType object. See the description of the @FT_Generic type for */
/* details of usage. */ /* details of usage. */
/* */ /* */
/* <Input> */ /* <Input> */
@ -461,14 +466,15 @@ FT_BEGIN_HEADER
/* FT_MAKE_TAG */ /* FT_MAKE_TAG */
/* */ /* */
/* <Description> */ /* <Description> */
/* This macro converts four letter tags which are used to label */ /* This macro converts four-letter tags which are used to label */
/* TrueType tables into an unsigned long to be used within FreeType. */ /* TrueType tables into an unsigned long to be used within FreeType. */
/* */ /* */
/* <Note> */ /* <Note> */
/* The produced values *must* be 32bit integers. Don't redefine this */ /* The produced values *must* be 32-bit integers. Don't redefine */
/* macro. */ /* this macro. */
/* */ /* */
#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \ #define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
(FT_Tag) \
( ( (FT_ULong)_x1 << 24 ) | \ ( ( (FT_ULong)_x1 << 24 ) | \
( (FT_ULong)_x2 << 16 ) | \ ( (FT_ULong)_x2 << 16 ) | \
( (FT_ULong)_x3 << 8 ) | \ ( (FT_ULong)_x3 << 8 ) | \
@ -498,8 +504,8 @@ FT_BEGIN_HEADER
/* FT_ListNode */ /* FT_ListNode */
/* */ /* */
/* <Description> */ /* <Description> */
/* Many elements and objects in FreeType are listed through a */ /* Many elements and objects in FreeType are listed through an */
/* FT_List record (see FT_ListRec). As its name suggests, a */ /* @FT_List record (see @FT_ListRec). As its name suggests, an */
/* FT_ListNode is a handle to a single list element. */ /* FT_ListNode is a handle to a single list element. */
/* */ /* */
typedef struct FT_ListNodeRec_* FT_ListNode; typedef struct FT_ListNodeRec_* FT_ListNode;
@ -511,7 +517,7 @@ FT_BEGIN_HEADER
/* FT_List */ /* FT_List */
/* */ /* */
/* <Description> */ /* <Description> */
/* A handle to a list record (see FT_ListRec). */ /* A handle to a list record (see @FT_ListRec). */
/* */ /* */
typedef struct FT_ListRec_* FT_List; typedef struct FT_ListRec_* FT_List;

View File

@ -25,6 +25,7 @@
#define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h> #define FT_INTERNAL_OBJECTS_H <freetype/internal/ftobjs.h>
#define FT_INTERNAL_PIC_H <freetype/internal/ftpic.h>
#define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h> #define FT_INTERNAL_STREAM_H <freetype/internal/ftstream.h>
#define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h> #define FT_INTERNAL_MEMORY_H <freetype/internal/ftmemory.h>
#define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h> #define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h>

View File

@ -2,9 +2,10 @@
/* */ /* */
/* ft2build.h */ /* ft2build.h */
/* */ /* */
/* Build macros of the FreeType 2 library. */ /* FreeType 2 build and setup macros. */
/* (Generic version) */
/* */ /* */
/* Copyright 1996-2001, 2003 by */ /* Copyright 1996-2001, 2006 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, */
@ -18,44 +19,21 @@
/*************************************************************************/ /*************************************************************************/
/* */ /* */
/* This is a Unix-specific version of <ft2build.h> that should be used */ /* This file corresponds to the default `ft2build.h' file for */
/* exclusively *after* installation of the library. */ /* FreeType 2. It uses the `freetype' include root. */
/* */ /* */
/* It assumes that "/usr/local/include/freetype2" (or whatever is */ /* Note that specific platforms might use a different configuration. */
/* returned by the "freetype-config --cflags" or "pkg-config --cflags" */ /* See builds/unix/ft2unix.h for an example. */
/* command) is in your compilation include path. */
/* */
/* 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: */
/* */
/* - The contents of "freetype-2.x/include/freetype" will be installed */
/* to "/usr/local/include/freetype2" instead of */
/* "/usr/local/include/freetype2/freetype". */
/* */
/* - This file will #include <freetype2/config/ftheader.h>, instead */
/* of <freetype/config/ftheader.h>. */
/* */
/* - The contents of "ftheader.h" will be processed with `sed' to */
/* 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__ #ifndef __FT2_BUILD_GENERIC_H__
#define __FT2_BUILD_UNIX_H__ #define __FT2_BUILD_GENERIC_H__
/* "<prefix>/include/freetype2" must be in your current inclusion path */
#include <freetype/config/ftheader.h> #include <freetype/config/ftheader.h>
#endif /* __FT2_BUILD_UNIX_H__ */ #endif /* __FT2_BUILD_GENERIC_H__ */
/* END */ /* END */

Binary file not shown.

Binary file not shown.