Subject: Re: bug#43177: Bug: Emacs 27.1 hangs forever in `FcCharSetSubtractCount' from '/usr/lib/libfontconfig.so.1'

From: Robert Pluim <[email-masked]>
Date: Thu, 03 Sep 2020 12:06:53 +0200

>>>>> On Thu, 3 Sep 2020 11:53:05 +0200, Alexander Shukaev <[email-masked]> said:

    Alexander> On 03/09/2020 11:50, Alexander Shukaev wrote:
    >> On 03/09/2020 11:40, Alexander Shukaev wrote:
    >>> (gdb) f 7
    >>> #7  0x0000555555a8d875 in xfont_supported_scripts
    >>> (display=0x555556594940, fontname=0x55556a79e428 "-misc-trirong
    >>> medium-medium-i-normal--0-0-0-0-p-0-iso10646-1",
    >>> props=XIL(0x7ffff27926e5),
    >>>      encoding=0x7ffff23ab8d0) at xfont.c:266
    >>> 266          xfont = XLoadQueryFont (display, fontname);
    >>> (gdb) pp fontname
    >>> #<INVALID_LISP_OBJECT 0x55556a79e428>
    >>> (gdb) pp fontname
    >>> #<INVALID_LISP_OBJECT 0x55556a79e428>
    >>> (gdb) p fontname
    >>> $3 = 0x55556a79e428 "-misc-trirong
    >>> medium-medium-i-normal--0-0-0-0-p-0-iso10646-1"
    >>> (gdb)
    >> It appears to always be different `fontname' here as I try multiple
    >> times to reproduce.  Maybe it's not really hanging but is merely
    >> ultra-slow somehow in looping over the fonts here.  Any ideas?

    Alexander> Hmm, right, waited for about a minute or so, and the file got opened
    Alexander> finally.  Reopening it was instant as well as if something got
    Alexander> cached/loaded already.  So any ideas how to speed things up here?  I
    Alexander> don't think I've encountered that with 26.3...

You can check easily enough by building emacs-27 --without-cairo, that
should get you back to emacs-26's font handling.

The issue is: why is Emacs falling back to the 'x' backend?

Robert