From 39c1fa2c212b8acf15dfbccd7b10c6de93ba88df Mon Sep 17 00:00:00 2001 From: Dzmitry Sankouski Date: Tue, 7 Mar 2023 13:21:14 +0300 Subject: video console: implement multiple fonts configuration This needed for unit testing different fonts. Configured fonts are placed in an array of fonts. First font is selected by default upon console probe. Signed-off-by: Dzmitry Sankouski Reviewed-by: Simon Glass [agust: fixed build error when bmp logo disabled] Signed-off-by: Anatolij Gustschin --- include/video_font.h | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'include/video_font.h') diff --git a/include/video_font.h b/include/video_font.h index b07c07662c..00310d0926 100644 --- a/include/video_font.h +++ b/include/video_font.h @@ -7,10 +7,23 @@ #ifndef _VIDEO_FONT_ #define _VIDEO_FONT_ -#ifdef CONFIG_VIDEO_FONT_4X6 +#include + +#if defined(CONFIG_VIDEO_FONT_4X6) #include -#else +#endif +#if defined(CONFIG_VIDEO_FONT_8X16) #include #endif +static struct video_fontdata __maybe_unused fonts[] = { +#if defined(CONFIG_VIDEO_FONT_8X16) + FONT_ENTRY(8, 16, 8x16), +#endif +#if defined(CONFIG_VIDEO_FONT_4X6) + FONT_ENTRY(4, 6, 4x6), +#endif + {/* list terminator */} +}; + #endif /* _VIDEO_FONT_ */ -- cgit v1.2.3