summaryrefslogtreecommitdiff
path: root/src/imlib.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/imlib.c')
-rw-r--r--src/imlib.c24
1 files changed, 20 insertions, 4 deletions
diff --git a/src/imlib.c b/src/imlib.c
index c8aaf82..eedab6a 100644
--- a/src/imlib.c
+++ b/src/imlib.c
@@ -552,9 +552,11 @@ void feh_draw_zoom(winwidget w)
if (!w->im)
return;
+ if (opt.font)
+ fn = gib_imlib_load_font(opt.font);
+
if (!fn) {
fn = gib_imlib_load_font(DEFAULT_FONT);
- memset(atab, 0, sizeof(atab));
}
if (!fn) {
@@ -562,6 +564,8 @@ void feh_draw_zoom(winwidget w)
return;
}
+ memset(atab, 0, sizeof(atab));
+
snprintf(buf, sizeof(buf), "%.0f%%, %dx%d", w->zoom * 100,
(int) (w->im_w * w->zoom), (int) (w->im_h * w->zoom));
@@ -598,8 +602,10 @@ void feh_draw_filename(winwidget w)
|| (!FEH_FILE(w->file->data)->filename))
return;
+ if (opt.font)
+ fn = gib_imlib_load_font(opt.font);
+
if (!fn) {
- memset(atab, 0, sizeof(atab));
if (w->full_screen)
fn = gib_imlib_load_font(DEFAULT_FONT_BIG);
else
@@ -611,6 +617,8 @@ void feh_draw_filename(winwidget w)
return;
}
+ memset(atab, 0, sizeof(atab));
+
/* Work out how high the font is */
gib_imlib_get_text_size(fn, FEH_FILE(w->file->data)->filename, NULL, &tw, &th, IMLIB_TEXT_TO_RIGHT);
@@ -730,8 +738,10 @@ void feh_draw_caption(winwidget w)
caption_style->bits = gib_list_add_front(caption_style->bits,
gib_style_bit_new(1, 1, 0, 0, 0, 255));
+ if (opt.font)
+ fn = gib_imlib_load_font(opt.font);
+
if (!fn) {
- memset(atab, 0, sizeof(atab));
if (w->full_screen)
fn = gib_imlib_load_font(DEFAULT_FONT_BIG);
else
@@ -743,6 +753,8 @@ void feh_draw_caption(winwidget w)
return;
}
+ memset(atab, 0, sizeof(atab));
+
if (*(file->caption) == '\0') {
p = estrdup("Caption entry mode - Hit ESC to cancel");
lines = feh_wrap_string(p, w->w, fn, NULL);
@@ -1035,8 +1047,10 @@ void feh_draw_actions(winwidget w)
|| (!FEH_FILE(w->file->data)->filename))
return;
+ if (opt.font)
+ fn = gib_imlib_load_font(opt.font);
+
if (!fn) {
- memset(atab, 0, sizeof(atab));
if (w->full_screen)
fn = gib_imlib_load_font(DEFAULT_FONT_BIG);
else
@@ -1048,6 +1062,8 @@ void feh_draw_actions(winwidget w)
return;
}
+ memset(atab, 0, sizeof(atab));
+
gib_imlib_get_text_size(fn, "defined actions:", NULL, &tw, &th, IMLIB_TEXT_TO_RIGHT);
/* Check for the widest line */
max_tw = tw;