aboutsummaryrefslogtreecommitdiff
path: root/include/video_font.h
diff options
context:
space:
mode:
authorDzmitry Sankouski2023-03-07 13:21:14 +0300
committerAnatolij Gustschin2023-03-07 15:57:19 +0100
commit39c1fa2c212b8acf15dfbccd7b10c6de93ba88df (patch)
tree799bc6e1d231a7eb93de3ddb6524aa6c9018890b /include/video_font.h
parent0e177d5a95c020c6d7a0d4294de5c7f34f5bf664 (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.h17
1 files changed, 15 insertions, 2 deletions
diff --git a/include/video_font.h b/include/video_font.h
index b07c07662cb..00310d09265 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_ */