Formatting, copyright years.

This commit is contained in:
Werner Lemberg 2006-01-27 14:16:16 +00:00
parent 6a681fa84a
commit be3c9814a4
20 changed files with 210 additions and 149 deletions

View File

@ -1,35 +1,66 @@
2006-01-27 David Turner <david@freetype.org>
* src/autofit/afwarp.c: simple #ifdef to prevent compilation when
the warp hinter isn't active (it shouldn't, still experimental)
* src/autofit/afwarp.c: Simple #ifdef to prevent compilation when
the warp hinter isn't active (it shouldn't, still experimental).
* Jamfile, include/freetype/config/ftmodule.h: removed "gxvalid"
and "otvalid" from the list of modules that are linked statically
to a given FreeType library. Functionality has been moved to the
"ftvalid" CVS module.
note also that current Make-based build system still compiles the
modules though...
* Jamfile, include/freetype/config/ftmodule.h: Removed `gxvalid'
and `otvalid' from the list of modules that are linked statically
to a given FreeType library. Functionality has been moved to the
`ftvalid' CVS module.
* include/freetype/config/ftoption.h: added FT_STRICT_ALIASING,
which controls the definitions of the memory management functions
to avoid warnings with recent versions of GCC. this macro is
only here to be disabled, in case we detect problems with the
new scheme.
NOTE: disable macro to use the memory debugger. this will be fixed
later !!
Note also that current Make-based build system still compiles the
modules though.
* builds/win32/visualc/freetype.dsp: updating project file to
define FT2_BUILD_LIBRARY, and remove gxvalid+otvalid from
compilation
* include/freetype/config/ftoption.h (FT_STRICT_ALIASING): New macro
which controls the definitions of the memory management functions to
avoid warnings with recent versions of GCC. This macro is only here
to be disabled, in case we detect problems with the new scheme.
* builds/freetype.mk, Jamfile: define the macro FT2_BUILD_LIBRARY
when compiling the library.
* include/freetype/config/ftheader.h: remove inclusions of
internal headers, except if the macro FT2_BUILD_LIBRARY is defined.
NOTE: Disable macro to use the memory debugger -- this will be fixed
later!
* include/freetype/internal/ftmemory.h, src/base/ftutil.c (FT_Alloc,
FT_QAlloc, FT_Realloc, FT_QRealloc, FT_Free) [FT_STRICT_ALIASING]:
New versions.
* builds/win32/visualc/freetype.dsp: Updating project file to
define FT2_BUILD_LIBRARY, and remove gxvalid + otvalid modules from
compilation.
* builds/freetype.mk (FT_CFLAGS), Jamfile (DEFINES): Define the
macro FT2_BUILD_LIBRARY when compiling the library.
* include/freetype/config/ftheader.h: Remove inclusions of internal
headers except if the macro FT2_BUILD_LIBRARY is defined.
* include/freetype/internal/psaux.h (AFM_KernPair, AFM_TrackKern,
AFM_FontInfo): Move structure declarations to...
* include/freetype/internal/t1types.h: This file.
* (many files): Fix compiler warnings.
Various minor reorganizations.
* src/cff/cffload.c (cff_font_done): Don't free static array
`subfonts'.
* src/otvalid/otvcommn.c (otv_ClassDef_validate),
src/otvalid/otvgpos.c (otv_x_sxy): Fix debugging information.
* src/psaux/afmparse.c: Include ft2build.h and FT_FREETYPE_H.
(AFM_MAX_ARGUMENTS): Define...
* src/psaux/afmparse.h: Here.
* src/psaux/Jamfile (_sources): Add afmparse.
* src/psaux/psconv.c: Include psconv.h.
* src/type1/t1afm.c: Don't include FT_INTERNAL_TYPE1_TYPES_H but
FT_INTERNAL_POSTSCRIPT_AUX_H.
* src/type1/t1afm.h: Include FT_INTERNAL_TYPE1_TYPES_H.
2006-01-23 Chia-I Wu <b90201047@ntu.edu.tw>

View File

@ -1,6 +1,6 @@
# FreeType 2 top Jamfile.
#
# Copyright 2001, 2002, 2003, 2004, 2005 by
# Copyright 2001, 2002, 2003, 2004, 2005, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,

View File

@ -3,7 +3,7 @@
#
# Copyright 1996-2000, 2001, 2002, 2003, 2004, 2005 by
# Copyright 1996-2000, 2001, 2002, 2003, 2004, 2005, 2006 by
# David Turner, Robert Wilhelm, and Werner Lemberg.
#
# This file is part of the FreeType project, and may only be used, modified,
@ -133,9 +133,9 @@ INCLUDE_FLAGS = $(INCLUDES:%=$I%)
# $(INCLUDE_FLAGS) should come before $(CFLAGS) to avoid problems with
# old FreeType versions.
#
# note what we also define the macro FT2_BUILD_LIBRARY when building
# FreeType. this is required to let our sources include the internal
# headers (something forbidden by clients)
# Note what we also define the macro FT2_BUILD_LIBRARY when building
# FreeType. This is required to let our sources include the internal
# headers (something forbidden by clients).
#
FT_CFLAGS = $(CPPFLAGS) $(INCLUDE_FLAGS) $(CFLAGS) $DFT2_BUILD_LIBRARY
FT_CC = $(CC) $(FT_CFLAGS)

View File

@ -4,7 +4,7 @@
/* */
/* Build macros of the FreeType 2 library. */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -626,14 +626,17 @@
#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
/* now include internal headers definitions from <freetype/internal/...>
* only when we're building the library !!
*/
/*
* Include internal headers definitions from <freetype/internal/...>
* only when building the library.
*/
#ifdef FT2_BUILD_LIBRARY
# define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
# include FT_INTERNAL_INTERNAL_H
#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
#include FT_INTERNAL_INTERNAL_H
#endif /* FT2_BUILD_LIBRARY */
#endif /* __FT2_BUILD_H__ */

View File

@ -4,7 +4,7 @@
/* */
/* User-selectable configuration macros (specification only). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -556,20 +556,22 @@ FT_BEGIN_HEADER
/* */
/*
* This temporary macro is used to control various optimizations for
* reducing the heap footprint of memory-mapped TrueType files.
*
*/
/*
* This temporary macro is used to control various optimizations for
* reducing the heap footprint of memory-mapped TrueType files.
*/
#define FT_OPTIMIZE_MEMORY
/* this temporary macro is used to control wether we're going to
* compile certain functions like FT_Alloc in a way that prevent recent
* GCC releases from spouting horrible "strict aliasing" warning
* messages each time a memory-management function is called
*/
/*
* This temporary macro is used to control whether we are going to
* compile certain functions like FT_Alloc in a way that prevents recent
* GCC releases from emitting zillions of `strict aliasing' warning
* messages each time a memory-management function is called.
*/
#define FT_STRICT_ALIASING
FT_END_HEADER

View File

@ -4,7 +4,7 @@
/* */
/* The FreeType memory management macros (specification). */
/* */
/* Copyright 1996-2001, 2002, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -56,11 +56,15 @@ FT_BEGIN_HEADER
/*************************************************************************/
/*************************************************************************/
#ifdef FT_STRICT_ALIASING
/* the allocation functions return a pointer, and the error code
* is written to through the 'p_error' parameter
*/
/*
* The allocation functions return a pointer, and the error code
* is written to through the `p_error' parameter. See below for
* for documentation.
*/
FT_BASE( FT_Pointer )
FT_Alloc( FT_Memory memory,
@ -91,7 +95,8 @@ FT_BEGIN_HEADER
const void* P );
# ifdef FT_DEBUG_MEMORY
#ifdef FT_DEBUG_MEMORY
FT_BASE( FT_Pointer )
FT_Alloc_Debug( FT_Memory memory,
@ -132,64 +137,71 @@ FT_BEGIN_HEADER
const char* file_name,
FT_Long line_no );
# define FT_MEM_ALLOC( _pointer_, _size_ ) \
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
(_pointer_) = FT_Alloc_Debug( memory, _size_, &error, \
__FILE__, __LINE__ )
__FILE__, __LINE__ )
# define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
(_pointer_) = FT_Realloc_Debug( memory, _current_, _size_, \
(_pointer_), &error, \
__FILE__, __LINE__ )
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
(_pointer_) = FT_Realloc_Debug( memory, _current_, _size_, \
(_pointer_), &error, \
__FILE__, __LINE__ )
# define FT_MEM_QALLOC( _pointer_, _size_ ) \
#define FT_MEM_QALLOC( _pointer_, _size_ ) \
(_pointer_) = FT_QAlloc_Debug( memory, _size_, &error, \
__FILE__, __LINE__ )
__FILE__, __LINE__ )
# define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
(_pointer_) = FT_QRealloc_Debug( memory, _current_, _size_, \
(_pointer_), &error, \
__FILE__, __LINE__ )
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
(_pointer_) = FT_QRealloc_Debug( memory, _current_, _size_, \
(_pointer_), &error, \
__FILE__, __LINE__ )
# define FT_MEM_FREE( _pointer_ ) \
FT_BEGIN_STMNT \
if ( _pointer_ ) { \
FT_Free_Debug( memory, (_pointer_), __FILE__, __LINE__ ); \
(_pointer_) = NULL; \
} \
FT_END_STMNT
#define FT_MEM_FREE( _pointer_ ) \
FT_BEGIN_STMNT \
if ( _pointer_ ) \
{ \
FT_Free_Debug( memory, (_pointer_), __FILE__, __LINE__ ); \
(_pointer_) = NULL; \
} \
FT_END_STMNT
# else /* !FT_DEBUG_MEMORY */
#else /* !FT_DEBUG_MEMORY */
# define FT_MEM_ALLOC( _pointer_, _size_ ) \
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
(_pointer_) = FT_Alloc( memory, _size_, &error )
# define FT_MEM_FREE( _pointer_ ) \
FT_BEGIN_STMNT \
if ( (_pointer_) ) { \
FT_Free( memory, (_pointer_) ); \
(_pointer_) = NULL; \
} \
FT_END_STMNT
#define FT_MEM_FREE( _pointer_ ) \
FT_BEGIN_STMNT \
if ( (_pointer_) ) \
{ \
FT_Free( memory, (_pointer_) ); \
(_pointer_) = NULL; \
} \
FT_END_STMNT
# define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
(_pointer_) = FT_Realloc( memory, _current_, _size_, \
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
(_pointer_) = FT_Realloc( memory, _current_, _size_, \
(_pointer_), &error )
# define FT_MEM_QALLOC( _pointer_, _size_ ) \
#define FT_MEM_QALLOC( _pointer_, _size_ ) \
(_pointer_) = FT_QAlloc( memory, _size_, &error )
# define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
(_pointer_) = FT_QRealloc( memory, _current_, _size_, \
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
(_pointer_) = FT_QRealloc( memory, _current_, _size_, \
(_pointer_), &error )
# endif /* !FT_DEBUG_MEMORY */
#endif /* !FT_DEBUG_MEMORY */
#define FT_MEM_SET_ERROR( cond ) ( (cond), error != 0 )
# define FT_MEM_SET_ERROR(cond) ( (cond), error != 0 )
#else /* !FT_STRICT_ALIASING */
# ifdef FT_DEBUG_MEMORY
#ifdef FT_DEBUG_MEMORY
FT_BASE( FT_Error )
FT_Alloc_Debug( FT_Memory memory,
@ -227,8 +239,8 @@ FT_BEGIN_HEADER
const char* file_name,
FT_Long line_no );
# endif /* FT_DEBUG_MEMORY */
#endif /* FT_DEBUG_MEMORY */
/*************************************************************************/
@ -383,8 +395,10 @@ FT_BEGIN_HEADER
FT_Free( FT_Memory memory,
void* *P );
#ifdef FT_DEBUG_MEMORY
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
FT_Alloc_Debug( memory, _size_, \
(void**)(void*)&(_pointer_), \
@ -410,7 +424,7 @@ FT_BEGIN_HEADER
__FILE__, __LINE__ )
#else /* !FT_DEBUG_MEMORY */
#else /* !FT_DEBUG_MEMORY */
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
@ -433,14 +447,16 @@ FT_BEGIN_HEADER
FT_QRealloc( memory, _current_, _size_, \
(void**)(void*)&(_pointer_) )
#endif /* !FT_DEBUG_MEMORY */
# define FT_MEM_SET_ERROR(cond) ( (error = (cond)) != 0 )
#define FT_MEM_SET_ERROR( cond ) ( ( error = (cond) ) != 0 )
#endif /* !FT_STRICT_ALIASING */
#define FT_MEM_SET( dest, byte, count ) ft_memset( dest, byte, count )
#define FT_MEM_COPY( dest, source, count ) ft_memcpy( dest, source, count )
@ -472,7 +488,6 @@ FT_BEGIN_HEADER
#define FT_ARRAY_CHECK( ptr, count ) ( (count) <= FT_ARRAY_MAX( ptr ) )
/*************************************************************************/
/* */
/* The following functions macros expect that their pointer argument is */
@ -517,21 +532,19 @@ FT_BEGIN_HEADER
/* */
/* The following macros are variants of their FT_MEM_XXXX equivalents; */
/* they are used to set an _implicit_ `error' variable and return TRUE */
/* if an error occured (i.e. if 'error != 0'). */
/* if an error occured (i.e., if 'error != 0'). */
/* */
#define FT_ALLOC( _pointer_, _size_ ) \
#define FT_ALLOC( _pointer_, _size_ ) \
FT_MEM_SET_ERROR( FT_MEM_ALLOC( _pointer_, _size_ ) )
#define FT_REALLOC( _pointer_, _current_, _size_ ) \
#define FT_REALLOC( _pointer_, _current_, _size_ ) \
FT_MEM_SET_ERROR( FT_MEM_REALLOC( _pointer_, _current_, _size_ ) )
#define FT_QALLOC( _pointer_, _size_ ) \
#define FT_QALLOC( _pointer_, _size_ ) \
FT_MEM_SET_ERROR( FT_MEM_QALLOC( _pointer_, _size_ ) )
#define FT_QREALLOC( _pointer_, _current_, _size_ ) \
#define FT_QREALLOC( _pointer_, _current_, _size_ ) \
FT_MEM_SET_ERROR( FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) )

View File

@ -5,7 +5,7 @@
/* FreeType utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp */
/* bitmaps into 8bpp format (body). */
/* */
/* Copyright 2004, 2005 by */
/* Copyright 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -267,8 +267,8 @@
ft_glyphslot_alloc_bitmap( FT_GlyphSlot slot,
FT_ULong size )
{
FT_Memory memory = FT_FACE_MEMORY( slot->face );
FT_Error error;
FT_Memory memory = FT_FACE_MEMORY( slot->face );
FT_Error error;
if ( slot->internal->flags & FT_GLYPH_OWN_BITMAP )
@ -1724,10 +1724,10 @@
if ( FT_IS_SCALABLE( face ) )
{
if ( face->height < 0 )
face->height = (short)-face->height;
face->height = (FT_Short)-face->height;
if ( !FT_HAS_VERTICAL( face ) )
face->max_advance_height = (short)face->height;
face->max_advance_height = (FT_Short)face->height;
}
if ( FT_HAS_FIXED_SIZES( face ) )
@ -1741,9 +1741,9 @@
if ( bsize->height < 0 )
bsize->height = (FT_Short) -bsize->height;
bsize->height = (FT_Short)-bsize->height;
if ( bsize->x_ppem < 0 )
bsize->x_ppem = (FT_Short) -bsize->x_ppem;
bsize->x_ppem = (FT_Short)-bsize->x_ppem;
if ( bsize->y_ppem < 0 )
bsize->y_ppem = -bsize->y_ppem;
}
@ -2087,8 +2087,8 @@
metrics = &face->size->metrics;
bsize = face->available_sizes + strike_index;
metrics->x_ppem = (FT_UShort)(( bsize->x_ppem + 32 ) >> 6);
metrics->y_ppem = (FT_UShort)(( bsize->y_ppem + 32 ) >> 6);
metrics->x_ppem = (FT_UShort)( ( bsize->x_ppem + 32 ) >> 6 );
metrics->y_ppem = (FT_UShort)( ( bsize->y_ppem + 32 ) >> 6 );
if ( FT_IS_SCALABLE( face ) )
{
@ -2199,8 +2199,8 @@
scaled_h = FT_MulFix( face->units_per_EM, metrics->y_scale );
}
metrics->x_ppem = (FT_UShort)(( scaled_w + 32 ) >> 6);
metrics->y_ppem = (FT_UShort)(( scaled_h + 32 ) >> 6);
metrics->x_ppem = (FT_UShort)( ( scaled_w + 32 ) >> 6 );
metrics->y_ppem = (FT_UShort)( ( scaled_h + 32 ) >> 6 );
ft_recompute_scaled_metrics( face, metrics );
}

View File

@ -4,7 +4,7 @@
/* */
/* Embedded resource forks accessor (body). */
/* */
/* Copyright 2004, 2005 by */
/* Copyright 2004, 2005, 2006 by */
/* Masatake YAMATO and Redhat K.K. */
/* */
/* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */

View File

@ -45,6 +45,7 @@
/*************************************************************************/
/*************************************************************************/
#ifdef FT_STRICT_ALIASING
@ -53,9 +54,10 @@
FT_Long size,
FT_Error *p_error )
{
FT_Error error = 0;
FT_Error error = FT_Err_Ok;
FT_Pointer block = NULL;
if ( size > 0 )
{
block = memory->alloc( memory, size );
@ -64,6 +66,7 @@
else
FT_MEM_ZERO( block, size );
}
*p_error = error;
return block;
}
@ -74,15 +77,17 @@
FT_Long size,
FT_Error *p_error )
{
FT_Error error = 0;
FT_Error error = FT_Err_Ok;
FT_Pointer block = NULL;
if ( size > 0 )
{
block = memory->alloc( memory, size );
if ( block == NULL )
error = FT_Err_Out_Of_Memory;
}
*p_error = error;
return block;
}
@ -95,8 +100,9 @@
void* block,
FT_Error *p_error )
{
FT_Error error = 0;
FT_Error error = FT_Err_Ok;
if ( size <= 0 )
{
FT_Free( memory, block );
@ -112,6 +118,7 @@
{
FT_Pointer block2;
block2 = memory->realloc( memory, current, size, block );
if ( block2 == NULL )
error = FT_Err_Out_Of_Memory;
@ -122,6 +129,7 @@
FT_MEM_ZERO( (char*)block + current, size-current );
}
}
*p_error = error;
return block;
}
@ -134,8 +142,9 @@
void* block,
FT_Error *p_error )
{
FT_Error error = 0;
FT_Error error = FT_Err_Ok;
if ( size <= 0 )
{
FT_Free( memory, block );
@ -151,15 +160,16 @@
{
FT_Pointer block2;
block2 = memory->realloc( memory, current, size, block );
if ( block2 == NULL )
error = FT_Err_Out_Of_Memory;
else
block = block2;
}
*p_error = error;
return block;
}
FT_BASE_DEF( void )
@ -170,8 +180,10 @@
memory->free( memory, (void*)P );
}
#else /* !FT_STRICT_ALIASING */
/* documentation is in ftmemory.h */
FT_BASE_DEF( FT_Error )

View File

@ -4,7 +4,7 @@
/* */
/* The FreeType internal cache interface (body). */
/* */
/* Copyright 2000-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 2000-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -4,7 +4,7 @@
/* */
/* OpenType and CFF data/program tables loader (body). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -2293,8 +2293,6 @@
{
for ( idx = 0; idx < font->num_subfonts; idx++ )
cff_subfont_done( memory, font->subfonts[idx] );
/* FT_FREE( font->subfonts ); -- bug this is a static array !! */
}
cff_encoding_done( &font->encoding );

View File

@ -8,7 +8,7 @@
/* parse compressed PCF fonts, as found with many X11 server */
/* distributions. */
/* */
/* Copyright 2002, 2003, 2004, 2005 by */
/* Copyright 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -4,7 +4,7 @@
/* */
/* OpenType common tables validation (body). */
/* */
/* Copyright 2004, 2005 by */
/* Copyright 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -4,7 +4,7 @@
/* */
/* OpenType GPOS table validation (body). */
/* */
/* Copyright 2002, 2004, 2005 by */
/* Copyright 2002, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */

View File

@ -480,7 +480,7 @@
FT_UInt probe = power * size;
FT_UInt extra = count - power;
FT_Byte* base = stream->cursor;
FT_Bool twobytes = FT_BOOL(item->flags & 1);
FT_Bool twobytes = FT_BOOL( item->flags & 1 );
FT_Byte* p;
FT_UInt32 cpair;

View File

@ -397,16 +397,17 @@
{
case AFM_VALUE_TYPE_STRING:
case AFM_VALUE_TYPE_NAME:
{
FT_Memory memory = parser->memory;
FT_Error error;
if ( !FT_QALLOC( val->u.s, len + 1 ) )
{
ft_memcpy( val->u.s, str, len );
val->u.s[len] = '\0';
}
}
{
FT_Memory memory = parser->memory;
FT_Error error;
if ( !FT_QALLOC( val->u.s, len + 1 ) )
{
ft_memcpy( val->u.s, str, len );
val->u.s[len] = '\0';
}
}
break;
case AFM_VALUE_TYPE_FIXED:
@ -880,6 +881,7 @@
{
AFM_ValueRec shared_vals[1];
shared_vals[0].type = AFM_VALUE_TYPE_BOOL;
if ( afm_parser_read_vals( parser, shared_vals, 1 ) != 1 )
goto Fail;

View File

@ -352,10 +352,10 @@
break;
if ( r % 2 )
{
{
*buffer = (FT_Byte)(*buffer + c);
buffer++;
}
buffer++;
}
else
*buffer = (FT_Byte)(c << 4);

View File

@ -4,7 +4,7 @@
/* */
/* SFNT object management (base). */
/* */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@ -51,7 +51,7 @@
FT_String* string;
FT_UInt len, code, n;
FT_Byte* read = (FT_Byte*)entry->string;
FT_Error error;
FT_Error error;
len = (FT_UInt)entry->stringLength / 2;
@ -82,7 +82,7 @@
FT_String* string;
FT_UInt len, code, n;
FT_Byte* read = (FT_Byte*)entry->string;
FT_Error error;
FT_Error error;
len = (FT_UInt)entry->stringLength / 4;
@ -113,7 +113,7 @@
FT_String* string;
FT_UInt len, code, n;
FT_Byte* read = (FT_Byte*)entry->string;
FT_Error error;
FT_Error error;
len = (FT_UInt)entry->stringLength;

View File

@ -168,11 +168,11 @@
x_ppem = p[44];
y_ppem = p[45];
bsize->x_ppem = (FT_Pos)(x_ppem << 6);
bsize->y_ppem = (FT_Pos)(y_ppem << 6);
bsize->x_ppem = (FT_Pos)( x_ppem << 6 );
bsize->y_ppem = (FT_Pos)( y_ppem << 6 );
/* XXX: Is this correct? */
bsize->height = (FT_Short)(ascender - descender);
bsize->height = (FT_Short)( ascender - descender );
bsize->width = (FT_Short)( ( avgwidth * y_ppem + em_size / 2 ) /
em_size );
@ -232,9 +232,9 @@
bsize = ( (FT_Face)face )->available_sizes + strike_index;
strike = face->sbit_table + 8 + strike_index * 48;
metrics->x_ppem = (FT_UShort)(bsize->x_ppem >> 6);
metrics->y_ppem = (FT_UShort)(bsize->y_ppem >> 6);
metrics->height = (FT_UShort)(bsize->height << 6);
metrics->x_ppem = (FT_UShort)( bsize->x_ppem >> 6 );
metrics->y_ppem = (FT_UShort)( bsize->y_ppem >> 6 );
metrics->height = (FT_UShort)( bsize->height << 6 );
metrics->ascender = (FT_Char)strike[16] << 6; /* hori.ascender */
metrics->descender = (FT_Char)strike[17] << 6; /* hori.descender */