From 88d4f107910eb88137490be1793cde2d34055290 Mon Sep 17 00:00:00 2001 From: jdgordon Date: Sun, 21 Feb 2010 19:10:09 +0000 Subject: [PATCH] remote multifont fixes. it shoud be working again (blame AlexP! he made me break it last week!) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24812 a1c6a512-1295-4272-9138-f99709370657 --- apps/gui/skin_engine/skin_parser.c | 5 +++++ apps/gui/statusbar-skinned.c | 4 ++-- apps/gui/viewport.c | 6 +----- firmware/font.c | 3 +++ 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/apps/gui/skin_engine/skin_parser.c b/apps/gui/skin_engine/skin_parser.c index 4e0cc42e1..414da4458 100644 --- a/apps/gui/skin_engine/skin_parser.c +++ b/apps/gui/skin_engine/skin_parser.c @@ -930,6 +930,11 @@ static int parse_viewport(const char *wps_bufptr, else vp->flags &= ~VP_FLAG_ALIGN_RIGHT; /* ignore right-to-left languages */ +#ifdef HAVE_REMOTE_LCD + if (vp->font == FONT_UI && curr_screen == SCREEN_REMOTE) + vp->font = FONT_UI_REMOTE; + else +#endif if (vp->font > FONT_UI) vp->font = font_ids[vp->font - FONT_UI]; diff --git a/apps/gui/statusbar-skinned.c b/apps/gui/statusbar-skinned.c index fac6756ae..f5458fb25 100644 --- a/apps/gui/statusbar-skinned.c +++ b/apps/gui/statusbar-skinned.c @@ -184,8 +184,8 @@ void sb_create_from_settings(enum screen_type screen) default: height = screens[screen].lcdheight; } - len = snprintf(ptr, remaining, "%%ax%%Vi|0|%d|-|%d|%d|-|-|\n", - y, height, FONT_UI + screen); + len = snprintf(ptr, remaining, "%%ax%%Vi|0|%d|-|%d|1|-|-|\n", + y, height); } sb_skin_data_load(screen, buf, false); } diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c index ee233b9c4..142be1c8a 100644 --- a/apps/gui/viewport.c +++ b/apps/gui/viewport.c @@ -457,11 +457,7 @@ const char* viewport_parse_viewport(struct viewport *vp, * font 1 is *always* the UI font for the current screen * 2 is always the first extra font */ if (!LIST_VALUE_PARSED(set, PL_FONT)) - vp->font = FONT_UI + screen; -#ifdef HAVE_REMOTE_LCD - else if (vp->font == FONT_UI && screen == SCREEN_REMOTE) - vp->font = FONT_UI_REMOTE; -#endif + vp->font = FONT_UI; /* Set the defaults for fields not user-specified */ vp->drawmode = DRMODE_SOLID; diff --git a/firmware/font.c b/firmware/font.c index 52c6ffae6..534fa922f 100644 --- a/firmware/font.c +++ b/firmware/font.c @@ -98,6 +98,9 @@ void font_init(void) while (i