unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Robert Pluim <rpluim@gmail.com>
Cc: 30874@debbugs.gnu.org, jsynacek@redhat.com
Subject: bug#30874: 27.0.50; Emacs crashes
Date: Thu, 29 Mar 2018 13:25:43 +0300	[thread overview]
Message-ID: <83efk3dvq0.fsf@gnu.org> (raw)
In-Reply-To: <874ll128ww.fsf@gmail.com> (message from Robert Pluim on Tue, 27 Mar 2018 10:57:03 +0200)

> From: Robert Pluim <rpluim@gmail.com>
> Cc: 30874@debbugs.gnu.org,  jsynacek@redhat.com
> Date: Tue, 27 Mar 2018 10:57:03 +0200
> 
> Eli Zaretskii <eliz@gnu.org> 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.





  reply	other threads:[~2018-03-29 10:25 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-20 10:24 bug#30874: 27.0.50; Emacs crashes Jan Synacek
2018-03-20 12:04 ` Eli Zaretskii
2018-03-20 12:12   ` Jan Synacek
2018-03-20 12:44     ` Eli Zaretskii
2018-03-22 12:28       ` Jan Synacek
2018-03-22 13:01         ` Eli Zaretskii
2018-03-22 13:05           ` Jan Synacek
2018-03-22 14:55             ` Eli Zaretskii
2018-03-26  9:12               ` Jan Synacek
2018-03-26 10:33                 ` Robert Pluim
2018-03-26 15:25                   ` Eli Zaretskii
2018-03-26 16:52                     ` Robert Pluim
2018-03-26 17:33                       ` Eli Zaretskii
2018-03-26 20:17                         ` Robert Pluim
2018-03-26 22:16                           ` Robert Pluim
2018-03-27  3:02                             ` Eli Zaretskii
2018-03-27  8:57                               ` Robert Pluim
2018-03-29 10:25                                 ` Eli Zaretskii [this message]
2018-03-29 16:14                                   ` Robert Pluim
2018-03-29 17:07                                     ` Eli Zaretskii
2018-03-30  5:10                                       ` Glenn Morris
2018-03-30  8:00                                         ` Eli Zaretskii
2018-03-30 10:36                                       ` Robert Pluim
2018-03-30 11:46                                         ` Eli Zaretskii
2018-03-30 13:00                                           ` Robert Pluim
2018-03-30 13:46                                             ` Eli Zaretskii
2018-03-31 13:55                                               ` Robert Pluim
2018-03-31 14:59                                                 ` Eli Zaretskii
2018-04-03  9:24                                                   ` Robert Pluim
2018-04-03  8:00                                           ` Jan Synacek
2018-04-03  9:22                                             ` Robert Pluim
2018-04-03  9:42                                               ` Eli Zaretskii
2018-04-03 12:52                                                 ` Robert Pluim
2018-03-29 10:35                               ` Jan Synacek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83efk3dvq0.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=30874@debbugs.gnu.org \
    --cc=jsynacek@redhat.com \
    --cc=rpluim@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).