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 <sjg@chromium.org>
This commit is contained in:
Simon Glass
2022-10-06 08:36:14 -06:00
committed by Anatolij Gustschin
parent 518d844a5e
commit 57a847cd40
2 changed files with 91 additions and 0 deletions

View File

@@ -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