diff options
author | Simon Glass <sjg@chromium.org> | 2022-10-06 08:36:16 -0600 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2022-10-30 20:01:40 +0100 |
commit | 430e1676a76bf8b7112c64e19cf64b988c281ee0 (patch) | |
tree | 97d40e3ae1f3305177622818c23d7195b3370e22 /include | |
parent | 3f425f9ca75c8d1938579044fde37a6f7d5abe16 (diff) |
video: Add commands to list and change fonts
Add a new 'font' command which allows the fonts to be listed as well as
selecting a different font and size.
Allow the test to run on sandbox, where multiple font/size combinations
are supported, as well as sandbox_flattree, where they are not.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/test/suites.h | 1 | ||||
-rw-r--r-- | include/video_console.h | 9 |
2 files changed, 10 insertions, 0 deletions
diff --git a/include/test/suites.h b/include/test/suites.h index 44025ccecd6..a01000e127b 100644 --- a/include/test/suites.h +++ b/include/test/suites.h @@ -39,6 +39,7 @@ int do_ut_compression(struct cmd_tbl *cmdtp, int flag, int argc, int do_ut_dm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); +int do_ut_font(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_lib(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_loadm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]); int do_ut_log(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]); diff --git a/include/video_console.h b/include/video_console.h index bef926cd433..d755eb73cf2 100644 --- a/include/video_console.h +++ b/include/video_console.h @@ -247,6 +247,15 @@ void vidconsole_list_fonts(void); */ int vidconsole_select_font(struct udevice *dev, const char *name, uint size); +/** + * vidconsole_get_font() - get the current font name and size + * + * @dev: vidconsole device + * @sizep: Place to put the font size (nominal height in pixels) + * Returns: Current font name + */ +const char *vidconsole_get_font(struct udevice *dev, uint *sizep); + #ifdef CONFIG_VIDEO_COPY /** * vidconsole_sync_copy() - Sync back to the copy framebuffer |