video: Refactor to allow more than one font size
At present the truetype console supports only a single font and size. It
is useful to be able to support different combinations. As a first step,
move the metrics into there own structure and allow having multiple
metrics.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 44ab9e7..3293837 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -176,6 +176,21 @@
method to select the display's physical size, which would allow
U-Boot to calculate the correct font size.
+config CONSOLE_TRUETYPE_MAX_METRICS
+ int "TrueType maximum number of font / size combinations"
+ depends on CONSOLE_TRUETYPE
+ default 10 if EXPO
+ default 1
+ help
+ This sets the number of font / size combinations which can be used by
+ the console. For simple console use a single font is enough. When
+ boot menus are in use, this may need to be increased.
+
+ Note that a separate entry is needed for each font size, even if the
+ font itself is the same. This is because the entry caches various
+ font metrics which are expensive to regenerate each time the font
+ size changes.
+
config SYS_WHITE_ON_BLACK
bool "Display console as white on a black background"
default y if ARCH_AT91 || ARCH_EXYNOS || ARCH_ROCKCHIP || ARCH_TEGRA || X86 || ARCH_SUNXI