Subject: Re: bug#24560: 25.1; With `--font 7x13', wrong font is used for Unicode characters

From: Lars Ingebrigtsen <[email-masked]>
Date: Sun, 17 Nov 2019 19:33:46 +0100

Eli Zaretskii <[email-masked]> writes:

>> From: Lars Ingebrigtsen <[email-masked]>
>> Cc: [email-masked],  [email-masked]
>> Date: Sun, 17 Nov 2019 18:58:26 +0100
>> 
>> So if somebody says explicitly --without-xft, then HAVE_XFT won't be
>> "yes", and we set HAVE_FREETYPE to "no" without checking.  And harfbuzz
>> depends on HAVE_FREETYPE being "yes", so harfbuzz depends on xft being
>> available, too.
>> 
>> Is this correct behaviour?
>
> Maybe I'm simply misremembering, and HarfBuzz does need xft.

I hacked the configure script to just say

diff --git a/configure.ac b/configure.ac
index 0976b665e6..d42f530407 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3399,6 +3399,9 @@ AC_DEFUN
     fi
   fi				  # $HAVE_CAIRO != yes
 
+  EMACS_CHECK_MODULES([FREETYPE], [freetype2])
+  test "$HAVE_FREETYPE" = "no" && AC_MSG_ERROR(libxft requires libfreetype)
+
   HAVE_LIBOTF=no
   if test "${HAVE_FREETYPE}" = "yes"; then
     AC_DEFINE(HAVE_FREETYPE, 1,

to force

  Does Emacs use HarfBuzz?                                yes
  Does Emacs use -lm17n-flt?                              yes
  Does Emacs use -lotf?                                   yes
  Does Emacs use -lxft?                                   no

and compilation does indeed fail:

In file included from ftfont.c:46:
ftfont.h:77:3: error: unknown type name ‘XftFont’
   XftFont *xftfont;
   ^~~~~~~

>> In addition, I think the configure script should fail if you say
>> --with-harfbuzz and harfbuzz isn't available.
>
> Probably.

I've now added that, at least.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no