From a8986f4c91692fc8c4dafb7ad4e3fa305e348850 Mon Sep 17 00:00:00 2001 From: Kenichi Handa Date: Wed, 20 Dec 2006 07:07:13 +0000 Subject: [PATCH] (x_load_resources): Setup the default fontSet X reource. --- src/xrdb.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/xrdb.c b/src/xrdb.c index 988db614c41..6885123c194 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -610,6 +610,29 @@ x_load_resources (display, xrm_string, myname, myclass) #endif /* not USE_MOTIF */ +#ifdef HAVE_X_I18N + { +#ifdef USE_MOTIF + Bool motif = True; +#else /* not USE_MOTIF */ + Bool motif = False; +#endif /* not USE_MOTIF */ + /* Setup the default fontSet resource. */ + extern char *xic_create_fontsetname P_ ((char *base_fontname, Bool motif)); + char *fontsetname = xic_create_fontsetname (helv, motif); + int len = strlen (fontsetname); + char *buf = line; + + /* fontsetname may be very long. */ + if (len + 16 > 256) + buf = alloca (len + 16); + sprintf (buf, "Emacs*fontSet: %s", fontsetname); + XrmPutLineResource (&rdb, buf); + if (fontsetname != helv) + xfree (fontsetname); + } +#endif /* HAVE_X_I18N */ + user_database = get_user_db (display); /* Figure out what the "customization string" is, so we can use it -- 2.39.5