diff options
| author | YAMAMOTO Mitsuharu | 2019-04-24 12:31:37 +0900 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2019-04-24 12:31:37 +0900 |
| commit | 5f4e8e2e088de9fb76cb631077c6eddd3219f594 (patch) | |
| tree | abb80bc8ec36c28d4eef08b92db90a142f641be6 /src | |
| parent | 1828e9a9b7481572448284a8e5925bf97f2145f7 (diff) | |
| download | emacs-5f4e8e2e088de9fb76cb631077c6eddd3219f594.tar.gz emacs-5f4e8e2e088de9fb76cb631077c6eddd3219f594.zip | |
Don't link libXft when using cairo
* configure.ac: Check cairo early. Don't try Xft if cairo is used.
* lwlib/lwlib-utils.h [USE_CAIRO]: Include cairo.h and fontconfig.h.
(XftFont, XftDraw, XftColor, XGlyphInfo) [USE_CAIRO]: New typedefs.
(XftFontOpenName, XftFontClose, XftDrawCreate, XftDrawDestroy)
(XftDrawRect, XftDrawStringUtf8, XftTextExtentsUtf8) [USE_CAIRO]: New macros.
(crxft_font_open_name, crxft_font_close, crxft_draw_create)
(crxft_draw_rect, crxft_draw_string, crxft_text_extents) [USE_CAIRO]: New
externs.
* lwlib/lwlib-utils.c [USE_CAIRO]: Include math.h, cairo-ft.h, and
cairo-xlib.h.
(crxft_font_open_name, crxft_font_close, crxft_draw_create)
(crxft_set_source_color, crxft_draw_rect, crxft_draw_string)
(crxft_text_extents) [USE_CAIRO]: New Xft compatibility functions.
* lwlib/xlwmenuP.h [USE_CAIRO]: Include lwlib-utils.h.
* lwlib/xlwmenu.c (display_menu_item) [USE_CAIRO]: Call
cairo_surface_mark_dirty and cairo_surface_flush.
* lwlib/lwlib-Xaw.c [USE_CAIRO]: Include stdlib.h and lwlib-utils.h.
(draw_text) [USE_CAIRO]: Call cairo_surface_flush.
* src/xsettings.c [USE_CAIRO]: Include fontconfig.h
(apply_xft_settings) [!HAVE_XFT]: Don't call XftDefaultSubstitute or
XftDefaultSet.
* lwlib/lwlib-Xaw.c:
* lwlib/lwlib-int.h:
* lwlib/xlwmenu.c:
* lwlib/xlwmenuP.h:
* src/xrdb.c:
* src/xsettings.c:
* src/xterm.c: Replace all #ifdef HAVE_XFT with #if defined USE_CAIRO ||
defined HAVE_XFT.
* src/xfns.c (x_default_font_parameter): Replace #ifdef HAVE_XFT with #if
defined USE_CAIRO || defined HAVE_XFT.
Diffstat (limited to 'src')
| -rw-r--r-- | src/menu.c | 2 | ||||
| -rw-r--r-- | src/xfns.c | 2 | ||||
| -rw-r--r-- | src/xrdb.c | 4 | ||||
| -rw-r--r-- | src/xsettings.c | 58 | ||||
| -rw-r--r-- | src/xterm.c | 2 |
5 files changed, 38 insertions, 30 deletions
diff --git a/src/menu.c b/src/menu.c index 7f46e68e73e..e82c8570595 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -687,7 +687,7 @@ digest_single_submenu (int start, int end, bool top_level_items) | |||
| 687 | 687 | ||
| 688 | ASET (menu_items, i + MENU_ITEMS_PANE_NAME, pane_name); | 688 | ASET (menu_items, i + MENU_ITEMS_PANE_NAME, pane_name); |
| 689 | } | 689 | } |
| 690 | #elif defined (USE_LUCID) && defined (HAVE_XFT) | 690 | #elif defined (USE_LUCID) && (defined USE_CAIRO || defined HAVE_XFT) |
| 691 | if (STRINGP (pane_name)) | 691 | if (STRINGP (pane_name)) |
| 692 | { | 692 | { |
| 693 | pane_name = ENCODE_UTF_8 (pane_name); | 693 | pane_name = ENCODE_UTF_8 (pane_name); |
diff --git a/src/xfns.c b/src/xfns.c index dbc5e10c415..9075491e978 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -3487,7 +3487,7 @@ x_default_font_parameter (struct frame *f, Lisp_Object parms) | |||
| 3487 | { | 3487 | { |
| 3488 | const char *names[] | 3488 | const char *names[] |
| 3489 | = { | 3489 | = { |
| 3490 | #ifdef HAVE_XFT | 3490 | #if defined USE_CAIRO || defined HAVE_XFT |
| 3491 | /* This will find the normal Xft font. */ | 3491 | /* This will find the normal Xft font. */ |
| 3492 | "monospace-10", | 3492 | "monospace-10", |
| 3493 | #endif | 3493 | #endif |
diff --git a/src/xrdb.c b/src/xrdb.c index 35de446cb7a..0950b706699 100644 --- a/src/xrdb.c +++ b/src/xrdb.c | |||
| @@ -383,7 +383,7 @@ x_load_resources (Display *display, const char *xrm_string, | |||
| 383 | XrmDatabase db; | 383 | XrmDatabase db; |
| 384 | char line[256]; | 384 | char line[256]; |
| 385 | 385 | ||
| 386 | #if defined USE_MOTIF || !defined HAVE_XFT || !defined USE_LUCID | 386 | #if defined USE_MOTIF || !(defined USE_CAIRO || defined HAVE_XFT) || !defined USE_LUCID |
| 387 | const char *helv = "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1"; | 387 | const char *helv = "-*-helvetica-medium-r-*--*-120-*-*-*-*-iso8859-1"; |
| 388 | #endif | 388 | #endif |
| 389 | 389 | ||
| @@ -456,7 +456,7 @@ x_load_resources (Display *display, const char *xrm_string, | |||
| 456 | 456 | ||
| 457 | sprintf (line, "Emacs.dialog*.background: grey75"); | 457 | sprintf (line, "Emacs.dialog*.background: grey75"); |
| 458 | XrmPutLineResource (&rdb, line); | 458 | XrmPutLineResource (&rdb, line); |
| 459 | #if !defined (HAVE_XFT) || !defined (USE_LUCID) | 459 | #if !(defined USE_CAIRO || defined HAVE_XFT) || !defined (USE_LUCID) |
| 460 | sprintf (line, "Emacs.dialog*.font: %s", helv); | 460 | sprintf (line, "Emacs.dialog*.font: %s", helv); |
| 461 | XrmPutLineResource (&rdb, line); | 461 | XrmPutLineResource (&rdb, line); |
| 462 | sprintf (line, "*XlwMenu*font: %s", helv); | 462 | sprintf (line, "*XlwMenu*font: %s", helv); |
diff --git a/src/xsettings.c b/src/xsettings.c index 947d5cfb7b6..3e9012e3ab1 100644 --- a/src/xsettings.c +++ b/src/xsettings.c | |||
| @@ -45,9 +45,13 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 45 | #include <gconf/gconf-client.h> | 45 | #include <gconf/gconf-client.h> |
| 46 | #endif | 46 | #endif |
| 47 | 47 | ||
| 48 | #ifdef HAVE_XFT | 48 | #if defined USE_CAIRO || defined HAVE_XFT |
| 49 | #ifdef USE_CAIRO | ||
| 50 | #include <fontconfig/fontconfig.h> | ||
| 51 | #else /* HAVE_XFT */ | ||
| 49 | #include <X11/Xft/Xft.h> | 52 | #include <X11/Xft/Xft.h> |
| 50 | #endif | 53 | #endif |
| 54 | #endif | ||
| 51 | 55 | ||
| 52 | static char *current_mono_font; | 56 | static char *current_mono_font; |
| 53 | static char *current_font; | 57 | static char *current_font; |
| @@ -83,7 +87,7 @@ dpyinfo_valid (struct x_display_info *dpyinfo) | |||
| 83 | 87 | ||
| 84 | /* Store a monospace font change event if the monospaced font changed. */ | 88 | /* Store a monospace font change event if the monospaced font changed. */ |
| 85 | 89 | ||
| 86 | #if defined HAVE_XFT && (defined HAVE_GSETTINGS || defined HAVE_GCONF) | 90 | #if (defined USE_CAIRO || defined HAVE_XFT) && (defined HAVE_GSETTINGS || defined HAVE_GCONF) |
| 87 | static void | 91 | static void |
| 88 | store_monospaced_changed (const char *newfont) | 92 | store_monospaced_changed (const char *newfont) |
| 89 | { | 93 | { |
| @@ -102,7 +106,7 @@ store_monospaced_changed (const char *newfont) | |||
| 102 | 106 | ||
| 103 | /* Store a font name change event if the font name changed. */ | 107 | /* Store a font name change event if the font name changed. */ |
| 104 | 108 | ||
| 105 | #ifdef HAVE_XFT | 109 | #if defined USE_CAIRO || defined HAVE_XFT |
| 106 | static void | 110 | static void |
| 107 | store_font_name_changed (const char *newfont) | 111 | store_font_name_changed (const char *newfont) |
| 108 | { | 112 | { |
| @@ -117,7 +121,7 @@ store_font_name_changed (const char *newfont) | |||
| 117 | XCAR (first_dpyinfo->name_list_element)); | 121 | XCAR (first_dpyinfo->name_list_element)); |
| 118 | } | 122 | } |
| 119 | } | 123 | } |
| 120 | #endif /* HAVE_XFT */ | 124 | #endif /* USE_CAIRO || HAVE_XFT */ |
| 121 | 125 | ||
| 122 | /* Map TOOL_BAR_STYLE from a string to its corresponding Lisp value. | 126 | /* Map TOOL_BAR_STYLE from a string to its corresponding Lisp value. |
| 123 | Return Qnil if TOOL_BAR_STYLE is not known. */ | 127 | Return Qnil if TOOL_BAR_STYLE is not known. */ |
| @@ -157,7 +161,7 @@ store_tool_bar_style_changed (const char *newstyle, | |||
| 157 | XCAR (dpyinfo->name_list_element)); | 161 | XCAR (dpyinfo->name_list_element)); |
| 158 | } | 162 | } |
| 159 | 163 | ||
| 160 | #ifdef HAVE_XFT | 164 | #if defined USE_CAIRO || defined HAVE_XFT |
| 161 | #define XSETTINGS_FONT_NAME "Gtk/FontName" | 165 | #define XSETTINGS_FONT_NAME "Gtk/FontName" |
| 162 | #endif | 166 | #endif |
| 163 | #define XSETTINGS_TOOL_BAR_STYLE "Gtk/ToolbarStyle" | 167 | #define XSETTINGS_TOOL_BAR_STYLE "Gtk/ToolbarStyle" |
| @@ -174,7 +178,7 @@ enum { | |||
| 174 | }; | 178 | }; |
| 175 | struct xsettings | 179 | struct xsettings |
| 176 | { | 180 | { |
| 177 | #ifdef HAVE_XFT | 181 | #if defined USE_CAIRO || defined HAVE_XFT |
| 178 | FcBool aa, hinting; | 182 | FcBool aa, hinting; |
| 179 | int rgba, lcdfilter, hintstyle; | 183 | int rgba, lcdfilter, hintstyle; |
| 180 | double dpi; | 184 | double dpi; |
| @@ -191,7 +195,7 @@ struct xsettings | |||
| 191 | #define GSETTINGS_SCHEMA "org.gnome.desktop.interface" | 195 | #define GSETTINGS_SCHEMA "org.gnome.desktop.interface" |
| 192 | #define GSETTINGS_TOOL_BAR_STYLE "toolbar-style" | 196 | #define GSETTINGS_TOOL_BAR_STYLE "toolbar-style" |
| 193 | 197 | ||
| 194 | #ifdef HAVE_XFT | 198 | #if defined USE_CAIRO || defined HAVE_XFT |
| 195 | #define GSETTINGS_MONO_FONT "monospace-font-name" | 199 | #define GSETTINGS_MONO_FONT "monospace-font-name" |
| 196 | #define GSETTINGS_FONT_NAME "font-name" | 200 | #define GSETTINGS_FONT_NAME "font-name" |
| 197 | #endif | 201 | #endif |
| @@ -224,7 +228,7 @@ something_changed_gsettingsCB (GSettings *settings, | |||
| 224 | g_variant_unref (val); | 228 | g_variant_unref (val); |
| 225 | } | 229 | } |
| 226 | } | 230 | } |
| 227 | #ifdef HAVE_XFT | 231 | #if defined USE_CAIRO || defined HAVE_XFT |
| 228 | else if (strcmp (key, GSETTINGS_MONO_FONT) == 0) | 232 | else if (strcmp (key, GSETTINGS_MONO_FONT) == 0) |
| 229 | { | 233 | { |
| 230 | val = g_settings_get_value (settings, GSETTINGS_MONO_FONT); | 234 | val = g_settings_get_value (settings, GSETTINGS_MONO_FONT); |
| @@ -253,14 +257,14 @@ something_changed_gsettingsCB (GSettings *settings, | |||
| 253 | g_variant_unref (val); | 257 | g_variant_unref (val); |
| 254 | } | 258 | } |
| 255 | } | 259 | } |
| 256 | #endif /* HAVE_XFT */ | 260 | #endif /* USE_CAIRO || HAVE_XFT */ |
| 257 | } | 261 | } |
| 258 | 262 | ||
| 259 | #endif /* HAVE_GSETTINGS */ | 263 | #endif /* HAVE_GSETTINGS */ |
| 260 | 264 | ||
| 261 | #ifdef HAVE_GCONF | 265 | #ifdef HAVE_GCONF |
| 262 | #define GCONF_TOOL_BAR_STYLE "/desktop/gnome/interface/toolbar_style" | 266 | #define GCONF_TOOL_BAR_STYLE "/desktop/gnome/interface/toolbar_style" |
| 263 | #ifdef HAVE_XFT | 267 | #if defined USE_CAIRO || defined HAVE_XFT |
| 264 | #define GCONF_MONO_FONT "/desktop/gnome/interface/monospace_font_name" | 268 | #define GCONF_MONO_FONT "/desktop/gnome/interface/monospace_font_name" |
| 265 | #define GCONF_FONT_NAME "/desktop/gnome/interface/font_name" | 269 | #define GCONF_FONT_NAME "/desktop/gnome/interface/font_name" |
| 266 | #endif | 270 | #endif |
| @@ -286,7 +290,7 @@ something_changed_gconfCB (GConfClient *client, | |||
| 286 | const char *value = gconf_value_get_string (v); | 290 | const char *value = gconf_value_get_string (v); |
| 287 | store_tool_bar_style_changed (value, first_dpyinfo); | 291 | store_tool_bar_style_changed (value, first_dpyinfo); |
| 288 | } | 292 | } |
| 289 | #ifdef HAVE_XFT | 293 | #if defined USE_CAIRO || defined HAVE_XFT |
| 290 | else if (strcmp (key, GCONF_MONO_FONT) == 0) | 294 | else if (strcmp (key, GCONF_MONO_FONT) == 0) |
| 291 | { | 295 | { |
| 292 | const char *value = gconf_value_get_string (v); | 296 | const char *value = gconf_value_get_string (v); |
| @@ -297,12 +301,12 @@ something_changed_gconfCB (GConfClient *client, | |||
| 297 | const char *value = gconf_value_get_string (v); | 301 | const char *value = gconf_value_get_string (v); |
| 298 | store_font_name_changed (value); | 302 | store_font_name_changed (value); |
| 299 | } | 303 | } |
| 300 | #endif /* HAVE_XFT */ | 304 | #endif /* USE_CAIRO || HAVE_XFT */ |
| 301 | } | 305 | } |
| 302 | 306 | ||
| 303 | #endif /* HAVE_GCONF */ | 307 | #endif /* HAVE_GCONF */ |
| 304 | 308 | ||
| 305 | #ifdef HAVE_XFT | 309 | #if defined USE_CAIRO || defined HAVE_XFT |
| 306 | 310 | ||
| 307 | /* Older fontconfig versions don't have FC_LCD_*. */ | 311 | /* Older fontconfig versions don't have FC_LCD_*. */ |
| 308 | #ifndef FC_LCD_NONE | 312 | #ifndef FC_LCD_NONE |
| @@ -315,7 +319,7 @@ something_changed_gconfCB (GConfClient *client, | |||
| 315 | #define FC_LCD_FILTER "lcdfilter" | 319 | #define FC_LCD_FILTER "lcdfilter" |
| 316 | #endif | 320 | #endif |
| 317 | 321 | ||
| 318 | #endif /* HAVE_XFT */ | 322 | #endif /* USE_CAIRO || HAVE_XFT */ |
| 319 | 323 | ||
| 320 | /* Find the window that contains the XSETTINGS property values. */ | 324 | /* Find the window that contains the XSETTINGS property values. */ |
| 321 | 325 | ||
| @@ -440,7 +444,7 @@ parse_settings (unsigned char *prop, | |||
| 440 | if (bytes_parsed > bytes) return settings_seen; | 444 | if (bytes_parsed > bytes) return settings_seen; |
| 441 | 445 | ||
| 442 | want_this = strcmp (XSETTINGS_TOOL_BAR_STYLE, name) == 0; | 446 | want_this = strcmp (XSETTINGS_TOOL_BAR_STYLE, name) == 0; |
| 443 | #ifdef HAVE_XFT | 447 | #if defined USE_CAIRO || defined HAVE_XFT |
| 444 | if ((nlen > 6 && memcmp (name, "Xft/", 4) == 0) | 448 | if ((nlen > 6 && memcmp (name, "Xft/", 4) == 0) |
| 445 | || strcmp (XSETTINGS_FONT_NAME, name) == 0) | 449 | || strcmp (XSETTINGS_FONT_NAME, name) == 0) |
| 446 | want_this = true; | 450 | want_this = true; |
| @@ -490,7 +494,7 @@ parse_settings (unsigned char *prop, | |||
| 490 | dupstring (&settings->tb_style, sval); | 494 | dupstring (&settings->tb_style, sval); |
| 491 | settings->seen |= SEEN_TB_STYLE; | 495 | settings->seen |= SEEN_TB_STYLE; |
| 492 | } | 496 | } |
| 493 | #ifdef HAVE_XFT | 497 | #if defined USE_CAIRO || defined HAVE_XFT |
| 494 | else if (strcmp (name, XSETTINGS_FONT_NAME) == 0) | 498 | else if (strcmp (name, XSETTINGS_FONT_NAME) == 0) |
| 495 | { | 499 | { |
| 496 | dupstring (&settings->font, sval); | 500 | dupstring (&settings->font, sval); |
| @@ -553,7 +557,7 @@ parse_settings (unsigned char *prop, | |||
| 553 | else | 557 | else |
| 554 | settings->seen &= ~SEEN_LCDFILTER; | 558 | settings->seen &= ~SEEN_LCDFILTER; |
| 555 | } | 559 | } |
| 556 | #endif /* HAVE_XFT */ | 560 | #endif /* USE_CAIRO || HAVE_XFT */ |
| 557 | else | 561 | else |
| 558 | want_this = false; | 562 | want_this = false; |
| 559 | settings_seen += want_this; | 563 | settings_seen += want_this; |
| @@ -604,16 +608,18 @@ static void | |||
| 604 | apply_xft_settings (struct x_display_info *dpyinfo, | 608 | apply_xft_settings (struct x_display_info *dpyinfo, |
| 605 | struct xsettings *settings) | 609 | struct xsettings *settings) |
| 606 | { | 610 | { |
| 607 | #ifdef HAVE_XFT | 611 | #if defined USE_CAIRO || defined HAVE_XFT |
| 608 | FcPattern *pat; | 612 | FcPattern *pat; |
| 609 | struct xsettings oldsettings; | 613 | struct xsettings oldsettings; |
| 610 | bool changed = false; | 614 | bool changed = false; |
| 611 | 615 | ||
| 612 | memset (&oldsettings, 0, sizeof (oldsettings)); | 616 | memset (&oldsettings, 0, sizeof (oldsettings)); |
| 613 | pat = FcPatternCreate (); | 617 | pat = FcPatternCreate (); |
| 618 | #ifdef HAVE_XFT | ||
| 614 | XftDefaultSubstitute (dpyinfo->display, | 619 | XftDefaultSubstitute (dpyinfo->display, |
| 615 | XScreenNumberOfScreen (dpyinfo->screen), | 620 | XScreenNumberOfScreen (dpyinfo->screen), |
| 616 | pat); | 621 | pat); |
| 622 | #endif | ||
| 617 | FcPatternGetBool (pat, FC_ANTIALIAS, 0, &oldsettings.aa); | 623 | FcPatternGetBool (pat, FC_ANTIALIAS, 0, &oldsettings.aa); |
| 618 | FcPatternGetBool (pat, FC_HINTING, 0, &oldsettings.hinting); | 624 | FcPatternGetBool (pat, FC_HINTING, 0, &oldsettings.hinting); |
| 619 | #ifdef FC_HINT_STYLE | 625 | #ifdef FC_HINT_STYLE |
| @@ -713,7 +719,9 @@ apply_xft_settings (struct x_display_info *dpyinfo, | |||
| 713 | }; | 719 | }; |
| 714 | char buf[sizeof format + d_formats * d_growth + lf_formats * lf_growth]; | 720 | char buf[sizeof format + d_formats * d_growth + lf_formats * lf_growth]; |
| 715 | 721 | ||
| 722 | #ifdef HAVE_XFT | ||
| 716 | XftDefaultSet (dpyinfo->display, pat); | 723 | XftDefaultSet (dpyinfo->display, pat); |
| 724 | #endif | ||
| 717 | store_config_changed_event (Qfont_render, | 725 | store_config_changed_event (Qfont_render, |
| 718 | XCAR (dpyinfo->name_list_element)); | 726 | XCAR (dpyinfo->name_list_element)); |
| 719 | Vxft_settings | 727 | Vxft_settings |
| @@ -725,7 +733,7 @@ apply_xft_settings (struct x_display_info *dpyinfo, | |||
| 725 | } | 733 | } |
| 726 | else | 734 | else |
| 727 | FcPatternDestroy (pat); | 735 | FcPatternDestroy (pat); |
| 728 | #endif /* HAVE_XFT */ | 736 | #endif /* USE_CAIRO || HAVE_XFT */ |
| 729 | } | 737 | } |
| 730 | 738 | ||
| 731 | /* Read XSettings from the display for DPYINFO. | 739 | /* Read XSettings from the display for DPYINFO. |
| @@ -748,7 +756,7 @@ read_and_apply_settings (struct x_display_info *dpyinfo, bool send_event_p) | |||
| 748 | current_tool_bar_style = map_tool_bar_style (settings.tb_style); | 756 | current_tool_bar_style = map_tool_bar_style (settings.tb_style); |
| 749 | xfree (settings.tb_style); | 757 | xfree (settings.tb_style); |
| 750 | } | 758 | } |
| 751 | #ifdef HAVE_XFT | 759 | #if defined USE_CAIRO || defined HAVE_XFT |
| 752 | if (settings.seen & SEEN_FONT) | 760 | if (settings.seen & SEEN_FONT) |
| 753 | { | 761 | { |
| 754 | if (send_event_p) | 762 | if (send_event_p) |
| @@ -850,7 +858,7 @@ init_gsettings (void) | |||
| 850 | g_variant_unref (val); | 858 | g_variant_unref (val); |
| 851 | } | 859 | } |
| 852 | 860 | ||
| 853 | #ifdef HAVE_XFT | 861 | #if defined USE_CAIRO || defined HAVE_XFT |
| 854 | val = g_settings_get_value (gsettings_client, GSETTINGS_MONO_FONT); | 862 | val = g_settings_get_value (gsettings_client, GSETTINGS_MONO_FONT); |
| 855 | if (val) | 863 | if (val) |
| 856 | { | 864 | { |
| @@ -868,7 +876,7 @@ init_gsettings (void) | |||
| 868 | dupstring (¤t_font, g_variant_get_string (val, NULL)); | 876 | dupstring (¤t_font, g_variant_get_string (val, NULL)); |
| 869 | g_variant_unref (val); | 877 | g_variant_unref (val); |
| 870 | } | 878 | } |
| 871 | #endif /* HAVE_XFT */ | 879 | #endif /* USE_CAIRO || HAVE_XFT */ |
| 872 | 880 | ||
| 873 | #endif /* HAVE_GSETTINGS */ | 881 | #endif /* HAVE_GSETTINGS */ |
| 874 | } | 882 | } |
| @@ -903,7 +911,7 @@ init_gconf (void) | |||
| 903 | g_free (s); | 911 | g_free (s); |
| 904 | } | 912 | } |
| 905 | 913 | ||
| 906 | #ifdef HAVE_XFT | 914 | #if defined USE_CAIRO || defined HAVE_XFT |
| 907 | s = gconf_client_get_string (gconf_client, GCONF_MONO_FONT, NULL); | 915 | s = gconf_client_get_string (gconf_client, GCONF_MONO_FONT, NULL); |
| 908 | if (s) | 916 | if (s) |
| 909 | { | 917 | { |
| @@ -932,7 +940,7 @@ init_gconf (void) | |||
| 932 | GCONF_FONT_NAME, | 940 | GCONF_FONT_NAME, |
| 933 | something_changed_gconfCB, | 941 | something_changed_gconfCB, |
| 934 | NULL, NULL, NULL); | 942 | NULL, NULL, NULL); |
| 935 | #endif /* HAVE_XFT */ | 943 | #endif /* USE_CAIRO || HAVE_XFT */ |
| 936 | #endif /* HAVE_GCONF */ | 944 | #endif /* HAVE_GCONF */ |
| 937 | } | 945 | } |
| 938 | 946 | ||
| @@ -1055,7 +1063,7 @@ If this variable is nil, Emacs ignores system font changes. */); | |||
| 1055 | doc: /* Font settings applied to Xft. */); | 1063 | doc: /* Font settings applied to Xft. */); |
| 1056 | Vxft_settings = empty_unibyte_string; | 1064 | Vxft_settings = empty_unibyte_string; |
| 1057 | 1065 | ||
| 1058 | #ifdef HAVE_XFT | 1066 | #if defined USE_CAIRO || defined HAVE_XFT |
| 1059 | Fprovide (intern_c_string ("font-render-setting"), Qnil); | 1067 | Fprovide (intern_c_string ("font-render-setting"), Qnil); |
| 1060 | #if defined (HAVE_GCONF) || defined (HAVE_GSETTINGS) | 1068 | #if defined (HAVE_GCONF) || defined (HAVE_GSETTINGS) |
| 1061 | Fprovide (intern_c_string ("system-font-setting"), Qnil); | 1069 | Fprovide (intern_c_string ("system-font-setting"), Qnil); |
diff --git a/src/xterm.c b/src/xterm.c index 0b83263a0e6..e85e8e35d44 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -12733,7 +12733,7 @@ x_term_init (Lisp_Object display_name, char *xrm_option, char *resource_name) | |||
| 12733 | dpyinfo->supports_xdbe = true; | 12733 | dpyinfo->supports_xdbe = true; |
| 12734 | #endif | 12734 | #endif |
| 12735 | 12735 | ||
| 12736 | #ifdef HAVE_XFT | 12736 | #if defined USE_CAIRO || defined HAVE_XFT |
| 12737 | { | 12737 | { |
| 12738 | /* If we are using Xft, the following precautions should be made: | 12738 | /* If we are using Xft, the following precautions should be made: |
| 12739 | 12739 | ||