From e2d8c1e8bcfaa107be653758ed6088fcb593d5ac Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Sun, 30 Jun 2019 15:40:43 +0900 Subject: [PATCH] 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 dccee159254..1d15aec253e 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. */ -- 2.39.2