X-Git-Url: https://git.rohieb.name/hackover2013-badge-firmware.git/blobdiff_plain/2c73edfac33b11a7bca0ff5d2118458101432bde..64dba59a68ae8ae69cf5ef5b37a3980f7c430a25:/project/commands/drawing/cmd_textw.c diff --git a/project/commands/drawing/cmd_textw.c b/project/commands/drawing/cmd_textw.c index fdcd0aa..151c344 100644 --- a/project/commands/drawing/cmd_textw.c +++ b/project/commands/drawing/cmd_textw.c @@ -46,13 +46,6 @@ #ifdef CFG_TFTLCD #include "drivers/displays/tft/lcd.h" #include "drivers/displays/tft/drawing.h" - #include "drivers/displays/tft/fonts/dejavusans9.h" - - // Only include this w/UART since there isn't enough space otherwise! - #ifdef CFG_PRINTF_UART - #include "drivers/displays/tft/fonts/dejavusansmono8.h" - #include "drivers/displays/tft/fonts/dejavusansbold9.h" - #endif /**************************************************************************/ /*! @@ -79,26 +72,22 @@ void cmd_textw(uint8_t argc, char **argv) } *data_ptr++ = '\0'; - // Only include this w/UART since there isn't enough space otherwise! - #ifdef CFG_PRINTF_UART + #if CFG_TFTLCD_USEAAFONTS switch (font) { - case 1: // DejaVu Sans Mono 8 - printf("%d %s", fontsGetStringWidth(&dejaVuSansMono8ptFontInfo, data), CFG_PRINTF_NEWLINE); - break; - case 2: // DejaVu Sans Bold 9 - printf("%d %s", fontsGetStringWidth(&dejaVuSansBold9ptFontInfo, data), CFG_PRINTF_NEWLINE); - break; - default: // DejaVu Sans 9 - printf("%d %s", fontsGetStringWidth(&dejaVuSans9ptFontInfo, data), CFG_PRINTF_NEWLINE); + default: // Only enough space for one font for now + printf("%d %s", aafontsGetStringWidth(&THEME_FONT, data), CFG_PRINTF_NEWLINE); break; } #else - // Always use DejaVu Sans 9 by default - printf("%d %s", fontsGetStringWidth(&dejaVuSans9ptFontInfo, data), CFG_PRINTF_NEWLINE); + switch (font) + { + default: // Only enough space for one font for now + printf("%d %s", fontsGetStringWidth(&THEME_FONT, data), CFG_PRINTF_NEWLINE); + break; + } #endif - return; }