From 93b231c69366563ba441dc4907bfb036fe3b4c55 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Thu, 12 Sep 2002 13:33:59 +0000 Subject: Greg Haerr's new loadable font. No more #ifdef font-style, removed old propfont and loadable font code. New font file format. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@2269 a1c6a512-1295-4272-9138-f99709370657 --- apps/recorder/icons.c | 23 ++++------------------- 1 file changed, 4 insertions(+), 19 deletions(-) (limited to 'apps/recorder/icons.c') diff --git a/apps/recorder/icons.c b/apps/recorder/icons.c index 0501a3f0c0..fbfaf6cd8c 100644 --- a/apps/recorder/icons.c +++ b/apps/recorder/icons.c @@ -16,8 +16,9 @@ * KIND, either express or implied. * ****************************************************************************/ -#include #include +#include "lcd.h" +#include "font.h" #include "kernel.h" #include "sprintf.h" #include "rtc.h" @@ -233,15 +234,7 @@ void statusbar_icon_volume(int percent) /* display volume lever numerical? */ if (TIME_BEFORE(current_tick,switch_tick)) { snprintf(buffer, sizeof(buffer), "%2d", percent); -#if defined(LCD_PROPFONTS) - lcd_getstringsize(buffer, 0, &width, &height); -#elif defined(LOADABLE_FONTS) - font = lcd_getcurrentldfont(); - lcd_getstringsize(buffer, font, &width, &height); -#else - width = 6*strlen(buffer); - height = 8; -#endif + lcd_getstringsize(buffer, FONT_UI, &width, &height); if (height <= STATUSBAR_HEIGHT) lcd_putsxy(ICON_VOLUME_X_POS + ICON_VOLUME_WIDTH / 2 - width/2, STATUSBAR_Y_POS, buffer, 0); @@ -316,15 +309,7 @@ void statusbar_time(int hour, int minute) strncpy(buffer, "--:--", sizeof buffer); } -#if defined(LCD_PROPFONTS) - lcd_getstringsize(buffer, 0, &width, &height); -#elif defined(LOADABLE_FONTS) - font = lcd_getcurrentldfont(); - lcd_getstringsize(buffer, font, &width, &height); -#else - width = 6*strlen(buffer); - height = 8; -#endif + lcd_getstringsize(buffer, FONT_UI, &width, &height); if (height <= STATUSBAR_HEIGHT) lcd_putsxy(TIME_X_END - width, STATUSBAR_Y_POS, buffer, 0); } -- cgit v1.2.3