summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-10-06 17:36:16 +0300
committerAnatolij Gustschin <agust@denx.de>2022-10-30 22:01:40 +0300
commit430e1676a76bf8b7112c64e19cf64b988c281ee0 (patch)
tree97d40e3ae1f3305177622818c23d7195b3370e22 /include
parent3f425f9ca75c8d1938579044fde37a6f7d5abe16 (diff)
downloadu-boot-430e1676a76bf8b7112c64e19cf64b988c281ee0.tar.xz
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.h1
-rw-r--r--include/video_console.h9
2 files changed, 10 insertions, 0 deletions
diff --git a/include/test/suites.h b/include/test/suites.h
index 44025ccecd..a01000e127 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 bef926cd43..d755eb73cf 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