forked from minhngoc25a/freetype2
demos/config/x11/rules.mk:
support for multiple X11R6 entries in $(PATH) added. ftxbbox.c, ftcalc.c, ftdebug.c, ftdriver.h: doc fixes. ftdebug.c: formatting. ftdebug.h: making makros `;'-safe (i.e., they can now be used within if-else clauses without side effects resp. don't produce a single `;').
This commit is contained in:
parent
fc1f989446
commit
f993b6a033
|
@ -41,13 +41,13 @@ endif
|
||||||
#
|
#
|
||||||
ifneq ($(X11_PATH),)
|
ifneq ($(X11_PATH),)
|
||||||
|
|
||||||
X11_INCLUDE := $(X11_PATH)$(SEP)include
|
X11_INCLUDE := $(X11_PATH:%=%$(SEP)include)
|
||||||
X11_LIB := $(X11_PATH)$(SEP)lib
|
X11_LIB := $(X11_PATH:%=%$(SEP)lib)
|
||||||
|
|
||||||
# the GRAPH_LINK variable is expanded each time an executable is linked against
|
# the GRAPH_LINK variable is expanded each time an executable is linked against
|
||||||
# the graphics library..
|
# the graphics library..
|
||||||
#
|
#
|
||||||
GRAPH_LINK += -L$(X11_LIB) -lX11
|
GRAPH_LINK += $(X11_LIB:%=-L%) -lX11
|
||||||
|
|
||||||
# Solaris needs a -lsocket in GRAPH_LINK ..
|
# Solaris needs a -lsocket in GRAPH_LINK ..
|
||||||
#
|
#
|
||||||
|
|
|
@ -47,11 +47,13 @@
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* This function is used as a `move_to' and `line_to' emitter during */
|
/* This function is used as a `move_to' and `line_to' emitter during */
|
||||||
/* FT_Raster_Decompose(). It simply records the destination point in */
|
/* FT_Raster_Decompose(). It simply records the destination point in */
|
||||||
/* user->last. */
|
/* `user->last'. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* to :: The destination vector. */
|
/* to :: A pointer to the destination vector. */
|
||||||
/* user :: The current walk context. */
|
/* */
|
||||||
|
/* <InOut> */
|
||||||
|
/* user :: A pointer to the current walk context. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* Error code. 0 means success. */
|
/* Error code. 0 means success. */
|
||||||
|
@ -88,7 +90,7 @@
|
||||||
/* y2 :: The coordinate of the control point. */
|
/* y2 :: The coordinate of the control point. */
|
||||||
/* y3 :: The end coordinate. */
|
/* y3 :: The end coordinate. */
|
||||||
/* */
|
/* */
|
||||||
/* <Output> */
|
/* <InOut> */
|
||||||
/* min :: The address of the current minimum. */
|
/* min :: The address of the current minimum. */
|
||||||
/* max :: The address of the current maximum. */
|
/* max :: The address of the current maximum. */
|
||||||
/* */
|
/* */
|
||||||
|
@ -143,11 +145,11 @@
|
||||||
/* update it. */
|
/* update it. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* control :: A control point. */
|
/* control :: A pointer to a control point. */
|
||||||
/* to :: The destination vector. */
|
/* to :: A pointer to the destination vector. */
|
||||||
/* */
|
/* */
|
||||||
/* <InOut> */
|
/* <InOut> */
|
||||||
/* user :: The current walk context. */
|
/* user :: The address of the current walk context. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* Error code. 0 means success. */
|
/* Error code. 0 means success. */
|
||||||
|
@ -288,12 +290,12 @@
|
||||||
/* update it. */
|
/* update it. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* control1 :: The first control point. */
|
/* control1 :: A pointer to the first control point. */
|
||||||
/* control2 :: The second control point. */
|
/* control2 :: A pointer to the second control point. */
|
||||||
/* to :: The destination vector. */
|
/* to :: A pointer to the destination vector. */
|
||||||
/* */
|
/* */
|
||||||
/* <InOut> */
|
/* <InOut> */
|
||||||
/* user :: The current walk context. */
|
/* user :: The address of the current walk context. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* Error code. 0 means success. */
|
/* Error code. 0 means success. */
|
||||||
|
@ -350,7 +352,7 @@
|
||||||
/* outline :: A pointer to the source outline. */
|
/* outline :: A pointer to the source outline. */
|
||||||
/* */
|
/* */
|
||||||
/* <Output> */
|
/* <Output> */
|
||||||
/* bbox :: The outline's exact bounding box. */
|
/* abbox :: A pointer to the outline's exact bounding box. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* Error code. 0 means success. */
|
/* Error code. 0 means success. */
|
||||||
|
@ -376,8 +378,8 @@
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We compute the control box, as well as the bounding box */
|
/* We compute the control box as well as the bounding box of */
|
||||||
/* of all `on' points in the outline. Then, if the two boxes */
|
/* all `on' points in the outline. Then, if the two boxes */
|
||||||
/* coincide, we exit immediately. */
|
/* coincide, we exit immediately. */
|
||||||
|
|
||||||
vec = outline->points;
|
vec = outline->points;
|
||||||
|
|
|
@ -422,15 +422,18 @@
|
||||||
/* FT_Add64 */
|
/* FT_Add64 */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Add two Int64 values. Will be wrapped by the ADD_64() macro. */
|
/* Add two Int64 values. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* x :: A pointer to the first value to be added. */
|
/* x :: A pointer to the first value to be added. */
|
||||||
/* y :: A pointer to the second value to be added. */
|
/* y :: A pointer to the second value to be added. */
|
||||||
/* */
|
/* */
|
||||||
/* <InOut> */
|
/* <Output> */
|
||||||
/* z :: A pointer to the result of `x + y'. */
|
/* z :: A pointer to the result of `x + y'. */
|
||||||
/* */
|
/* */
|
||||||
|
/* <Note> */
|
||||||
|
/* Will be wrapped by the ADD_64() macro. */
|
||||||
|
/* */
|
||||||
BASE_FUNC
|
BASE_FUNC
|
||||||
void FT_Add64( FT_Int64* x,
|
void FT_Add64( FT_Int64* x,
|
||||||
FT_Int64* y,
|
FT_Int64* y,
|
||||||
|
@ -452,16 +455,18 @@
|
||||||
/* FT_MulTo64 */
|
/* FT_MulTo64 */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Multiplies two Int32 integers. Returns a Int64 integer. Will be */
|
/* Multiplies two Int32 integers. Returns a Int64 integer. */
|
||||||
/* wrapped by the MUL_64() macro. */
|
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* x :: The first multiplier. */
|
/* x :: The first multiplier. */
|
||||||
/* y :: The second multiplier. */
|
/* y :: The second multiplier. */
|
||||||
/* */
|
/* */
|
||||||
/* <InOut> */
|
/* <Output> */
|
||||||
/* z :: A pointer to the result of `x * y'. */
|
/* z :: A pointer to the result of `x * y'. */
|
||||||
/* */
|
/* */
|
||||||
|
/* <Note> */
|
||||||
|
/* Will be wrapped by the MUL_64() macro. */
|
||||||
|
/* */
|
||||||
BASE_FUNC
|
BASE_FUNC
|
||||||
void FT_MulTo64( FT_Int32 x,
|
void FT_MulTo64( FT_Int32 x,
|
||||||
FT_Int32 y,
|
FT_Int32 y,
|
||||||
|
@ -516,7 +521,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* Divides an Int64 value by an Int32 value. Returns an Int32 */
|
/* Divides an Int64 value by an Int32 value. Returns an Int32 */
|
||||||
/* integer. Will be wrapped by the DIV_64() macro. */
|
/* integer. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* x :: A pointer to the dividend. */
|
/* x :: A pointer to the dividend. */
|
||||||
|
@ -525,6 +530,9 @@
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* The result of `x / y'. */
|
/* The result of `x / y'. */
|
||||||
/* */
|
/* */
|
||||||
|
/* <Note> */
|
||||||
|
/* Will be wrapped by the DIV_64() macro. */
|
||||||
|
/* */
|
||||||
BASE_FUNC
|
BASE_FUNC
|
||||||
FT_Int32 FT_Div64by32( FT_Int64* x,
|
FT_Int32 FT_Div64by32( FT_Int64* x,
|
||||||
FT_Int32 y )
|
FT_Int32 y )
|
||||||
|
|
|
@ -50,9 +50,12 @@
|
||||||
#define MUL_64( x, y, z ) FT_MulTo64( x, y, &z )
|
#define MUL_64( x, y, z ) FT_MulTo64( x, y, &z )
|
||||||
#define DIV_64( x, y ) FT_Div64by32( &x, y )
|
#define DIV_64( x, y ) FT_Div64by32( &x, y )
|
||||||
|
|
||||||
BASE_DEF void FT_Add64 ( FT_Int64* x, FT_Int64* y, FT_Int64* z );
|
BASE_DEF
|
||||||
BASE_DEF void FT_MulTo64 ( FT_Int32 x, FT_Int32 y, FT_Int64* z );
|
void FT_Add64 ( FT_Int64* x, FT_Int64* y, FT_Int64* z );
|
||||||
BASE_DEF FT_Int32 FT_Div64by32( FT_Int64* x, FT_Int32 y );
|
BASE_DEF
|
||||||
|
void FT_MulTo64 ( FT_Int32 x, FT_Int32 y, FT_Int64* z );
|
||||||
|
BASE_DEF
|
||||||
|
FT_Int32 FT_Div64by32( FT_Int64* x, FT_Int32 y );
|
||||||
|
|
||||||
|
|
||||||
#endif /* LONG64 */
|
#endif /* LONG64 */
|
||||||
|
@ -60,7 +63,8 @@
|
||||||
|
|
||||||
#define SQRT_32( x ) FT_Sqrt32( x )
|
#define SQRT_32( x ) FT_Sqrt32( x )
|
||||||
|
|
||||||
BASE_DEF FT_Int32 FT_Sqrt32( FT_Int32 l );
|
BASE_DEF
|
||||||
|
FT_Int32 FT_Sqrt32( FT_Int32 l );
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* Debugging and logging component (body). */
|
/* Debugging and logging component (body). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-1999 by */
|
/* Copyright 1996-2000 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used */
|
/* This file is part of the FreeType project, and may only be used */
|
||||||
|
@ -31,14 +31,6 @@
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
|
||||||
/* */
|
|
||||||
/* The Print() function is defined in ftconfig.h. It defaults to */
|
|
||||||
/* vprintf() on systems which have it. */
|
|
||||||
/* */
|
|
||||||
/*************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
void FT_Message( const char* fmt, ... )
|
void FT_Message( const char* fmt, ... )
|
||||||
{
|
{
|
||||||
va_list ap;
|
va_list ap;
|
||||||
|
@ -65,6 +57,21 @@
|
||||||
|
|
||||||
#ifdef FT_DEBUG_LEVEL_TRACE
|
#ifdef FT_DEBUG_LEVEL_TRACE
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************/
|
||||||
|
/* */
|
||||||
|
/* <Function> */
|
||||||
|
/* FT_SetTraceLevel */
|
||||||
|
/* */
|
||||||
|
/* <Description> */
|
||||||
|
/* Sets the trace level for debugging. */
|
||||||
|
/* */
|
||||||
|
/* <Input> */
|
||||||
|
/* component :: The component which should be traced. See ftdebug.h */
|
||||||
|
/* for a complete list. If set to `trace_any', all */
|
||||||
|
/* components will be traced. */
|
||||||
|
/* level :: The tracing level. */
|
||||||
|
/* */
|
||||||
EXPORT_FUNC
|
EXPORT_FUNC
|
||||||
void FT_SetTraceLevel( FT_Trace component,
|
void FT_SetTraceLevel( FT_Trace component,
|
||||||
char level )
|
char level )
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* Debugging and logging component (specification). */
|
/* Debugging and logging component (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-1999 by */
|
/* Copyright 1996-2000 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used */
|
/* This file is part of the FreeType project, and may only be used */
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* - release mode: */
|
/* - release mode: */
|
||||||
/* */
|
/* */
|
||||||
/* No error message is sent nor generated. The code is free from any */
|
/* No error message is sent or generated. The code is free from any */
|
||||||
/* debugging parts. */
|
/* debugging parts. */
|
||||||
/* */
|
/* */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
@ -57,6 +57,7 @@
|
||||||
|
|
||||||
typedef enum FT_Trace_
|
typedef enum FT_Trace_
|
||||||
{
|
{
|
||||||
|
/* the first level must always be `trace_any' */
|
||||||
trace_any = 0,
|
trace_any = 0,
|
||||||
|
|
||||||
/* first, define an enum for each common component */
|
/* first, define an enum for each common component */
|
||||||
|
@ -78,12 +79,14 @@
|
||||||
trace_ttextend,
|
trace_ttextend,
|
||||||
trace_ttdriver,
|
trace_ttdriver,
|
||||||
|
|
||||||
|
#if 0
|
||||||
/* define an enum for each TrueDoc driver component */
|
/* define an enum for each TrueDoc driver component */
|
||||||
trace_tdobjs,
|
trace_tdobjs,
|
||||||
trace_tdload,
|
trace_tdload,
|
||||||
trace_tdgload,
|
trace_tdgload,
|
||||||
trace_tdhint,
|
trace_tdhint,
|
||||||
trace_tddriver,
|
trace_tddriver,
|
||||||
|
#endif
|
||||||
|
|
||||||
/* define an enum for each Type1 driver component */
|
/* define an enum for each Type1 driver component */
|
||||||
trace_t1objs,
|
trace_t1objs,
|
||||||
|
@ -100,6 +103,7 @@
|
||||||
|
|
||||||
} FT_Trace;
|
} FT_Trace;
|
||||||
|
|
||||||
|
/* declared in ftdebug.c */
|
||||||
extern char ft_trace_levels[trace_max];
|
extern char ft_trace_levels[trace_max];
|
||||||
|
|
||||||
|
|
||||||
|
@ -114,8 +118,11 @@
|
||||||
|
|
||||||
|
|
||||||
#define FT_TRACE( level, varformat ) \
|
#define FT_TRACE( level, varformat ) \
|
||||||
|
do \
|
||||||
|
{ \
|
||||||
if ( ft_trace_levels[FT_COMPONENT] >= level ) \
|
if ( ft_trace_levels[FT_COMPONENT] >= level ) \
|
||||||
FT_Message##varformat
|
FT_Message##varformat; \
|
||||||
|
} while ( 0 )
|
||||||
|
|
||||||
|
|
||||||
EXPORT_DEF
|
EXPORT_DEF
|
||||||
|
@ -126,16 +133,16 @@
|
||||||
#elif defined( FT_DEBUG_LEVEL_ERROR )
|
#elif defined( FT_DEBUG_LEVEL_ERROR )
|
||||||
|
|
||||||
|
|
||||||
#define FT_TRACE( level, varformat ) /* nothing */
|
#define FT_TRACE( level, varformat ) while ( 0 ) { } /* nothing */
|
||||||
|
|
||||||
|
|
||||||
#else /* release mode */
|
#else /* release mode */
|
||||||
|
|
||||||
|
|
||||||
#define FT_Assert( condition ) /* nothing */
|
#define FT_Assert( condition ) while ( 0 ) { } /* nothing */
|
||||||
|
|
||||||
#define FT_TRACE( level, varformat ) /* nothing */
|
#define FT_TRACE( level, varformat ) while ( 0 ) { } /* nothing */
|
||||||
#define FT_ERROR( varformat ) /* nothing */
|
#define FT_ERROR( varformat ) while ( 0 ) { } /* nothing */
|
||||||
|
|
||||||
|
|
||||||
#endif /* FT_DEBUG_LEVEL_TRACE, FT_DEBUG_LEVEL_ERROR */
|
#endif /* FT_DEBUG_LEVEL_TRACE, FT_DEBUG_LEVEL_ERROR */
|
||||||
|
@ -146,7 +153,7 @@
|
||||||
/* Define macros and functions that are common to the debug and trace */
|
/* Define macros and functions that are common to the debug and trace */
|
||||||
/* modes. */
|
/* modes. */
|
||||||
/* */
|
/* */
|
||||||
/* You need vprintf() to be able to compile ttdebug.c. */
|
/* You need vprintf() to be able to compile ftdebug.c. */
|
||||||
/* */
|
/* */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
@ -156,9 +163,14 @@
|
||||||
#include "stdio.h" /* for vprintf() */
|
#include "stdio.h" /* for vprintf() */
|
||||||
|
|
||||||
#define FT_Assert( condition ) \
|
#define FT_Assert( condition ) \
|
||||||
if ( !(condition) ) \
|
do \
|
||||||
FT_Panic( "assertion failed on line %d of file %s\n", __LINE__, __FILE__ );
|
{ \
|
||||||
|
if ( !( condition ) ) \
|
||||||
|
FT_Panic( "assertion failed on line %d of file %s\n", \
|
||||||
|
__LINE__, __FILE__ ); \
|
||||||
|
} while ( 0 )
|
||||||
|
|
||||||
|
/* print a message */
|
||||||
extern void FT_Message( const char* fmt, ... );
|
extern void FT_Message( const char* fmt, ... );
|
||||||
|
|
||||||
/* print a message and exit */
|
/* print a message and exit */
|
||||||
|
@ -170,6 +182,9 @@
|
||||||
#endif /* FT_DEBUG_LEVEL_TRACE || FT_DEBUG_LEVEL_ERROR */
|
#endif /* FT_DEBUG_LEVEL_TRACE || FT_DEBUG_LEVEL_ERROR */
|
||||||
|
|
||||||
|
|
||||||
|
/* you need two opening resp. closing parentheses!
|
||||||
|
Example: FT_TRACE0(( "Value is %i", foo )) */
|
||||||
|
|
||||||
#define FT_TRACE0( varformat ) FT_TRACE( 0, varformat )
|
#define FT_TRACE0( varformat ) FT_TRACE( 0, varformat )
|
||||||
#define FT_TRACE1( varformat ) FT_TRACE( 1, varformat )
|
#define FT_TRACE1( varformat ) FT_TRACE( 1, varformat )
|
||||||
#define FT_TRACE2( varformat ) FT_TRACE( 2, varformat )
|
#define FT_TRACE2( varformat ) FT_TRACE( 2, varformat )
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* FreeType driver interface (specification). */
|
/* FreeType driver interface (specification). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-1999 by */
|
/* Copyright 1996-2000 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used */
|
/* This file is part of the FreeType project, and may only be used */
|
||||||
|
@ -56,7 +56,7 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <FuncType> */
|
/* <FuncType> */
|
||||||
/* FTDriver_doneEngine */
|
/* FTDriver_doneDriver */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A driver method used to finalize a given driver object. Note that */
|
/* A driver method used to finalize a given driver object. Note that */
|
||||||
|
@ -95,7 +95,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* A typeless pointer to the extension's interface (normally a table */
|
/* A typeless pointer to the extension's interface (normally a table */
|
||||||
/* of function pointers). Returns NULL when the requested extension */
|
/* of function pointers). Returns NULL if the requested extension */
|
||||||
/* isn't available (i.e., wasn't compiled in the driver at build */
|
/* isn't available (i.e., wasn't compiled in the driver at build */
|
||||||
/* time). */
|
/* time). */
|
||||||
/* */
|
/* */
|
||||||
|
@ -106,17 +106,18 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <Type> */
|
/* <Type> */
|
||||||
/* FTDriver_formatInterface */
|
/* FT_FormatInterface */
|
||||||
/* */
|
/* */
|
||||||
/* <Description> */
|
/* <Description> */
|
||||||
/* A driver interface field whose value is a driver-specific */
|
/* A driver interface field whose value is a driver-specific */
|
||||||
/* interface method tables. This table contains entry points to */
|
/* interface method table. This table contains entry points to */
|
||||||
/* various functions that are strictly related to the driver's */
|
/* various functions that are strictly related to the driver's */
|
||||||
/* format. */
|
/* format. */
|
||||||
/* */
|
/* */
|
||||||
typedef void* FT_FormatInterface;
|
typedef void* FT_FormatInterface;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
@ -140,24 +141,23 @@
|
||||||
/* must be created by the caller. */
|
/* must be created by the caller. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* driver :: A handle to the source driver object. */
|
/* stream :: The input stream. */
|
||||||
/* resource :: A handle to the source resource. */
|
/* typeface_index :: The face index in the font resource. Used to */
|
||||||
/* typeface_index :: The index of face in the font resource. Used to */
|
|
||||||
/* access individual faces in collections. */
|
/* access individual faces in collections. */
|
||||||
/* */
|
|
||||||
/* face :: A handle to the new target face. */
|
/* face :: A handle to the new target face. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* FreeType error code. 0 means success. */
|
/* FreeType error code. 0 means success. */
|
||||||
/* */
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
/* The `typeface_index' parameter field will be set to -1 when the */
|
/* The `typeface_index' parameter field will be set to -1 if the */
|
||||||
/* engine only wants to test the format of the resource. This means */
|
/* engine only wants to test the format of the resource. This means */
|
||||||
/* that font drivers should simply check the font format, then return */
|
/* that font drivers should simply check the font format, then return */
|
||||||
/* immediately with an error code of 0 (meaning success). The field */
|
/* immediately with an error code of 0 (meaning success). The field */
|
||||||
/* `num_faces' should be set. */
|
/* `num_faces' should be set. */
|
||||||
/* */
|
/* */
|
||||||
/* done_face() will be called subsequently, whatever the result was. */
|
/* FTDriver_doneFace() will be called subsequently, whatever the */
|
||||||
|
/* result was. */
|
||||||
/* */
|
/* */
|
||||||
typedef FT_Error (*FTDriver_initFace)( FT_Stream stream,
|
typedef FT_Error (*FTDriver_initFace)( FT_Stream stream,
|
||||||
FT_Long typeface_index,
|
FT_Long typeface_index,
|
||||||
|
@ -194,15 +194,13 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* face :: A handle to the source face object. */
|
/* face :: A handle to the source face object. */
|
||||||
/* */
|
|
||||||
/* left_glyph :: The index of the left glyph in the kern pair. */
|
/* left_glyph :: The index of the left glyph in the kern pair. */
|
||||||
/* */
|
|
||||||
/* right_glyph :: The index of the right glyph in the kern pair. */
|
/* right_glyph :: The index of the right glyph in the kern pair. */
|
||||||
/* */
|
/* */
|
||||||
/* <Output> */
|
/* <Output> */
|
||||||
/* kerning :: The kerning vector. This is in font units for */
|
/* kerning :: A pointer to the kerning vector. This is in font */
|
||||||
/* scalable formats, and in pixels for fixed-sizes */
|
/* units for scalable formats, and in pixels for */
|
||||||
/* formats. */
|
/* fixed-sizes formats. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* FreeType error code. 0 means success. */
|
/* FreeType error code. 0 means success. */
|
||||||
|
@ -213,7 +211,7 @@
|
||||||
/* kernings are out of the scope of this method (the basic driver */
|
/* kernings are out of the scope of this method (the basic driver */
|
||||||
/* interface is meant to be simple). */
|
/* interface is meant to be simple). */
|
||||||
/* */
|
/* */
|
||||||
/* They can be implemented through format-specific interfaces. */
|
/* They can be implemented by format-specific interfaces. */
|
||||||
/* */
|
/* */
|
||||||
typedef FT_Error (*FTDriver_getKerning)( FT_Face face,
|
typedef FT_Error (*FTDriver_getKerning)( FT_Face face,
|
||||||
FT_UInt left_glyph,
|
FT_UInt left_glyph,
|
||||||
|
@ -221,6 +219,7 @@
|
||||||
FT_Vector* kerning );
|
FT_Vector* kerning );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
@ -244,7 +243,6 @@
|
||||||
/* must be created by the caller. */
|
/* must be created by the caller. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* face :: A handle to the parent face object. */
|
|
||||||
/* size :: A handle to the new size object. */
|
/* size :: A handle to the new size object. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
|
@ -268,10 +266,12 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* size :: A handle to the target size object. */
|
/* size :: A handle to the target size object. */
|
||||||
/* char_width :: The character width expressed in 26.6 fractional */
|
/* char_width :: The character width expressed in 26.6 */
|
||||||
/* points. */
|
/* fractional points. */
|
||||||
/* char_height :: The character height expressed in 26.6 fractional */
|
/* char_height :: The character height expressed in 26.6 */
|
||||||
/* points. */
|
/* fractional points. */
|
||||||
|
/* horz_resolution :: The horizontal resolution. */
|
||||||
|
/* vert_resolution :: The vertical resolution. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* FreeType error code. 0 means success. */
|
/* FreeType error code. 0 means success. */
|
||||||
|
@ -298,26 +298,17 @@
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* size :: A handle to the target size object. */
|
/* size :: A handle to the target size object. */
|
||||||
/* */
|
|
||||||
/* pixel_width :: The character width expressed in 26.6 fractional */
|
/* pixel_width :: The character width expressed in 26.6 fractional */
|
||||||
/* pixels. */
|
/* pixels. */
|
||||||
/* */
|
|
||||||
/* pixel_height :: The character height expressed in 26.6 fractional */
|
/* pixel_height :: The character height expressed in 26.6 fractional */
|
||||||
/* pixels. */
|
/* pixels. */
|
||||||
/* */
|
/* */
|
||||||
/* point_size :: The corresponding character size in points. This */
|
|
||||||
/* value is only sent to the TrueType bytecode */
|
|
||||||
/* interpreter, even though 99% of glyph programs */
|
|
||||||
/* will simply ignore it. A safe value there is the */
|
|
||||||
/* maximum of the pixel width and height (multiplied */
|
|
||||||
/* by 64 to make it a 26.6 fixed float). */
|
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* FreeType error code. 0 means success. */
|
/* FreeType error code. 0 means success. */
|
||||||
/* */
|
/* */
|
||||||
/* <Note> */
|
/* <Note> */
|
||||||
/* This function should work with all kinds of `Size' objects, either */
|
/* This function should work with all kinds of `Size' objects, either */
|
||||||
/* fixed or scalable ones. The `point_size' parameter will simply be */
|
/* fixed or scalable ones. */
|
||||||
/* ignored in case of fixed formats. */
|
|
||||||
/* */
|
/* */
|
||||||
typedef FT_Error (*FTDriver_setPixelSizes)( FT_Size size,
|
typedef FT_Error (*FTDriver_setPixelSizes)( FT_Size size,
|
||||||
FT_UInt pixel_width,
|
FT_UInt pixel_width,
|
||||||
|
@ -337,12 +328,10 @@
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* size :: A handle to the target size object. */
|
/* size :: A handle to the target size object. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
|
||||||
/* FreeType error code. 0 means success. */
|
|
||||||
/* */
|
|
||||||
typedef void (*FTDriver_doneSize)( FT_Size size );
|
typedef void (*FTDriver_doneSize)( FT_Size size );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
@ -368,7 +357,6 @@
|
||||||
/* bitmap format. */
|
/* bitmap format. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* face :: A handle to the parent face object. */
|
|
||||||
/* slot :: A handle to the new glyph slot object. */
|
/* slot :: A handle to the new glyph slot object. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
|
@ -387,12 +375,8 @@
|
||||||
/* is not destroyed by this function. */
|
/* is not destroyed by this function. */
|
||||||
/* */
|
/* */
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* face :: A handle to the parent face object. */
|
|
||||||
/* slot :: A handle to the new glyph slot object. */
|
/* slot :: A handle to the new glyph slot object. */
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
|
||||||
/* FreeType error code. 0 means success. */
|
|
||||||
/* */
|
|
||||||
typedef void (*FTDriver_doneGlyphSlot)( FT_GlyphSlot slot );
|
typedef void (*FTDriver_doneGlyphSlot)( FT_GlyphSlot slot );
|
||||||
|
|
||||||
|
|
||||||
|
@ -407,21 +391,14 @@
|
||||||
/* <Input> */
|
/* <Input> */
|
||||||
/* slot :: A handle to target slot object where the glyph will */
|
/* slot :: A handle to target slot object where the glyph will */
|
||||||
/* be loaded. */
|
/* be loaded. */
|
||||||
/* */
|
|
||||||
/* size :: A handle to the source face size at which the glyph */
|
/* size :: A handle to the source face size at which the glyph */
|
||||||
/* must be scaled/loaded. */
|
/* must be scaled/loaded. */
|
||||||
/* */
|
|
||||||
/* glyph_index :: The index of the glyph in the font file. */
|
/* glyph_index :: The index of the glyph in the font file. */
|
||||||
/* */
|
|
||||||
/* load_flags :: A flag indicating what to load for this glyph. The */
|
/* load_flags :: A flag indicating what to load for this glyph. The */
|
||||||
/* FTLOAD_??? constants can be used to control the */
|
/* FTLOAD_??? constants can be used to control the */
|
||||||
/* glyph loading process (e.g., whether the outline */
|
/* glyph loading process (e.g., whether the outline */
|
||||||
/* should be scaled, whether to load bitmaps or not, */
|
/* should be scaled, whether to load bitmaps or not, */
|
||||||
/* whether to hint the outline, etc). */
|
/* whether to hint the outline, etc). */
|
||||||
/* <Output> */
|
|
||||||
/* result :: A set of bit flags indicating the type of data that */
|
|
||||||
/* was loaded in the glyph slot (outline, bitmap, */
|
|
||||||
/* pixmap, etc). */
|
|
||||||
/* */
|
/* */
|
||||||
/* <Return> */
|
/* <Return> */
|
||||||
/* FreeType error code. 0 means success. */
|
/* FreeType error code. 0 means success. */
|
||||||
|
@ -432,6 +409,7 @@
|
||||||
FT_Int load_flags );
|
FT_Int load_flags );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
@ -463,6 +441,19 @@
|
||||||
FT_Long charcode );
|
FT_Long charcode );
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*************************************************************************/
|
||||||
|
/*************************************************************************/
|
||||||
|
/*************************************************************************/
|
||||||
|
/**** ****/
|
||||||
|
/**** ****/
|
||||||
|
/**** I N T E R F A C E ****/
|
||||||
|
/**** ****/
|
||||||
|
/**** ****/
|
||||||
|
/*************************************************************************/
|
||||||
|
/*************************************************************************/
|
||||||
|
/*************************************************************************/
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* <Struct> */
|
/* <Struct> */
|
||||||
|
@ -482,63 +473,52 @@
|
||||||
/* <Fields> */
|
/* <Fields> */
|
||||||
/* driver_object_size :: The size in bytes of a single driver */
|
/* driver_object_size :: The size in bytes of a single driver */
|
||||||
/* object. */
|
/* object. */
|
||||||
/* */
|
|
||||||
/* face_object_size :: The size in bytes of a single face object. */
|
/* face_object_size :: The size in bytes of a single face object. */
|
||||||
/* */
|
|
||||||
/* size_object_size :: The size in bytes of a single size object. */
|
/* size_object_size :: The size in bytes of a single size object. */
|
||||||
/* */
|
|
||||||
/* slot_object_size :: The size in bytes of a single glyph slot */
|
/* slot_object_size :: The size in bytes of a single glyph slot */
|
||||||
/* object. */
|
/* object. */
|
||||||
/* */
|
/* */
|
||||||
/* driver_name :: a string to describe the driver to the */
|
/* driver_name :: A string to describe the driver to the */
|
||||||
/* system. It doesn't necessarily describe */
|
/* system. It doesn't necessarily describe */
|
||||||
/* in detail all the font formats the driver */
|
/* in detail all the font formats the driver */
|
||||||
/* may support. */
|
/* may support. */
|
||||||
/* */
|
/* driver_version :: The driver version number. Starts at 1. */
|
||||||
/* driver_version :: driver version number. starts at 1 */
|
/* driver_requires :: The FreeType major version this driver is */
|
||||||
/* */
|
|
||||||
/* driver_requires :: the FreeType major version this driver is */
|
|
||||||
/* written for. This number should be equal */
|
/* written for. This number should be equal */
|
||||||
/* to or greater than 2 ! */
|
/* to or greater than 2! */
|
||||||
/* */
|
/* */
|
||||||
/* format_interface :: A pointer to the driver's format-specific */
|
/* format_interface :: A pointer to the driver's format-specific */
|
||||||
/* interface. */
|
/* interface. */
|
||||||
/* */
|
/* */
|
||||||
/* init_driver :: Used to initialize a given driver object. */
|
/* init_driver :: Used to initialize a given driver object. */
|
||||||
/* */
|
|
||||||
/* done_driver :: Used to finalize and destroy a given */
|
/* done_driver :: Used to finalize and destroy a given */
|
||||||
/* driver object. */
|
/* driver object. */
|
||||||
/* */
|
/* get_interface :: Returns an interface for a given driver */
|
||||||
/* get_extension :: Returns an interface for a given driver */
|
|
||||||
/* extension. */
|
/* extension. */
|
||||||
/* */
|
/* */
|
||||||
/* init_face :: Initializes a given face object. */
|
/* init_face :: Initializes a given face object. */
|
||||||
/* */
|
|
||||||
/* done_face :: Discards a face object, as well as all */
|
/* done_face :: Discards a face object, as well as all */
|
||||||
/* child objects (sizes, charmaps, glyph */
|
/* child objects (sizes, charmaps, glyph */
|
||||||
/* slots). */
|
/* slots). */
|
||||||
/* */
|
|
||||||
/* get_kerning :: Returns the kerning vector corresponding */
|
/* get_kerning :: Returns the kerning vector corresponding */
|
||||||
/* to a pair of glyphs, expressed in unscaled */
|
/* to a pair of glyphs, expressed in unscaled */
|
||||||
/* font units. */
|
/* font units. */
|
||||||
/* */
|
/* */
|
||||||
/* init_size :: Initializes a given size object. */
|
/* init_size :: Initializes a given size object. */
|
||||||
/* */
|
|
||||||
/* done_size :: Finalizes a given size object. */
|
/* done_size :: Finalizes a given size object. */
|
||||||
/* */
|
|
||||||
/* set_size_char_sizes :: Resets a scalable size object's character */
|
/* set_size_char_sizes :: Resets a scalable size object's character */
|
||||||
/* size. */
|
/* size. */
|
||||||
/* */
|
|
||||||
/* set_pixel_sizes :: Resets a face size object's pixel */
|
/* set_pixel_sizes :: Resets a face size object's pixel */
|
||||||
/* dimensions. Applies to both scalable and */
|
/* dimensions. Applies to both scalable and */
|
||||||
/* fixed faces. */
|
/* fixed faces. */
|
||||||
/* */
|
/* */
|
||||||
/* init_glyph_slot :: Initializes a given glyph slot object. */
|
/* init_glyph_slot :: Initializes a given glyph slot object. */
|
||||||
/* */
|
|
||||||
/* done_glyph_slot :: Finalizes a given glyph slot. */
|
/* done_glyph_slot :: Finalizes a given glyph slot. */
|
||||||
/* */
|
|
||||||
/* load_glyph :: Loads a given glyph into a given slot. */
|
/* load_glyph :: Loads a given glyph into a given slot. */
|
||||||
/* */
|
/* */
|
||||||
|
/* get_char_index :: Returns the glyph index for a given */
|
||||||
|
/* charmap. */
|
||||||
|
/* */
|
||||||
typedef struct FT_DriverInterface_
|
typedef struct FT_DriverInterface_
|
||||||
{
|
{
|
||||||
FT_Int driver_object_size;
|
FT_Int driver_object_size;
|
||||||
|
@ -573,6 +553,7 @@
|
||||||
|
|
||||||
} FT_DriverInterface;
|
} FT_DriverInterface;
|
||||||
|
|
||||||
|
|
||||||
#endif /* FTDRIVER_H */
|
#endif /* FTDRIVER_H */
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue