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:
parent
bfcc54db3d
commit
5e73228b5e
@ -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. */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* building the library. */
|
||||
/* */
|
||||
/* This ANSI version should stay in `include/freetype/config'. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FTCONFIG_H__
|
||||
#define __FTCONFIG_H__
|
||||
|
||||
@ -58,17 +58,42 @@ FT_BEGIN_HEADER
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#define HAVE_UNISTD_H 1
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
#define SIZEOF_INT 4
|
||||
#define SIZEOF_LONG 4
|
||||
|
||||
|
||||
#define FT_SIZEOF_INT SIZEOF_INT
|
||||
#define FT_SIZEOF_LONG SIZEOF_LONG
|
||||
/* There are systems (like the Texas Instruments 'C54x) where a `char' */
|
||||
/* 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 */
|
||||
/* is probably unexpected. */
|
||||
/* */
|
||||
/* `CHAR_BIT' (defined in limits.h) gives the number of bits in a */
|
||||
/* `char' type. */
|
||||
|
||||
#ifndef FT_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 */
|
||||
#define FT_ALIGNMENT 8
|
||||
@ -101,25 +126,92 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
#if ( defined( __APPLE__ ) && !defined( DARWIN_NO_CARBON ) ) || \
|
||||
( 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
|
||||
#endif
|
||||
|
||||
#elif defined( __SC__ ) || defined( __MRC__ )
|
||||
/* Classic MacOS compilers */
|
||||
#include "ConditionalMacros.h"
|
||||
#if TARGET_OS_MAC
|
||||
#define FT_MACINTOSH 1
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* IntN types */
|
||||
/* <Section> */
|
||||
/* basic_types */
|
||||
/* */
|
||||
/* Used to guarantee the size of some specific integers. */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Type> */
|
||||
/* FT_Int16 */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A typedef for a 16bit signed integer type. */
|
||||
/* */
|
||||
typedef signed short FT_Int16;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Type> */
|
||||
/* FT_UInt16 */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A typedef for a 16bit unsigned integer type. */
|
||||
/* */
|
||||
typedef signed short FT_Int16;
|
||||
typedef unsigned short FT_UInt16;
|
||||
|
||||
#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 unsigned int FT_UInt32;
|
||||
|
||||
#elif FT_SIZEOF_LONG == 4
|
||||
#elif FT_SIZEOF_LONG == (32 / FT_CHAR_BIT)
|
||||
|
||||
typedef signed long FT_Int32;
|
||||
typedef unsigned long FT_UInt32;
|
||||
@ -130,12 +222,12 @@ FT_BEGIN_HEADER
|
||||
|
||||
|
||||
/* 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 unsigned int FT_UFast;
|
||||
|
||||
#elif FT_SIZEOF_LONG >= 4
|
||||
#elif FT_SIZEOF_LONG >= (32 / FT_CHAR_BIT)
|
||||
|
||||
typedef long FT_Fast;
|
||||
typedef unsigned long FT_UFast;
|
||||
@ -145,7 +237,7 @@ FT_BEGIN_HEADER
|
||||
|
||||
/* determine whether we have a 64-bit int type for platforms without */
|
||||
/* 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 */
|
||||
#define FT_LONG64
|
||||
@ -177,11 +269,31 @@ FT_BEGIN_HEADER
|
||||
|
||||
#elif defined( __GNUC__ )
|
||||
|
||||
/* GCC provides the "long long" type */
|
||||
/* GCC provides the `long long' type */
|
||||
#define FT_LONG64
|
||||
#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 {
|
||||
@ -189,27 +301,108 @@ FT_BEGIN_HEADER
|
||||
#define FT_DUMMY_STMNT FT_BEGIN_STMNT FT_END_STMNT
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* A 64-bit data type will create compilation problems if you compile */
|
||||
/* 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 )
|
||||
#ifndef FT_CONFIG_OPTION_NO_ASSEMBLER
|
||||
/* Provide assembler fragments for performance-critical functions. */
|
||||
/* These must be defined `static __inline__' with GCC. */
|
||||
|
||||
#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. */
|
||||
/* 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
|
||||
/* documentation is in freetype.h */
|
||||
|
||||
#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
|
||||
@ -244,9 +437,9 @@ FT_BEGIN_HEADER
|
||||
#ifndef FT_BASE_DEF
|
||||
|
||||
#ifdef __cplusplus
|
||||
#define FT_BASE_DEF( x ) extern "C" x
|
||||
#define FT_BASE_DEF( x ) x
|
||||
#else
|
||||
#define FT_BASE_DEF( x ) extern x
|
||||
#define FT_BASE_DEF( x ) x
|
||||
#endif
|
||||
|
||||
#endif /* !FT_BASE_DEF */
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,19 +1,32 @@
|
||||
FT_USE_MODULE(autofit_module_class)
|
||||
FT_USE_MODULE(tt_driver_class)
|
||||
FT_USE_MODULE(t1_driver_class)
|
||||
FT_USE_MODULE(cff_driver_class)
|
||||
FT_USE_MODULE(t1cid_driver_class)
|
||||
FT_USE_MODULE(pfr_driver_class)
|
||||
FT_USE_MODULE(t42_driver_class)
|
||||
FT_USE_MODULE(winfnt_driver_class)
|
||||
FT_USE_MODULE(pcf_driver_class)
|
||||
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(sfnt_module_class)
|
||||
FT_USE_MODULE(ft_smooth_renderer_class)
|
||||
FT_USE_MODULE(ft_smooth_lcd_renderer_class)
|
||||
FT_USE_MODULE(ft_smooth_lcdv_renderer_class)
|
||||
FT_USE_MODULE(otv_module_class)
|
||||
FT_USE_MODULE(bdf_driver_class)
|
||||
/*
|
||||
* This file registers the FreeType modules compiled into the library.
|
||||
*
|
||||
* If you use GNU make, this file IS NOT USED! Instead, it is created in
|
||||
* the objects directory (normally `<topdir>/objs/') based on information
|
||||
* from `<topdir>/modules.cfg'.
|
||||
*
|
||||
* Please read `docs/INSTALL.ANY' and `docs/CUSTOMIZE' how to compile
|
||||
* FreeType without GNU make.
|
||||
*
|
||||
*/
|
||||
|
||||
FT_USE_MODULE( FT_Module_Class, autofit_module_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, tt_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, t1_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, cff_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, t1cid_driver_class )
|
||||
FT_USE_MODULE( FT_Driver_ClassRec, pfr_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 */
|
||||
|
@ -4,7 +4,8 @@
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* - 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 */
|
||||
/* include path during compilation. */
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* - 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 */
|
||||
/* locate this file during the build. For example, */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTIONS_H <myftoptions.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. */
|
||||
/* */
|
||||
/* 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 */
|
||||
@ -89,10 +110,31 @@ FT_BEGIN_HEADER
|
||||
/* building the library. */
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
#undef FT_CONFIG_OPTION_FORCE_INT64
|
||||
#undef FT_CONFIG_OPTION_FORCE_INT64
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* If this macro is defined, do not try to use an assembler version of */
|
||||
/* performance-critical functions (e.g. FT_MulFix). You should only do */
|
||||
/* that to verify that the assembler function works properly, or to */
|
||||
/* execute benchmark tests of the various implementations. */
|
||||
/* #define FT_CONFIG_OPTION_NO_ASSEMBLER */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* If this macro is defined, try to use an inlined assembler version of */
|
||||
/* the `FT_MulFix' function, which is a `hotspot' when loading and */
|
||||
/* hinting glyphs, and which should be executed as fast as possible. */
|
||||
/* */
|
||||
/* Note that if your compiler or CPU is not supported, this will default */
|
||||
/* to the standard and portable implementation found in `ftcalc.c'. */
|
||||
/* */
|
||||
#define FT_CONFIG_OPTION_INLINE_MULFIX
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -100,7 +142,7 @@ FT_BEGIN_HEADER
|
||||
/* LZW-compressed file support. */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* uses NetBSD's `zopen' to partially uncompress the file on the fly */
|
||||
/* (see src/lzw/ftgzip.c). */
|
||||
@ -115,7 +157,7 @@ FT_BEGIN_HEADER
|
||||
/* Gzip-compressed file support. */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* partially uncompress the file on the fly (see src/gzip/ftgzip.c). */
|
||||
/* */
|
||||
@ -143,7 +185,7 @@ FT_BEGIN_HEADER
|
||||
/* Do not #undef this macro here since the build system might define */
|
||||
/* it for certain configurations only. */
|
||||
/* */
|
||||
/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
|
||||
/* #define FT_CONFIG_OPTION_SYSTEM_ZLIB */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -184,27 +226,27 @@ FT_BEGIN_HEADER
|
||||
/* Do not #undef these macros here since the build system might define */
|
||||
/* them for certain configurations only. */
|
||||
/* */
|
||||
/* #define FT_EXPORT(x) extern x */
|
||||
/* #define FT_EXPORT_DEF(x) x */
|
||||
/* #define FT_EXPORT(x) extern x */
|
||||
/* #define FT_EXPORT_DEF(x) x */
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* 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 */
|
||||
/* Unicode value, or return a Macintosh standard glyph name for the */
|
||||
/* 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: */
|
||||
/* */
|
||||
/* - The TrueType driver will provide its own set of glyph names, */
|
||||
/* if you build it to support postscript names in the TrueType */
|
||||
/* `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. */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* in. Among other things, the module is used to convert a glyph name */
|
||||
/* 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). */
|
||||
/* */
|
||||
/* Undefine this macro if you do not want the Adobe Glyph List */
|
||||
/* 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. */
|
||||
/* */
|
||||
#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 */
|
||||
/* contain no glyph data, but supply it via a callback function. */
|
||||
/* This allows FreeType to be used with the PostScript language, using */
|
||||
/* the GhostScript interpreter. */
|
||||
/* This is required by clients supporting document formats which */
|
||||
/* 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 */
|
||||
/* 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
|
||||
|
||||
@ -328,7 +373,7 @@ FT_BEGIN_HEADER
|
||||
/* should define FT_DEBUG_MEMORY here. */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* it for certain configurations only. */
|
||||
@ -353,6 +398,20 @@ FT_BEGIN_HEADER
|
||||
#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. */
|
||||
/* */
|
||||
/* Accessing SFNT names is done through the functions declared in */
|
||||
/* `freetype/ftnames.h'. */
|
||||
/* `freetype/ftsnames.h'. */
|
||||
/* */
|
||||
#define TT_CONFIG_OPTION_SFNT_NAMES
|
||||
|
||||
@ -414,6 +473,8 @@ FT_BEGIN_HEADER
|
||||
#define TT_CONFIG_CMAP_FORMAT_8
|
||||
#define TT_CONFIG_CMAP_FORMAT_10
|
||||
#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 */
|
||||
/* a bytecode interpreter in the TrueType driver. Note that there are */
|
||||
/* important patent issues related to the use of the interpreter. */
|
||||
/* a bytecode interpreter in the TrueType driver. */
|
||||
/* */
|
||||
/* By undefining this, you will only compile the code necessary to load */
|
||||
/* TrueType glyphs without hinting. */
|
||||
@ -436,19 +496,57 @@ FT_BEGIN_HEADER
|
||||
/* Do not #undef this macro here, since the build system might */
|
||||
/* 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 */
|
||||
/* TT_CONFIG_OPTION_BYTECODE_INTERPRETER) to compile the unpatented */
|
||||
/* work-around hinting system. Note that for the moment, the algorithm */
|
||||
/* is only used when selected at runtime through the parameter tag */
|
||||
/* FT_PARAM_TAG_UNPATENTED_HINTING; or when the debug hook */
|
||||
/* FT_DEBUG_HOOK_UNPATENTED_HINTING is globally activated. */
|
||||
/* If you define TT_CONFIG_OPTION_UNPATENTED_HINTING, a special version */
|
||||
/* of the TrueType bytecode interpreter is used that doesn't implement */
|
||||
/* any of the patented opcodes and algorithms. The patents related to */
|
||||
/* TrueType hinting have expired worldwide since May 2010; this option */
|
||||
/* is now deprecated. */
|
||||
/* */
|
||||
#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 = ¶meter; */
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* 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) */
|
||||
/* while MS says they should not. OpenType defines two bits in the */
|
||||
/* 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_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
|
||||
|
||||
/* */
|
||||
|
||||
/*
|
||||
* This temporary macro is used to control various optimizations for
|
||||
* reducing the heap footprint of memory-mapped TrueType files.
|
||||
*
|
||||
*/
|
||||
/* #define FT_OPTIMIZE_MEMORY */
|
||||
/*************************************************************************/
|
||||
/*************************************************************************/
|
||||
/**** ****/
|
||||
/**** 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
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
/*
|
||||
* Define this variable if you want to keep the layout of internal
|
||||
* structures that was used prior to FreeType 2.2. This also compiles in
|
||||
* a few obsolete functions to avoid linking problems on typical Unix
|
||||
* distributions.
|
||||
*
|
||||
* For embedded systems or building a new distribution from scratch, it
|
||||
* is recommended to disable the macro since it reduces the library's code
|
||||
* size and activates a few memory-saving optimizations as well.
|
||||
*/
|
||||
#define FT_CONFIG_OPTION_OLD_INTERNALS
|
||||
|
||||
|
||||
/*
|
||||
* To detect legacy cache-lookup call from a rogue client (<= 2.1.7),
|
||||
* we restrict the number of charmaps in a font. The current API of
|
||||
* FTC_CMapCache_Lookup() takes cmap_index & charcode, but old API
|
||||
* takes charcode only. To determine the passed value is for cmap_index
|
||||
* or charcode, the possible cmap_index is restricted not to exceed
|
||||
* the minimum possible charcode by a rogue client. It is also very
|
||||
* unlikely that a rogue client is interested in Unicode values 0 to 15.
|
||||
*
|
||||
* NOTE: The original threshold was 4 deduced from popular number of
|
||||
* cmap subtables in UCS-4 TrueType fonts, but now it is not
|
||||
* irregular for OpenType fonts to have more than 4 subtables,
|
||||
* because variation selector subtables are available for Apple
|
||||
* and Microsoft platforms.
|
||||
*/
|
||||
|
||||
#ifdef FT_CONFIG_OPTION_OLD_INTERNALS
|
||||
#define FT_MAX_CHARMAP_CACHEABLE 15
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* This macro is defined if either unpatented or native TrueType
|
||||
* hinting is requested by the definitions above.
|
||||
*/
|
||||
#ifdef TT_CONFIG_OPTION_BYTECODE_INTERPRETER
|
||||
#define TT_USE_BYTECODE_INTERPRETER
|
||||
#undef TT_CONFIG_OPTION_UNPATENTED_HINTING
|
||||
#elif defined TT_CONFIG_OPTION_UNPATENTED_HINTING
|
||||
#define TT_USE_BYTECODE_INTERPRETER
|
||||
#endif
|
||||
|
||||
FT_END_HEADER
|
||||
|
||||
|
@ -5,7 +5,7 @@
|
||||
/* ANSI-specific library and header configuration file (specification */
|
||||
/* only). */
|
||||
/* */
|
||||
/* Copyright 2002, 2003, 2004 by */
|
||||
/* Copyright 2002, 2003, 2004, 2005, 2006, 2007, 2009 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* about the correct behaviour of FT2 with all fonts. */
|
||||
/* */
|
||||
/* In these case, "ftconfig.h" will refuse to compile anyway with a */
|
||||
/* 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". */
|
||||
/* In these case, `ftconfig.h' will refuse to compile anyway with a */
|
||||
/* message like `couldn't find 32-bit type' or something similar. */
|
||||
/* */
|
||||
/**********************************************************************/
|
||||
|
||||
|
||||
#include <limits.h>
|
||||
|
||||
#define FT_UINT_MAX UINT_MAX
|
||||
#define FT_CHAR_BIT CHAR_BIT
|
||||
#define FT_INT_MAX INT_MAX
|
||||
#define FT_INT_MIN INT_MIN
|
||||
#define FT_UINT_MAX UINT_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>
|
||||
|
||||
#define ft_memchr memchr
|
||||
#define ft_memcmp memcmp
|
||||
#define ft_memcpy memcpy
|
||||
#define ft_memmove memmove
|
||||
@ -99,10 +87,24 @@
|
||||
#define ft_strncmp strncmp
|
||||
#define ft_strncpy strncpy
|
||||
#define ft_strrchr strrchr
|
||||
#define ft_strstr strstr
|
||||
|
||||
|
||||
/**********************************************************************/
|
||||
/* */
|
||||
/* file handling */
|
||||
/* */
|
||||
/**********************************************************************/
|
||||
|
||||
|
||||
#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
|
||||
|
||||
|
||||
@ -116,9 +118,30 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#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_labs labs
|
||||
|
||||
|
||||
/**********************************************************************/
|
||||
@ -130,17 +153,17 @@
|
||||
|
||||
#include <setjmp.h>
|
||||
|
||||
#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */
|
||||
/* jmp_buf is defined as a macro */
|
||||
/* on certain platforms */
|
||||
#define ft_jmp_buf jmp_buf /* note: this cannot be a typedef since */
|
||||
/* jmp_buf is defined as a macro */
|
||||
/* 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 */
|
||||
/* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */
|
||||
/* */
|
||||
/* the following is only used for debugging purposes, i.e., if */
|
||||
/* FT_DEBUG_LEVEL_ERROR or FT_DEBUG_LEVEL_TRACE are defined */
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -2,10 +2,9 @@
|
||||
/* */
|
||||
/* ftbitmap.h */
|
||||
/* */
|
||||
/* FreeType utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp */
|
||||
/* bitmaps into 8bpp format (specification). */
|
||||
/* FreeType utility functions for bitmaps (specification). */
|
||||
/* */
|
||||
/* Copyright 2004, 2005 by */
|
||||
/* Copyright 2004, 2005, 2006, 2008 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -57,7 +56,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Bitmap_New */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Initialize a pointer to an FT_Bitmap structure. */
|
||||
/* Initialize a pointer to an @FT_Bitmap structure. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* abitmap :: A pointer to the bitmap structure. */
|
||||
@ -72,7 +71,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Bitmap_Copy */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Copies an bitmap into another one. */
|
||||
/* Copy a bitmap into another one. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* library :: A handle to a library object. */
|
||||
@ -83,9 +82,9 @@ FT_BEGIN_HEADER
|
||||
/* target :: A handle to the target bitmap. */
|
||||
/* */
|
||||
/* <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,
|
||||
const FT_Bitmap *source,
|
||||
FT_Bitmap *target);
|
||||
@ -114,16 +113,16 @@ FT_BEGIN_HEADER
|
||||
/* bitmap :: A handle to the target bitmap. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* 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 */
|
||||
/* @FT_Bitmap_Copy to get a copy and work on the copy instead. */
|
||||
/* If you want to embolden the bitmap owned by a @FT_GlyphSlotRec, */
|
||||
/* 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* bitmap,
|
||||
FT_Pos xStrength,
|
||||
@ -152,7 +151,7 @@ FT_BEGIN_HEADER
|
||||
/* target :: The target bitmap. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* It is possible to call @FT_Bitmap_Convert multiple times without */
|
||||
@ -170,6 +169,28 @@ FT_BEGIN_HEADER
|
||||
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> */
|
||||
@ -184,7 +205,7 @@ FT_BEGIN_HEADER
|
||||
/* bitmap :: The bitmap object to be freed. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The `library' argument is taken to have access to FreeType's */
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* FreeType error codes (specification). */
|
||||
/* */
|
||||
/* Copyright 2002, 2004 by */
|
||||
/* Copyright 2002, 2004, 2006, 2007, 2010 by */
|
||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -52,6 +52,8 @@
|
||||
"broken table" )
|
||||
FT_ERRORDEF_( Invalid_Offset, 0x09, \
|
||||
"broken offset within table" )
|
||||
FT_ERRORDEF_( Array_Too_Large, 0x0A, \
|
||||
"array allocation size too large" )
|
||||
|
||||
/* glyph/character errors */
|
||||
|
||||
@ -209,6 +211,9 @@
|
||||
"argument stack underflow" )
|
||||
FT_ERRORDEF_( Ignore, 0xA2, \
|
||||
"ignore" )
|
||||
FT_ERRORDEF_( No_Unicode_Glyph_Name, 0xA3, \
|
||||
"no Unicode glyph name found" )
|
||||
|
||||
|
||||
/* BDF errors */
|
||||
|
||||
@ -218,14 +223,22 @@
|
||||
"`FONT' field missing" )
|
||||
FT_ERRORDEF_( Missing_Size_Field, 0xB2, \
|
||||
"`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" )
|
||||
FT_ERRORDEF_( Missing_Startchar_Field, 0xB4, \
|
||||
FT_ERRORDEF_( Missing_Startchar_Field, 0xB5, \
|
||||
"`STARTCHAR' field missing" )
|
||||
FT_ERRORDEF_( Missing_Encoding_Field, 0xB5, \
|
||||
FT_ERRORDEF_( Missing_Encoding_Field, 0xB6, \
|
||||
"`ENCODING' field missing" )
|
||||
FT_ERRORDEF_( Missing_Bbx_Field, 0xB6, \
|
||||
FT_ERRORDEF_( Missing_Bbx_Field, 0xB7, \
|
||||
"`BBX' field missing" )
|
||||
FT_ERRORDEF_( Bbx_Too_Big, 0xB8, \
|
||||
"`BBX' too big" )
|
||||
FT_ERRORDEF_( Corrupted_Font_Header, 0xB9, \
|
||||
"Font header corrupted or missing fields" )
|
||||
FT_ERRORDEF_( Corrupted_Font_Glyphs, 0xBA, \
|
||||
"Font glyphs corrupted or missing fields" )
|
||||
|
||||
|
||||
/* END */
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -73,7 +73,7 @@
|
||||
/* const struct */
|
||||
/* { */
|
||||
/* int err_code; */
|
||||
/* const char* err_msg */
|
||||
/* const char* err_msg; */
|
||||
/* } ft_errors[] = */
|
||||
/* */
|
||||
/* #include FT_ERRORS_H */
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -134,10 +134,10 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A structure used for bitmap glyph images. This really is a */
|
||||
/* `sub-class' of `FT_GlyphRec'. */
|
||||
/* `sub-class' of @FT_GlyphRec. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* root :: The root FT_Glyph fields. */
|
||||
/* root :: The root @FT_Glyph fields. */
|
||||
/* */
|
||||
/* left :: The left-side bearing, i.e., the horizontal distance */
|
||||
/* 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 */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* You can typecast FT_Glyph to FT_BitmapGlyph if you have */
|
||||
/* glyph->format == FT_GLYPH_FORMAT_BITMAP. This lets you access */
|
||||
/* You can typecast an @FT_Glyph to @FT_BitmapGlyph if you have */
|
||||
/* `glyph->format == FT_GLYPH_FORMAT_BITMAP'. This lets you access */
|
||||
/* 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. */
|
||||
/* */
|
||||
typedef struct FT_BitmapGlyphRec_
|
||||
@ -186,21 +186,21 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* 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> */
|
||||
/* root :: The root FT_Glyph fields. */
|
||||
/* root :: The root @FT_Glyph fields. */
|
||||
/* */
|
||||
/* outline :: A descriptor for the outline. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* You can typecast FT_Glyph to FT_OutlineGlyph if you have */
|
||||
/* glyph->format == FT_GLYPH_FORMAT_OUTLINE. This lets you access */
|
||||
/* You can typecast an @FT_Glyph to @FT_OutlineGlyph if you have */
|
||||
/* `glyph->format == FT_GLYPH_FORMAT_OUTLINE'. This lets you access */
|
||||
/* the outline's content easily. */
|
||||
/* */
|
||||
/* As the outline is extracted from a glyph slot, its coordinates are */
|
||||
/* 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 */
|
||||
/* destroyed with it. */
|
||||
@ -219,7 +219,8 @@ FT_BEGIN_HEADER
|
||||
/* FT_Get_Glyph */
|
||||
/* */
|
||||
/* <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> */
|
||||
/* slot :: A handle to the source glyph slot. */
|
||||
@ -228,7 +229,7 @@ FT_BEGIN_HEADER
|
||||
/* aglyph :: A handle to the glyph object. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Get_Glyph( FT_GlyphSlot slot,
|
||||
@ -248,11 +249,11 @@ FT_BEGIN_HEADER
|
||||
/* source :: A handle to the source glyph object. */
|
||||
/* */
|
||||
/* <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. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Glyph_Copy( FT_Glyph source,
|
||||
@ -265,7 +266,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Glyph_Transform */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Transforms a glyph image if its format is scalable. */
|
||||
/* Transform a glyph image if its format is scalable. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* glyph :: A handle to the target glyph object. */
|
||||
@ -277,8 +278,7 @@ FT_BEGIN_HEADER
|
||||
/* expressed in 1/64th of a pixel. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code (the glyph format is not scalable if it is */
|
||||
/* not zero). */
|
||||
/* FreeType error code (if not 0, the glyph format is not scalable). */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The 2x2 transformation matrix is also applied to the glyph's */
|
||||
@ -335,11 +335,11 @@ FT_BEGIN_HEADER
|
||||
/* @FT_Glyph_BBox_Mode values instead. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* ft_glyph_bbox_unscaled :: see @FT_GLYPH_BBOX_UNSCALED */
|
||||
/* ft_glyph_bbox_subpixels :: see @FT_GLYPH_BBOX_SUBPIXELS */
|
||||
/* ft_glyph_bbox_gridfit :: see @FT_GLYPH_BBOX_GRIDFIT */
|
||||
/* ft_glyph_bbox_truncate :: see @FT_GLYPH_BBOX_TRUNCATE */
|
||||
/* ft_glyph_bbox_pixels :: see @FT_GLYPH_BBOX_PIXELS */
|
||||
/* ft_glyph_bbox_unscaled :: See @FT_GLYPH_BBOX_UNSCALED. */
|
||||
/* ft_glyph_bbox_subpixels :: See @FT_GLYPH_BBOX_SUBPIXELS. */
|
||||
/* ft_glyph_bbox_gridfit :: See @FT_GLYPH_BBOX_GRIDFIT. */
|
||||
/* ft_glyph_bbox_truncate :: See @FT_GLYPH_BBOX_TRUNCATE. */
|
||||
/* ft_glyph_bbox_pixels :: See @FT_GLYPH_BBOX_PIXELS. */
|
||||
/* */
|
||||
#define ft_glyph_bbox_unscaled FT_GLYPH_BBOX_UNSCALED
|
||||
#define ft_glyph_bbox_subpixels FT_GLYPH_BBOX_SUBPIXELS
|
||||
@ -354,11 +354,11 @@ FT_BEGIN_HEADER
|
||||
/* FT_Glyph_Get_CBox */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Returns a glyph's `control box'. The control box encloses all the */
|
||||
/* outline's points, including Bezier control points. Though it */
|
||||
/* Return a glyph's `control box'. The control box encloses all the */
|
||||
/* outline's points, including Bézier control points. Though it */
|
||||
/* coincides with the exact bounding box for most glyphs, it can be */
|
||||
/* 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 */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* Coordinates are relative to the glyph origin, using the Y-upwards */
|
||||
/* Coordinates are relative to the glyph origin, using the y~upwards */
|
||||
/* convention. */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* units in 26.6 pixel format. The value `FT_GLYPH_BBOX_SUBPIXELS' */
|
||||
/* 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 */
|
||||
/* units in 26.6 pixel format. The value @FT_GLYPH_BBOX_SUBPIXELS */
|
||||
/* is another name for this constant. */
|
||||
/* */
|
||||
/* Note that the maximum coordinates are exclusive, which means that */
|
||||
/* one can compute the width and height of the glyph image (be it in */
|
||||
/* integer or 26.6 pixels) as: */
|
||||
/* */
|
||||
/* { */
|
||||
/* width = bbox.xMax - bbox.xMin; */
|
||||
/* height = bbox.yMax - bbox.yMin; */
|
||||
/* } */
|
||||
/* */
|
||||
/* 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: */
|
||||
/* */
|
||||
/* { */
|
||||
/* bbox.xMin = FLOOR(bbox.xMin); */
|
||||
/* bbox.yMin = FLOOR(bbox.yMin); */
|
||||
/* bbox.xMax = CEILING(bbox.xMax); */
|
||||
/* bbox.yMax = CEILING(bbox.yMax); */
|
||||
/* } */
|
||||
/* */
|
||||
/* 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 `FT_GLYPH_BBOX_PIXELS'. */
|
||||
/* to @FT_GLYPH_BBOX_PIXELS. */
|
||||
/* */
|
||||
FT_EXPORT( void )
|
||||
FT_Glyph_Get_CBox( FT_Glyph glyph,
|
||||
@ -418,17 +422,17 @@ FT_BEGIN_HEADER
|
||||
/* FT_Glyph_To_Bitmap */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Converts a given glyph object to a bitmap glyph object. */
|
||||
/* Convert a given glyph object to a bitmap glyph object. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* the_glyph :: A pointer to a handle to the target glyph. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* render_mode :: An enumeration that describe how the data is */
|
||||
/* render_mode :: An enumeration that describes how the data is */
|
||||
/* rendered. */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* 26.6 pixels. */
|
||||
/* */
|
||||
@ -437,15 +441,17 @@ FT_BEGIN_HEADER
|
||||
/* never destroyed in case of error. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* This function does nothing if the glyph format isn't scalable. */
|
||||
/* */
|
||||
/* The glyph image is translated with the `origin' vector before */
|
||||
/* rendering. */
|
||||
/* */
|
||||
/* The first parameter is a pointer to a FT_Glyph handle, that will */
|
||||
/* be replaced by this function. Typically, you would use (omitting */
|
||||
/* error handling): */
|
||||
/* The first parameter is a pointer to an @FT_Glyph handle, that will */
|
||||
/* be _replaced_ by this function (with newly allocated data). */
|
||||
/* Typically, you would use (omitting error handling): */
|
||||
/* */
|
||||
/* */
|
||||
/* { */
|
||||
@ -459,12 +465,12 @@ FT_BEGIN_HEADER
|
||||
/* // extract glyph image */
|
||||
/* 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 ) */
|
||||
/* { */
|
||||
/* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_DEFAULT, */
|
||||
/* error = FT_Glyph_To_Bitmap( &glyph, FT_RENDER_MODE_NORMAL, */
|
||||
/* 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_Glyph_To_Bitmap( FT_Glyph* the_glyph,
|
||||
@ -494,7 +535,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Done_Glyph */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Destroys a given glyph. */
|
||||
/* Destroy a given glyph. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* glyph :: A handle to the target glyph object. */
|
||||
@ -502,6 +543,8 @@ FT_BEGIN_HEADER
|
||||
FT_EXPORT( void )
|
||||
FT_Done_Glyph( FT_Glyph glyph );
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
/* other helpful functions */
|
||||
|
||||
@ -519,7 +562,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Matrix_Multiply */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Performs the matrix operation `b = a*b'. */
|
||||
/* Perform the matrix operation `b = a*b'. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* a :: A pointer to matrix `a'. */
|
||||
@ -532,7 +575,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
FT_EXPORT( void )
|
||||
FT_Matrix_Multiply( const FT_Matrix* a,
|
||||
FT_Matrix* b );
|
||||
FT_Matrix* b );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
@ -541,14 +584,14 @@ FT_BEGIN_HEADER
|
||||
/* FT_Matrix_Invert */
|
||||
/* */
|
||||
/* <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> */
|
||||
/* matrix :: A pointer to the target matrix. Remains untouched in */
|
||||
/* case of error. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Matrix_Invert( FT_Matrix* matrix );
|
||||
@ -563,3 +606,8 @@ FT_END_HEADER
|
||||
|
||||
|
||||
/* END */
|
||||
|
||||
|
||||
/* Local Variables: */
|
||||
/* coding: utf-8 */
|
||||
/* End: */
|
||||
|
@ -5,7 +5,8 @@
|
||||
/* FreeType glyph image formats and default raster interface */
|
||||
/* (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. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -28,7 +29,7 @@
|
||||
#define __FTIMAGE_H__
|
||||
|
||||
|
||||
/* _STANDALONE_ is from ftgrays.c */
|
||||
/* _STANDALONE_ is from ftgrays.c */
|
||||
#ifndef _STANDALONE_
|
||||
#include <ft2build.h>
|
||||
#endif
|
||||
@ -51,10 +52,9 @@ FT_BEGIN_HEADER
|
||||
/* FT_Pos */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* The type FT_Pos is a 32-bit integer used to store vectorial */
|
||||
/* coordinates. Depending on the context, these can represent */
|
||||
/* distances in integer font units, or 16,16, or 26.6 fixed float */
|
||||
/* pixel coordinates. */
|
||||
/* The type FT_Pos is used to store vectorial coordinates. Depending */
|
||||
/* on the context, these can represent distances in integer font */
|
||||
/* units, or 16.16, or 26.6 fixed float pixel coordinates. */
|
||||
/* */
|
||||
typedef signed long FT_Pos;
|
||||
|
||||
@ -99,6 +99,20 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* 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_
|
||||
{
|
||||
FT_Pos xMin, yMin;
|
||||
@ -119,40 +133,41 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* FT_PIXEL_MODE_NONE :: */
|
||||
/* Value 0 is reserved. */
|
||||
/* Value~0 is reserved. */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* the left-most pixel in a byte has value 128. */
|
||||
/* */
|
||||
/* FT_PIXEL_MODE_GRAY :: */
|
||||
/* An 8-bit bitmap, generally used to represent anti-aliased glyph */
|
||||
/* images. Each pixel is stored in one byte. Note that the number */
|
||||
/* of value "gray" levels is stored in the `num_bytes' field of */
|
||||
/* the @FT_Bitmap structure (it generally is 256). */
|
||||
/* of `gray' levels is stored in the `num_grays' field of the */
|
||||
/* @FT_Bitmap structure (it generally is 256). */
|
||||
/* */
|
||||
/* FT_PIXEL_MODE_GRAY2 :: */
|
||||
/* A 2-bit/pixel bitmap, used to represent embedded anti-aliased */
|
||||
/* bitmaps in font files according to the OpenType specification. */
|
||||
/* We haven't found a single font using this format, however. */
|
||||
/* A 2-bit per pixel bitmap, used to represent embedded */
|
||||
/* anti-aliased bitmaps in font files according to the OpenType */
|
||||
/* specification. We haven't found a single font using this */
|
||||
/* format, however. */
|
||||
/* */
|
||||
/* 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. */
|
||||
/* We haven't found a single font using this format, however. */
|
||||
/* */
|
||||
/* FT_PIXEL_MODE_LCD :: */
|
||||
/* An 8-bit bitmap, used to represent RGB or BGR decimated glyph */
|
||||
/* images used for display on LCD displays; the bitmap's width is */
|
||||
/* three times wider than the original glyph image. See also */
|
||||
/* An 8-bit bitmap, representing RGB or BGR decimated glyph images */
|
||||
/* used for display on LCD displays; the bitmap is three times */
|
||||
/* wider than the original glyph image. See also */
|
||||
/* @FT_RENDER_MODE_LCD. */
|
||||
/* */
|
||||
/* FT_PIXEL_MODE_LCD_V :: */
|
||||
/* An 8-bit bitmap, used to represent RGB or BGR decimated glyph */
|
||||
/* images used for display on rotated LCD displays; the bitmap's */
|
||||
/* height is three times taller than the original glyph image. */
|
||||
/* See also @FT_RENDER_MODE_LCD_V. */
|
||||
/* An 8-bit bitmap, representing RGB or BGR decimated glyph images */
|
||||
/* used for display on rotated LCD displays; the bitmap is three */
|
||||
/* times taller than the original glyph image. See also */
|
||||
/* @FT_RENDER_MODE_LCD_V. */
|
||||
/* */
|
||||
typedef enum FT_Pixel_Mode_
|
||||
{
|
||||
@ -179,11 +194,11 @@ FT_BEGIN_HEADER
|
||||
/* @FT_Pixel_Mode values instead. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* ft_pixel_mode_none :: see @FT_PIXEL_MODE_NONE */
|
||||
/* ft_pixel_mode_mono :: see @FT_PIXEL_MODE_MONO */
|
||||
/* ft_pixel_mode_grays :: see @FT_PIXEL_MODE_GRAY */
|
||||
/* ft_pixel_mode_pal2 :: see @FT_PIXEL_MODE_GRAY2 */
|
||||
/* ft_pixel_mode_pal4 :: see @FT_PIXEL_MODE_GRAY4 */
|
||||
/* ft_pixel_mode_none :: See @FT_PIXEL_MODE_NONE. */
|
||||
/* ft_pixel_mode_mono :: See @FT_PIXEL_MODE_MONO. */
|
||||
/* ft_pixel_mode_grays :: See @FT_PIXEL_MODE_GRAY. */
|
||||
/* ft_pixel_mode_pal2 :: See @FT_PIXEL_MODE_GRAY2. */
|
||||
/* ft_pixel_mode_pal4 :: See @FT_PIXEL_MODE_GRAY4. */
|
||||
/* */
|
||||
#define ft_pixel_mode_none FT_PIXEL_MODE_NONE
|
||||
#define ft_pixel_mode_mono FT_PIXEL_MODE_MONO
|
||||
@ -203,14 +218,14 @@ FT_BEGIN_HEADER
|
||||
/* <Description> */
|
||||
/* THIS TYPE IS DEPRECATED. DO NOT USE IT! */
|
||||
/* */
|
||||
/* An enumeration type used to describe the format of a bitmap */
|
||||
/* palette, used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */
|
||||
/* An enumeration type to describe the format of a bitmap palette, */
|
||||
/* used with ft_pixel_mode_pal4 and ft_pixel_mode_pal8. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* ft_palette_mode_rgb :: The palette is an array of 3-bytes RGB */
|
||||
/* <Values> */
|
||||
/* ft_palette_mode_rgb :: The palette is an array of 3-byte RGB */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
@ -222,7 +237,7 @@ FT_BEGIN_HEADER
|
||||
ft_palette_mode_rgb = 0,
|
||||
ft_palette_mode_rgba,
|
||||
|
||||
ft_palettte_mode_max /* do not remove */
|
||||
ft_palette_mode_max /* do not remove */
|
||||
|
||||
} FT_Palette_Mode;
|
||||
|
||||
@ -253,12 +268,27 @@ FT_BEGIN_HEADER
|
||||
/* flow. In all cases, the pitch is an offset to add */
|
||||
/* 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 */
|
||||
/* value should be aligned on 32-bit boundaries in */
|
||||
/* most cases. */
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* tags :: A pointer to an array of `n_points' chars, giving */
|
||||
/* each outline point's type. If bit 0 is unset, the */
|
||||
/* point is `off' the curve, i.e. a Bezier control */
|
||||
/* point, while it is `on' when set. */
|
||||
/* each outline point's type. */
|
||||
/* */
|
||||
/* Bit 1 is meaningful for `off' points only. If set, */
|
||||
/* it indicates a third-order Bezier arc control point; */
|
||||
/* If bit~0 is unset, the point is `off' the curve, */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* point of each contour within the outline. For */
|
||||
/* 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 */
|
||||
/* 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_
|
||||
{
|
||||
@ -348,72 +393,91 @@ FT_BEGIN_HEADER
|
||||
|
||||
} 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
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Enum> */
|
||||
/* FT_OUTLINE_FLAGS */
|
||||
/* FT_OUTLINE_FLAGS */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A list of bit-field constants use for the flags in an outline's */
|
||||
/* `flags' field. */
|
||||
/* */
|
||||
/* <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 */
|
||||
/* outline's field arrays (i.e. */
|
||||
/* `points', `flags' & `contours') are */
|
||||
/* `owned' by the outline object, and */
|
||||
/* should thus be freed when it is */
|
||||
/* destroyed. */
|
||||
/* FT_OUTLINE_OWNER :: */
|
||||
/* If set, this flag indicates that the outline's field arrays */
|
||||
/* (i.e., `points', `flags', and `contours') are `owned' by the */
|
||||
/* outline object, and should thus be freed when it is destroyed. */
|
||||
/* */
|
||||
/* FT_OUTLINE_EVEN_ODD_FILL :: By default, outlines are filled using */
|
||||
/* the non-zero winding rule. If set to */
|
||||
/* 1, the outline will be filled using */
|
||||
/* the even-odd fill rule (only works */
|
||||
/* with the smooth raster). */
|
||||
/* FT_OUTLINE_EVEN_ODD_FILL :: */
|
||||
/* By default, outlines are filled using the non-zero winding rule. */
|
||||
/* If set to 1, the outline will be filled using the even-odd fill */
|
||||
/* rule (only works with the smooth rasterizer). */
|
||||
/* */
|
||||
/* FT_OUTLINE_REVERSE_FILL :: By default, outside contours of an */
|
||||
/* outline are oriented in clock-wise */
|
||||
/* direction, as defined in the TrueType */
|
||||
/* specification. This flag is set if */
|
||||
/* the outline uses the opposite */
|
||||
/* direction (typically for Type 1 */
|
||||
/* fonts). This flag is ignored by the */
|
||||
/* scan-converter. However, it is very */
|
||||
/* important for the auto-hinter. */
|
||||
/* FT_OUTLINE_REVERSE_FILL :: */
|
||||
/* By default, outside contours of an outline are oriented in */
|
||||
/* clock-wise direction, as defined in the TrueType specification. */
|
||||
/* This flag is set if the outline uses the opposite direction */
|
||||
/* (typically for Type~1 fonts). This flag is ignored by the scan */
|
||||
/* converter. */
|
||||
/* */
|
||||
/* FT_OUTLINE_IGNORE_DROPOUTS :: By default, the scan converter will */
|
||||
/* try to detect drop-outs in an outline */
|
||||
/* and correct the glyph bitmap to */
|
||||
/* ensure consistent shape continuity. */
|
||||
/* If set, this flag hints the scan-line */
|
||||
/* converter to ignore such cases. */
|
||||
/* FT_OUTLINE_IGNORE_DROPOUTS :: */
|
||||
/* By default, the scan converter will try to detect drop-outs in */
|
||||
/* an outline and correct the glyph bitmap to ensure consistent */
|
||||
/* shape continuity. If set, this flag hints the scan-line */
|
||||
/* converter to ignore such cases. See below for more information. */
|
||||
/* */
|
||||
/* FT_OUTLINE_HIGH_PRECISION :: 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_SMART_DROPOUTS :: */
|
||||
/* Select smart dropout control. If unset, use simple dropout */
|
||||
/* control. Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See */
|
||||
/* below for more information. */
|
||||
/* */
|
||||
/* 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. */
|
||||
/* FT_OUTLINE_INCLUDE_STUBS :: */
|
||||
/* If set, turn pixels on for `stubs', otherwise exclude them. */
|
||||
/* Ignored if @FT_OUTLINE_IGNORE_DROPOUTS is set. See below for */
|
||||
/* more information. */
|
||||
/* */
|
||||
/* FT_OUTLINE_HIGH_PRECISION :: */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* <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_OWNER 0x1
|
||||
#define FT_OUTLINE_EVEN_ODD_FILL 0x2
|
||||
#define FT_OUTLINE_REVERSE_FILL 0x4
|
||||
#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_SINGLE_PASS 0x200
|
||||
@ -449,21 +513,24 @@ FT_BEGIN_HEADER
|
||||
|
||||
#define FT_CURVE_TAG( flag ) ( flag & 3 )
|
||||
|
||||
#define FT_CURVE_TAG_ON 1
|
||||
#define FT_CURVE_TAG_CONIC 0
|
||||
#define FT_CURVE_TAG_CUBIC 2
|
||||
#define FT_CURVE_TAG_ON 1
|
||||
#define FT_CURVE_TAG_CONIC 0
|
||||
#define FT_CURVE_TAG_CUBIC 2
|
||||
|
||||
#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_HAS_SCANMODE 4
|
||||
|
||||
#define FT_CURVE_TAG_TOUCH_BOTH ( FT_CURVE_TAG_TOUCH_X | \
|
||||
FT_CURVE_TAG_TOUCH_Y )
|
||||
#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_BOTH ( FT_CURVE_TAG_TOUCH_X | \
|
||||
FT_CURVE_TAG_TOUCH_Y )
|
||||
|
||||
#define FT_Curve_Tag_On FT_CURVE_TAG_ON
|
||||
#define FT_Curve_Tag_Conic FT_CURVE_TAG_CONIC
|
||||
#define FT_Curve_Tag_Cubic FT_CURVE_TAG_CUBIC
|
||||
#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_On FT_CURVE_TAG_ON
|
||||
#define FT_Curve_Tag_Conic FT_CURVE_TAG_CONIC
|
||||
#define FT_Curve_Tag_Cubic FT_CURVE_TAG_CUBIC
|
||||
#define FT_Curve_Tag_Touch_X FT_CURVE_TAG_TOUCH_X
|
||||
#define FT_Curve_Tag_Touch_Y FT_CURVE_TAG_TOUCH_Y
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@ -483,14 +550,15 @@ FT_BEGIN_HEADER
|
||||
/* decomposition function. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* Error code. 0 means success. */
|
||||
/* Error code. 0~means success. */
|
||||
/* */
|
||||
typedef int
|
||||
(*FT_Outline_MoveToFunc)( FT_Vector* to,
|
||||
void* user );
|
||||
(*FT_Outline_MoveToFunc)( const FT_Vector* to,
|
||||
void* user );
|
||||
|
||||
#define FT_Outline_MoveTo_Func FT_Outline_MoveToFunc
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <FuncType> */
|
||||
@ -509,13 +577,14 @@ FT_BEGIN_HEADER
|
||||
/* decomposition function. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* Error code. 0 means success. */
|
||||
/* Error code. 0~means success. */
|
||||
/* */
|
||||
typedef int
|
||||
(*FT_Outline_LineToFunc)( FT_Vector* to,
|
||||
void* user );
|
||||
(*FT_Outline_LineToFunc)( const FT_Vector* to,
|
||||
void* user );
|
||||
|
||||
#define FT_Outline_LineTo_Func FT_Outline_LineToFunc
|
||||
|
||||
#define FT_Outline_LineTo_Func FT_Outline_LineToFunc
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@ -523,10 +592,10 @@ FT_BEGIN_HEADER
|
||||
/* FT_Outline_ConicToFunc */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A function pointer type use to describe the signature of a `conic */
|
||||
/* to' function during outline walking/decomposition. */
|
||||
/* A function pointer type used to describe the signature of a `conic */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
@ -539,14 +608,15 @@ FT_BEGIN_HEADER
|
||||
/* the decomposition function. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* Error code. 0 means success. */
|
||||
/* Error code. 0~means success. */
|
||||
/* */
|
||||
typedef int
|
||||
(*FT_Outline_ConicToFunc)( FT_Vector* control,
|
||||
FT_Vector* to,
|
||||
void* user );
|
||||
(*FT_Outline_ConicToFunc)( const FT_Vector* control,
|
||||
const FT_Vector* to,
|
||||
void* user );
|
||||
|
||||
#define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc
|
||||
|
||||
#define FT_Outline_ConicTo_Func FT_Outline_ConicToFunc
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@ -555,14 +625,14 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* 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> */
|
||||
/* 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. */
|
||||
/* */
|
||||
@ -570,15 +640,15 @@ FT_BEGIN_HEADER
|
||||
/* the decomposition function. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* Error code. 0 means success. */
|
||||
/* Error code. 0~means success. */
|
||||
/* */
|
||||
typedef int
|
||||
(*FT_Outline_CubicToFunc)( FT_Vector* control1,
|
||||
FT_Vector* control2,
|
||||
FT_Vector* to,
|
||||
void* user );
|
||||
(*FT_Outline_CubicToFunc)( const FT_Vector* control1,
|
||||
const FT_Vector* control2,
|
||||
const FT_Vector* to,
|
||||
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> */
|
||||
/* A structure to hold various function pointers used during outline */
|
||||
/* decomposition in order to emit segments, conic, and cubic Beziers, */
|
||||
/* as well as `move to' and `close to' operations. */
|
||||
/* decomposition in order to emit segments, conic, and cubic Béziers. */
|
||||
/* */
|
||||
/* <Fields> */
|
||||
/* move_to :: The `move to' 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 */
|
||||
/* are sent to the emitter. */
|
||||
@ -611,10 +680,12 @@ FT_BEGIN_HEADER
|
||||
/* version of the original coordinates (this is important for high */
|
||||
/* accuracy during scan-conversion). The transformation is simple: */
|
||||
/* */
|
||||
/* { */
|
||||
/* x' = (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. */
|
||||
/* */
|
||||
typedef struct FT_Outline_Funcs_
|
||||
@ -644,14 +715,16 @@ FT_BEGIN_HEADER
|
||||
/* FT_IMAGE_TAG */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This macro converts four letter tags into an unsigned long. */
|
||||
/* This macro converts four-letter tags to an unsigned long type. */
|
||||
/* */
|
||||
/* <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 */
|
||||
/* this: */
|
||||
/* */
|
||||
/* { */
|
||||
/* #define FT_IMAGE_TAG( value, _x1, _x2, _x3, _x4 ) value */
|
||||
/* } */
|
||||
/* */
|
||||
/* to get a simple enumeration without assigning special numbers. */
|
||||
/* */
|
||||
@ -677,7 +750,7 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* FT_GLYPH_FORMAT_NONE :: */
|
||||
/* The value 0 is reserved and does describe a glyph format. */
|
||||
/* The value~0 is reserved. */
|
||||
/* */
|
||||
/* FT_GLYPH_FORMAT_COMPOSITE :: */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* FT_GLYPH_FORMAT_OUTLINE :: */
|
||||
/* The glyph image is a vertorial outline made of line segments */
|
||||
/* and Bezier arcs; it can be described as an @FT_Outline; you */
|
||||
/* The glyph image is a vectorial outline made of line segments */
|
||||
/* and Bézier arcs; it can be described as an @FT_Outline; you */
|
||||
/* generally want to access the `outline' field of the */
|
||||
/* @FT_GlyphSlotRec structure to read it. */
|
||||
/* */
|
||||
/* FT_GLYPH_FORMAT_PLOTTER :: */
|
||||
/* The glyph image is a vectorial path with no inside/outside */
|
||||
/* contours. Some Type 1 fonts, like those in the Hershey family, */
|
||||
/* The glyph image is a vectorial path with no inside and outside */
|
||||
/* contours. Some Type~1 fonts, like those in the Hershey family, */
|
||||
/* contain glyphs in this format. These are described as */
|
||||
/* @FT_Outline, but FreeType isn't currently capable of rendering */
|
||||
/* them correctly. */
|
||||
@ -720,15 +793,15 @@ FT_BEGIN_HEADER
|
||||
/* ft_glyph_format_xxx */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* A list of decprecated constants. Use the corresponding */
|
||||
/* A list of deprecated constants. Use the corresponding */
|
||||
/* @FT_Glyph_Format values instead. */
|
||||
/* */
|
||||
/* <Values> */
|
||||
/* ft_glyph_format_none :: see @FT_GLYPH_FORMAT_NONE */
|
||||
/* ft_glyph_format_composite :: see @FT_GLYPH_FORMAT_COMPOSITE */
|
||||
/* ft_glyph_format_bitmap :: see @FT_GLYPH_FORMAT_BITMAP */
|
||||
/* ft_glyph_format_outline :: see @FT_GLYPH_FORMAT_OUTLINE */
|
||||
/* ft_glyph_format_plotter :: see @FT_GLYPH_FORMAT_PLOTTER */
|
||||
/* ft_glyph_format_none :: See @FT_GLYPH_FORMAT_NONE. */
|
||||
/* ft_glyph_format_composite :: See @FT_GLYPH_FORMAT_COMPOSITE. */
|
||||
/* ft_glyph_format_bitmap :: See @FT_GLYPH_FORMAT_BITMAP. */
|
||||
/* ft_glyph_format_outline :: See @FT_GLYPH_FORMAT_OUTLINE. */
|
||||
/* ft_glyph_format_plotter :: See @FT_GLYPH_FORMAT_PLOTTER. */
|
||||
/* */
|
||||
#define ft_glyph_format_none FT_GLYPH_FORMAT_NONE
|
||||
#define ft_glyph_format_composite FT_GLYPH_FORMAT_COMPOSITE
|
||||
@ -809,11 +882,11 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* The coverage value is always between 0 and 255, even if the number */
|
||||
/* of gray levels have been set through FT_Set_Gray_Levels(). */
|
||||
/* The coverage value is always between 0 and 255. If you want less */
|
||||
/* gray values, the callback function has to reduce them. */
|
||||
/* */
|
||||
typedef struct FT_Span_
|
||||
{
|
||||
@ -835,7 +908,7 @@ FT_BEGIN_HEADER
|
||||
/* spans on each scan line. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* y :: The scanline's y-coordinate. */
|
||||
/* y :: The scanline's y~coordinate. */
|
||||
/* */
|
||||
/* count :: The number of spans to draw on this scanline. */
|
||||
/* */
|
||||
@ -851,22 +924,22 @@ FT_BEGIN_HEADER
|
||||
/* given background bitmap, and even perform translucency. */
|
||||
/* */
|
||||
/* Note that the `count' field cannot be greater than a fixed value */
|
||||
/* defined by the FT_MAX_GRAY_SPANS configuration macro in */
|
||||
/* ftoption.h. By default, this value is set to 32, which means that */
|
||||
/* if there are more than 32 spans on a given scanline, the callback */
|
||||
/* will be called several times with the same `y' parameter in order */
|
||||
/* to draw all callbacks. */
|
||||
/* defined by the `FT_MAX_GRAY_SPANS' configuration macro in */
|
||||
/* `ftoption.h'. By default, this value is set to~32, which means */
|
||||
/* that if there are more than 32~spans on a given scanline, the */
|
||||
/* callback is called several times with the same `y' parameter in */
|
||||
/* order to draw all callbacks. */
|
||||
/* */
|
||||
/* Otherwise, the callback is only called once per scan-line, and */
|
||||
/* only for those scanlines that do have `gray' pixels on them. */
|
||||
/* */
|
||||
typedef void
|
||||
(*FT_SpanFunc)( int y,
|
||||
int count,
|
||||
FT_Span* spans,
|
||||
void* user );
|
||||
(*FT_SpanFunc)( int y,
|
||||
int count,
|
||||
const FT_Span* spans,
|
||||
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. */
|
||||
/* */
|
||||
/* <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. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* 1 if the pixel is `set', 0 otherwise. */
|
||||
/* 1~if the pixel is `set', 0~otherwise. */
|
||||
/* */
|
||||
typedef int
|
||||
(*FT_Raster_BitTest_Func)( int y,
|
||||
@ -911,14 +984,14 @@ FT_BEGIN_HEADER
|
||||
/* drop-out control according to the TrueType specification. */
|
||||
/* */
|
||||
/* <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. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* 1 if the pixel is `set', 0 otherwise. */
|
||||
/* 1~if the pixel is `set', 0~otherwise. */
|
||||
/* */
|
||||
typedef void
|
||||
(*FT_Raster_BitSet_Func)( int y,
|
||||
@ -958,8 +1031,8 @@ FT_BEGIN_HEADER
|
||||
/* FT_RASTER_FLAG_CLIP :: This flag is only used in direct */
|
||||
/* rendering mode. If set, the output will */
|
||||
/* be clipped to a box specified in the */
|
||||
/* "clip_box" field of the FT_Raster_Params */
|
||||
/* structure. */
|
||||
/* `clip_box' field of the */
|
||||
/* @FT_Raster_Params structure. */
|
||||
/* */
|
||||
/* Note that by default, the glyph bitmap */
|
||||
/* is clipped to the target pixmap, except */
|
||||
@ -990,14 +1063,14 @@ FT_BEGIN_HEADER
|
||||
/* <Fields> */
|
||||
/* target :: The target bitmap. */
|
||||
/* */
|
||||
/* source :: A pointer to the source glyph image (e.g. an */
|
||||
/* FT_Outline). */
|
||||
/* source :: A pointer to the source glyph image (e.g., an */
|
||||
/* @FT_Outline). */
|
||||
/* */
|
||||
/* flags :: The rendering flags. */
|
||||
/* */
|
||||
/* 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! */
|
||||
/* */
|
||||
@ -1012,11 +1085,11 @@ FT_BEGIN_HEADER
|
||||
/* 26.6 fixed-point units). */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* An anti-aliased glyph bitmap is drawn if the FT_RASTER_FLAG_AA bit */
|
||||
/* flag is set in the `flags' field, otherwise a monochrome bitmap */
|
||||
/* will be generated. */
|
||||
/* An anti-aliased glyph bitmap is drawn if the @FT_RASTER_FLAG_AA */
|
||||
/* bit flag is set in the `flags' field, otherwise a monochrome */
|
||||
/* 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 */
|
||||
/* 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 */
|
||||
@ -1034,7 +1107,7 @@ FT_BEGIN_HEADER
|
||||
const void* source;
|
||||
int flags;
|
||||
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_BitSet_Func bit_set; /* doesn't work! */
|
||||
void* user;
|
||||
@ -1058,20 +1131,21 @@ FT_BEGIN_HEADER
|
||||
/* raster :: A handle to the new raster object. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* Error code. 0 means success. */
|
||||
/* Error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The `memory' parameter is a typeless pointer in order to avoid */
|
||||
/* un-wanted dependencies on the rest of the FreeType code. In */
|
||||
/* practice, it is a FT_Memory, i.e., a handle to the standard */
|
||||
/* FreeType memory allocator. However, this field can be completely */
|
||||
/* ignored by a given raster implementation. */
|
||||
/* practice, it is an @FT_Memory object, i.e., a handle to the */
|
||||
/* standard FreeType memory allocator. However, this field can be */
|
||||
/* completely ignored by a given raster implementation. */
|
||||
/* */
|
||||
typedef int
|
||||
(*FT_Raster_NewFunc)( void* memory,
|
||||
FT_Raster* raster );
|
||||
|
||||
#define FT_Raster_New_Func FT_Raster_NewFunc
|
||||
#define FT_Raster_New_Func FT_Raster_NewFunc
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@ -1087,7 +1161,8 @@ FT_BEGIN_HEADER
|
||||
typedef void
|
||||
(*FT_Raster_DoneFunc)( FT_Raster raster );
|
||||
|
||||
#define FT_Raster_Done_Func FT_Raster_DoneFunc
|
||||
#define FT_Raster_Done_Func FT_Raster_DoneFunc
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@ -1121,7 +1196,8 @@ FT_BEGIN_HEADER
|
||||
unsigned char* pool_base,
|
||||
unsigned long pool_size );
|
||||
|
||||
#define FT_Raster_Reset_Func FT_Raster_ResetFunc
|
||||
#define FT_Raster_Reset_Func FT_Raster_ResetFunc
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@ -1146,7 +1222,8 @@ FT_BEGIN_HEADER
|
||||
unsigned long mode,
|
||||
void* args );
|
||||
|
||||
#define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc
|
||||
#define FT_Raster_Set_Mode_Func FT_Raster_SetModeFunc
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@ -1154,39 +1231,40 @@ FT_BEGIN_HEADER
|
||||
/* FT_Raster_RenderFunc */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Invokes a given raster to scan-convert a given glyph image into a */
|
||||
/* target bitmap. */
|
||||
/* Invoke a given raster to scan-convert a given glyph image into a */
|
||||
/* target bitmap. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* raster :: A handle to the raster object. */
|
||||
/* */
|
||||
/* params :: A pointer to a FT_Raster_Params structure used to store */
|
||||
/* the rendering parameters. */
|
||||
/* params :: A pointer to an @FT_Raster_Params structure used to */
|
||||
/* store the rendering parameters. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* Error code. 0 means success. */
|
||||
/* Error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* 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 */
|
||||
/* FT_Outline or anything else in order to support a large array of */
|
||||
/* 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 */
|
||||
/* glyph formats. */
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* XXX: For now, the standard raster doesn't support direct */
|
||||
/* composition but this should change for the final release (see */
|
||||
/* the files demos/src/ftgrays.c and demos/src/ftgrays2.c for */
|
||||
/* examples of distinct implementations which support direct */
|
||||
/* the files `demos/src/ftgrays.c' and `demos/src/ftgrays2.c' */
|
||||
/* for examples of distinct implementations which support direct */
|
||||
/* composition). */
|
||||
/* */
|
||||
typedef int
|
||||
(*FT_Raster_RenderFunc)( FT_Raster raster,
|
||||
FT_Raster_Params* params );
|
||||
(*FT_Raster_RenderFunc)( FT_Raster raster,
|
||||
const FT_Raster_Params* params );
|
||||
|
||||
#define FT_Raster_Render_Func FT_Raster_RenderFunc
|
||||
|
||||
#define FT_Raster_Render_Func FT_Raster_RenderFunc
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
@ -1209,12 +1287,12 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
typedef struct FT_Raster_Funcs_
|
||||
{
|
||||
FT_Glyph_Format glyph_format;
|
||||
FT_Raster_NewFunc raster_new;
|
||||
FT_Raster_ResetFunc raster_reset;
|
||||
FT_Raster_SetModeFunc raster_set_mode;
|
||||
FT_Raster_RenderFunc raster_render;
|
||||
FT_Raster_DoneFunc raster_done;
|
||||
FT_Glyph_Format glyph_format;
|
||||
FT_Raster_NewFunc raster_new;
|
||||
FT_Raster_ResetFunc raster_reset;
|
||||
FT_Raster_SetModeFunc raster_set_mode;
|
||||
FT_Raster_RenderFunc raster_render;
|
||||
FT_Raster_DoneFunc raster_done;
|
||||
|
||||
} FT_Raster_Funcs;
|
||||
|
||||
@ -1228,3 +1306,8 @@ FT_END_HEADER
|
||||
|
||||
|
||||
/* END */
|
||||
|
||||
|
||||
/* Local Variables: */
|
||||
/* coding: utf-8 */
|
||||
/* End: */
|
||||
|
@ -5,7 +5,7 @@
|
||||
/* Support for the FT_Outline type used to store glyph shapes of */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -84,15 +84,14 @@ FT_BEGIN_HEADER
|
||||
/* FT_Outline_Decompose */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Walks over an outline's structure to decompose it into individual */
|
||||
/* segments and Bezier arcs. This function is also able to emit */
|
||||
/* `move to' and `close to' operations to indicate the start and end */
|
||||
/* of new contours in the outline. */
|
||||
/* Walk over an outline's structure to decompose it into individual */
|
||||
/* segments and Bézier arcs. This function also emits `move to' */
|
||||
/* operations to indicate the start of new contours in the outline. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* 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 */
|
||||
/* operations. */
|
||||
/* */
|
||||
@ -103,7 +102,7 @@ FT_BEGIN_HEADER
|
||||
/* decomposition. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means sucess. */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Outline_Decompose( FT_Outline* outline,
|
||||
@ -117,24 +116,23 @@ FT_BEGIN_HEADER
|
||||
/* FT_Outline_New */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Creates a new outline of a given size. */
|
||||
/* Create a new outline of a given size. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* library :: A handle to the library object from where the */
|
||||
/* outline is allocated. Note however that the new */
|
||||
/* outline will NOT necessarily be FREED, when */
|
||||
/* destroying the library, by FT_Done_FreeType(). */
|
||||
/* outline will *not* necessarily be *freed*, when */
|
||||
/* destroying the library, by @FT_Done_FreeType. */
|
||||
/* */
|
||||
/* numPoints :: The maximal number of points within the outline. */
|
||||
/* */
|
||||
/* numContours :: The maximal number of contours within the outline. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* anoutline :: A handle to the new outline. NULL in case of */
|
||||
/* error. */
|
||||
/* anoutline :: A handle to the new outline. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The reason why this function takes a `library' parameter is simply */
|
||||
@ -160,7 +158,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Outline_Done */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Destroys an outline created with FT_Outline_New(). */
|
||||
/* Destroy an outline created with @FT_Outline_New. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* If the outline's `owner' field is not set, only the outline */
|
||||
/* descriptor will be released. */
|
||||
/* */
|
||||
/* 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_Outline_Done( FT_Library library,
|
||||
@ -200,7 +198,7 @@ FT_BEGIN_HEADER
|
||||
/* outline :: A handle to a source outline. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Outline_Check( FT_Outline* outline );
|
||||
@ -212,11 +210,11 @@ FT_BEGIN_HEADER
|
||||
/* FT_Outline_Get_CBox */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Returns an outline's `control box'. The control box encloses all */
|
||||
/* the outline's points, including Bezier control points. Though it */
|
||||
/* Return an outline's `control box'. The control box encloses all */
|
||||
/* the outline's points, including Bézier control points. Though it */
|
||||
/* coincides with the exact bounding box for most glyphs, it can be */
|
||||
/* 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 */
|
||||
/* box can take much more time as it needs to walk over all segments */
|
||||
@ -240,7 +238,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Outline_Translate */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Applies a simple translation to the points of an outline. */
|
||||
/* Apply a simple translation to the points of an outline. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* outline :: A pointer to the target outline descriptor. */
|
||||
@ -262,7 +260,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Outline_Copy */
|
||||
/* */
|
||||
/* <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 */
|
||||
/* function is called. */
|
||||
/* */
|
||||
@ -273,7 +271,7 @@ FT_BEGIN_HEADER
|
||||
/* target :: A handle to the target outline. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
FT_EXPORT( FT_Error )
|
||||
FT_Outline_Copy( const FT_Outline* source,
|
||||
@ -286,7 +284,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Outline_Transform */
|
||||
/* */
|
||||
/* <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. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
@ -296,7 +294,7 @@ FT_BEGIN_HEADER
|
||||
/* matrix :: A pointer to the transformation matrix. */
|
||||
/* */
|
||||
/* <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. */
|
||||
/* */
|
||||
FT_EXPORT( void )
|
||||
@ -310,10 +308,13 @@ FT_BEGIN_HEADER
|
||||
/* FT_Outline_Embolden */
|
||||
/* */
|
||||
/* <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 */
|
||||
/* bottom borders as unchanged. */
|
||||
/* */
|
||||
/* Negative `strength' values to reduce the outline thickness are */
|
||||
/* possible also. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* outline :: A handle to the target outline. */
|
||||
/* */
|
||||
@ -322,9 +323,26 @@ FT_BEGIN_HEADER
|
||||
/* 26.6 pixel format. */
|
||||
/* */
|
||||
/* <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_Pos strength );
|
||||
|
||||
@ -335,14 +353,14 @@ FT_BEGIN_HEADER
|
||||
/* FT_Outline_Reverse */
|
||||
/* */
|
||||
/* <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. */
|
||||
/* */
|
||||
/* <InOut> */
|
||||
/* outline :: A pointer to the target outline descriptor. */
|
||||
/* */
|
||||
/* <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. */
|
||||
/* */
|
||||
/* It shouldn't be used by a normal client application, unless it */
|
||||
@ -358,7 +376,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Outline_Get_Bitmap */
|
||||
/* */
|
||||
/* <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. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
@ -366,17 +384,22 @@ FT_BEGIN_HEADER
|
||||
/* */
|
||||
/* outline :: A pointer to the source outline descriptor. */
|
||||
/* */
|
||||
/* <Output> */
|
||||
/* <InOut> */
|
||||
/* abitmap :: A pointer to the target bitmap descriptor. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* 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_Outline_Get_Bitmap( FT_Library library,
|
||||
@ -390,8 +413,8 @@ FT_BEGIN_HEADER
|
||||
/* FT_Outline_Render */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Renders an outline within a bitmap using the current scan-convert. */
|
||||
/* This functions uses an FT_Raster_Params structure as an argument, */
|
||||
/* Render an outline within a bitmap using the current scan-convert. */
|
||||
/* This function uses an @FT_Raster_Params structure as an argument, */
|
||||
/* allowing advanced features like direct composition, translucency, */
|
||||
/* etc. */
|
||||
/* */
|
||||
@ -401,20 +424,25 @@ FT_BEGIN_HEADER
|
||||
/* outline :: A pointer to the source outline descriptor. */
|
||||
/* */
|
||||
/* <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. */
|
||||
/* */
|
||||
/* <Return> */
|
||||
/* FreeType error code. 0 means success. */
|
||||
/* FreeType error code. 0~means success. */
|
||||
/* */
|
||||
/* <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. */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* 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_Outline_Render( FT_Library library,
|
||||
FT_Outline* outline,
|
||||
@ -429,7 +457,7 @@ FT_BEGIN_HEADER
|
||||
* @description:
|
||||
* 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.
|
||||
*
|
||||
* @values:
|
||||
@ -438,7 +466,7 @@ FT_BEGIN_HEADER
|
||||
* be filled, and counter-clockwise ones must be unfilled.
|
||||
*
|
||||
* 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.
|
||||
*
|
||||
* FT_ORIENTATION_FILL_RIGHT ::
|
||||
@ -448,15 +476,21 @@ FT_BEGIN_HEADER
|
||||
*
|
||||
* FT_ORIENTATION_FILL_LEFT ::
|
||||
* 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.
|
||||
*
|
||||
* 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_POSTSCRIPT = 1,
|
||||
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;
|
||||
|
||||
@ -496,3 +530,8 @@ FT_END_HEADER
|
||||
|
||||
|
||||
/* END */
|
||||
|
||||
|
||||
/* Local Variables: */
|
||||
/* coding: utf-8 */
|
||||
/* End: */
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* This file is part of the FreeType project, and may only be used, */
|
||||
@ -29,19 +29,19 @@ FT_BEGIN_HEADER
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Section> */
|
||||
/* system_interface */
|
||||
/* system_interface */
|
||||
/* */
|
||||
/* <Title> */
|
||||
/* System Interface */
|
||||
/* System Interface */
|
||||
/* */
|
||||
/* <Abstract> */
|
||||
/* How FreeType manages memory and i/o. */
|
||||
/* How FreeType manages memory and i/o. */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This section contains various definitions related to memory */
|
||||
/* management and i/o access. You need to understand this */
|
||||
/* information if you want to use a custom memory manager or you own */
|
||||
/* input i/o streams. */
|
||||
/* This section contains various definitions related to memory */
|
||||
/* management and i/o access. You need to understand this */
|
||||
/* information if you want to use a custom memory manager or you own */
|
||||
/* i/o streams. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
@ -53,80 +53,92 @@ FT_BEGIN_HEADER
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* @type: */
|
||||
/* FT_Memory */
|
||||
/* */
|
||||
/* @description: */
|
||||
/* A handle to a given memory manager object, defined with a */
|
||||
/* @FT_MemoryRec structure. */
|
||||
/* */
|
||||
/*************************************************************************
|
||||
*
|
||||
* @type:
|
||||
* FT_Memory
|
||||
*
|
||||
* @description:
|
||||
* A handle to a given memory manager object, defined with an
|
||||
* @FT_MemoryRec structure.
|
||||
*
|
||||
*/
|
||||
typedef struct FT_MemoryRec_* FT_Memory;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* @functype: */
|
||||
/* FT_Alloc_Func */
|
||||
/* */
|
||||
/* @description: */
|
||||
/* A function used to allocate `size' bytes from `memory'. */
|
||||
/* */
|
||||
/* @input: */
|
||||
/* memory :: A handle to the source memory manager. */
|
||||
/* */
|
||||
/* size :: The size in bytes to allocate. */
|
||||
/* */
|
||||
/* @return: */
|
||||
/* Address of new memory block. 0 in case of failure. */
|
||||
/* */
|
||||
/*************************************************************************
|
||||
*
|
||||
* @functype:
|
||||
* FT_Alloc_Func
|
||||
*
|
||||
* @description:
|
||||
* A function used to allocate `size' bytes from `memory'.
|
||||
*
|
||||
* @input:
|
||||
* memory ::
|
||||
* A handle to the source memory manager.
|
||||
*
|
||||
* size ::
|
||||
* The size in bytes to allocate.
|
||||
*
|
||||
* @return:
|
||||
* Address of new memory block. 0~in case of failure.
|
||||
*
|
||||
*/
|
||||
typedef void*
|
||||
(*FT_Alloc_Func)( FT_Memory memory,
|
||||
long size );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* @functype: */
|
||||
/* FT_Free_Func */
|
||||
/* */
|
||||
/* @description: */
|
||||
/* A function used to release a given block of memory. */
|
||||
/* */
|
||||
/* @input: */
|
||||
/* memory :: A handle to the source memory manager. */
|
||||
/* */
|
||||
/* block :: The address of the target memory block. */
|
||||
/* */
|
||||
/*************************************************************************
|
||||
*
|
||||
* @functype:
|
||||
* FT_Free_Func
|
||||
*
|
||||
* @description:
|
||||
* A function used to release a given block of memory.
|
||||
*
|
||||
* @input:
|
||||
* memory ::
|
||||
* A handle to the source memory manager.
|
||||
*
|
||||
* block ::
|
||||
* The address of the target memory block.
|
||||
*
|
||||
*/
|
||||
typedef void
|
||||
(*FT_Free_Func)( FT_Memory memory,
|
||||
void* block );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* @functype: */
|
||||
/* FT_Realloc_Func */
|
||||
/* */
|
||||
/* @description: */
|
||||
/* a function used to re-allocate a given block of memory. */
|
||||
/* */
|
||||
/* @input: */
|
||||
/* memory :: A handle to the source memory manager. */
|
||||
/* */
|
||||
/* cur_size :: The block's current size in bytes. */
|
||||
/* */
|
||||
/* new_size :: The block's requested new size. */
|
||||
/* */
|
||||
/* block :: The block's current address. */
|
||||
/* */
|
||||
/* @return: */
|
||||
/* New block address. 0 in case of memory shortage. */
|
||||
/* */
|
||||
/* @note: */
|
||||
/* In case of error, the old block must still be available. */
|
||||
/* */
|
||||
/*************************************************************************
|
||||
*
|
||||
* @functype:
|
||||
* FT_Realloc_Func
|
||||
*
|
||||
* @description:
|
||||
* A function used to re-allocate a given block of memory.
|
||||
*
|
||||
* @input:
|
||||
* memory ::
|
||||
* A handle to the source memory manager.
|
||||
*
|
||||
* cur_size ::
|
||||
* The block's current size in bytes.
|
||||
*
|
||||
* new_size ::
|
||||
* The block's requested new size.
|
||||
*
|
||||
* block ::
|
||||
* The block's current address.
|
||||
*
|
||||
* @return:
|
||||
* New block address. 0~in case of memory shortage.
|
||||
*
|
||||
* @note:
|
||||
* In case of error, the old block must still be available.
|
||||
*
|
||||
*/
|
||||
typedef void*
|
||||
(*FT_Realloc_Func)( FT_Memory memory,
|
||||
long cur_size,
|
||||
@ -134,23 +146,28 @@ FT_BEGIN_HEADER
|
||||
void* block );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* @struct: */
|
||||
/* FT_MemoryRec */
|
||||
/* */
|
||||
/* @description: */
|
||||
/* A structure used to describe a given memory manager to FreeType 2. */
|
||||
/* */
|
||||
/* @fields: */
|
||||
/* user :: A generic typeless pointer for user data. */
|
||||
/* */
|
||||
/* alloc :: A pointer type to an allocation function. */
|
||||
/* */
|
||||
/* free :: A pointer type to an memory freeing function. */
|
||||
/* */
|
||||
/* realloc :: A pointer type to a reallocation function. */
|
||||
/* */
|
||||
/*************************************************************************
|
||||
*
|
||||
* @struct:
|
||||
* FT_MemoryRec
|
||||
*
|
||||
* @description:
|
||||
* A structure used to describe a given memory manager to FreeType~2.
|
||||
*
|
||||
* @fields:
|
||||
* user ::
|
||||
* A generic typeless pointer for user data.
|
||||
*
|
||||
* alloc ::
|
||||
* A pointer type to an allocation function.
|
||||
*
|
||||
* free ::
|
||||
* A pointer type to an memory freeing function.
|
||||
*
|
||||
* realloc ::
|
||||
* A pointer type to a reallocation function.
|
||||
*
|
||||
*/
|
||||
struct FT_MemoryRec_
|
||||
{
|
||||
void* user;
|
||||
@ -167,26 +184,28 @@ FT_BEGIN_HEADER
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* @type: */
|
||||
/* FT_Stream */
|
||||
/* */
|
||||
/* @description: */
|
||||
/* A handle to an input stream. */
|
||||
/* */
|
||||
/*************************************************************************
|
||||
*
|
||||
* @type:
|
||||
* FT_Stream
|
||||
*
|
||||
* @description:
|
||||
* A handle to an input stream.
|
||||
*
|
||||
*/
|
||||
typedef struct FT_StreamRec_* FT_Stream;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* @struct: */
|
||||
/* FT_StreamDesc */
|
||||
/* */
|
||||
/* @description: */
|
||||
/* A union type used to store either a long or a pointer. This is */
|
||||
/* used to store a file descriptor or a FILE* in an input stream. */
|
||||
/* */
|
||||
/*************************************************************************
|
||||
*
|
||||
* @struct:
|
||||
* FT_StreamDesc
|
||||
*
|
||||
* @description:
|
||||
* A union type used to store either a long or a pointer. This is used
|
||||
* to store a file descriptor or a `FILE*' in an input stream.
|
||||
*
|
||||
*/
|
||||
typedef union FT_StreamDesc_
|
||||
{
|
||||
long value;
|
||||
@ -195,30 +214,36 @@ FT_BEGIN_HEADER
|
||||
} FT_StreamDesc;
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* @functype: */
|
||||
/* FT_Stream_IoFunc */
|
||||
/* */
|
||||
/* @description: */
|
||||
/* A function used to seek and read data from a given input stream. */
|
||||
/* */
|
||||
/* @input: */
|
||||
/* stream :: A handle to the source stream. */
|
||||
/* */
|
||||
/* offset :: The offset of read in stream (always from start). */
|
||||
/* */
|
||||
/* buffer :: The address of the read buffer. */
|
||||
/* */
|
||||
/* count :: The number of bytes to read from the stream. */
|
||||
/* */
|
||||
/* @return: */
|
||||
/* 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. */
|
||||
/* */
|
||||
/*************************************************************************
|
||||
*
|
||||
* @functype:
|
||||
* FT_Stream_IoFunc
|
||||
*
|
||||
* @description:
|
||||
* A function used to seek and read data from a given input stream.
|
||||
*
|
||||
* @input:
|
||||
* stream ::
|
||||
* A handle to the source stream.
|
||||
*
|
||||
* offset ::
|
||||
* The offset of read in stream (always from start).
|
||||
*
|
||||
* buffer ::
|
||||
* The address of the read buffer.
|
||||
*
|
||||
* count ::
|
||||
* The number of bytes to read from the stream.
|
||||
*
|
||||
* @return:
|
||||
* 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
|
||||
(*FT_Stream_IoFunc)( FT_Stream stream,
|
||||
unsigned long offset,
|
||||
@ -226,60 +251,73 @@ FT_BEGIN_HEADER
|
||||
unsigned long count );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* @functype: */
|
||||
/* FT_Stream_CloseFunc */
|
||||
/* */
|
||||
/* @description: */
|
||||
/* A function used to close a given input stream. */
|
||||
/* */
|
||||
/* @input: */
|
||||
/* stream :: A handle to the target stream. */
|
||||
/* */
|
||||
/*************************************************************************
|
||||
*
|
||||
* @functype:
|
||||
* FT_Stream_CloseFunc
|
||||
*
|
||||
* @description:
|
||||
* A function used to close a given input stream.
|
||||
*
|
||||
* @input:
|
||||
* stream ::
|
||||
* A handle to the target stream.
|
||||
*
|
||||
*/
|
||||
typedef void
|
||||
(*FT_Stream_CloseFunc)( FT_Stream stream );
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* @struct: */
|
||||
/* FT_StreamRec */
|
||||
/* */
|
||||
/* @description: */
|
||||
/* A structure used to describe an input stream. */
|
||||
/* */
|
||||
/* @input: */
|
||||
/* base :: For memory-based streams, this is the address of the */
|
||||
/* first stream byte in memory. This field should */
|
||||
/* always be set to NULL for disk-based streams. */
|
||||
/* */
|
||||
/* size :: The stream size in bytes. */
|
||||
/* */
|
||||
/* pos :: The current position within the stream. */
|
||||
/* */
|
||||
/* descriptor :: This field is a union that can hold an integer or a */
|
||||
/* pointer. It is used by stream implementations to */
|
||||
/* store file descriptors or FILE* pointers. */
|
||||
/* */
|
||||
/* pathname :: This field is completely ignored by FreeType. */
|
||||
/* However, it is often useful during debugging to use */
|
||||
/* it to store the stream's filename (where available). */
|
||||
/* */
|
||||
/* read :: The stream's input function. */
|
||||
/* */
|
||||
/* close :: The stream;s close function. */
|
||||
/* */
|
||||
/* memory :: 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. */
|
||||
/* */
|
||||
/*************************************************************************
|
||||
*
|
||||
* @struct:
|
||||
* FT_StreamRec
|
||||
*
|
||||
* @description:
|
||||
* A structure used to describe an input stream.
|
||||
*
|
||||
* @input:
|
||||
* base ::
|
||||
* For memory-based streams, this is the address of the first stream
|
||||
* byte in memory. This field should always be set to NULL for
|
||||
* disk-based streams.
|
||||
*
|
||||
* size ::
|
||||
* The stream size in bytes.
|
||||
*
|
||||
* pos ::
|
||||
* The current position within the stream.
|
||||
*
|
||||
* descriptor ::
|
||||
* This field is a union that can hold an integer or a pointer. It is
|
||||
* used by stream implementations to store file descriptors or `FILE*'
|
||||
* pointers.
|
||||
*
|
||||
* pathname ::
|
||||
* This field is completely ignored by FreeType. However, it is often
|
||||
* useful during debugging to use it to store the stream's filename
|
||||
* (where available).
|
||||
*
|
||||
* read ::
|
||||
* The stream's input function.
|
||||
*
|
||||
* close ::
|
||||
* The stream's close function.
|
||||
*
|
||||
* memory ::
|
||||
* 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_
|
||||
{
|
||||
unsigned char* base;
|
||||
|
@ -4,7 +4,7 @@
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* <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 */
|
||||
/* font-specific structures are defined in a different section. */
|
||||
/* */
|
||||
@ -53,6 +53,10 @@ FT_BEGIN_HEADER
|
||||
/* FT_Char */
|
||||
/* FT_Int */
|
||||
/* FT_UInt */
|
||||
/* FT_Int16 */
|
||||
/* FT_UInt16 */
|
||||
/* FT_Int32 */
|
||||
/* FT_UInt32 */
|
||||
/* FT_Short */
|
||||
/* FT_UShort */
|
||||
/* FT_Long */
|
||||
@ -94,7 +98,8 @@ FT_BEGIN_HEADER
|
||||
/* FT_Bool */
|
||||
/* */
|
||||
/* <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;
|
||||
|
||||
@ -162,7 +167,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Tag */
|
||||
/* */
|
||||
/* <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;
|
||||
|
||||
@ -273,8 +278,8 @@ FT_BEGIN_HEADER
|
||||
/* FT_Fixed */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* This type is used to store 16.16 fixed float values, like scales */
|
||||
/* or matrix coefficients. */
|
||||
/* This type is used to store 16.16 fixed float values, like scaling */
|
||||
/* values or matrix coefficients. */
|
||||
/* */
|
||||
typedef signed long FT_Fixed;
|
||||
|
||||
@ -285,7 +290,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Error */
|
||||
/* */
|
||||
/* <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. */
|
||||
/* */
|
||||
typedef int FT_Error;
|
||||
@ -308,7 +313,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_Offset */
|
||||
/* */
|
||||
/* <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, */
|
||||
/* or a memory block size. */
|
||||
/* */
|
||||
@ -321,7 +326,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_PtrDist */
|
||||
/* */
|
||||
/* <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 */
|
||||
/* between two pointers. */
|
||||
/* */
|
||||
@ -384,7 +389,7 @@ FT_BEGIN_HEADER
|
||||
/*************************************************************************/
|
||||
/* */
|
||||
/* <Struct> */
|
||||
/* FT_Data */
|
||||
/* FT_Data */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Read-only binary data represented as a pointer and a length. */
|
||||
@ -408,8 +413,8 @@ FT_BEGIN_HEADER
|
||||
/* FT_Generic_Finalizer */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Describes a function used to destroy the `client' data of any */
|
||||
/* FreeType object. See the description of the FT_Generic type for */
|
||||
/* Describe a function used to destroy the `client' data of any */
|
||||
/* FreeType object. See the description of the @FT_Generic type for */
|
||||
/* details of usage. */
|
||||
/* */
|
||||
/* <Input> */
|
||||
@ -461,14 +466,15 @@ FT_BEGIN_HEADER
|
||||
/* FT_MAKE_TAG */
|
||||
/* */
|
||||
/* <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. */
|
||||
/* */
|
||||
/* <Note> */
|
||||
/* The produced values *must* be 32bit integers. Don't redefine this */
|
||||
/* macro. */
|
||||
/* The produced values *must* be 32-bit integers. Don't redefine */
|
||||
/* this macro. */
|
||||
/* */
|
||||
#define FT_MAKE_TAG( _x1, _x2, _x3, _x4 ) \
|
||||
(FT_Tag) \
|
||||
( ( (FT_ULong)_x1 << 24 ) | \
|
||||
( (FT_ULong)_x2 << 16 ) | \
|
||||
( (FT_ULong)_x3 << 8 ) | \
|
||||
@ -498,8 +504,8 @@ FT_BEGIN_HEADER
|
||||
/* FT_ListNode */
|
||||
/* */
|
||||
/* <Description> */
|
||||
/* Many elements and objects in FreeType are listed through a */
|
||||
/* FT_List record (see FT_ListRec). As its name suggests, a */
|
||||
/* Many elements and objects in FreeType are listed through an */
|
||||
/* @FT_List record (see @FT_ListRec). As its name suggests, an */
|
||||
/* FT_ListNode is a handle to a single list element. */
|
||||
/* */
|
||||
typedef struct FT_ListNodeRec_* FT_ListNode;
|
||||
@ -511,7 +517,7 @@ FT_BEGIN_HEADER
|
||||
/* FT_List */
|
||||
/* */
|
||||
/* <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;
|
||||
|
||||
|
@ -25,6 +25,7 @@
|
||||
|
||||
|
||||
#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_MEMORY_H <freetype/internal/ftmemory.h>
|
||||
#define FT_INTERNAL_DEBUG_H <freetype/internal/ftdebug.h>
|
||||
|
@ -2,9 +2,10 @@
|
||||
/* */
|
||||
/* 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. */
|
||||
/* */
|
||||
/* 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 */
|
||||
/* exclusively *after* installation of the library. */
|
||||
/* This file corresponds to the default `ft2build.h' file for */
|
||||
/* FreeType 2. It uses the `freetype' include root. */
|
||||
/* */
|
||||
/* It assumes that "/usr/local/include/freetype2" (or whatever is */
|
||||
/* returned by the "freetype-config --cflags" or "pkg-config --cflags" */
|
||||
/* 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. */
|
||||
/* Note that specific platforms might use a different configuration. */
|
||||
/* See builds/unix/ft2unix.h for an example. */
|
||||
/* */
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
#ifndef __FT2_BUILD_UNIX_H__
|
||||
#define __FT2_BUILD_UNIX_H__
|
||||
#ifndef __FT2_BUILD_GENERIC_H__
|
||||
#define __FT2_BUILD_GENERIC_H__
|
||||
|
||||
/* "<prefix>/include/freetype2" must be in your current inclusion path */
|
||||
#include <freetype/config/ftheader.h>
|
||||
|
||||
#endif /* __FT2_BUILD_UNIX_H__ */
|
||||
#endif /* __FT2_BUILD_GENERIC_H__ */
|
||||
|
||||
|
||||
/* END */
|
||||
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue
Block a user