diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/conf.h | 1 | ||||
-rw-r--r-- | src/main.c | 7 |
2 files changed, 7 insertions, 1 deletions
@@ -121,5 +121,6 @@ /* The default font */ #define DEFAULT_FONT "-*-fixed-bold-r-normal-*-15-*-*-*-c-*-*-*" +#define BACKUP_FONT "*" #endif /* !_ _RATPOISON_CONF_H */ @@ -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); |