all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Robert Pluim <rpluim@gmail.com>
To: Allen Li <darkfeline@felesatra.moe>
Cc: 37786@debbugs.gnu.org
Subject: bug#37786: 26.3; Emacs crashes when calling function to decode string
Date: Fri, 25 Oct 2019 18:32:39 +0200	[thread overview]
Message-ID: <m2pnikrdjs.fsf@gmail.com> (raw)
In-Reply-To: <805zkg3zyj.fsf@felesatra.moe> (Allen Li's message of "Tue, 22 Oct 2019 20:25:40 -0700")

>>>>> On Tue, 22 Oct 2019 20:25:40 -0700, Allen Li <darkfeline@felesatra.moe> said:

    Allen> I haven't touched xft-ignore-color-fonts (and it reproduces from emacs -Q)
    >> 
    Allen> #define FC_MAJOR	2
    Allen> #define FC_MINOR	13
    Allen> #define FC_REVISION	91
    >> 

Thatʼs a very recent (and maybe even unreleased) version of
fontconfig.

    Allen> Arch Linux

Hmm. Could you try the following against emacs-26 and see if it fixes
your crash? (the character will almost certainly end up displayed
wrong). This looks more like a fontconfig bug than anything else: the
pattern we've supplied to FcFontList explicitly says "donʼt give me
color fonts".

diff --git i/lisp/international/fontset.el w/lisp/international/fontset.el
index c90d4f53bd..e80a1a87b9 100644
--- i/lisp/international/fontset.el
+++ w/lisp/international/fontset.el
@@ -804,7 +804,6 @@ setup-default-fontset
              #x2664
              (#x2667 . #x2669)
              (#x266C . #x26FF)
-             (#x2700 . #x27bF) ;; Dingbats
              (#x27C0 . #x27EF) ;; Misc Mathematical Symbols-A
              (#x27F0 . #x27FF) ;; Supplemental Arrows-A
              (#x2900 . #x297F) ;; Supplemental Arrows-B
diff --git i/src/ftfont.c w/src/ftfont.c
index 823fb2095c..017b349318 100644
--- i/src/ftfont.c
+++ w/src/ftfont.c
@@ -861,6 +861,9 @@ ftfont_list (struct frame *f, Lisp_Object spec)
 #endif /* FC_CAPABILITY */
 #ifdef FC_FONTFORMAT
                             FC_FONTFORMAT,
+#endif
+#ifdef FC_COLOR
+                             FC_COLOR,
 #endif
                             NULL);
   if (! objset)
@@ -902,6 +905,15 @@ ftfont_list (struct frame *f, Lisp_Object spec)
     {
       Lisp_Object entity;

+      {
+        FcBool b;
+        if (FcPatternGetBool (fontset->fonts[i], FC_COLOR, 0, &b)
+            == FcResultMatch && b)
+          {
+            fprintf (stderr, "Skipping Color font\n");
+            continue;
+          }
+      }
       if (spacing >= 0)
        {
          int this;





  reply	other threads:[~2019-10-25 16:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-17  4:11 bug#37786: 26.3; Emacs crashes when calling function to decode string Allen Li
2019-10-17  4:22 ` Lars Ingebrigtsen
2019-10-17  9:53   ` Robert Pluim
2019-10-18  4:28     ` Allen Li
2019-10-18  9:49       ` Robert Pluim
2019-10-19  1:18         ` Allen Li
2019-10-21 10:02           ` Robert Pluim
2019-10-22  3:44             ` Allen Li
2019-10-22  8:18               ` Robert Pluim
2019-10-23  3:25                 ` Allen Li
2019-10-25 16:32                   ` Robert Pluim [this message]
2019-10-26  9:44                     ` Allen Li
2019-10-27  8:26                       ` Robert Pluim
2019-11-05 17:40                         ` Robert Pluim
2019-11-13 14:03                           ` Robert Pluim

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

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

  git send-email \
    --in-reply-to=m2pnikrdjs.fsf@gmail.com \
    --to=rpluim@gmail.com \
    --cc=37786@debbugs.gnu.org \
    --cc=darkfeline@felesatra.moe \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.