Formatting, copyright years.
This commit is contained in:
parent
6a681fa84a
commit
be3c9814a4
73
ChangeLog
73
ChangeLog
|
@ -1,36 +1,67 @@
|
||||||
2006-01-27 David Turner <david@freetype.org>
|
2006-01-27 David Turner <david@freetype.org>
|
||||||
|
|
||||||
* src/autofit/afwarp.c: simple #ifdef to prevent compilation when
|
* src/autofit/afwarp.c: Simple #ifdef to prevent compilation when
|
||||||
the warp hinter isn't active (it shouldn't, still experimental)
|
the warp hinter isn't active (it shouldn't, still experimental).
|
||||||
|
|
||||||
* Jamfile, include/freetype/config/ftmodule.h: removed "gxvalid"
|
* Jamfile, include/freetype/config/ftmodule.h: Removed `gxvalid'
|
||||||
and "otvalid" from the list of modules that are linked statically
|
and `otvalid' from the list of modules that are linked statically
|
||||||
to a given FreeType library. Functionality has been moved to the
|
to a given FreeType library. Functionality has been moved to the
|
||||||
"ftvalid" CVS module.
|
`ftvalid' CVS module.
|
||||||
|
|
||||||
note also that current Make-based build system still compiles the
|
Note also that current Make-based build system still compiles the
|
||||||
modules though...
|
modules though.
|
||||||
|
|
||||||
* include/freetype/config/ftoption.h: added FT_STRICT_ALIASING,
|
* include/freetype/config/ftoption.h (FT_STRICT_ALIASING): New macro
|
||||||
which controls the definitions of the memory management functions
|
which controls the definitions of the memory management functions to
|
||||||
to avoid warnings with recent versions of GCC. this macro is
|
avoid warnings with recent versions of GCC. This macro is only here
|
||||||
only here to be disabled, in case we detect problems with the
|
to be disabled, in case we detect problems with the new scheme.
|
||||||
new scheme.
|
|
||||||
|
|
||||||
NOTE: disable macro to use the memory debugger. this will be fixed
|
NOTE: Disable macro to use the memory debugger -- this will be fixed
|
||||||
later !!
|
later!
|
||||||
|
|
||||||
* builds/win32/visualc/freetype.dsp: updating project file to
|
* include/freetype/internal/ftmemory.h, src/base/ftutil.c (FT_Alloc,
|
||||||
define FT2_BUILD_LIBRARY, and remove gxvalid+otvalid from
|
FT_QAlloc, FT_Realloc, FT_QRealloc, FT_Free) [FT_STRICT_ALIASING]:
|
||||||
compilation
|
New versions.
|
||||||
|
|
||||||
* builds/freetype.mk, Jamfile: define the macro FT2_BUILD_LIBRARY
|
|
||||||
when compiling the library.
|
|
||||||
|
|
||||||
* include/freetype/config/ftheader.h: remove inclusions of
|
* builds/win32/visualc/freetype.dsp: Updating project file to
|
||||||
internal headers, except if the macro FT2_BUILD_LIBRARY is defined.
|
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>
|
2006-01-23 Chia-I Wu <b90201047@ntu.edu.tw>
|
||||||
|
|
||||||
* include/freetype/freetype.h (FT_Select_Size): Rename the second
|
* include/freetype/freetype.h (FT_Select_Size): Rename the second
|
||||||
|
|
2
Jamfile
2
Jamfile
|
@ -1,6 +1,6 @@
|
||||||
# FreeType 2 top Jamfile.
|
# 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.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used, modified,
|
# This file is part of the FreeType project, and may only be used, modified,
|
||||||
|
|
|
@ -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.
|
# David Turner, Robert Wilhelm, and Werner Lemberg.
|
||||||
#
|
#
|
||||||
# This file is part of the FreeType project, and may only be used, modified,
|
# 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
|
# $(INCLUDE_FLAGS) should come before $(CFLAGS) to avoid problems with
|
||||||
# old FreeType versions.
|
# old FreeType versions.
|
||||||
#
|
#
|
||||||
# note what we also define the macro FT2_BUILD_LIBRARY when building
|
# Note what we also define the macro FT2_BUILD_LIBRARY when building
|
||||||
# FreeType. this is required to let our sources include the internal
|
# FreeType. This is required to let our sources include the internal
|
||||||
# headers (something forbidden by clients)
|
# headers (something forbidden by clients).
|
||||||
#
|
#
|
||||||
FT_CFLAGS = $(CPPFLAGS) $(INCLUDE_FLAGS) $(CFLAGS) $DFT2_BUILD_LIBRARY
|
FT_CFLAGS = $(CPPFLAGS) $(INCLUDE_FLAGS) $(CFLAGS) $DFT2_BUILD_LIBRARY
|
||||||
FT_CC = $(CC) $(FT_CFLAGS)
|
FT_CC = $(CC) $(FT_CFLAGS)
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* Build macros of the FreeType 2 library. */
|
/* 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. */
|
/* 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, */
|
||||||
|
@ -626,14 +626,17 @@
|
||||||
|
|
||||||
#define FT_TRUETYPE_UNPATENTED_H <freetype/ttunpat.h>
|
#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
|
#ifdef FT2_BUILD_LIBRARY
|
||||||
# define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
|
#define FT_INTERNAL_INTERNAL_H <freetype/internal/internal.h>
|
||||||
# include FT_INTERNAL_INTERNAL_H
|
#include FT_INTERNAL_INTERNAL_H
|
||||||
#endif /* FT2_BUILD_LIBRARY */
|
#endif /* FT2_BUILD_LIBRARY */
|
||||||
|
|
||||||
|
|
||||||
#endif /* __FT2_BUILD_H__ */
|
#endif /* __FT2_BUILD_H__ */
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* User-selectable configuration macros (specification only). */
|
/* User-selectable configuration macros (specification only). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 1996-2001, 2002, 2003, 2004, 2005 by */
|
/* Copyright 1996-2001, 2002, 2003, 2004, 2005, 2006 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, */
|
||||||
|
@ -556,20 +556,22 @@ FT_BEGIN_HEADER
|
||||||
|
|
||||||
/* */
|
/* */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This temporary macro is used to control various optimizations for
|
* This temporary macro is used to control various optimizations for
|
||||||
* reducing the heap footprint of memory-mapped TrueType files.
|
* reducing the heap footprint of memory-mapped TrueType files.
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
#define FT_OPTIMIZE_MEMORY
|
#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
|
* This temporary macro is used to control whether we are going to
|
||||||
* messages each time a memory-management function is called
|
* 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
|
#define FT_STRICT_ALIASING
|
||||||
|
|
||||||
|
|
||||||
FT_END_HEADER
|
FT_END_HEADER
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* The FreeType memory management macros (specification). */
|
/* 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 */
|
/* 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,10 +56,14 @@ FT_BEGIN_HEADER
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifdef FT_STRICT_ALIASING
|
#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_BASE( FT_Pointer )
|
||||||
|
@ -91,7 +95,8 @@ FT_BEGIN_HEADER
|
||||||
const void* P );
|
const void* P );
|
||||||
|
|
||||||
|
|
||||||
# ifdef FT_DEBUG_MEMORY
|
#ifdef FT_DEBUG_MEMORY
|
||||||
|
|
||||||
|
|
||||||
FT_BASE( FT_Pointer )
|
FT_BASE( FT_Pointer )
|
||||||
FT_Alloc_Debug( FT_Memory memory,
|
FT_Alloc_Debug( FT_Memory memory,
|
||||||
|
@ -132,64 +137,71 @@ FT_BEGIN_HEADER
|
||||||
const char* file_name,
|
const char* file_name,
|
||||||
FT_Long line_no );
|
FT_Long line_no );
|
||||||
|
|
||||||
# define FT_MEM_ALLOC( _pointer_, _size_ ) \
|
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
|
||||||
(_pointer_) = FT_Alloc_Debug( memory, _size_, &error, \
|
(_pointer_) = FT_Alloc_Debug( memory, _size_, &error, \
|
||||||
__FILE__, __LINE__ )
|
__FILE__, __LINE__ )
|
||||||
|
|
||||||
# define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
|
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
|
||||||
(_pointer_) = FT_Realloc_Debug( memory, _current_, _size_, \
|
(_pointer_) = FT_Realloc_Debug( memory, _current_, _size_, \
|
||||||
(_pointer_), &error, \
|
(_pointer_), &error, \
|
||||||
__FILE__, __LINE__ )
|
__FILE__, __LINE__ )
|
||||||
|
|
||||||
# define FT_MEM_QALLOC( _pointer_, _size_ ) \
|
#define FT_MEM_QALLOC( _pointer_, _size_ ) \
|
||||||
(_pointer_) = FT_QAlloc_Debug( memory, _size_, &error, \
|
(_pointer_) = FT_QAlloc_Debug( memory, _size_, &error, \
|
||||||
__FILE__, __LINE__ )
|
__FILE__, __LINE__ )
|
||||||
|
|
||||||
# define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
|
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
|
||||||
(_pointer_) = FT_QRealloc_Debug( memory, _current_, _size_, \
|
(_pointer_) = FT_QRealloc_Debug( memory, _current_, _size_, \
|
||||||
(_pointer_), &error, \
|
(_pointer_), &error, \
|
||||||
__FILE__, __LINE__ )
|
__FILE__, __LINE__ )
|
||||||
|
|
||||||
# define FT_MEM_FREE( _pointer_ ) \
|
#define FT_MEM_FREE( _pointer_ ) \
|
||||||
FT_BEGIN_STMNT \
|
FT_BEGIN_STMNT \
|
||||||
if ( _pointer_ ) { \
|
if ( _pointer_ ) \
|
||||||
|
{ \
|
||||||
FT_Free_Debug( memory, (_pointer_), __FILE__, __LINE__ ); \
|
FT_Free_Debug( memory, (_pointer_), __FILE__, __LINE__ ); \
|
||||||
(_pointer_) = NULL; \
|
(_pointer_) = NULL; \
|
||||||
} \
|
} \
|
||||||
FT_END_STMNT
|
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 )
|
(_pointer_) = FT_Alloc( memory, _size_, &error )
|
||||||
|
|
||||||
# define FT_MEM_FREE( _pointer_ ) \
|
#define FT_MEM_FREE( _pointer_ ) \
|
||||||
FT_BEGIN_STMNT \
|
FT_BEGIN_STMNT \
|
||||||
if ( (_pointer_) ) { \
|
if ( (_pointer_) ) \
|
||||||
|
{ \
|
||||||
FT_Free( memory, (_pointer_) ); \
|
FT_Free( memory, (_pointer_) ); \
|
||||||
(_pointer_) = NULL; \
|
(_pointer_) = NULL; \
|
||||||
} \
|
} \
|
||||||
FT_END_STMNT
|
FT_END_STMNT
|
||||||
|
|
||||||
# define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
|
#define FT_MEM_REALLOC( _pointer_, _current_, _size_ ) \
|
||||||
(_pointer_) = FT_Realloc( memory, _current_, _size_, \
|
(_pointer_) = FT_Realloc( memory, _current_, _size_, \
|
||||||
(_pointer_), &error )
|
(_pointer_), &error )
|
||||||
|
|
||||||
# define FT_MEM_QALLOC( _pointer_, _size_ ) \
|
#define FT_MEM_QALLOC( _pointer_, _size_ ) \
|
||||||
(_pointer_) = FT_QAlloc( memory, _size_, &error )
|
(_pointer_) = FT_QAlloc( memory, _size_, &error )
|
||||||
|
|
||||||
# define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
|
#define FT_MEM_QREALLOC( _pointer_, _current_, _size_ ) \
|
||||||
(_pointer_) = FT_QRealloc( memory, _current_, _size_, \
|
(_pointer_) = FT_QRealloc( memory, _current_, _size_, \
|
||||||
(_pointer_), &error )
|
(_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 */
|
#else /* !FT_STRICT_ALIASING */
|
||||||
|
|
||||||
# ifdef FT_DEBUG_MEMORY
|
|
||||||
|
#ifdef FT_DEBUG_MEMORY
|
||||||
|
|
||||||
|
|
||||||
FT_BASE( FT_Error )
|
FT_BASE( FT_Error )
|
||||||
FT_Alloc_Debug( FT_Memory memory,
|
FT_Alloc_Debug( FT_Memory memory,
|
||||||
|
@ -227,8 +239,8 @@ FT_BEGIN_HEADER
|
||||||
const char* file_name,
|
const char* file_name,
|
||||||
FT_Long line_no );
|
FT_Long line_no );
|
||||||
|
|
||||||
# endif /* FT_DEBUG_MEMORY */
|
|
||||||
|
|
||||||
|
#endif /* FT_DEBUG_MEMORY */
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
@ -383,8 +395,10 @@ FT_BEGIN_HEADER
|
||||||
FT_Free( FT_Memory memory,
|
FT_Free( FT_Memory memory,
|
||||||
void* *P );
|
void* *P );
|
||||||
|
|
||||||
|
|
||||||
#ifdef FT_DEBUG_MEMORY
|
#ifdef FT_DEBUG_MEMORY
|
||||||
|
|
||||||
|
|
||||||
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
|
#define FT_MEM_ALLOC( _pointer_, _size_ ) \
|
||||||
FT_Alloc_Debug( memory, _size_, \
|
FT_Alloc_Debug( memory, _size_, \
|
||||||
(void**)(void*)&(_pointer_), \
|
(void**)(void*)&(_pointer_), \
|
||||||
|
@ -433,14 +447,16 @@ FT_BEGIN_HEADER
|
||||||
FT_QRealloc( memory, _current_, _size_, \
|
FT_QRealloc( memory, _current_, _size_, \
|
||||||
(void**)(void*)&(_pointer_) )
|
(void**)(void*)&(_pointer_) )
|
||||||
|
|
||||||
|
|
||||||
#endif /* !FT_DEBUG_MEMORY */
|
#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 */
|
#endif /* !FT_STRICT_ALIASING */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define FT_MEM_SET( dest, byte, count ) ft_memset( dest, byte, count )
|
#define FT_MEM_SET( dest, byte, count ) ft_memset( dest, byte, count )
|
||||||
|
|
||||||
#define FT_MEM_COPY( dest, source, count ) ft_memcpy( dest, source, 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 ) )
|
#define FT_ARRAY_CHECK( ptr, count ) ( (count) <= FT_ARRAY_MAX( ptr ) )
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/* */
|
/* */
|
||||||
/* The following functions macros expect that their pointer argument is */
|
/* The following functions macros expect that their pointer argument is */
|
||||||
|
@ -517,11 +532,9 @@ FT_BEGIN_HEADER
|
||||||
/* */
|
/* */
|
||||||
/* The following macros are variants of their FT_MEM_XXXX equivalents; */
|
/* The following macros are variants of their FT_MEM_XXXX equivalents; */
|
||||||
/* they are used to set an _implicit_ `error' variable and return TRUE */
|
/* 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_ ) )
|
FT_MEM_SET_ERROR( FT_MEM_ALLOC( _pointer_, _size_ ) )
|
||||||
|
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
/* FreeType utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp */
|
/* FreeType utility functions for converting 1bpp, 2bpp, 4bpp, and 8bpp */
|
||||||
/* bitmaps into 8bpp format (body). */
|
/* bitmaps into 8bpp format (body). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2004, 2005 by */
|
/* Copyright 2004, 2005, 2006 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
|
|
|
@ -1724,10 +1724,10 @@
|
||||||
if ( FT_IS_SCALABLE( face ) )
|
if ( FT_IS_SCALABLE( face ) )
|
||||||
{
|
{
|
||||||
if ( face->height < 0 )
|
if ( face->height < 0 )
|
||||||
face->height = (short)-face->height;
|
face->height = (FT_Short)-face->height;
|
||||||
|
|
||||||
if ( !FT_HAS_VERTICAL( face ) )
|
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 ) )
|
if ( FT_HAS_FIXED_SIZES( face ) )
|
||||||
|
@ -1741,9 +1741,9 @@
|
||||||
|
|
||||||
|
|
||||||
if ( bsize->height < 0 )
|
if ( bsize->height < 0 )
|
||||||
bsize->height = (FT_Short) -bsize->height;
|
bsize->height = (FT_Short)-bsize->height;
|
||||||
if ( bsize->x_ppem < 0 )
|
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 )
|
if ( bsize->y_ppem < 0 )
|
||||||
bsize->y_ppem = -bsize->y_ppem;
|
bsize->y_ppem = -bsize->y_ppem;
|
||||||
}
|
}
|
||||||
|
@ -2087,8 +2087,8 @@
|
||||||
metrics = &face->size->metrics;
|
metrics = &face->size->metrics;
|
||||||
bsize = face->available_sizes + strike_index;
|
bsize = face->available_sizes + strike_index;
|
||||||
|
|
||||||
metrics->x_ppem = (FT_UShort)(( bsize->x_ppem + 32 ) >> 6);
|
metrics->x_ppem = (FT_UShort)( ( bsize->x_ppem + 32 ) >> 6 );
|
||||||
metrics->y_ppem = (FT_UShort)(( bsize->y_ppem + 32 ) >> 6);
|
metrics->y_ppem = (FT_UShort)( ( bsize->y_ppem + 32 ) >> 6 );
|
||||||
|
|
||||||
if ( FT_IS_SCALABLE( face ) )
|
if ( FT_IS_SCALABLE( face ) )
|
||||||
{
|
{
|
||||||
|
@ -2199,8 +2199,8 @@
|
||||||
scaled_h = FT_MulFix( face->units_per_EM, metrics->y_scale );
|
scaled_h = FT_MulFix( face->units_per_EM, metrics->y_scale );
|
||||||
}
|
}
|
||||||
|
|
||||||
metrics->x_ppem = (FT_UShort)(( scaled_w + 32 ) >> 6);
|
metrics->x_ppem = (FT_UShort)( ( scaled_w + 32 ) >> 6 );
|
||||||
metrics->y_ppem = (FT_UShort)(( scaled_h + 32 ) >> 6);
|
metrics->y_ppem = (FT_UShort)( ( scaled_h + 32 ) >> 6 );
|
||||||
|
|
||||||
ft_recompute_scaled_metrics( face, metrics );
|
ft_recompute_scaled_metrics( face, metrics );
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* Embedded resource forks accessor (body). */
|
/* Embedded resource forks accessor (body). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2004, 2005 by */
|
/* Copyright 2004, 2005, 2006 by */
|
||||||
/* Masatake YAMATO and Redhat K.K. */
|
/* Masatake YAMATO and Redhat K.K. */
|
||||||
/* */
|
/* */
|
||||||
/* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */
|
/* FT_Raccess_Get_HeaderInfo() and raccess_guess_darwin_hfsplus() are */
|
||||||
|
|
|
@ -45,6 +45,7 @@
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
|
|
||||||
#ifdef FT_STRICT_ALIASING
|
#ifdef FT_STRICT_ALIASING
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,9 +54,10 @@
|
||||||
FT_Long size,
|
FT_Long size,
|
||||||
FT_Error *p_error )
|
FT_Error *p_error )
|
||||||
{
|
{
|
||||||
FT_Error error = 0;
|
FT_Error error = FT_Err_Ok;
|
||||||
FT_Pointer block = NULL;
|
FT_Pointer block = NULL;
|
||||||
|
|
||||||
|
|
||||||
if ( size > 0 )
|
if ( size > 0 )
|
||||||
{
|
{
|
||||||
block = memory->alloc( memory, size );
|
block = memory->alloc( memory, size );
|
||||||
|
@ -64,6 +66,7 @@
|
||||||
else
|
else
|
||||||
FT_MEM_ZERO( block, size );
|
FT_MEM_ZERO( block, size );
|
||||||
}
|
}
|
||||||
|
|
||||||
*p_error = error;
|
*p_error = error;
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
|
@ -74,15 +77,17 @@
|
||||||
FT_Long size,
|
FT_Long size,
|
||||||
FT_Error *p_error )
|
FT_Error *p_error )
|
||||||
{
|
{
|
||||||
FT_Error error = 0;
|
FT_Error error = FT_Err_Ok;
|
||||||
FT_Pointer block = NULL;
|
FT_Pointer block = NULL;
|
||||||
|
|
||||||
|
|
||||||
if ( size > 0 )
|
if ( size > 0 )
|
||||||
{
|
{
|
||||||
block = memory->alloc( memory, size );
|
block = memory->alloc( memory, size );
|
||||||
if ( block == NULL )
|
if ( block == NULL )
|
||||||
error = FT_Err_Out_Of_Memory;
|
error = FT_Err_Out_Of_Memory;
|
||||||
}
|
}
|
||||||
|
|
||||||
*p_error = error;
|
*p_error = error;
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
|
@ -95,7 +100,8 @@
|
||||||
void* block,
|
void* block,
|
||||||
FT_Error *p_error )
|
FT_Error *p_error )
|
||||||
{
|
{
|
||||||
FT_Error error = 0;
|
FT_Error error = FT_Err_Ok;
|
||||||
|
|
||||||
|
|
||||||
if ( size <= 0 )
|
if ( size <= 0 )
|
||||||
{
|
{
|
||||||
|
@ -112,6 +118,7 @@
|
||||||
{
|
{
|
||||||
FT_Pointer block2;
|
FT_Pointer block2;
|
||||||
|
|
||||||
|
|
||||||
block2 = memory->realloc( memory, current, size, block );
|
block2 = memory->realloc( memory, current, size, block );
|
||||||
if ( block2 == NULL )
|
if ( block2 == NULL )
|
||||||
error = FT_Err_Out_Of_Memory;
|
error = FT_Err_Out_Of_Memory;
|
||||||
|
@ -122,6 +129,7 @@
|
||||||
FT_MEM_ZERO( (char*)block + current, size-current );
|
FT_MEM_ZERO( (char*)block + current, size-current );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*p_error = error;
|
*p_error = error;
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
|
@ -134,7 +142,8 @@
|
||||||
void* block,
|
void* block,
|
||||||
FT_Error *p_error )
|
FT_Error *p_error )
|
||||||
{
|
{
|
||||||
FT_Error error = 0;
|
FT_Error error = FT_Err_Ok;
|
||||||
|
|
||||||
|
|
||||||
if ( size <= 0 )
|
if ( size <= 0 )
|
||||||
{
|
{
|
||||||
|
@ -151,15 +160,16 @@
|
||||||
{
|
{
|
||||||
FT_Pointer block2;
|
FT_Pointer block2;
|
||||||
|
|
||||||
|
|
||||||
block2 = memory->realloc( memory, current, size, block );
|
block2 = memory->realloc( memory, current, size, block );
|
||||||
if ( block2 == NULL )
|
if ( block2 == NULL )
|
||||||
error = FT_Err_Out_Of_Memory;
|
error = FT_Err_Out_Of_Memory;
|
||||||
else
|
else
|
||||||
block = block2;
|
block = block2;
|
||||||
}
|
}
|
||||||
|
|
||||||
*p_error = error;
|
*p_error = error;
|
||||||
return block;
|
return block;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
FT_BASE_DEF( void )
|
FT_BASE_DEF( void )
|
||||||
|
@ -170,8 +180,10 @@
|
||||||
memory->free( memory, (void*)P );
|
memory->free( memory, (void*)P );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#else /* !FT_STRICT_ALIASING */
|
#else /* !FT_STRICT_ALIASING */
|
||||||
|
|
||||||
|
|
||||||
/* documentation is in ftmemory.h */
|
/* documentation is in ftmemory.h */
|
||||||
|
|
||||||
FT_BASE_DEF( FT_Error )
|
FT_BASE_DEF( FT_Error )
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* The FreeType internal cache interface (body). */
|
/* 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. */
|
/* 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, */
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* OpenType and CFF data/program tables loader (body). */
|
/* 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. */
|
/* 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, */
|
||||||
|
@ -2293,8 +2293,6 @@
|
||||||
{
|
{
|
||||||
for ( idx = 0; idx < font->num_subfonts; idx++ )
|
for ( idx = 0; idx < font->num_subfonts; idx++ )
|
||||||
cff_subfont_done( memory, font->subfonts[idx] );
|
cff_subfont_done( memory, font->subfonts[idx] );
|
||||||
|
|
||||||
/* FT_FREE( font->subfonts ); -- bug this is a static array !! */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cff_encoding_done( &font->encoding );
|
cff_encoding_done( &font->encoding );
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
/* parse compressed PCF fonts, as found with many X11 server */
|
/* parse compressed PCF fonts, as found with many X11 server */
|
||||||
/* distributions. */
|
/* distributions. */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2002, 2003, 2004, 2005 by */
|
/* Copyright 2002, 2003, 2004, 2005, 2006 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* OpenType common tables validation (body). */
|
/* OpenType common tables validation (body). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2004, 2005 by */
|
/* Copyright 2004, 2005, 2006 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* OpenType GPOS table validation (body). */
|
/* OpenType GPOS table validation (body). */
|
||||||
/* */
|
/* */
|
||||||
/* Copyright 2002, 2004, 2005 by */
|
/* Copyright 2002, 2004, 2005, 2006 by */
|
||||||
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
|
||||||
/* */
|
/* */
|
||||||
/* This file is part of the FreeType project, and may only be used, */
|
/* This file is part of the FreeType project, and may only be used, */
|
||||||
|
|
|
@ -480,7 +480,7 @@
|
||||||
FT_UInt probe = power * size;
|
FT_UInt probe = power * size;
|
||||||
FT_UInt extra = count - power;
|
FT_UInt extra = count - power;
|
||||||
FT_Byte* base = stream->cursor;
|
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_Byte* p;
|
||||||
FT_UInt32 cpair;
|
FT_UInt32 cpair;
|
||||||
|
|
||||||
|
|
|
@ -401,6 +401,7 @@
|
||||||
FT_Memory memory = parser->memory;
|
FT_Memory memory = parser->memory;
|
||||||
FT_Error error;
|
FT_Error error;
|
||||||
|
|
||||||
|
|
||||||
if ( !FT_QALLOC( val->u.s, len + 1 ) )
|
if ( !FT_QALLOC( val->u.s, len + 1 ) )
|
||||||
{
|
{
|
||||||
ft_memcpy( val->u.s, str, len );
|
ft_memcpy( val->u.s, str, len );
|
||||||
|
@ -880,6 +881,7 @@
|
||||||
{
|
{
|
||||||
AFM_ValueRec shared_vals[1];
|
AFM_ValueRec shared_vals[1];
|
||||||
|
|
||||||
|
|
||||||
shared_vals[0].type = AFM_VALUE_TYPE_BOOL;
|
shared_vals[0].type = AFM_VALUE_TYPE_BOOL;
|
||||||
if ( afm_parser_read_vals( parser, shared_vals, 1 ) != 1 )
|
if ( afm_parser_read_vals( parser, shared_vals, 1 ) != 1 )
|
||||||
goto Fail;
|
goto Fail;
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
/* */
|
/* */
|
||||||
/* SFNT object management (base). */
|
/* 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. */
|
/* 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, */
|
||||||
|
|
|
@ -168,11 +168,11 @@
|
||||||
x_ppem = p[44];
|
x_ppem = p[44];
|
||||||
y_ppem = p[45];
|
y_ppem = p[45];
|
||||||
|
|
||||||
bsize->x_ppem = (FT_Pos)(x_ppem << 6);
|
bsize->x_ppem = (FT_Pos)( x_ppem << 6 );
|
||||||
bsize->y_ppem = (FT_Pos)(y_ppem << 6);
|
bsize->y_ppem = (FT_Pos)( y_ppem << 6 );
|
||||||
|
|
||||||
/* XXX: Is this correct? */
|
/* 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 ) /
|
bsize->width = (FT_Short)( ( avgwidth * y_ppem + em_size / 2 ) /
|
||||||
em_size );
|
em_size );
|
||||||
|
|
||||||
|
@ -232,9 +232,9 @@
|
||||||
bsize = ( (FT_Face)face )->available_sizes + strike_index;
|
bsize = ( (FT_Face)face )->available_sizes + strike_index;
|
||||||
strike = face->sbit_table + 8 + strike_index * 48;
|
strike = face->sbit_table + 8 + strike_index * 48;
|
||||||
|
|
||||||
metrics->x_ppem = (FT_UShort)(bsize->x_ppem >> 6);
|
metrics->x_ppem = (FT_UShort)( bsize->x_ppem >> 6 );
|
||||||
metrics->y_ppem = (FT_UShort)(bsize->y_ppem >> 6);
|
metrics->y_ppem = (FT_UShort)( bsize->y_ppem >> 6 );
|
||||||
metrics->height = (FT_UShort)(bsize->height << 6);
|
metrics->height = (FT_UShort)( bsize->height << 6 );
|
||||||
|
|
||||||
metrics->ascender = (FT_Char)strike[16] << 6; /* hori.ascender */
|
metrics->ascender = (FT_Char)strike[16] << 6; /* hori.ascender */
|
||||||
metrics->descender = (FT_Char)strike[17] << 6; /* hori.descender */
|
metrics->descender = (FT_Char)strike[17] << 6; /* hori.descender */
|
||||||
|
|
Loading…
Reference in New Issue