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/xrdb.c | |
| 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/xrdb.c')
| -rw-r--r-- | src/xrdb.c | 4 |
1 files changed, 2 insertions, 2 deletions
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); |