From: Simon Glass Date: Mon, 8 Jan 2024 00:14:55 +0000 (-0700) Subject: coreboot: Switch to a monospaced font X-Git-Url: http://git.dujemihanovic.xyz/img/static/gitweb.css?a=commitdiff_plain;h=f0feda90826556d2841ff4168f7d21902d992d70;p=u-boot.git coreboot: Switch to a monospaced font The default font is proportional, with different character widths. Select a monospace font for coreboot so that the 'dm tree' output lines up correctly. Update the coreboot tests to match. Signed-off-by: Simon Glass --- diff --git a/configs/coreboot64_defconfig b/configs/coreboot64_defconfig index da42ad0a20..553f1dc83f 100644 --- a/configs/coreboot64_defconfig +++ b/configs/coreboot64_defconfig @@ -61,6 +61,9 @@ CONFIG_SOUND=y CONFIG_SOUND_I8254=y CONFIG_VIDEO_COPY=y CONFIG_CONSOLE_TRUETYPE=y +CONFIG_CONSOLE_TRUETYPE_SIZE=20 +# CONFIG_CONSOLE_TRUETYPE_NIMBUS is not set +CONFIG_CONSOLE_TRUETYPE_ANKACODER=y CONFIG_CONSOLE_SCROLL_LINES=5 CONFIG_SPL_ACPI=y CONFIG_CMD_DHRYSTONE=y diff --git a/configs/coreboot_defconfig b/configs/coreboot_defconfig index 0b103efe16..e68a3aed65 100644 --- a/configs/coreboot_defconfig +++ b/configs/coreboot_defconfig @@ -55,6 +55,9 @@ CONFIG_SOUND=y CONFIG_SOUND_I8254=y CONFIG_VIDEO_COPY=y CONFIG_CONSOLE_TRUETYPE=y +CONFIG_CONSOLE_TRUETYPE_SIZE=20 +# CONFIG_CONSOLE_TRUETYPE_NIMBUS is not set +CONFIG_CONSOLE_TRUETYPE_ANKACODER=y CONFIG_CONSOLE_SCROLL_LINES=5 CONFIG_CMD_DHRYSTONE=y # CONFIG_GZIP is not set diff --git a/test/cmd/font.c b/test/cmd/font.c index 2aea7b68c4..3335dd65be 100644 --- a/test/cmd/font.c +++ b/test/cmd/font.c @@ -27,14 +27,20 @@ static int font_test_base(struct unit_test_state *uts) ut_assertok(uclass_first_device_err(UCLASS_VIDEO_CONSOLE, &dev)); ut_assertok(run_command("font list", 0)); - ut_assert_nextline("nimbus_sans_l_regular"); + if (IS_ENABLED(CONFIG_CONSOLE_TRUETYPE_NIMBUS)) + ut_assert_nextline("nimbus_sans_l_regular"); + if (IS_ENABLED(CONFIG_CONSOLE_TRUETYPE_ANKACODER)) + ut_assert_nextline("ankacoder_c75_r"); if (IS_ENABLED(CONFIG_CONSOLE_TRUETYPE_CANTORAONE)) ut_assert_nextline("cantoraone_regular"); ut_assert_console_end(); ut_assertok(vidconsole_get_font_size(dev, &name, &size)); - ut_asserteq_str("nimbus_sans_l_regular", name); - ut_asserteq(18, size); + if (IS_ENABLED(CONFIG_CONSOLE_TRUETYPE_ANKACODER)) + ut_asserteq_str("ankacoder_c75_r", name); + else + ut_asserteq_str("nimbus_sans_l_regular", name); + ut_asserteq(CONFIG_CONSOLE_TRUETYPE_SIZE, size); if (!IS_ENABLED(CONFIG_CONSOLE_TRUETYPE_CANTORAONE)) return 0;