From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#30874: 27.0.50; Emacs crashes Date: Thu, 29 Mar 2018 13:25:43 +0300 Message-ID: <83efk3dvq0.fsf@gnu.org> References: <837eq7lzr4.fsf@gnu.org> <831sgencgb.fsf@gnu.org> <83woy4i7rz.fsf@gnu.org> <83vadoi2ia.fsf@gnu.org> <878taf2kj5.fsf@gmail.com> <83d0zqg8p8.fsf@gnu.org> <87o9ja230e.fsf@gmail.com> <83605ig2se.fsf@gnu.org> <87fu4m1tht.fsf@gmail.com> <878tae1nzu.fsf@gmail.com> <83lgeedxv7.fsf@gnu.org> <874ll128ww.fsf@gmail.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: blaine.gmane.org 1522319110 19321 195.159.176.226 (29 Mar 2018 10:25:10 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 29 Mar 2018 10:25:10 +0000 (UTC) Cc: 30874@debbugs.gnu.org, jsynacek@redhat.com To: Robert Pluim Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Mar 29 12:25:06 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1Ujy-0004sD-1n for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Mar 2018 12:25:06 +0200 Original-Received: from localhost ([::1]:38461 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1Um1-0007Eg-K4 for geb-bug-gnu-emacs@m.gmane.org; Thu, 29 Mar 2018 06:27:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1Ult-0007ED-UP for bug-gnu-emacs@gnu.org; Thu, 29 Mar 2018 06:27:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1Ulq-0003Nn-0Y for bug-gnu-emacs@gnu.org; Thu, 29 Mar 2018 06:27:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50086) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f1Ulp-0003Nd-Sp for bug-gnu-emacs@gnu.org; Thu, 29 Mar 2018 06:27:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f1Ulp-0003uG-KD for bug-gnu-emacs@gnu.org; Thu, 29 Mar 2018 06:27:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 29 Mar 2018 10:27:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 30874 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 30874-submit@debbugs.gnu.org id=B30874.152231918414972 (code B ref 30874); Thu, 29 Mar 2018 10:27:01 +0000 Original-Received: (at 30874) by debbugs.gnu.org; 29 Mar 2018 10:26:24 +0000 Original-Received: from localhost ([127.0.0.1]:57983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1UlE-0003tP-4H for submit@debbugs.gnu.org; Thu, 29 Mar 2018 06:26:24 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60084) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1f1UlA-0003t9-Ng for 30874@debbugs.gnu.org; Thu, 29 Mar 2018 06:26:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1Ul1-0002lZ-I1 for 30874@debbugs.gnu.org; Thu, 29 Mar 2018 06:26:15 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:39029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1Ukq-0002aq-KF; Thu, 29 Mar 2018 06:26:00 -0400 Original-Received: from [176.228.60.248] (port=2047 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1f1Ukp-0002aH-DB; Thu, 29 Mar 2018 06:26:00 -0400 In-reply-to: <874ll128ww.fsf@gmail.com> (message from Robert Pluim on Tue, 27 Mar 2018 10:57:03 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 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.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:144679 Archived-At: > From: Robert Pluim > Cc: 30874@debbugs.gnu.org, jsynacek@redhat.com > Date: Tue, 27 Mar 2018 10:57:03 +0200 > > Eli Zaretskii writes: > > > So how do we end up loading that problematic font, and why does that > > happen with the recipe for this bug, but not if set-fonset-font on the > > command line is omitted? > > Hereʼs what the file loading looks like from Xft's perspective: > > XFT_DEBUG=16 LD_LIBRARY_PATH=/home/rpluim/repos/src/libXft-2.3.2/src/.libs/ ./emacs -Q > > XFT_DEBUG=16 > FontFile /home/rpluim/.local/share/fonts/Inconsolata-Regular.ttf/0 matches new > Loading file /home/rpluim/.local/share/fonts/Inconsolata-Regular.ttf/0 > FontFile /home/rpluim/.local/share/fonts/Inconsolata-Regular.ttf/0 matches existing (2) > FontFile /usr/share/fonts/inconsolata/Inconsolata-Bold.ttf/0 matches new > Loading file /usr/share/fonts/inconsolata/Inconsolata-Bold.ttf/0 > > # Inconsolata is my system default monospace font. Now I insert #x274c : > > FontFile /usr/share/fonts/inconsolata/Inconsolata-Regular.ttf/0 matches new > Loading file /usr/share/fonts/inconsolata/Inconsolata-Regular.ttf/0 > FontFile /usr/share/fonts/vlgothic/VL-Gothic-Regular.ttf/0 matches new > Loading file /usr/share/fonts/vlgothic/VL-Gothic-Regular.ttf/0 What does "matches new" mean in this log? And what does "matches existing" (below) mean? > # I think this means Inconsolata doesnʼt have a glyph for that > # codepoint, although I thought the default fontset specified Symbola > # for that codepoint (and Symbola is installed), so I donʼt understand > # why VL-Gothic is chosen. Strange indeed. Does setting use-default-font-for-symbols to a nil value change this in any way? > # Now I change the fontset, and this time it finds the > # emojione-android font : > > FontFile /usr/share/fonts/dejavu/DejaVuSansMono.ttf/0 matches new > Loading file /usr/share/fonts/dejavu/DejaVuSansMono.ttf/0 > FontFile /home/rpluim/.local/share/fonts/Inconsolata-Regular.ttf/0 matches existing (2) > FontFile /usr/share/fonts/eosrei-emojione/emojione-android.ttf/0 matches new > Loading file /usr/share/fonts/eosrei-emojione/emojione-android.ttf/0 Right. Does use-default-font-for-symbols change anything in this case? > > It looks like this is a problem with all color emoji fonts, so this is > > indeed a duplicate of bug#30045. See this bug: > > > > https://bugzilla.redhat.com/show_bug.cgi?id=1498269 > > > > The question now becomes: how do we avoid loading such fonts, at least > > when the xftfont back-end is in use? Is there any alternative except > > telling users to "move such fonts out of the way"? > > Accoding to that bug, the solution is for the application to 'move > away from legacy Xft to fontconfig', whatever that means. I can say > that building '--without-xft' is definitely sub-optimal (the buffer > text isnʼt scaled, and Emacs doesnʼt find a font to display #x274c). We already use fontconfig to some extent, and xftfont is AFAIK the most advanced font backend we have. Patches for switching to using more of fontconfig's features (assuming it can replace Xft), or for switching to a more modern back-end (harfbuzz?) are welcome, but I don't hold my breath, as I don't think we have expert on board who know enough about complex script shaping to make progress in those directions. As a stopgap, I think we should find a way of ignoring the problematic fonts. Is there some way of detecting them? AFAICT, we could do that either in ftfont_match or in its subroutine ftfont_spec_pattern. We could then pretend that these fonts don't match any font spec, perhaps subject to some variable (which would provide a 'fire escape"), which I think would fix the problem. Failing that, we could have a non-empty list in face-ignored-fonts, but that would be an inferior solution, and it would take us more time to come up with the full list of the problematic fonts. Thanks.