* builds/win32/visualc/freetype.vcproj: Updated.

Exclude debug info for `Release' versions to reduce library size.


* src/base/ftobjs.c (FT_Open_Face): Make it work as documented, this
is, ignore `aface' completely if face_index < 0.  Reported by David
Osborn <spam@habitualhiatus.com>.


* include/freetype/ftimage.h (FT_Outline_MoveToFunc,
FT_Outline_LineTo_Func, FT_Outline_ConicToFunc,
FT_Outline_CubicToFunc), src/smooth/ftgrays.c (gray_render_conic,
gray_render_cubic, gray_move_to, gray_line_to, gray_conic_to,
gray_cubic_to, gray_render_span, gray_sweep): Decorate parameters
with `const' where appropriate.
This commit is contained in:
Werner Lemberg 2005-05-17 20:35:23 +00:00
parent daeaa43978
commit 4303677c2d
7 changed files with 777 additions and 821 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1912,8 +1912,8 @@ FT_BEGIN_HEADER
/* @FT_Open_Face can be used to determine and/or check the font */
/* format of a given font resource. If the `face_index' field is */
/* negative, the function will _not_ return any face handle in */
/* `*face'; the return value is 0 if the font format is recognized, */
/* or non-zero otherwise. */
/* `*aface'; the function's return value is 0 if the font format is */
/* recognized, or non-zero otherwise. */
/* */
FT_EXPORT( FT_Error )
FT_Open_Face( FT_Library library,

View File

@ -486,8 +486,8 @@ FT_BEGIN_HEADER
/* 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
@ -512,8 +512,8 @@ FT_BEGIN_HEADER
/* 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
@ -542,9 +542,9 @@ FT_BEGIN_HEADER
/* 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
@ -573,10 +573,10 @@ FT_BEGIN_HEADER
/* 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

View File

@ -1550,11 +1550,9 @@
/* test for valid `library' delayed to */
/* FT_Stream_New() */
if ( !aface || !args )
if ( ( !aface && face_index >= 0 ) || !args )
return FT_Err_Invalid_Argument;
*aface = 0;
external_stream = FT_BOOL( ( args->flags & FT_OPEN_STREAM ) &&
args->stream );
@ -1720,7 +1718,8 @@
internal->transform_delta.y = 0;
}
*aface = face;
if ( aface )
*aface = face;
goto Exit;
Fail:

View File

@ -339,16 +339,16 @@ FT_BEGIN_HEADER
/*************************************************************************/
#define ChainPosClassSet otv_x_Ox, "ChainPosClassSet"
#define ChainPosRuleSet otv_x_Ox, "ChainPosRuleSet"
#define ChainPosRuleSet otv_x_Ox, "ChainPosRuleSet"
#define ChainSubClassSet otv_x_Ox, "ChainSubClassSet"
#define ChainSubRuleSet otv_x_Ox, "ChainSubRuleSet"
#define JstfLangSys otv_x_Ox, "JstfLangSys"
#define JstfMax otv_x_Ox, "JstfMax"
#define JstfMax otv_x_Ox, "JstfMax"
#define LigGlyph otv_x_Ox, "LigGlyph"
#define LigatureArray otv_x_Ox, "LigatureArray"
#define LigatureSet otv_x_Ox, "LigatureSet"
#define PosClassSet otv_x_Ox, "PosClassSet"
#define PosRuleSet otv_x_Ox, "PosRuleSet"
#define PosRuleSet otv_x_Ox, "PosRuleSet"
#define SubClassSet otv_x_Ox, "SubClassSet"
#define SubRuleSet otv_x_Ox, "SubRuleSet"
@ -356,24 +356,24 @@ FT_BEGIN_HEADER
otv_x_Ox ( FT_Bytes table,
OTV_Validator valid );
#define AlternateSubstFormat1 otv_u_C_x_Ox, "AlternateSubstFormat1"
#define ChainContextPosFormat1 otv_u_C_x_Ox, "ChainContextPosFormat1"
#define ChainContextSubstFormat1 otv_u_C_x_Ox, "ChainContextSubstFormat1"
#define ContextPosFormat1 otv_u_C_x_Ox, "ContextPosFormat1"
#define ContextSubstFormat1 otv_u_C_x_Ox, "ContextSubstFormat1"
#define LigatureSubstFormat1 otv_u_C_x_Ox, "LigatureSubstFormat1"
#define MultipleSubstFormat1 otv_u_C_x_Ox, "MultipleSubstFormat1"
#define AlternateSubstFormat1 otv_u_C_x_Ox, "AlternateSubstFormat1"
#define ChainContextPosFormat1 otv_u_C_x_Ox, "ChainContextPosFormat1"
#define ChainContextSubstFormat1 otv_u_C_x_Ox, "ChainContextSubstFormat1"
#define ContextPosFormat1 otv_u_C_x_Ox, "ContextPosFormat1"
#define ContextSubstFormat1 otv_u_C_x_Ox, "ContextSubstFormat1"
#define LigatureSubstFormat1 otv_u_C_x_Ox, "LigatureSubstFormat1"
#define MultipleSubstFormat1 otv_u_C_x_Ox, "MultipleSubstFormat1"
FT_LOCAL( void )
otv_u_C_x_Ox( FT_Bytes table,
OTV_Validator valid );
#define AlternateSet otv_x_ux, "AlternateSet"
#define AttachPoint otv_x_ux, "AttachPoint"
#define ExtenderGlyph otv_x_ux, "ExtenderGlyph"
#define AlternateSet otv_x_ux, "AlternateSet"
#define AttachPoint otv_x_ux, "AttachPoint"
#define ExtenderGlyph otv_x_ux, "ExtenderGlyph"
#define JstfGPOSModList otv_x_ux, "JstfGPOSModList"
#define JstfGSUBModList otv_x_ux, "JstfGSUBModList"
#define Sequence otv_x_ux, "Sequence"
#define JstfGSUBModList otv_x_ux, "JstfGSUBModList"
#define Sequence otv_x_ux, "Sequence"
FT_LOCAL( void )
otv_x_ux( FT_Bytes table,

View File

@ -1255,10 +1255,10 @@
/* */
/* <Input> */
/* x :: The x-coordinate of the segment's end point (its start point */
/* is stored in `LastX'). */
/* is stored in `lastX'). */
/* */
/* y :: The y-coordinate of the segment's end point (its start point */
/* is stored in `LastY'). */
/* is stored in `lastY'). */
/* */
/* <Return> */
/* SUCCESS on success, FAILURE on render pool overflow or incorrect */
@ -1349,10 +1349,10 @@
/* cy :: The y-coordinate of the arc's new control point. */
/* */
/* x :: The x-coordinate of the arc's end point (its start point is */
/* stored in `LastX'). */
/* stored in `lastX'). */
/* */
/* y :: The y-coordinate of the arc's end point (its start point is */
/* stored in `LastY'). */
/* stored in `lastY'). */
/* */
/* <Return> */
/* SUCCESS on success, FAILURE on render pool overflow or incorrect */
@ -1463,10 +1463,10 @@
/* cy2 :: The y-coordinate of the arc's second new control point. */
/* */
/* x :: The x-coordinate of the arc's end point (its start point is */
/* stored in `LastX'). */
/* stored in `lastX'). */
/* */
/* y :: The y-coordinate of the arc's end point (its start point is */
/* stored in `LastY'). */
/* stored in `lastY'). */
/* */
/* <Return> */
/* SUCCESS on success, FAILURE on render pool overflow or incorrect */

View File

@ -235,7 +235,7 @@
typedef long TPos; /* sub-pixel coordinate */
/* determine the type used to store cell areas. This normally takes at */
/* least PIXEL_BYTES*2 + 1. On 16-bit systems, we need to use `long' */
/* least PIXEL_BITS*2 + 1 bits. On 16-bit systems, we need to use `long'*/
/* instead of `int', otherwise bad things happen */
#if PIXEL_BITS <= 7
@ -457,7 +457,7 @@
}
/* record the previous cell if needed (i.e., if we changed the cell */
/* position, of changed the `invalid' flag) */
/* position, or changed the `invalid' flag) */
if ( ras.invalid != invalid || record )
gray_record_cell( RAS_VAR );
@ -782,8 +782,8 @@
static void
gray_render_conic( RAS_ARG_ FT_Vector* control,
FT_Vector* to )
gray_render_conic( RAS_ARG_ const FT_Vector* control,
const FT_Vector* to )
{
TPos dx, dy;
int top, level;
@ -917,9 +917,9 @@
static void
gray_render_cubic( RAS_ARG_ FT_Vector* control1,
FT_Vector* control2,
FT_Vector* to )
gray_render_cubic( RAS_ARG_ const FT_Vector* control1,
const FT_Vector* control2,
const FT_Vector* to )
{
TPos dx, dy, da, db;
int top, level;
@ -1229,8 +1229,8 @@
static int
gray_move_to( FT_Vector* to,
FT_Raster raster )
gray_move_to( const FT_Vector* to,
FT_Raster raster )
{
TPos x, y;
@ -1251,8 +1251,8 @@
static int
gray_line_to( FT_Vector* to,
FT_Raster raster )
gray_line_to( const FT_Vector* to,
FT_Raster raster )
{
gray_render_line( (PRaster)raster,
UPSCALE( to->x ), UPSCALE( to->y ) );
@ -1261,9 +1261,9 @@
static int
gray_conic_to( FT_Vector* control,
FT_Vector* to,
FT_Raster raster )
gray_conic_to( const FT_Vector* control,
const FT_Vector* to,
FT_Raster raster )
{
gray_render_conic( (PRaster)raster, control, to );
return 0;
@ -1271,10 +1271,10 @@
static int
gray_cubic_to( FT_Vector* control1,
FT_Vector* control2,
FT_Vector* to,
FT_Raster raster )
gray_cubic_to( const FT_Vector* control1,
const FT_Vector* control2,
const FT_Vector* to,
FT_Raster raster )
{
gray_render_cubic( (PRaster)raster, control1, control2, to );
return 0;
@ -1282,10 +1282,10 @@
static void
gray_render_span( int y,
int count,
FT_Span* spans,
PRaster raster )
gray_render_span( int y,
int count,
const FT_Span* spans,
PRaster raster )
{
unsigned char* p;
FT_Bitmap* map = &raster->target;
@ -1447,7 +1447,7 @@
static void
gray_sweep( RAS_ARG_ FT_Bitmap* target )
gray_sweep( RAS_ARG_ const FT_Bitmap* target )
{
TCoord x, y, cover;
TArea area;