emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Emacs-diffs] master 50c5d56: --with-cairo is no longer experimental


From: Robert Pluim
Subject: Re: [Emacs-diffs] master 50c5d56: --with-cairo is no longer experimental
Date: Wed, 06 Nov 2019 08:39:54 +0100

>>>>> On Wed, 06 Nov 2019 05:34:43 +0200, Eli Zaretskii <address@hidden> said:

    >> From: Robert Pluim <address@hidden>
    >> Date: Tue, 05 Nov 2019 21:07:20 +0100
    >> Cc: address@hidden, address@hidden
    >> 
    >> I can crash the Xft one in about 2 seconds, even with my recent
    >> patch. Iʼve not run the Cairo build in anger, but it seems stable.

    Eli> Can't we provide some band-aid to prevent Xft from crashing Emacs?

We could filter out 'Noto Color Emoji' in gtkutil.c:xg_get_font, but
the relevant GTK interface is marked as deprecated, so weʼd have to
match on font name or something. Itʼs not pretty:

diff --git a/src/gtkutil.c b/src/gtkutil.c
index 16d765533a..ccdba27ff2 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2281,12 +2281,14 @@ xg_get_font (struct frame *f, const char *default_name)
          gint        size   = pango_font_description_get_size (desc);
          PangoWeight weight = pango_font_description_get_weight (desc);
          PangoStyle  style  = pango_font_description_get_style (desc);
-
-         font = CALLN (Ffont_spec,
-                       QCfamily, build_string (family),
-                       QCsize, make_float (pango_units_to_double (size)),
-                       QCweight, XG_WEIGHT_TO_SYMBOL (weight),
-                       QCslant, XG_STYLE_TO_SYMBOL (style));
+          if (strcmp (family, "Noto Color Emoji") == 0)
+            font = Qnil;
+          else
+            font = CALLN (Ffont_spec,
+                          QCfamily, build_string (family),
+                          QCsize, make_float (pango_units_to_double (size)),
+                          QCweight, XG_WEIGHT_TO_SYMBOL (weight),
+                          QCslant, XG_STYLE_TO_SYMBOL (style));
 
          pango_font_description_free (desc);
          dupstring (&x_last_font_name, family);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]