emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master e2d8c1e: Fix error in mouse-set-font on GTK 3 with


From: YAMAMOTO Mitsuharu
Subject: [Emacs-diffs] master e2d8c1e: Fix error in mouse-set-font on GTK 3 with Harfbuzz (Bug#36288)
Date: Sun, 30 Jun 2019 02:41:15 -0400 (EDT)

branch: master
commit e2d8c1e8bcfaa107be653758ed6088fcb593d5ac
Author: YAMAMOTO Mitsuharu <address@hidden>
Commit: YAMAMOTO Mitsuharu <address@hidden>

    Fix error in mouse-set-font on GTK 3 with Harfbuzz (Bug#36288)
    
    * src/gtkutil.c (xg_get_font) [HAVE_GTK3]: Remove type property from font
    spec.  This effectively undoes the fix for Bug#3228, but gives consistent
    results overall.
---
 src/gtkutil.c | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/src/gtkutil.c b/src/gtkutil.c
index dccee15..1d15aec 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -2277,26 +2277,19 @@ xg_get_font (struct frame *f, const char *default_name)
 
       if (desc)
        {
-         const char *name   = pango_font_description_get_family (desc);
+         const char *family = pango_font_description_get_family (desc);
          gint        size   = pango_font_description_get_size (desc);
          PangoWeight weight = pango_font_description_get_weight (desc);
          PangoStyle  style  = pango_font_description_get_style (desc);
 
-#ifdef USE_CAIRO
-#define FONT_TYPE_WANTED (Qftcr)
-#else
-#define FONT_TYPE_WANTED (Qxft)
-#endif
          font = CALLN (Ffont_spec,
-                       QCname, build_string (name),
+                       QCfamily, build_string (family),
                        QCsize, make_float (pango_units_to_double (size)),
                        QCweight, XG_WEIGHT_TO_SYMBOL (weight),
-                       QCslant, XG_STYLE_TO_SYMBOL (style),
-                       QCtype,
-                        FONT_TYPE_WANTED);
+                       QCslant, XG_STYLE_TO_SYMBOL (style));
 
          pango_font_description_free (desc);
-         dupstring (&x_last_font_name, name);
+         dupstring (&x_last_font_name, family);
        }
 
 #else /* Use old font selector, which just returns the font name.  */



reply via email to

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