Fix compile with old FreeType that doesn't have FT_Select_Size() (bug #17498)

This commit is contained in:
Behdad Esfahbod 2008-12-28 04:48:54 -05:00
parent 350dc5f350
commit 00c0972aca
2 changed files with 3 additions and 9 deletions

View File

@ -223,19 +223,11 @@ FREETYPE_LIBS="`$ft_config --libs`"
AC_SUBST(FREETYPE_LIBS)
AC_SUBST(FREETYPE_CFLAGS)
#
# Check to see whether we have:
# FT_Get_Next_Char
# FT_Get_BDF_Property
# FT_Get_PS_Font_Info
# FT_Has_PS_Glyph_Names
#
fontconfig_save_libs="$LIBS"
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 FT_Get_X11_Font_Format)
AC_CHECK_FUNCS(FT_Get_Next_Char FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names FT_Get_X11_Font_Format FT_Select_Size)
AC_CHECK_MEMBER(FT_Bitmap_Size.y_ppem,
HAVE_FT_BITMAP_SIZE_Y_PPEM=1,
HAVE_FT_BITMAP_SIZE_Y_PPEM=0,

View File

@ -2551,11 +2551,13 @@ FcFreeTypeCharSetAndSpacingForSize (FT_Face face, FcBlanks *blanks, int *spacing
if (!fcs)
goto bail0;
#if HAVE_FT_SELECT_SIZE
if (strike_index >= 0) {
if (FT_Select_Size (face, strike_index) != FT_Err_Ok)
goto bail1;
using_strike = FcTrue;
}
#endif
#ifdef CHECK
printf ("Family %s style %s\n", face->family_name, face->style_name);