Use FT_Done_MM_Var if available

This commit is contained in:
Behdad Esfahbod 2018-01-08 09:55:41 +00:00
parent 97488fd725
commit 94683a1255
2 changed files with 5 additions and 1 deletions

View File

@ -320,7 +320,7 @@ fontconfig_save_libs="$LIBS"
fontconfig_save_cflags="$CFLAGS" fontconfig_save_cflags="$CFLAGS"
LIBS="$LIBS $FREETYPE_LIBS" LIBS="$LIBS $FREETYPE_LIBS"
CFLAGS="$CFLAGS $FREETYPE_CFLAGS" CFLAGS="$CFLAGS $FREETYPE_CFLAGS"
AC_CHECK_FUNCS(FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names FT_Get_X11_Font_Format) AC_CHECK_FUNCS(FT_Get_BDF_Property FT_Get_PS_Font_Info FT_Has_PS_Glyph_Names FT_Get_X11_Font_Format FT_Done_MM_Var)
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
#include <ft2build.h> #include <ft2build.h>

View File

@ -2170,7 +2170,11 @@ skip:
} while (!err && (!index_set || face_num == set_face_num) && face_num < num_faces); } while (!err && (!index_set || face_num == set_face_num) && face_num < num_faces);
bail: bail:
#ifdef HAVE_FT_DONE_MM_VAR
FT_Done_MM_Var (ftLibrary, mm_var);
#else
free (mm_var); free (mm_var);
#endif
FcLangSetDestroy (ls); FcLangSetDestroy (ls);
FcCharSetDestroy (cs); FcCharSetDestroy (cs);
if (face) if (face)