summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorBerke Viktor <berkeviktor@aol.com>2012-02-15 22:56:52 +0100
committerBerke Viktor <berkeviktor@aol.com>2012-02-15 22:56:52 +0100
commit77ca8de9b3fd241e3191441a5cbde69fad2bf375 (patch)
treee53cc1172beb106ec1e6b0a727cfb27b2a8f1ce3 /src/common
parent6d894ac586a45a1651b02d3818d286fbf1b3def5 (diff)
provide a GUI field for alternative fonts, pango.aliases replacement
Diffstat (limited to 'src/common')
-rw-r--r--src/common/cfgfiles.c11
-rw-r--r--src/common/xchat.h6
2 files changed, 17 insertions, 0 deletions
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];