diff options
author | Dzmitry Sankouski <dsankouski@gmail.com> | 2023-03-07 13:21:14 +0300 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2023-03-07 15:57:19 +0100 |
commit | 39c1fa2c212b8acf15dfbccd7b10c6de93ba88df (patch) | |
tree | 799bc6e1d231a7eb93de3ddb6524aa6c9018890b /include/video_font.h | |
parent | 0e177d5a95c020c6d7a0d4294de5c7f34f5bf664 (diff) |
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 <dsankouski@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
[agust: fixed build error when bmp logo disabled]
Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'include/video_font.h')
-rw-r--r-- | include/video_font.h | 17 |
1 files changed, 15 insertions, 2 deletions
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 <video_font_data.h> + +#if defined(CONFIG_VIDEO_FONT_4X6) #include <video_font_4x6.h> -#else +#endif +#if defined(CONFIG_VIDEO_FONT_8X16) #include <video_font_8x16.h> #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_ */ |