summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorsabetts <sabetts>2007-05-04 20:25:10 +0000
committersabetts <sabetts>2007-05-04 20:25:10 +0000
commitfd9c683b25edd3a56eaaed005fe51545bbb93217 (patch)
tree8acdbefc03b252c668d187439663b6e75d1dde8c /src/main.c
parent95fa75486929a9f535ae9a7283bd3dfc52528a2f (diff)
downloadratpoison-fd9c683b25edd3a56eaaed005fe51545bbb93217.zip
* src/main.c (init_defaults): if the default font fails, use the
backup font. * src/conf.h (BACKUP_FONT): new define
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/main.c b/src/main.c
index 779ae46..9ea60f4 100644
--- a/src/main.c
+++ b/src/main.c
@@ -517,12 +517,17 @@ init_defaults (void)
defaults.padding_top = 0;
defaults.padding_bottom = 0;
+ /* Attempt to load a font */
defaults.font = load_query_font_set (dpy, DEFAULT_FONT);
if (defaults.font == NULL)
+ PRINT_ERROR (("ratpoison: Cannot load font %s.\n", DEFAULT_FONT));
+ defaults.font = load_query_font_set (dpy, BACKUP_FONT);
+ if (defaults.font == NULL)
{
- fprintf (stderr, "ratpoison: Cannot load font %s.\n", DEFAULT_FONT);
+ PRINT_ERROR (("ratpoison: Cannot load backup font %s . You lose.\n", BACKUP_FONT));
exit (EXIT_FAILURE);
}
+
defaults.font_string = xstrdup (DEFAULT_FONT);
set_extents_of_fontset (defaults.font);