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>
This commit is contained in:
Dzmitry Sankouski
2023-03-07 13:21:14 +03:00
committed by Anatolij Gustschin
parent 0e177d5a95
commit 39c1fa2c21
10 changed files with 202 additions and 93 deletions

View File

@@ -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_ */