summaryrefslogtreecommitdiff
path: root/apps/gui/viewport.c
diff options
context:
space:
mode:
authorJonathan Gordon <rockbox@jdgordon.info>2010-02-14 06:26:16 +0000
committerJonathan Gordon <rockbox@jdgordon.info>2010-02-14 06:26:16 +0000
commit1c2aa35371aed8d895b3448dad865b913da57cfb (patch)
tree8a790ad8efe5d0abd73eaf77adc854d336ce0ef4 /apps/gui/viewport.c
parented21ab1c8c9b16ec62933313c3d36a93d9255f62 (diff)
downloadrockbox-1c2aa35371aed8d895b3448dad865b913da57cfb.tar.gz
rockbox-1c2aa35371aed8d895b3448dad865b913da57cfb.zip
FS#10984 - multifont! 2 major additions:
1) seperate UI font for the remote and main displays 2) allow individual skins to load additional fonts for use in the skin (Uo to 7 extra in this first version) see CustomWPS for info on how to load a font in the skins. Code should always use FONT_UI+screen_number to get the correct user font git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24644 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/gui/viewport.c')
-rw-r--r--apps/gui/viewport.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/apps/gui/viewport.c b/apps/gui/viewport.c
index eaee2cc8a5..ee233b9c46 100644
--- a/apps/gui/viewport.c
+++ b/apps/gui/viewport.c
@@ -315,7 +315,7 @@ void viewport_set_fullscreen(struct viewport *vp,
315#ifndef __PCTOOL__ 315#ifndef __PCTOOL__
316 set_default_align_flags(vp); 316 set_default_align_flags(vp);
317#endif 317#endif
318 vp->font = FONT_UI; /* default to UI to discourage SYSFONT use */ 318 vp->font = FONT_UI + screen; /* default to UI to discourage SYSFONT use */
319 vp->drawmode = DRMODE_SOLID; 319 vp->drawmode = DRMODE_SOLID;
320#if LCD_DEPTH > 1 320#if LCD_DEPTH > 1
321#ifdef HAVE_REMOTE_LCD 321#ifdef HAVE_REMOTE_LCD
@@ -453,11 +453,15 @@ const char* viewport_parse_viewport(struct viewport *vp,
453 return NULL; 453 return NULL;
454 } 454 }
455 455
456 /* Default to using the user font if the font was an invalid number or '-'*/ 456 /* Default to using the user font if the font was an invalid number or '-'
457 if (((vp->font != FONT_SYSFIXED) && (vp->font != FONT_UI)) 457 * font 1 is *always* the UI font for the current screen
458 || !LIST_VALUE_PARSED(set, PL_FONT) 458 * 2 is always the first extra font */
459 ) 459 if (!LIST_VALUE_PARSED(set, PL_FONT))
460 vp->font = FONT_UI; 460 vp->font = FONT_UI + screen;
461#ifdef HAVE_REMOTE_LCD
462 else if (vp->font == FONT_UI && screen == SCREEN_REMOTE)
463 vp->font = FONT_UI_REMOTE;
464#endif
461 465
462 /* Set the defaults for fields not user-specified */ 466 /* Set the defaults for fields not user-specified */
463 vp->drawmode = DRMODE_SOLID; 467 vp->drawmode = DRMODE_SOLID;