expo: Create a struct for generic text attributes
In preparation for adding more text types, refactor the common fields
into a new structure. This will allow common code to be used.
Signed-off-by: Simon Glass <sjg@chromium.org>
diff --git a/boot/scene_textline.c b/boot/scene_textline.c
index f1d6ff7..7bc35a9 100644
--- a/boot/scene_textline.c
+++ b/boot/scene_textline.c
@@ -71,8 +71,8 @@
if (!txt)
return log_msg_ret("dim", -ENOENT);
- ret = vidconsole_nominal(scn->expo->cons, txt->font_name,
- txt->font_size, tline->max_chars, &bbox);
+ ret = vidconsole_nominal(scn->expo->cons, txt->gen.font_name,
+ txt->gen.font_size, tline->max_chars, &bbox);
if (ret)
return log_msg_ret("nom", ret);
@@ -191,10 +191,10 @@
if (!txt)
return log_msg_ret("cur", -ENOENT);
- if (txt->font_name || txt->font_size) {
+ if (txt->gen.font_name || txt->gen.font_size) {
ret = vidconsole_select_font(cons,
- txt->font_name,
- txt->font_size);
+ txt->gen.font_name,
+ txt->gen.font_size);
} else {
ret = vidconsole_select_font(cons, NULL, 0);
}