diff options
| author | YAMAMOTO Mitsuharu | 2019-06-30 15:40:43 +0900 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2019-06-30 15:40:43 +0900 |
| commit | e2d8c1e8bcfaa107be653758ed6088fcb593d5ac (patch) | |
| tree | cda1aa26000cdd78e4c0c4632efa3c437dd1c6a5 /src | |
| parent | 4a5a74a07ff783242fe2c6c76c28712ffed67a12 (diff) | |
| download | emacs-e2d8c1e8bcfaa107be653758ed6088fcb593d5ac.tar.gz emacs-e2d8c1e8bcfaa107be653758ed6088fcb593d5ac.zip | |
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.
Diffstat (limited to 'src')
| -rw-r--r-- | src/gtkutil.c | 15 |
1 files 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) | |||
| 2277 | 2277 | ||
| 2278 | if (desc) | 2278 | if (desc) |
| 2279 | { | 2279 | { |
| 2280 | const char *name = pango_font_description_get_family (desc); | 2280 | const char *family = pango_font_description_get_family (desc); |
| 2281 | gint size = pango_font_description_get_size (desc); | 2281 | gint size = pango_font_description_get_size (desc); |
| 2282 | PangoWeight weight = pango_font_description_get_weight (desc); | 2282 | PangoWeight weight = pango_font_description_get_weight (desc); |
| 2283 | PangoStyle style = pango_font_description_get_style (desc); | 2283 | PangoStyle style = pango_font_description_get_style (desc); |
| 2284 | 2284 | ||
| 2285 | #ifdef USE_CAIRO | ||
| 2286 | #define FONT_TYPE_WANTED (Qftcr) | ||
| 2287 | #else | ||
| 2288 | #define FONT_TYPE_WANTED (Qxft) | ||
| 2289 | #endif | ||
| 2290 | font = CALLN (Ffont_spec, | 2285 | font = CALLN (Ffont_spec, |
| 2291 | QCname, build_string (name), | 2286 | QCfamily, build_string (family), |
| 2292 | QCsize, make_float (pango_units_to_double (size)), | 2287 | QCsize, make_float (pango_units_to_double (size)), |
| 2293 | QCweight, XG_WEIGHT_TO_SYMBOL (weight), | 2288 | QCweight, XG_WEIGHT_TO_SYMBOL (weight), |
| 2294 | QCslant, XG_STYLE_TO_SYMBOL (style), | 2289 | QCslant, XG_STYLE_TO_SYMBOL (style)); |
| 2295 | QCtype, | ||
| 2296 | FONT_TYPE_WANTED); | ||
| 2297 | 2290 | ||
| 2298 | pango_font_description_free (desc); | 2291 | pango_font_description_free (desc); |
| 2299 | dupstring (&x_last_font_name, name); | 2292 | dupstring (&x_last_font_name, family); |
| 2300 | } | 2293 | } |
| 2301 | 2294 | ||
| 2302 | #else /* Use old font selector, which just returns the font name. */ | 2295 | #else /* Use old font selector, which just returns the font name. */ |