1
0
Fork 0
forked from len0rd/rockbox

Redo r30826 (and hopefully not reintroduce font issues) which cleans up the font API. FONT_UI is deprecated, use screens[screen].getuifont() instead (and .setuifont() to set it after a font has been loaded)

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30932 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jonathan Gordon 2011-11-08 10:09:33 +00:00
parent 452a3ce274
commit f19f3efb07
13 changed files with 94 additions and 95 deletions

View file

@ -424,13 +424,10 @@ static void ft_load_font(char *file)
set_file(file, (char *)global_settings.font_file, MAX_FILENAME);
#endif
splash(0, ID2P(LANG_WAIT));
current_font_id = global_status.font_id[screen];
current_font_id = screens[screen].getuifont();
if (current_font_id >= 0)
font_unload(current_font_id);
current_font_id = font_load(file);
if(screen==SCREEN_MAIN)
font_set_ui(current_font_id);
global_status.font_id[screen] = current_font_id;
screens[screen].setuifont(font_load(file));
viewportmanager_theme_changed(THEME_UI_VIEWPORT);
}
#endif