From 3d37607cda69cc23910b850aeb6c0f8fdae9b1b6 Mon Sep 17 00:00:00 2001 From: Rob Kendrick Date: Thu, 24 Aug 2006 17:39:41 +0000 Subject: nsgtk font defaults in case of no Choices file, misc file cleanups svn path=/trunk/netsurf/; revision=2890 --- gtk/gtk_gui.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'gtk/gtk_gui.c') diff --git a/gtk/gtk_gui.c b/gtk/gtk_gui.c index 05799e160..a08d7d048 100644 --- a/gtk/gtk_gui.c +++ b/gtk/gtk_gui.c @@ -165,6 +165,16 @@ void gui_init(int argc, char** argv) options_file_location = strdup(buf); options_read(buf); + /* check what the font settings are, setting them to a default font + * if they're not set - stops Pango whinging + */ +#define SETFONTDEFAULT(x,y) (x) = ((x) != NULL) ? (x) : strdup((y)) + SETFONTDEFAULT(option_font_sans, "Sans"); + SETFONTDEFAULT(option_font_serif, "Serif"); + SETFONTDEFAULT(option_font_mono, "Monospace"); + SETFONTDEFAULT(option_font_cursive, "Serif"); + SETFONTDEFAULT(option_font_fantasy, "Serif"); + nsgtk_options_init(); if (!option_cookie_file) { -- cgit v1.2.3