summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/viewer.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/apps/plugins/viewer.c b/apps/plugins/viewer.c
index 519c8a23dc..271ca37630 100644
--- a/apps/plugins/viewer.c
+++ b/apps/plugins/viewer.c
@@ -2186,8 +2186,12 @@ read_end:
/* load prefs font if it is different than the global settings font */
if (rb->strcmp(prefs.font, rb->global_settings->font_file)) {
if (!change_font(prefs.font)) {
- /* fallback by re-loading the global settings font */
- if (!change_font(rb->global_settings->font_file))
+ /* fallback by resetting prefs font to the global settings font */
+ rb->memset(prefs.font, 0, MAX_PATH);
+ rb->snprintf(prefs.font, MAX_PATH, "%s",
+ rb->global_settings->font_file);
+
+ if (!change_font(prefs.font))
return false;
}
}