From 57a847cd405e546711dbab1b70ea43fd46960f58 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 6 Oct 2022 08:36:14 -0600 Subject: video: Add a way to change the font name and size It is useful to be able to support multiple fonts. Add a function to handle this as well as one to list the available fonts. Signed-off-by: Simon Glass --- include/video_console.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'include') diff --git a/include/video_console.h b/include/video_console.h index 76c4b10acf6..bef926cd433 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -231,6 +231,22 @@ void vidconsole_position_cursor(struct udevice *dev, unsigned col, */ void vidconsole_set_cursor_pos(struct udevice *dev, int x, int y); +/** + * vidconsole_list_fonts() - List the available fonts + * + * This shows a list on the console + */ +void vidconsole_list_fonts(void); + +/** + * vidconsole_select_font() - Select a font to use + * + * @dev: vidconsole device + * @name: Font name + * @size: Size of the font (norminal pixel height) or 0 for default + */ +int vidconsole_select_font(struct udevice *dev, const char *name, uint size); + #ifdef CONFIG_VIDEO_COPY /** * vidconsole_sync_copy() - Sync back to the copy framebuffer -- cgit v1.3.1