From: Paul Eggert Date: Sat, 15 Dec 2018 00:40:44 +0000 (-0800) Subject: Assume hb_ft_font_create_referenced if HarfBuzz X-Git-Tag: emacs-27.0.90~2671^2~48 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=051d65a5a028fe31a735f2a50174d6078f830aa9;p=emacs.git Assume hb_ft_font_create_referenced if HarfBuzz * configure.ac (HAVE_HB_FT_FONT_CREATE_REFERENCED): Remove test, since we now require 0.9.42 and hb_ft_font_create_referenced has been present since 0.9.38. * src/ftfont.c (ft_face_destroy, hb_ft_font_create_referenced): Remove; no longer needed. --- diff --git a/configure.ac b/configure.ac index 7a45a541f28..991ab55c685 100644 --- a/configure.ac +++ b/configure.ac @@ -3317,13 +3317,6 @@ if test "${HAVE_X11}" = "yes"; then EMACS_CHECK_MODULES([HARFBUZZ], [harfbuzz >= 0.9.42]) if test "$HAVE_HARFBUZZ" = "yes"; then AC_DEFINE(HAVE_HARFBUZZ, 1, [Define to 1 if using HarfBuzz.]) - AC_CHECK_LIB(harfbuzz, hb_ft_font_create_referenced, - HAVE_HB_FT_FONT_CREATE_REFERENCED=yes, - HAVE_HB_FT_FONT_CREATE_REFERENCED=no) - if test "${HAVE_HB_FT_FONT_CREATE_REFERENCED}" = "yes"; then - AC_DEFINE(HAVE_HB_FT_FONT_CREATE_REFERENCED, 1, - [Define to 1 if HarfBuzz has hb_ft_font_create_referenced.]) - fi fi fi if test "${with_libotf}" != "no"; then diff --git a/src/ftfont.c b/src/ftfont.c index 47442df0e5a..bc988963937 100644 --- a/src/ftfont.c +++ b/src/ftfont.c @@ -478,21 +478,6 @@ ftfont_get_otf (struct ftfont_info *ftfont_info) #ifdef HAVE_HARFBUZZ -# ifndef HAVE_HB_FT_FONT_CREATE_REFERENCED -static void -ft_face_destroy (void *data) -{ - FT_Done_Face (data); -} - -static hb_font_t * -hb_ft_font_create_referenced (FT_Face face) -{ - FT_Reference_Face (face); - return hb_ft_font_create (face, ft_face_destroy); -} -# endif - static hb_font_t * ftfont_get_hb_font (struct ftfont_info *ftfont_info) {