diff options
| author | Jan Djärv | 2010-04-08 18:20:32 +0200 |
|---|---|---|
| committer | Jan Djärv | 2010-04-08 18:20:32 +0200 |
| commit | 99852628a828979c55c96d7def6c5a21f2b32af5 (patch) | |
| tree | 31090fefe3468ad6d12495d2e65596dc939b41d2 /src | |
| parent | 9a15cc5a6837f39eaefd28ab607fc39dffcc11b3 (diff) | |
| download | emacs-99852628a828979c55c96d7def6c5a21f2b32af5.tar.gz emacs-99852628a828979c55c96d7def6c5a21f2b32af5.zip | |
Lucid menus can now use Xft for fonts.
* xsettings.c (current_font, SYSTEM_FONT, XSETTINGS_FONT_NAME): New.
(parse_xft_settings): Also check for XSETTINGS_FONT_NAME and save that
in current_font.
(init_gconf): Read value of SYSTEM_FONT and save it in current_font.
(Ffont_get_system_normal_font, xsettings_get_system_normal_font): New
functions.
(syms_of_xsettings): Initialize current_font. defsubr
Sfont_get_system_normal_font.
* xsettings.h (Ffont_get_system_normal_font,
xsettings_get_system_normal_font): Declare.
* xfns.c (extern xlwmenu_default_font): Remove.
(Fx_create_frame): Remove setting of xlwmenu_default_font, moved
to xlwmenu.c.
* menu.c (digest_single_submenu): If USE_LUCID and HAVE_XFT, encode
menu items in UTF-8.
* xmenu.c: include xsettings.h and xlwmenu.h if USE_LUCID.
(apply_systemfont_to_menu): New function.
(set_frame_menubar, create_and_show_popup_menu): Call
apply_systemfont_to_menu.
* xlwmenu.c (xlwmenu_default_font): Make static.
(xlwMenuResources): Add XtNfaceName and XtNdefaultFace.
(string_width): Use XftTextExtentsUtf8 if HAVE_XFT.
(MENU_FONT_HEIGHT, MENU_FONT_ASCENT): Add versions for
HAVE_XFT.
(size_menu): Set max_rest_width in window_state structure.
(display_menu_item): If HAVE_XFT and xft_draw is set, use
XftDrawRect and XftDrawStringUtf8 to draw text.
(make_windows_if_needed): Set max_rest_width and xft_draw
in windows[i].
(openXftFont): New.
(XlwMenuInitialize): Call openXftFont if HAVE_XFT. If mw->menu.font
is not set, load font fixed and save it in xlwmenu_default_font.
(XlwMenuInitialize): Set max_rest_width and xft_draw in windows[0].
(XlwMenuClassInitialize): Initialize xlwmenu_default_font.
(XlwMenuRealize): Set xft_fg, xft_bg, xft_disabled_fg and
windows[0].xft_draw if xft_font is set.
(XlwMenuDestroy): Destroy all xft_draw and close xft_font.
(facename_changed): New.
(XlwMenuSetValues): Call facename_changed. If face name did change,
close old fonts and destroy xft_draw:s. Then create new ones.
* xlwmenu.h (XtNfaceName, XtCFaceName, XtNdefaultFace,
XtCDefaultFace): New.
* xlwmenuP.h (_window_state): Add max_rest_width and xft_draw.
(_XlwMenu_part): Add faceName,xft_fg, xft_bg, xft_disabled_fg and
xft_font.
* xresources.texi (Lucid Resources): Mention faceName to set Xft fonts.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 26 | ||||
| -rw-r--r-- | src/menu.c | 18 | ||||
| -rw-r--r-- | src/xfns.c | 13 | ||||
| -rw-r--r-- | src/xmenu.c | 35 | ||||
| -rw-r--r-- | src/xsettings.c | 48 | ||||
| -rw-r--r-- | src/xsettings.h | 3 |
6 files changed, 123 insertions, 20 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 455deff0aae..51ed028b9d5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,29 @@ | |||
| 1 | 2010-04-08 Jan Djärv <jan.h.d@swipnet.se> | ||
| 2 | |||
| 3 | * xsettings.c (current_font, SYSTEM_FONT, XSETTINGS_FONT_NAME): New. | ||
| 4 | (parse_xft_settings): Also check for XSETTINGS_FONT_NAME and save that | ||
| 5 | in current_font. | ||
| 6 | (init_gconf): Read value of SYSTEM_FONT and save it in current_font. | ||
| 7 | (Ffont_get_system_normal_font, xsettings_get_system_normal_font): New | ||
| 8 | functions. | ||
| 9 | (syms_of_xsettings): Initialize current_font. defsubr | ||
| 10 | Sfont_get_system_normal_font. | ||
| 11 | |||
| 12 | * xsettings.h (Ffont_get_system_normal_font, | ||
| 13 | xsettings_get_system_normal_font): Declare. | ||
| 14 | |||
| 15 | * xfns.c (extern xlwmenu_default_font): Remove. | ||
| 16 | (Fx_create_frame): Remove setting of xlwmenu_default_font, moved | ||
| 17 | to xlwmenu.c. | ||
| 18 | |||
| 19 | * menu.c (digest_single_submenu): If USE_LUCID and HAVE_XFT, encode | ||
| 20 | menu items in UTF-8. | ||
| 21 | |||
| 22 | * xmenu.c: include xsettings.h and xlwmenu.h if USE_LUCID. | ||
| 23 | (apply_systemfont_to_menu): New function. | ||
| 24 | (set_frame_menubar, create_and_show_popup_menu): Call | ||
| 25 | apply_systemfont_to_menu. | ||
| 26 | |||
| 1 | 2010-04-07 Jan Djärv <jan.h.d@swipnet.se> | 27 | 2010-04-07 Jan Djärv <jan.h.d@swipnet.se> |
| 2 | 28 | ||
| 3 | * frame.h (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT): Don't use | 29 | * frame.h (FRAME_TEXT_LINES_TO_PIXEL_HEIGHT): Don't use |
diff --git a/src/menu.c b/src/menu.c index bfe54a53328..ca00c06a98b 100644 --- a/src/menu.c +++ b/src/menu.c | |||
| @@ -697,6 +697,12 @@ digest_single_submenu (start, end, top_level_items) | |||
| 697 | 697 | ||
| 698 | ASET (menu_items, i + MENU_ITEMS_PANE_NAME, pane_name); | 698 | ASET (menu_items, i + MENU_ITEMS_PANE_NAME, pane_name); |
| 699 | } | 699 | } |
| 700 | #elif defined (USE_LUCID) && defined (HAVE_XFT) | ||
| 701 | if (STRINGP (pane_name)) | ||
| 702 | { | ||
| 703 | pane_name = ENCODE_UTF_8 (pane_name); | ||
| 704 | ASET (menu_items, i + MENU_ITEMS_PANE_NAME, pane_name); | ||
| 705 | } | ||
| 700 | #elif !defined (HAVE_MULTILINGUAL_MENU) | 706 | #elif !defined (HAVE_MULTILINGUAL_MENU) |
| 701 | if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) | 707 | if (STRINGP (pane_name) && STRING_MULTIBYTE (pane_name)) |
| 702 | { | 708 | { |
| @@ -770,6 +776,18 @@ digest_single_submenu (start, end, top_level_items) | |||
| 770 | descrip = ENCODE_SYSTEM (descrip); | 776 | descrip = ENCODE_SYSTEM (descrip); |
| 771 | ASET (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY, descrip); | 777 | ASET (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY, descrip); |
| 772 | } | 778 | } |
| 779 | #elif USE_LUCID | ||
| 780 | if (STRINGP (item_name)) | ||
| 781 | { | ||
| 782 | item_name = ENCODE_UTF_8 (item_name); | ||
| 783 | ASET (menu_items, i + MENU_ITEMS_ITEM_NAME, item_name); | ||
| 784 | } | ||
| 785 | |||
| 786 | if (STRINGP (descrip)) | ||
| 787 | { | ||
| 788 | descrip = ENCODE_UTF_8 (descrip); | ||
| 789 | ASET (menu_items, i + MENU_ITEMS_ITEM_EQUIV_KEY, descrip); | ||
| 790 | } | ||
| 773 | #elif !defined (HAVE_MULTILINGUAL_MENU) | 791 | #elif !defined (HAVE_MULTILINGUAL_MENU) |
| 774 | if (STRING_MULTIBYTE (item_name)) | 792 | if (STRING_MULTIBYTE (item_name)) |
| 775 | { | 793 | { |
diff --git a/src/xfns.c b/src/xfns.c index 4ec13b7e50d..647526cc22b 100644 --- a/src/xfns.c +++ b/src/xfns.c | |||
| @@ -110,11 +110,6 @@ extern void _XEditResCheckMessages (); | |||
| 110 | 110 | ||
| 111 | extern LWLIB_ID widget_id_tick; | 111 | extern LWLIB_ID widget_id_tick; |
| 112 | 112 | ||
| 113 | #ifdef USE_LUCID | ||
| 114 | /* This is part of a kludge--see lwlib/xlwmenu.c. */ | ||
| 115 | extern XFontStruct *xlwmenu_default_font; | ||
| 116 | #endif | ||
| 117 | |||
| 118 | extern void free_frame_menubar (); | 113 | extern void free_frame_menubar (); |
| 119 | extern double atof (); | 114 | extern double atof (); |
| 120 | 115 | ||
| @@ -3379,14 +3374,6 @@ This function is an internal primitive--use `make-frame' instead. */) | |||
| 3379 | error ("Invalid frame font"); | 3374 | error ("Invalid frame font"); |
| 3380 | } | 3375 | } |
| 3381 | 3376 | ||
| 3382 | #ifdef USE_LUCID | ||
| 3383 | /* Prevent lwlib/xlwmenu.c from crashing because of a bug | ||
| 3384 | whereby it fails to get any font. */ | ||
| 3385 | BLOCK_INPUT; | ||
| 3386 | xlwmenu_default_font = XLoadQueryFont (FRAME_X_DISPLAY (f), "fixed"); | ||
| 3387 | UNBLOCK_INPUT; | ||
| 3388 | #endif | ||
| 3389 | |||
| 3390 | /* Frame contents get displaced if an embedded X window has a border. */ | 3377 | /* Frame contents get displaced if an embedded X window has a border. */ |
| 3391 | if (! FRAME_X_EMBEDDED_P (f)) | 3378 | if (! FRAME_X_EMBEDDED_P (f)) |
| 3392 | x_default_parameter (f, parms, Qborder_width, make_number (2), | 3379 | x_default_parameter (f, parms, Qborder_width, make_number (2), |
diff --git a/src/xmenu.c b/src/xmenu.c index 64e55b7413c..de2f4eb6815 100644 --- a/src/xmenu.c +++ b/src/xmenu.c | |||
| @@ -81,6 +81,8 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 81 | #include <X11/StringDefs.h> | 81 | #include <X11/StringDefs.h> |
| 82 | #include <X11/Shell.h> | 82 | #include <X11/Shell.h> |
| 83 | #ifdef USE_LUCID | 83 | #ifdef USE_LUCID |
| 84 | #include "xsettings.h" | ||
| 85 | #include "../lwlib/xlwmenu.h" | ||
| 84 | #ifdef HAVE_XAW3D | 86 | #ifdef HAVE_XAW3D |
| 85 | #include <X11/Xaw3d/Paned.h> | 87 | #include <X11/Xaw3d/Paned.h> |
| 86 | #else /* !HAVE_XAW3D */ | 88 | #else /* !HAVE_XAW3D */ |
| @@ -950,6 +952,36 @@ update_frame_menubar (f) | |||
| 950 | return 1; | 952 | return 1; |
| 951 | } | 953 | } |
| 952 | 954 | ||
| 955 | #ifdef USE_LUCID | ||
| 956 | static void | ||
| 957 | apply_systemfont_to_menu (w) | ||
| 958 | Widget w; | ||
| 959 | { | ||
| 960 | const char *fn = xsettings_get_system_normal_font (); | ||
| 961 | int defflt; | ||
| 962 | |||
| 963 | if (!fn) return; | ||
| 964 | |||
| 965 | if (XtIsShell (w)) /* popup menu */ | ||
| 966 | { | ||
| 967 | Widget *childs[1]; | ||
| 968 | int num = 0; | ||
| 969 | |||
| 970 | XtVaGetValues (w, XtNnumChildren, &num, NULL); | ||
| 971 | if (num != 1) return; /* Should only be one. */ | ||
| 972 | |||
| 973 | childs[0] = 0; | ||
| 974 | XtVaGetValues (w, XtNchildren, childs, NULL); | ||
| 975 | if (childs[0] && *childs[0]) w = *childs[0]; | ||
| 976 | } | ||
| 977 | |||
| 978 | /* Only use system font if the default is used for the menu. */ | ||
| 979 | XtVaGetValues (w, XtNdefaultFace, &defflt, NULL); | ||
| 980 | if (defflt) | ||
| 981 | XtVaSetValues (w, XtNfaceName, fn, NULL); | ||
| 982 | } | ||
| 983 | #endif | ||
| 984 | |||
| 953 | /* Set the contents of the menubar widgets of frame F. | 985 | /* Set the contents of the menubar widgets of frame F. |
| 954 | The argument FIRST_TIME is currently ignored; | 986 | The argument FIRST_TIME is currently ignored; |
| 955 | it is set the first time this is called, from initialize_frame_menubar. */ | 987 | it is set the first time this is called, from initialize_frame_menubar. */ |
| @@ -1262,6 +1294,7 @@ set_frame_menubar (f, first_time, deep_p) | |||
| 1262 | 1294 | ||
| 1263 | /* Make menu pop down on C-g. */ | 1295 | /* Make menu pop down on C-g. */ |
| 1264 | XtOverrideTranslations (menubar_widget, override); | 1296 | XtOverrideTranslations (menubar_widget, override); |
| 1297 | apply_systemfont_to_menu (menubar_widget); | ||
| 1265 | } | 1298 | } |
| 1266 | 1299 | ||
| 1267 | { | 1300 | { |
| @@ -1608,6 +1641,8 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click, timestamp) | |||
| 1608 | popup_deactivate_callback, | 1641 | popup_deactivate_callback, |
| 1609 | menu_highlight_callback); | 1642 | menu_highlight_callback); |
| 1610 | 1643 | ||
| 1644 | apply_systemfont_to_menu (menu); | ||
| 1645 | |||
| 1611 | dummy.type = ButtonPress; | 1646 | dummy.type = ButtonPress; |
| 1612 | dummy.serial = 0; | 1647 | dummy.serial = 0; |
| 1613 | dummy.send_event = 0; | 1648 | dummy.send_event = 0; |
diff --git a/src/xsettings.c b/src/xsettings.c index 945007db2f0..b71871df573 100644 --- a/src/xsettings.c +++ b/src/xsettings.c | |||
| @@ -39,6 +39,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 39 | #endif | 39 | #endif |
| 40 | 40 | ||
| 41 | static char *current_mono_font; | 41 | static char *current_mono_font; |
| 42 | static char *current_font; | ||
| 42 | static struct x_display_info *first_dpyinfo; | 43 | static struct x_display_info *first_dpyinfo; |
| 43 | static Lisp_Object Qfont_name, Qfont_render; | 44 | static Lisp_Object Qfont_name, Qfont_render; |
| 44 | static int use_system_font; | 45 | static int use_system_font; |
| @@ -65,7 +66,9 @@ store_font_changed_event (arg, display_name) | |||
| 65 | 66 | ||
| 66 | #ifdef HAVE_GCONF | 67 | #ifdef HAVE_GCONF |
| 67 | 68 | ||
| 68 | #define SYSTEM_MONO_FONT "/desktop/gnome/interface/monospace_font_name" | 69 | #define SYSTEM_MONO_FONT "/desktop/gnome/interface/monospace_font_name" |
| 70 | #define SYSTEM_FONT "/desktop/gnome/interface/font_name" | ||
| 71 | #define XSETTINGS_FONT_NAME "Gtk/FontName" | ||
| 69 | 72 | ||
| 70 | /* Callback called when something changed in GConf that we care about, | 73 | /* Callback called when something changed in GConf that we care about, |
| 71 | that is SYSTEM_MONO_FONT. */ | 74 | that is SYSTEM_MONO_FONT. */ |
| @@ -235,7 +238,7 @@ parse_xft_settings (prop, bytes, settings) | |||
| 235 | 238 | ||
| 236 | memset (settings, 0, sizeof (*settings)); | 239 | memset (settings, 0, sizeof (*settings)); |
| 237 | 240 | ||
| 238 | while (bytes_parsed+4 < bytes && settings_seen < 6 | 241 | while (bytes_parsed+4 < bytes && settings_seen < 7 |
| 239 | && i < n_settings) | 242 | && i < n_settings) |
| 240 | { | 243 | { |
| 241 | int type = prop[bytes_parsed++]; | 244 | int type = prop[bytes_parsed++]; |
| @@ -243,7 +246,7 @@ parse_xft_settings (prop, bytes, settings) | |||
| 243 | CARD32 vlen, ival = 0; | 246 | CARD32 vlen, ival = 0; |
| 244 | char name[128]; /* The names we are looking for are not this long. */ | 247 | char name[128]; /* The names we are looking for are not this long. */ |
| 245 | char sval[128]; /* The values we are looking for are not this long. */ | 248 | char sval[128]; /* The values we are looking for are not this long. */ |
| 246 | int is_xft; | 249 | int want_this; |
| 247 | int to_cpy; | 250 | int to_cpy; |
| 248 | 251 | ||
| 249 | sval[0] = '\0'; | 252 | sval[0] = '\0'; |
| @@ -264,13 +267,14 @@ parse_xft_settings (prop, bytes, settings) | |||
| 264 | bytes_parsed += 4; /* Skip serial for this value */ | 267 | bytes_parsed += 4; /* Skip serial for this value */ |
| 265 | if (bytes_parsed > bytes) return BadLength; | 268 | if (bytes_parsed > bytes) return BadLength; |
| 266 | 269 | ||
| 267 | is_xft = nlen > 6 && strncmp (name, "Xft/", 4) == 0; | 270 | want_this = (nlen > 6 && strncmp (name, "Xft/", 4) == 0) |
| 271 | || (strcmp (XSETTINGS_FONT_NAME, name) == 0); | ||
| 268 | 272 | ||
| 269 | switch (type) | 273 | switch (type) |
| 270 | { | 274 | { |
| 271 | case 0: /* Integer */ | 275 | case 0: /* Integer */ |
| 272 | if (bytes_parsed+4 > bytes) return BadLength; | 276 | if (bytes_parsed+4 > bytes) return BadLength; |
| 273 | if (is_xft) | 277 | if (want_this) |
| 274 | { | 278 | { |
| 275 | memcpy (&ival, prop+bytes_parsed, 4); | 279 | memcpy (&ival, prop+bytes_parsed, 4); |
| 276 | if (my_bo != that_bo) ival = SWAP32 (ival); | 280 | if (my_bo != that_bo) ival = SWAP32 (ival); |
| @@ -283,7 +287,7 @@ parse_xft_settings (prop, bytes, settings) | |||
| 283 | memcpy (&vlen, prop+bytes_parsed, 4); | 287 | memcpy (&vlen, prop+bytes_parsed, 4); |
| 284 | bytes_parsed += 4; | 288 | bytes_parsed += 4; |
| 285 | if (my_bo != that_bo) vlen = SWAP32 (vlen); | 289 | if (my_bo != that_bo) vlen = SWAP32 (vlen); |
| 286 | if (is_xft) | 290 | if (want_this) |
| 287 | { | 291 | { |
| 288 | to_cpy = vlen > 127 ? 127 : vlen; | 292 | to_cpy = vlen > 127 ? 127 : vlen; |
| 289 | memcpy (sval, prop+bytes_parsed, to_cpy); | 293 | memcpy (sval, prop+bytes_parsed, to_cpy); |
| @@ -303,7 +307,7 @@ parse_xft_settings (prop, bytes, settings) | |||
| 303 | return BadValue; | 307 | return BadValue; |
| 304 | } | 308 | } |
| 305 | 309 | ||
| 306 | if (is_xft) | 310 | if (want_this) |
| 307 | { | 311 | { |
| 308 | ++settings_seen; | 312 | ++settings_seen; |
| 309 | if (strcmp (name, "Xft/Antialias") == 0) | 313 | if (strcmp (name, "Xft/Antialias") == 0) |
| @@ -361,6 +365,11 @@ parse_xft_settings (prop, bytes, settings) | |||
| 361 | else | 365 | else |
| 362 | settings->seen &= ~SEEN_LCDFILTER; | 366 | settings->seen &= ~SEEN_LCDFILTER; |
| 363 | } | 367 | } |
| 368 | else if (strcmp (name, XSETTINGS_FONT_NAME) == 0) | ||
| 369 | { | ||
| 370 | free (current_font); | ||
| 371 | current_font = xstrdup (sval); | ||
| 372 | } | ||
| 364 | } | 373 | } |
| 365 | } | 374 | } |
| 366 | 375 | ||
| @@ -571,6 +580,12 @@ init_gconf () | |||
| 571 | current_mono_font = xstrdup (s); | 580 | current_mono_font = xstrdup (s); |
| 572 | g_free (s); | 581 | g_free (s); |
| 573 | } | 582 | } |
| 583 | s = gconf_client_get_string (gconf_client, SYSTEM_FONT, NULL); | ||
| 584 | if (s) | ||
| 585 | { | ||
| 586 | current_font = xstrdup (s); | ||
| 587 | g_free (s); | ||
| 588 | } | ||
| 574 | gconf_client_set_error_handling (gconf_client, GCONF_CLIENT_HANDLE_NONE); | 589 | gconf_client_set_error_handling (gconf_client, GCONF_CLIENT_HANDLE_NONE); |
| 575 | gconf_client_add_dir (gconf_client, | 590 | gconf_client_add_dir (gconf_client, |
| 576 | SYSTEM_MONO_FONT, | 591 | SYSTEM_MONO_FONT, |
| @@ -635,6 +650,23 @@ xsettings_get_system_font () | |||
| 635 | return current_mono_font; | 650 | return current_mono_font; |
| 636 | } | 651 | } |
| 637 | 652 | ||
| 653 | const char * | ||
| 654 | xsettings_get_system_normal_font () | ||
| 655 | { | ||
| 656 | return current_font; | ||
| 657 | } | ||
| 658 | |||
| 659 | DEFUN ("font-get-system-normal-font", Ffont_get_system_normal_font, | ||
| 660 | Sfont_get_system_normal_font, | ||
| 661 | 0, 0, 0, | ||
| 662 | doc: /* Get the system default font. */) | ||
| 663 | () | ||
| 664 | { | ||
| 665 | return current_font && use_system_font | ||
| 666 | ? make_string (current_font, strlen (current_font)) | ||
| 667 | : Qnil; | ||
| 668 | } | ||
| 669 | |||
| 638 | DEFUN ("font-get-system-font", Ffont_get_system_font, Sfont_get_system_font, | 670 | DEFUN ("font-get-system-font", Ffont_get_system_font, Sfont_get_system_font, |
| 639 | 0, 0, 0, | 671 | 0, 0, 0, |
| 640 | doc: /* Get the system default monospaced font. */) | 672 | doc: /* Get the system default monospaced font. */) |
| @@ -649,6 +681,7 @@ void | |||
| 649 | syms_of_xsettings () | 681 | syms_of_xsettings () |
| 650 | { | 682 | { |
| 651 | current_mono_font = NULL; | 683 | current_mono_font = NULL; |
| 684 | current_font = NULL; | ||
| 652 | first_dpyinfo = NULL; | 685 | first_dpyinfo = NULL; |
| 653 | #ifdef HAVE_GCONF | 686 | #ifdef HAVE_GCONF |
| 654 | gconf_client = NULL; | 687 | gconf_client = NULL; |
| @@ -659,6 +692,7 @@ syms_of_xsettings () | |||
| 659 | Qfont_render = intern_c_string ("font-render"); | 692 | Qfont_render = intern_c_string ("font-render"); |
| 660 | staticpro (&Qfont_render); | 693 | staticpro (&Qfont_render); |
| 661 | defsubr (&Sfont_get_system_font); | 694 | defsubr (&Sfont_get_system_font); |
| 695 | defsubr (&Sfont_get_system_normal_font); | ||
| 662 | 696 | ||
| 663 | DEFVAR_BOOL ("font-use-system-font", &use_system_font, | 697 | DEFVAR_BOOL ("font-use-system-font", &use_system_font, |
| 664 | doc: /* *Non-nil means to use the system defined font. */); | 698 | doc: /* *Non-nil means to use the system defined font. */); |
diff --git a/src/xsettings.h b/src/xsettings.h index 6c603e5bbd9..f6399ea1bcc 100644 --- a/src/xsettings.h +++ b/src/xsettings.h | |||
| @@ -21,10 +21,13 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 21 | #define XSETTINGS_H | 21 | #define XSETTINGS_H |
| 22 | 22 | ||
| 23 | EXFUN (Ffont_get_system_font, 0); | 23 | EXFUN (Ffont_get_system_font, 0); |
| 24 | EXFUN (Ffont_get_system_normal_font, 0); | ||
| 25 | |||
| 24 | extern void xsettings_initialize P_ ((struct x_display_info *dpyinfo)); | 26 | extern void xsettings_initialize P_ ((struct x_display_info *dpyinfo)); |
| 25 | extern void xft_settings_event P_ ((struct x_display_info *dpyinfo, | 27 | extern void xft_settings_event P_ ((struct x_display_info *dpyinfo, |
| 26 | XEvent *)); | 28 | XEvent *)); |
| 27 | extern const char *xsettings_get_system_font P_ ((void)); | 29 | extern const char *xsettings_get_system_font P_ ((void)); |
| 30 | extern const char *xsettings_get_system_normal_font P_ ((void)); | ||
| 28 | 31 | ||
| 29 | 32 | ||
| 30 | #endif /* XSETTINGS_H */ | 33 | #endif /* XSETTINGS_H */ |