Fix crash due to incorrect resolution of type of NSM characters (bug#5858).
[bpt/emacs.git] / src / xsettings.c
... / ...
CommitLineData
1/* Functions for handle font changes dynamically.
2 Copyright (C) 2009, 2010
3 Free Software Foundation, Inc.
4
5This file is part of GNU Emacs.
6
7GNU Emacs is free software: you can redistribute it and/or modify
8it under the terms of the GNU General Public License as published by
9the Free Software Foundation, either version 3 of the License, or
10(at your option) any later version.
11
12GNU Emacs is distributed in the hope that it will be useful,
13but WITHOUT ANY WARRANTY; without even the implied warranty of
14MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15GNU General Public License for more details.
16
17You should have received a copy of the GNU General Public License
18along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
19
20#include "config.h"
21#include <setjmp.h>
22#include <fcntl.h>
23#include "lisp.h"
24#include "xterm.h"
25#include "xsettings.h"
26#include "frame.h"
27#include "keyboard.h"
28#include "blockinput.h"
29#include "termhooks.h"
30#include "termopts.h"
31
32#include <X11/Xproto.h>
33
34#ifdef HAVE_GCONF
35#include <gconf/gconf-client.h>
36#endif
37#ifdef HAVE_XFT
38#include <X11/Xft/Xft.h>
39#endif
40
41static char *current_mono_font;
42static char *current_font;
43static struct x_display_info *first_dpyinfo;
44static Lisp_Object Qfont_name, Qfont_render;
45static int use_system_font;
46static Lisp_Object Vxft_settings;
47
48
49#ifdef HAVE_GCONF
50static GConfClient *gconf_client;
51#endif
52
53
54static void
55store_font_changed_event (arg, display_name)
56 Lisp_Object arg;
57 Lisp_Object display_name;
58{
59 struct input_event event;
60 EVENT_INIT (event);
61 event.kind = CONFIG_CHANGED_EVENT;
62 event.frame_or_window = display_name;
63 event.arg = arg;
64 kbd_buffer_store_event (&event);
65}
66
67#ifdef HAVE_GCONF
68
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"
72
73/* Callback called when something changed in GConf that we care about,
74 that is SYSTEM_MONO_FONT. */
75
76static void
77something_changedCB (client, cnxn_id, entry, user_data)
78 GConfClient *client;
79 guint cnxn_id;
80 GConfEntry *entry;
81 gpointer user_data;
82{
83 GConfValue *v = gconf_entry_get_value (entry);
84
85 if (!v) return;
86 if (v->type == GCONF_VALUE_STRING)
87 {
88 const char *value = gconf_value_get_string (v);
89 int i;
90 if (current_mono_font != NULL && strcmp (value, current_mono_font) == 0)
91 return; /* No change. */
92
93 xfree (current_mono_font);
94 current_mono_font = xstrdup (value);
95 }
96
97
98 if (first_dpyinfo != NULL)
99 {
100 /* Check if display still open */
101 struct x_display_info *dpyinfo;
102 int found = 0;
103 for (dpyinfo = x_display_list; !found && dpyinfo; dpyinfo = dpyinfo->next)
104 found = dpyinfo == first_dpyinfo;
105
106 if (found && use_system_font)
107 store_font_changed_event (Qfont_name,
108 XCAR (first_dpyinfo->name_list_element));
109 }
110}
111#endif /* HAVE_GCONF */
112
113#ifdef HAVE_XFT
114
115/* Older fontconfig versions don't have FC_LCD_*. */
116#ifndef FC_LCD_NONE
117#define FC_LCD_NONE 0
118#endif
119#ifndef FC_LCD_DEFAULT
120#define FC_LCD_DEFAULT 1
121#endif
122#ifndef FC_LCD_FILTER
123#define FC_LCD_FILTER "lcdfilter"
124#endif
125
126/* Find the window that contains the XSETTINGS property values. */
127
128static void
129get_prop_window (dpyinfo)
130 struct x_display_info *dpyinfo;
131{
132 Display *dpy = dpyinfo->display;
133
134 XGrabServer (dpy);
135 dpyinfo->xsettings_window = XGetSelectionOwner (dpy,
136 dpyinfo->Xatom_xsettings_sel);
137 if (dpyinfo->xsettings_window != None)
138 /* Select events so we can detect if window is deleted or if settings
139 are changed. */
140 XSelectInput (dpy, dpyinfo->xsettings_window,
141 PropertyChangeMask|StructureNotifyMask);
142
143 XUngrabServer (dpy);
144}
145
146enum {
147 SEEN_AA = 0x01,
148 SEEN_HINTING = 0x02,
149 SEEN_RGBA = 0x04,
150 SEEN_LCDFILTER = 0x08,
151 SEEN_HINTSTYLE = 0x10,
152 SEEN_DPI = 0x20,
153};
154struct xsettings
155{
156 FcBool aa, hinting;
157 int rgba, lcdfilter, hintstyle;
158 double dpi;
159
160 unsigned seen;
161};
162
163#define SWAP32(nr) (((nr) << 24) | (((nr) << 8) & 0xff0000) \
164 | (((nr) >> 8) & 0xff00) | ((nr) >> 24))
165#define SWAP16(nr) (((nr) << 8) | ((nr) >> 8))
166#define PAD(nr) (((nr) + 3) & ~3)
167
168/* Parse xsettings and extract those that deal with Xft.
169 See http://freedesktop.org/wiki/Specifications/XSettingsRegistry
170 and http://standards.freedesktop.org/xsettings-spec/xsettings-spec-0.5.html.
171
172 Layout of prop. First is a header:
173
174 bytes type what
175 ------------------------------------
176 1 CARD8 byte-order
177 3 unused
178 4 CARD32 SERIAL
179 4 CARD32 N_SETTINGS
180
181 Then N_SETTINGS records, with header:
182
183 bytes type what
184 ------------------------------------
185 1 SETTING_TYPE type (0 = integer, 1 = string, 2 RGB color).
186 1 unused
187 2 CARD16 n == name-length
188 n STRING8 name
189 p unused, p=pad_to_even_4(n)
190 4 CARD32 last-change-serial
191
192 and then the value, For string:
193
194 bytes type what
195 ------------------------------------
196 4 CARD32 n = value-length
197 n STRING8 value
198 p unused, p=pad_to_even_4(n)
199
200 For integer:
201
202 bytes type what
203 ------------------------------------
204 4 INT32 value
205
206 For RGB color:
207
208 bytes type what
209 ------------------------------------
210 2 CARD16 red
211 2 CARD16 blue
212 2 CARD16 green
213 2 CARD16 alpha
214
215 Returns non-zero if some Xft settings was seen, zero otherwise.
216*/
217
218static int
219parse_xft_settings (prop, bytes, settings)
220 unsigned char *prop;
221 unsigned long bytes;
222 struct xsettings *settings;
223{
224 Lisp_Object byteorder = Fbyteorder ();
225 int my_bo = XFASTINT (byteorder) == 'B' ? MSBFirst : LSBFirst;
226 int that_bo = prop[0];
227 CARD32 n_settings;
228 int bytes_parsed = 0;
229 int settings_seen = 0;
230 int i = 0;
231
232 /* First 4 bytes is a serial number, skip that. */
233
234 if (bytes < 12) return BadLength;
235 memcpy (&n_settings, prop+8, 4);
236 if (my_bo != that_bo) n_settings = SWAP32 (n_settings);
237 bytes_parsed = 12;
238
239 memset (settings, 0, sizeof (*settings));
240
241 while (bytes_parsed+4 < bytes && settings_seen < 7
242 && i < n_settings)
243 {
244 int type = prop[bytes_parsed++];
245 CARD16 nlen;
246 CARD32 vlen, ival = 0;
247 char name[128]; /* The names we are looking for are not this long. */
248 char sval[128]; /* The values we are looking for are not this long. */
249 int want_this;
250 int to_cpy;
251
252 sval[0] = '\0';
253 ++i;
254 ++bytes_parsed; /* Padding */
255
256 memcpy (&nlen, prop+bytes_parsed, 2);
257 bytes_parsed += 2;
258 if (my_bo != that_bo) nlen = SWAP16 (nlen);
259 if (bytes_parsed+nlen > bytes) return BadLength;
260 to_cpy = nlen > 127 ? 127 : nlen;
261 memcpy (name, prop+bytes_parsed, to_cpy);
262 name[to_cpy] = '\0';
263
264 bytes_parsed += nlen;
265 bytes_parsed = PAD (bytes_parsed);
266
267 bytes_parsed += 4; /* Skip serial for this value */
268 if (bytes_parsed > bytes) return BadLength;
269
270 want_this = (nlen > 6 && strncmp (name, "Xft/", 4) == 0)
271 || (strcmp (XSETTINGS_FONT_NAME, name) == 0);
272
273 switch (type)
274 {
275 case 0: /* Integer */
276 if (bytes_parsed+4 > bytes) return BadLength;
277 if (want_this)
278 {
279 memcpy (&ival, prop+bytes_parsed, 4);
280 if (my_bo != that_bo) ival = SWAP32 (ival);
281 }
282 bytes_parsed += 4;
283 break;
284
285 case 1: /* String */
286 if (bytes_parsed+4 > bytes) return BadLength;
287 memcpy (&vlen, prop+bytes_parsed, 4);
288 bytes_parsed += 4;
289 if (my_bo != that_bo) vlen = SWAP32 (vlen);
290 if (want_this)
291 {
292 to_cpy = vlen > 127 ? 127 : vlen;
293 memcpy (sval, prop+bytes_parsed, to_cpy);
294 sval[to_cpy] = '\0';
295 }
296 bytes_parsed += vlen;
297 bytes_parsed = PAD (bytes_parsed);
298 break;
299
300 case 2: /* RGB value */
301 /* No need to parse this */
302 if (bytes_parsed+8 > bytes) return BadLength;
303 bytes_parsed += 8; /* 4 values (r, b, g, alpha), 2 bytes each. */
304 break;
305
306 default: /* Parse Error */
307 return BadValue;
308 }
309
310 if (want_this)
311 {
312 ++settings_seen;
313 if (strcmp (name, "Xft/Antialias") == 0)
314 {
315 settings->seen |= SEEN_AA;
316 settings->aa = ival != 0;
317 }
318 else if (strcmp (name, "Xft/Hinting") == 0)
319 {
320 settings->seen |= SEEN_HINTING;
321 settings->hinting = ival != 0;
322 }
323 else if (strcmp (name, "Xft/HintStyle") == 0)
324 {
325 settings->seen |= SEEN_HINTSTYLE;
326 if (strcmp (sval, "hintnone") == 0)
327 settings->hintstyle = FC_HINT_NONE;
328 else if (strcmp (sval, "hintslight") == 0)
329 settings->hintstyle = FC_HINT_SLIGHT;
330 else if (strcmp (sval, "hintmedium") == 0)
331 settings->hintstyle = FC_HINT_MEDIUM;
332 else if (strcmp (sval, "hintfull") == 0)
333 settings->hintstyle = FC_HINT_FULL;
334 else
335 settings->seen &= ~SEEN_HINTSTYLE;
336 }
337 else if (strcmp (name, "Xft/RGBA") == 0)
338 {
339 settings->seen |= SEEN_RGBA;
340 if (strcmp (sval, "none") == 0)
341 settings->rgba = FC_RGBA_NONE;
342 else if (strcmp (sval, "rgb") == 0)
343 settings->rgba = FC_RGBA_RGB;
344 else if (strcmp (sval, "bgr") == 0)
345 settings->rgba = FC_RGBA_BGR;
346 else if (strcmp (sval, "vrgb") == 0)
347 settings->rgba = FC_RGBA_VRGB;
348 else if (strcmp (sval, "vbgr") == 0)
349 settings->rgba = FC_RGBA_VBGR;
350 else
351 settings->seen &= ~SEEN_RGBA;
352 }
353 else if (strcmp (name, "Xft/DPI") == 0)
354 {
355 settings->seen |= SEEN_DPI;
356 settings->dpi = (double)ival/1024.0;
357 }
358 else if (strcmp (name, "Xft/lcdfilter") == 0)
359 {
360 settings->seen |= SEEN_LCDFILTER;
361 if (strcmp (sval, "none") == 0)
362 settings->lcdfilter = FC_LCD_NONE;
363 else if (strcmp (sval, "lcddefault") == 0)
364 settings->lcdfilter = FC_LCD_DEFAULT;
365 else
366 settings->seen &= ~SEEN_LCDFILTER;
367 }
368 else if (strcmp (name, XSETTINGS_FONT_NAME) == 0)
369 {
370 free (current_font);
371 current_font = xstrdup (sval);
372 }
373 }
374 }
375
376 return settings_seen;
377}
378
379static int
380read_xft_settings (dpyinfo, settings)
381 struct x_display_info *dpyinfo;
382 struct xsettings *settings;
383{
384 long long_len;
385 Atom act_type;
386 int act_form;
387 unsigned long nitems, bytes_after;
388 unsigned char *prop = NULL;
389 Display *dpy = dpyinfo->display;
390 int rc;
391
392 x_catch_errors (dpy);
393 rc = XGetWindowProperty (dpy,
394 dpyinfo->xsettings_window,
395 dpyinfo->Xatom_xsettings_prop,
396 0, LONG_MAX, False, AnyPropertyType,
397 &act_type, &act_form, &nitems, &bytes_after,
398 &prop);
399
400 if (rc == Success && prop != NULL && act_form == 8 && nitems > 0
401 && act_type == dpyinfo->Xatom_xsettings_prop)
402 rc = parse_xft_settings (prop, nitems, settings);
403
404 XFree (prop);
405
406 x_uncatch_errors ();
407
408 return rc != 0;
409}
410
411
412static void
413apply_xft_settings (dpyinfo, send_event_p)
414 struct x_display_info *dpyinfo;
415 int send_event_p;
416{
417 FcPattern *pat;
418 struct xsettings settings, oldsettings;
419 int changed = 0;
420 char buf[256];
421
422 if (!read_xft_settings (dpyinfo, &settings))
423 return;
424
425 memset (&oldsettings, 0, sizeof (oldsettings));
426 buf[0] = '\0';
427 pat = FcPatternCreate ();
428 XftDefaultSubstitute (dpyinfo->display,
429 XScreenNumberOfScreen (dpyinfo->screen),
430 pat);
431 FcPatternGetBool (pat, FC_ANTIALIAS, 0, &oldsettings.aa);
432 FcPatternGetBool (pat, FC_HINTING, 0, &oldsettings.hinting);
433 FcPatternGetInteger (pat, FC_HINT_STYLE, 0, &oldsettings.hintstyle);
434 FcPatternGetInteger (pat, FC_LCD_FILTER, 0, &oldsettings.lcdfilter);
435 FcPatternGetInteger (pat, FC_RGBA, 0, &oldsettings.rgba);
436 FcPatternGetDouble (pat, FC_DPI, 0, &oldsettings.dpi);
437
438 if ((settings.seen & SEEN_AA) != 0 && oldsettings.aa != settings.aa)
439 {
440 FcPatternDel (pat, FC_ANTIALIAS);
441 FcPatternAddBool (pat, FC_ANTIALIAS, settings.aa);
442 ++changed;
443 oldsettings.aa = settings.aa;
444 }
445 sprintf (buf, "Antialias: %d", oldsettings.aa);
446
447 if ((settings.seen & SEEN_HINTING) != 0
448 && oldsettings.hinting != settings.hinting)
449 {
450 FcPatternDel (pat, FC_HINTING);
451 FcPatternAddBool (pat, FC_HINTING, settings.hinting);
452 ++changed;
453 oldsettings.hinting = settings.hinting;
454 }
455 if (strlen (buf) > 0) strcat (buf, ", ");
456 sprintf (buf+strlen (buf), "Hinting: %d", oldsettings.hinting);
457 if ((settings.seen & SEEN_RGBA) != 0 && oldsettings.rgba != settings.rgba)
458 {
459 FcPatternDel (pat, FC_RGBA);
460 FcPatternAddInteger (pat, FC_RGBA, settings.rgba);
461 oldsettings.rgba = settings.rgba;
462 ++changed;
463 }
464 if (strlen (buf) > 0) strcat (buf, ", ");
465 sprintf (buf+strlen (buf), "RGBA: %d", oldsettings.rgba);
466
467 /* Older fontconfig versions don't have FC_LCD_FILTER. */
468 if ((settings.seen & SEEN_LCDFILTER) != 0
469 && oldsettings.lcdfilter != settings.lcdfilter)
470 {
471 FcPatternDel (pat, FC_LCD_FILTER);
472 FcPatternAddInteger (pat, FC_LCD_FILTER, settings.lcdfilter);
473 ++changed;
474 oldsettings.lcdfilter = settings.lcdfilter;
475 }
476 if (strlen (buf) > 0) strcat (buf, ", ");
477 sprintf (buf+strlen (buf), "LCDFilter: %d", oldsettings.lcdfilter);
478
479 if ((settings.seen & SEEN_HINTSTYLE) != 0
480 && oldsettings.hintstyle != settings.hintstyle)
481 {
482 FcPatternDel (pat, FC_HINT_STYLE);
483 FcPatternAddInteger (pat, FC_HINT_STYLE, settings.hintstyle);
484 ++changed;
485 oldsettings.hintstyle = settings.hintstyle;
486 }
487 if (strlen (buf) > 0) strcat (buf, ", ");
488 sprintf (buf+strlen (buf), "Hintstyle: %d", oldsettings.hintstyle);
489
490 if ((settings.seen & SEEN_DPI) != 0 && oldsettings.dpi != settings.dpi
491 && settings.dpi > 0)
492 {
493 Lisp_Object frame, tail;
494
495 FcPatternDel (pat, FC_DPI);
496 FcPatternAddDouble (pat, FC_DPI, settings.dpi);
497 ++changed;
498 oldsettings.dpi = settings.dpi;
499
500 /* Change the DPI on this display and all frames on the display. */
501 dpyinfo->resy = dpyinfo->resx = settings.dpi;
502 FOR_EACH_FRAME (tail, frame)
503 if (FRAME_X_P (XFRAME (frame))
504 && FRAME_X_DISPLAY_INFO (XFRAME (frame)) == dpyinfo)
505 XFRAME (frame)->resy = XFRAME (frame)->resx = settings.dpi;
506 }
507
508 if (strlen (buf) > 0) strcat (buf, ", ");
509 sprintf (buf+strlen (buf), "DPI: %lf", oldsettings.dpi);
510
511 if (changed)
512 {
513 XftDefaultSet (dpyinfo->display, pat);
514 if (send_event_p)
515 store_font_changed_event (Qfont_render,
516 XCAR (dpyinfo->name_list_element));
517 Vxft_settings = make_string (buf, strlen (buf));
518 }
519 else
520 FcPatternDestroy (pat);
521}
522
523#endif /* HAVE_XFT */
524
525void
526xft_settings_event (dpyinfo, event)
527 struct x_display_info *dpyinfo;
528 XEvent *event;
529{
530#ifdef HAVE_XFT
531 int check_window_p = 0;
532
533 switch (event->type)
534 {
535 case DestroyNotify:
536 if (dpyinfo->xsettings_window == event->xany.window)
537 check_window_p = 1;
538 break;
539
540 case ClientMessage:
541 if (event->xclient.message_type == dpyinfo->Xatom_xsettings_mgr
542 && event->xclient.data.l[1] == dpyinfo->Xatom_xsettings_sel
543 && event->xclient.window == dpyinfo->root_window)
544 check_window_p = 1;
545 break;
546
547 case PropertyNotify:
548 if (event->xproperty.window == dpyinfo->xsettings_window
549 && event->xproperty.state == PropertyNewValue
550 && event->xproperty.atom == dpyinfo->Xatom_xsettings_prop)
551 {
552 apply_xft_settings (dpyinfo, True);
553 }
554 break;
555 }
556
557 if (check_window_p)
558 {
559 dpyinfo->xsettings_window = None;
560 get_prop_window (dpyinfo);
561 if (dpyinfo->xsettings_window != None)
562 apply_xft_settings (dpyinfo, True);
563 }
564#endif /* HAVE_XFT */
565}
566
567
568static void
569init_gconf ()
570{
571#if defined (HAVE_GCONF) && defined (HAVE_XFT)
572 int i;
573 char *s;
574
575 g_type_init ();
576 gconf_client = gconf_client_get_default ();
577 s = gconf_client_get_string (gconf_client, SYSTEM_MONO_FONT, NULL);
578 if (s)
579 {
580 current_mono_font = xstrdup (s);
581 g_free (s);
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 }
589 gconf_client_set_error_handling (gconf_client, GCONF_CLIENT_HANDLE_NONE);
590 gconf_client_add_dir (gconf_client,
591 SYSTEM_MONO_FONT,
592 GCONF_CLIENT_PRELOAD_ONELEVEL,
593 NULL);
594 gconf_client_notify_add (gconf_client,
595 SYSTEM_MONO_FONT,
596 something_changedCB,
597 NULL, NULL, NULL);
598#endif /* HAVE_GCONF && HAVE_XFT */
599}
600
601static void
602init_xfd_settings (dpyinfo)
603 struct x_display_info *dpyinfo;
604{
605#ifdef HAVE_XFT
606 char sel[64];
607 Display *dpy = dpyinfo->display;
608
609 BLOCK_INPUT;
610
611 sprintf (sel, "_XSETTINGS_S%d", XScreenNumberOfScreen (dpyinfo->screen));
612 dpyinfo->Xatom_xsettings_sel = XInternAtom (dpy, sel, False);
613 dpyinfo->Xatom_xsettings_prop = XInternAtom (dpy,
614 "_XSETTINGS_SETTINGS",
615 False);
616 dpyinfo->Xatom_xsettings_mgr = XInternAtom (dpy, "MANAGER", False);
617
618 /* Select events so we can detect client messages sent when selection
619 owner changes. */
620 XSelectInput (dpy, dpyinfo->root_window, StructureNotifyMask);
621
622 get_prop_window (dpyinfo);
623 if (dpyinfo->xsettings_window != None)
624 apply_xft_settings (dpyinfo, False);
625
626 UNBLOCK_INPUT;
627
628#else /* ! HAVE_XFT */
629
630 dpyinfo->Xatom_xsettings_sel = None;
631 dpyinfo->Xatom_xsettings_prop = None;
632 dpyinfo->Xatom_xsettings_mgr = None;
633 dpyinfo->xsettings_window = None;
634
635#endif /* ! HAVE_XFT */
636}
637
638void
639xsettings_initialize (dpyinfo)
640 struct x_display_info *dpyinfo;
641{
642 if (first_dpyinfo == NULL) first_dpyinfo = dpyinfo;
643 init_gconf ();
644 init_xfd_settings (dpyinfo);
645}
646
647const char *
648xsettings_get_system_font ()
649{
650 return current_mono_font;
651}
652
653const char *
654xsettings_get_system_normal_font ()
655{
656 return current_font;
657}
658
659DEFUN ("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
670DEFUN ("font-get-system-font", Ffont_get_system_font, Sfont_get_system_font,
671 0, 0, 0,
672 doc: /* Get the system default monospaced font. */)
673 ()
674{
675 return current_mono_font && use_system_font
676 ? make_string (current_mono_font, strlen (current_mono_font))
677 : Qnil;
678}
679
680void
681syms_of_xsettings ()
682{
683 current_mono_font = NULL;
684 current_font = NULL;
685 first_dpyinfo = NULL;
686#ifdef HAVE_GCONF
687 gconf_client = NULL;
688#endif
689
690 Qfont_name = intern_c_string ("font-name");
691 staticpro (&Qfont_name);
692 Qfont_render = intern_c_string ("font-render");
693 staticpro (&Qfont_render);
694 defsubr (&Sfont_get_system_font);
695 defsubr (&Sfont_get_system_normal_font);
696
697 DEFVAR_BOOL ("font-use-system-font", &use_system_font,
698 doc: /* *Non-nil means to use the system defined font. */);
699 use_system_font = 0;
700
701 DEFVAR_LISP ("xft-settings", &Vxft_settings,
702 doc: /* Font settings applied to Xft. */);
703 Vxft_settings = make_string ("", 0);
704
705#ifdef HAVE_XFT
706 Fprovide (intern_c_string ("font-render-setting"), Qnil);
707#ifdef HAVE_GCONF
708 Fprovide (intern_c_string ("system-font-setting"), Qnil);
709#endif
710#endif
711}
712
713/* arch-tag: 541716ed-2e6b-42e1-8212-3197e01ea61d
714 (do not change this comment) */