[PATCH 1/1] video: menu "TrueType Fonts" depends on TrueType enabled

Heinrich Schuchardt heinrich.schuchardt at canonical.com
Wed Dec 31 15:13:44 CET 2025


The Kconfig menu "TrueType Fonts" should only be shown if TrueType is
enabled.

Put all TrueType dependent customization within one if statement.
Remove `depends TRUETYPE` clauses.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt at canonical.com>
---
 drivers/video/Kconfig       | 10 ++++++----
 drivers/video/fonts/Kconfig |  4 ----
 2 files changed, 6 insertions(+), 8 deletions(-)

diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
index 0fc1c161541..566942e16f3 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -211,9 +211,10 @@ config CONSOLE_TRUETYPE
 	  With this option you can adjust the text size and use a variety of
 	  fonts. Note that this is noticeably slower than with normal console.
 
+if CONSOLE_TRUETYPE
+
 config CONSOLE_TRUETYPE_SIZE
 	int "TrueType font size"
-	depends on CONSOLE_TRUETYPE
 	default 18
 	help
 	  This sets the font size for the console. The size is measured in
@@ -226,7 +227,6 @@ config CONSOLE_TRUETYPE_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
@@ -239,6 +239,10 @@ config CONSOLE_TRUETYPE_MAX_METRICS
 	  font metrics which are expensive to regenerate each time the font
 	  size changes.
 
+source "drivers/video/fonts/Kconfig"
+
+endif
+
 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
@@ -309,8 +313,6 @@ config PANEL_HX8238D
 	  It can drive a maximum 960x240 dot graphics on a-TFT panel
 	  displays in 16M colors with dithering.
 
-source "drivers/video/fonts/Kconfig"
-
 config VIDEO_BOCHS
 	bool "Enable Bochs video emulation for QEMU"
 	help
diff --git a/drivers/video/fonts/Kconfig b/drivers/video/fonts/Kconfig
index c692fa9602f..5233a277bbd 100644
--- a/drivers/video/fonts/Kconfig
+++ b/drivers/video/fonts/Kconfig
@@ -6,7 +6,6 @@ menu "TrueType Fonts"
 
 config CONSOLE_TRUETYPE_NIMBUS
 	bool "Nimbus Sans Regular"
-	depends on CONSOLE_TRUETYPE
 	default y
 	help
 	  Nimbus Sans L is a version of Nimbus Sans using Adobe font sources.
@@ -20,7 +19,6 @@ config CONSOLE_TRUETYPE_NIMBUS
 
 config CONSOLE_TRUETYPE_ANKACODER
 	bool "Anka Coder Narrow"
-	depends on CONSOLE_TRUETYPE
 	help
 	  The Anka/Coder family is a monospaced, courier-width font for source
 	  code and terminals, in two styles and weights. Anka/Coder Narrow was
@@ -32,7 +30,6 @@ config CONSOLE_TRUETYPE_ANKACODER
 
 config CONSOLE_TRUETYPE_RUFSCRIPT
 	bool "Ruf Script"
-	depends on CONSOLE_TRUETYPE
 	help
 	  A laid-back handwritten font.
 	  Font: https://fontlibrary.org/en/font/rufscript
@@ -41,7 +38,6 @@ config CONSOLE_TRUETYPE_RUFSCRIPT
 
 config CONSOLE_TRUETYPE_CANTORAONE
 	bool "Cantoraone"
-	depends on CONSOLE_TRUETYPE
 	help
 	  Cantora is a friendly semi formal, semi condensed, semi sans-serif
 	  with a hint of handwriting. Perfect for headlines.
-- 
2.51.0



More information about the U-Boot mailing list