diff --git a/configure.ac b/configure.ac index 0227166f0..18bfe2a05 100644 --- a/configure.ac +++ b/configure.ac @@ -355,6 +355,7 @@ if $have_freetype; then LIBS="$LIBS $FREETYPE_LIBS" AC_CHECK_FUNCS(FT_Get_Var_Blend_Coordinates) AC_CHECK_FUNCS(FT_Set_Var_Blend_Coordinates) + AC_CHECK_FUNCS(FT_Done_MM_Var) LIBS=$save_libs fi AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype) diff --git a/src/hb-ft.cc b/src/hb-ft.cc index ae8c8d923..1c526cf37 100644 --- a/src/hb-ft.cc +++ b/src/hb-ft.cc @@ -651,7 +651,11 @@ hb_ft_font_changed (hb_font_t *font) } free (coords); free (ft_coords); +#ifdef HAVE_FT_DONE_MM_VAR + FT_Done_MM_Var (ft_face->glyph->library, mm_var); +#else free (mm_var); +#endif } #endif }