From 77ca8de9b3fd241e3191441a5cbde69fad2bf375 Mon Sep 17 00:00:00 2001 From: Berke Viktor Date: Wed, 15 Feb 2012 22:56:52 +0100 Subject: provide a GUI field for alternative fonts, pango.aliases replacement --- src/common/cfgfiles.c | 11 +++++++++++ src/common/xchat.h | 6 ++++++ 2 files changed, 17 insertions(+) (limited to 'src/common') diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c index 130ad9d9..da4adbd3 100644 --- a/src/common/cfgfiles.c +++ b/src/common/cfgfiles.c @@ -36,6 +36,9 @@ #endif #define DEF_FONT "Monospace 9" +#ifdef WIN32 +#define DEF_FONT_ALTER "Arial Unicode MS,Lucida Sans Unicode" +#endif void list_addentry (GSList ** list, char *cmd, char *name) @@ -578,6 +581,10 @@ const struct prefs vars[] = { {"text_emoticons", P_OFFINT (emoticons), TYPE_BOOL}, #endif {"text_font", P_OFFSET (font_normal), TYPE_STR}, +#ifdef WIN32 + {"text_font_main", P_OFFSET (font_main), TYPE_STR}, + {"text_font_alternative", P_OFFSET (font_alternative), TYPE_STR}, +#endif {"text_indent", P_OFFINT (indent_nicks), TYPE_BOOL}, {"text_max_indent", P_OFFINT (max_auto_indent), TYPE_INT}, {"text_max_lines", P_OFFINT (max_lines), TYPE_INT}, @@ -749,6 +756,10 @@ load_config (void) strcpy (prefs.quitreason, _("Leaving")); strcpy (prefs.partreason, prefs.quitreason); strcpy (prefs.font_normal, DEF_FONT); +#ifdef WIN32 + strcpy (prefs.font_main, DEF_FONT); + strcpy (prefs.font_alternative, DEF_FONT_ALTER); +#endif strcpy (prefs.dnsprogram, "host"); strcpy (prefs.irc_no_hilight, "NickServ,ChanServ"); diff --git a/src/common/xchat.h b/src/common/xchat.h index 6815cc39..dbffb900 100644 --- a/src/common/xchat.h +++ b/src/common/xchat.h @@ -115,7 +115,13 @@ struct xchatprefs char awayreason[256]; char quitreason[256]; char partreason[256]; +#ifdef WIN32 + char font_normal[4 * FONTNAMELEN + 1]; + char font_main[FONTNAMELEN + 1]; + char font_alternative[3 * FONTNAMELEN + 1]; +#else char font_normal[FONTNAMELEN + 1]; +#endif char doubleclickuser[256]; char gui_license[64]; char spell_langs[64]; -- cgit 1.4.1