diff options
author | Simon Glass <sjg@chromium.org> | 2022-10-06 08:36:18 -0600 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2022-10-30 20:01:40 +0100 |
commit | c830e285f475e580eb45290d54e9d174a57a7d71 (patch) | |
tree | 55e62ac2c9900f40b178fb0092638948bcfb7a3e /drivers | |
parent | e90322f87c97a4829c44fe77435c9faca87cbfc8 (diff) | |
download | u-boot-c830e285f475e580eb45290d54e9d174a57a7d71.tar.gz u-boot-c830e285f475e580eb45290d54e9d174a57a7d71.tar.bz2 u-boot-c830e285f475e580eb45290d54e9d174a57a7d71.zip |
video: Add a way to get the default font height
This is not as simple as it seems. Add a function to provide it so that
the upcoming menu feature can space lines out correctly.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/video/video-uclass.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/video/video-uclass.c b/drivers/video/video-uclass.c index fbe1ad169e..0ce376ca3f 100644 --- a/drivers/video/video-uclass.c +++ b/drivers/video/video-uclass.c @@ -421,6 +421,17 @@ static int show_splash(struct udevice *dev) return 0; } +int video_default_font_height(struct udevice *dev) +{ + struct vidconsole_priv *vc_priv = dev_get_uclass_priv(dev); + + if (IS_ENABLED(CONFIG_CONSOLE_TRUETYPE)) + return IF_ENABLED_INT(CONFIG_CONSOLE_TRUETYPE, + CONFIG_CONSOLE_TRUETYPE_SIZE); + + return vc_priv->y_charsize; +} + /* Set up the display ready for use */ static int video_post_probe(struct udevice *dev) { |