Skip to content
Snippets Groups Projects
Commit aee2ce6e authored by Birte Kristina Friesel's avatar Birte Kristina Friesel
Browse files

index.c, thumbnail.c: Fix --title-font fallback to default (closes #65)

parent e7dd9481
No related branches found
No related tags found
No related merge requests found
......@@ -4,6 +4,7 @@ git HEAD
(fun fact: strictly speaking, this was not a memory leak)
<https://github.com/derf/feh/issues/62>
* "--image-bg default" was renamed to "--image-bg checks"
* Fix --title-font fallback behaviour
Sun, 11 Sep 2011 12:46:50 +0200 Daniel Friesel <derf@finalrewind.org>
......
......@@ -79,8 +79,9 @@ void init_index_mode(void)
int fh, fw;
title_fn = gib_imlib_load_font(opt.title_font);
if (!fn)
if (!title_fn)
title_fn = gib_imlib_load_font(DEFAULT_FONT_TITLE);
gib_imlib_get_text_size(title_fn, "W", NULL, &fw, &fh, IMLIB_TEXT_TO_RIGHT);
title_area_h = fh + 4;
} else
......
......@@ -104,6 +104,9 @@ void init_thumbnail_mode(void)
int fh, fw;
td.font_title = gib_imlib_load_font(opt.title_font);
if (!td.font_title)
td.font_title = gib_imlib_load_font(DEFAULT_FONT_TITLE);
gib_imlib_get_text_size(td.font_title, "W", NULL, &fw, &fh,
IMLIB_TEXT_TO_RIGHT);
title_area_h = fh + 4;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment