From: Keith Packard Date: Wed, 11 Feb 2004 18:53:05 +0000 (+0000) Subject: Ok, so I messed up the test for y_ppem. Let's see if I got it right this X-Git-Tag: fc-2_2_93~4 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=208a720f009357449647a56d6fe95a5a346a6578;p=fontconfig.git Ok, so I messed up the test for y_ppem. Let's see if I got it right this time. --- diff --git a/ChangeLog b/ChangeLog index b75341f..d532022 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-02-11 Keith Packard + + * configure.in: + * src/fcfreetype.c: (FcGetPixelSize): + Ok, so I messed up the test for y_ppem. Let's see if I + got it right this time. + 2004-02-10 Keith Packard * configure.in: diff --git a/configure.in b/configure.in index 299410c..100d7b9 100644 --- a/configure.in +++ b/configure.in @@ -125,20 +125,11 @@ fontconfig_save_cflags="$CFLAGS" LIBS="$LIBS $FREETYPE_LIBS" CFLAGS="$CFLAGS $FREETYPE_CFLAGS" AC_CHECK_FUNCS(FT_Get_Next_Char FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names) -AC_CHECK_MEMBER(FT_Bitmap_Size.y_ppem,,, +AC_CHECK_MEMBER(FT_Bitmap_Size.y_ppem, + HAVE_FT_BITMAP_SIZE_Y_PPEM=1, + HAVE_FT_BITMAP_SIZE_Y_PPEM=0, [#include #include FT_FREETYPE_H]) -LIBS="$fontconfig_save_libs" -CFLAGS="$fontconfig_save_cflags" - -case "$ac_cv_member_FT_Bitmap_Size_y_ppem" in -yes) - HAVE_FT_BITMAP_SIZE_Y_PPEM=1 - ;; -*) - HAVE_FT_BITMAP_SIZE_Y_PPEM=0 - ;; -esac AC_DEFINE_UNQUOTED(HAVE_FT_BITMAP_SIZE_Y_PPEM,$HAVE_FT_BITMAP_SIZE_Y_PPEM, [FT_Bitmap_Size structure includes y_ppem field]) diff --git a/src/fcfreetype.c b/src/fcfreetype.c index ea2ee88..78fe20c 100644 --- a/src/fcfreetype.c +++ b/src/fcfreetype.c @@ -347,7 +347,7 @@ static const FcStringConst slantConsts[] = { static double FcGetPixelSize (FT_Face face, int i) { -#ifdef HAVE_FT_GET_BDF_PROPERTY +#if HAVE_FT_GET_BDF_PROPERTY if (face->num_fixed_sizes == 1) { BDF_PropertyRec prop; @@ -358,7 +358,7 @@ FcGetPixelSize (FT_Face face, int i) return (double) prop.u.integer; } #endif -#ifdef HAVE_FT_BITMAP_SIZE_Y_PPEM +#if HAVE_FT_BITMAP_SIZE_Y_PPEM return (double) face->available_sizes[i].y_ppem / 64.0; #else return (double) face->available_sizes[i].height / 64.0;