diff --git a/ChangeLog b/ChangeLog index 9804fc936..0e6357eca 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-10-25 David Turner + + * include/freetype/ftcache.h (FT_POINTER_TO_ULONG): New macro. + (FTC_FACE_ID_HASH): Rewritten, using FT_POINTER_TO_ULONG. + 2002-10-22 Giuseppe Ghibò * include/freetype/freetype.h (FT_Encoding): Fix entry for latin-2. diff --git a/include/freetype/freetype.h b/include/freetype/freetype.h index eaeac75c7..82a5de42e 100644 --- a/include/freetype/freetype.h +++ b/include/freetype/freetype.h @@ -548,7 +548,7 @@ FT_BEGIN_HEADER /* */ /* ft_encoding_none :: see @FT_ENCODING_NONE */ /* ft_encoding_unicode :: see @FT_ENCODING_UNICODE */ - /* ft_encoding_latin_2 :: see @FT_ENCODING_LATIN_2 */ + /* ft_encoding_latin_2 :: see @FT_ENCODING_OLD_LATIN_2 */ /* ft_encoding_symbol :: see @FT_ENCODING_MS_SYMBOL */ /* ft_encoding_sjis :: see @FT_ENCODING_MS_SJIS */ /* ft_encoding_gb2312 :: see @FT_ENCODING_MS_GB2312 */ diff --git a/include/freetype/ftcache.h b/include/freetype/ftcache.h index 97962753e..82af39142 100644 --- a/include/freetype/ftcache.h +++ b/include/freetype/ftcache.h @@ -183,7 +183,11 @@ FT_BEGIN_HEADER (f1)->pix_width == (f2)->pix_width && \ (f1)->pix_height == (f2)->pix_height ) -#define FTC_FACE_ID_HASH( i ) ((FT_UInt32)(FT_Pointer)( i )) +#define FT_POINTER_TO_ULONG( p ) ((FT_ULong)(FT_Pointer)(p)) + +#define FTC_FACE_ID_HASH( i ) \ + ((FT_UInt32)(( FT_POINTER_TO_ULONG( i ) >> 3 ) ^ \ + ( FT_POINTER_TO_ULONG( i ) << 7 ) ) ) #define FTC_FONT_HASH( f ) \ (FT_UInt32)( FTC_FACE_ID_HASH((f)->face_id) ^ \