From c093db9d06581455607d5997998eb664b9c55bcb Mon Sep 17 00:00:00 2001 From: David Turner Date: Tue, 21 Feb 2006 17:06:35 +0000 Subject: [PATCH] * src/sfnt/sfmtx.c: disabling memory optimization when FT_CONFIG_OPTION_OLD_INTERNALS is used. This is because libXfont is directly accessing the HMTX data. Grrrrr.... --- ChangeLog | 4 ++++ src/sfnt/ttmtx.c | 18 ++++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index b7791bc37..36d983ed3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,10 @@ * src/sfnt/sfobjs.c (sfnt_face_load): fixed silly bug that prevented embedded bitmaps from being correctly listed and used + * src/sfnt/sfmtx.c: disabling memory optimization when + FT_CONFIG_OPTION_OLD_INTERNALS is used. This is because libXfont + is directly accessing the HMTX data. Grrrrr.... + * src/pfr/pfrsbit.c: fixed handling of character advances 2006-02-20 David Turner diff --git a/src/sfnt/ttmtx.c b/src/sfnt/ttmtx.c index bb89cd33c..a6925ec43 100644 --- a/src/sfnt/ttmtx.c +++ b/src/sfnt/ttmtx.c @@ -35,6 +35,12 @@ #define FT_COMPONENT trace_ttmtx +/* Unfortunately, we can't enable our memory optimizations when + * FT_CONFIG_OPTION_OLD_INTERNALS is defined. This is because some + * rogue clients (libXfont in the X.Org XServer) is directly accessing + * the metrics + */ + /*************************************************************************/ /* */ /* */ @@ -53,7 +59,7 @@ /* */ /* FreeType error code. 0 means success. */ /* */ -#ifdef FT_OPTIMIZE_MEMORY +#if defined FT_OPTIMIZE_MEMORY && !defined FT_CONFIG_OPTION_OLD_INTERNALS FT_LOCAL_DEF( FT_Error ) tt_face_load_hmtx( TT_Face face, @@ -94,7 +100,7 @@ return error; } -#else /* !OPTIMIZE_MEMORY */ +#else /* !OPTIMIZE_MEMORY || OLD_INTERNALS */ FT_LOCAL_DEF( FT_Error ) tt_face_load_hmtx( TT_Face face, @@ -215,7 +221,7 @@ return error; } -#endif /* !FT_OPTIMIZE_METRICS */ +#endif /* !OPTIMIZE_MEMORY || OLD_INTERNALS */ /*************************************************************************/ @@ -324,7 +330,7 @@ /* */ /* advance :: The advance width resp. advance height. */ /* */ -#ifdef FT_OPTIMIZE_MEMORY +#if defined FT_OPTIMIZE_MEMORY && !defined FT_CONFIG_OPTION_OLD_INTERNALS FT_LOCAL_DEF( FT_Error ) tt_face_get_metrics( TT_Face face, @@ -389,7 +395,7 @@ return SFNT_Err_Ok; } -#else /* !FT_OPTIMIZE_MEMORY */ +#else /* !OPTIMIZE_MEMORY || OLD_INTERNALS */ FT_LOCAL_DEF( FT_Error ) tt_face_get_metrics( TT_Face face, @@ -427,7 +433,7 @@ return SFNT_Err_Ok; } -#endif /* !FT_OPTIMIZE_MEMORY */ +#endif /* !OPTIMIZE_MEMORY || OLD_INTERNALS */ /* END */