From 051d65a5a028fe31a735f2a50174d6078f830aa9 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Fri, 14 Dec 2018 16:40:44 -0800 Subject: [PATCH] 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. --- configure.ac | 7 ------- src/ftfont.c | 15 --------------- 2 files changed, 22 deletions(-) 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) { -- 2.39.2