From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#43177: Bug: Emacs 27.1 hangs forever in `FcCharSetSubtractCount' from '/usr/lib/libfontconfig.so.1' Date: Fri, 04 Sep 2020 15:05:52 +0200 Message-ID: References: <7bb2d5e3-1abf-08d6-d7c8-0f1bd139815e@Alexander.Shukaev.name> <3598262d-b65c-b1b4-310a-29149fd89ebf@Alexander.Shukaev.name> <04c384ac-bfbe-6073-829c-20712053bb1d@Alexander.Shukaev.name> <28ddec32-bee2-e6fd-d572-b09766f2be37@Alexander.Shukaev.name> <20b43a48-2aac-032b-8bdf-16dffb25de99@Alexander.Shukaev.name> <87o8mnqayh.fsf@igel.home> <87k0xboupe.fsf@igel.home> <87eeniq5ln.fsf@igel.home> <83ft7yvk0k.fsf@gnu.org> <87a6y6oiju.fsf@igel.home> <83blimvhuv.fsf@gnu.org> <83mu25u3x9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="39655"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43177@debbugs.gnu.org, schwab@linux-m68k.org, emacs@Alexander.Shukaev.name To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 04 15:07:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kEBQs-000ADm-5G for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Sep 2020 15:07:10 +0200 Original-Received: from localhost ([::1]:41704 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kEBQr-0003zc-54 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Sep 2020 09:07:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:43236) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kEBQk-0003yu-21 for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2020 09:07:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:54644) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kEBQj-0001Zt-Os for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2020 09:07:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kEBQj-0002oN-Jy for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2020 09:07:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 04 Sep 2020 13:07:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43177 X-GNU-PR-Package: emacs Original-Received: via spool by 43177-submit@debbugs.gnu.org id=B43177.159922476310724 (code B ref 43177); Fri, 04 Sep 2020 13:07:01 +0000 Original-Received: (at 43177) by debbugs.gnu.org; 4 Sep 2020 13:06:03 +0000 Original-Received: from localhost ([127.0.0.1]:37955 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEBPn-0002mt-5U for submit@debbugs.gnu.org; Fri, 04 Sep 2020 09:06:03 -0400 Original-Received: from mail-wr1-f67.google.com ([209.85.221.67]:47022) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEBPl-0002m9-B2 for 43177@debbugs.gnu.org; Fri, 04 Sep 2020 09:06:01 -0400 Original-Received: by mail-wr1-f67.google.com with SMTP id o5so6638617wrn.13 for <43177@debbugs.gnu.org>; Fri, 04 Sep 2020 06:06:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :mime-version; bh=qUChCPjjGjXlb7uCshsF6F+SUFX4eOw42/MC8jivs6c=; b=NHHBbRYfykLvkJVDOeWmqFRoLxz2ukD6DsmjjvWEfsRPtIvN9xbEv9Tazb3JjR2nJT 3LivbnB0RyyvvwlXgqgjYHw88zolbDZxjZPdXXRRcqsx7Npj4AojEpiUh3wVUt7ETFnk LG0IOF7U0HWIKyWrGbeKWmsUJYg0czuwP5ShAFf8lHKeUBelXB3fxp+/dUzmx2BCDNSN Th6xUJejQdV+KJiO8JNrNOcA28esHXP8un9xP2sCXgNJQUcEbZRY7llVl49ED3YvaFWS +S/ypcU1Comg7kybful92YM34op483UtVCBrugDc/NGw84/qpjmOEZG6oza1bqAu58RE WTlg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:mime-version; bh=qUChCPjjGjXlb7uCshsF6F+SUFX4eOw42/MC8jivs6c=; b=lBj0Oer8fmlBufW3XjVl0xQT2H8L5X+vbsEz7JDqe4M2BPRJlij7Lk4poE7hBINLVA rqKg8noG+0cakgjDNP9ekecIacwtILr5X251gBQ+ConmkAkYyWbW0BF0ALKmuTzOMWsi uxdKgdZjrigxZaJDDgtgmrr2micPU4OeDsrHQyc9WoS1VfMRfPnlBapBjTRYSzFNW+1X v0K5x/CWoSDBPc65DRLM0/QJUKTlY5+MQw2Mx/ygJ+E5ujDl2o+N19Jo1wB81qghK+Op DoTIy13qN+bMa0nGAC6hQN/voSt6Lqf1xltqZT9IE0cFpZYUrFG2SPMEDYmphNTTtgCW u57w== X-Gm-Message-State: AOAM532x7ztcx4O1m9dsek6pT4/+anLLjwx5WdX3xIBBBXUmMod0vhJE 0UHg+6FivQ4U+qWtlLh8Onk= X-Google-Smtp-Source: ABdhPJynI3ekOhCy/dhqJDXuYrOxeQUszPXXUUp2Wl85t924EKL5g2lckYmqODXYxZldn47RPeOOrQ== X-Received: by 2002:adf:f106:: with SMTP id r6mr7652663wro.106.1599224755257; Fri, 04 Sep 2020 06:05:55 -0700 (PDT) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:8409:1beb:8d81:9d2a]) by smtp.gmail.com with ESMTPSA id b8sm11337288wmh.48.2020.09.04.06.05.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2020 06:05:54 -0700 (PDT) In-Reply-To: <83mu25u3x9.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 04 Sep 2020 15:22:58 +0300") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:187127 Archived-At: >>>>> On Fri, 04 Sep 2020 15:22:58 +0300, Eli Zaretskii said: Eli> I don't think this would help, because most scripts don't specify Eli> language properties like 'ja' or 'ko', which is what Eli> xfont_supported_scripts uses. ok >> Perhaps we should flip the default of scalable-fonts-allowed to nil >> under GNU/Linux? [1] >> (unless the only available font-backend is 'x', which can only happen >> if the user explicitly sets it that way)? Eli> That'd be backward-incompatible. Besides, I think it's too late. I Eli> think we should do this in font.c, where the 'list' method of each Eli> font backend is called. There, we should not call the 'x' backend Eli> unless the no fonts were found by the backend called before it. This Eli> should be controlled by a variable exposed to Lisp, of course. Eli> Does that make sense? Yes. Something like the following works, and makes displaying etc/HELLO quite a bit faster. diff --git a/src/font.c b/src/font.c index 2786a772dc..6bff3a7362 100644 --- a/src/font.c +++ b/src/font.c @@ -2810,7 +2810,13 @@ font_list_entities (struct frame *f, Lisp_Object spec) || ! NILP (Vface_ignored_fonts))) val = font_delete_unmatched (val, need_filtering ? spec : Qnil, size); if (ASIZE (val) > 0) - list = Fcons (val, list); + { + list = Fcons (val, list); + /* Querying further backends can be very slow, so we only do + it if the user has explicitly requested it (Bug#43177). */ + if (query_all_font_backends == false) + break; + } } list = Fnreverse (list); @@ -5527,6 +5533,13 @@ syms_of_font (void) cause Xft crashes. Only has an effect in Xft builds. */); xft_ignore_color_fonts = true; + DEFVAR_BOOL ("query-all-font-backends", query_all_font_backends, + doc: /* +Non-nil means attempt to query all available font backends when +looking up a font, otherwise stop as soon as a suitable font has been +found. */); + query_all_font_backends = false; + #ifdef HAVE_WINDOW_SYSTEM #ifdef HAVE_FREETYPE syms_of_ftfont ();