[PATCH 2/2] coreboot: Switch to a monospaced font
Dragan Simic
dsimic at manjaro.org
Mon Jan 8 10:33:07 CET 2024
On 2024-01-08 10:29, Mark Kettenis wrote:
>> From: Simon Glass <sjg at chromium.org>
>> Date: Sun, 7 Jan 2024 17:14:55 -0700
>>
>> 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.
>
> To be honest, I think defaulting to a proportional font is wrong as a
> default for something like U-Boot.
I agree, it makes very little sense to default to a proportional font.
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>> ---
>>
>> configs/coreboot64_defconfig | 3 +++
>> configs/coreboot_defconfig | 3 +++
>> test/cmd/font.c | 12 +++++++++---
>> 3 files changed, 15 insertions(+), 3 deletions(-)
>>
>> diff --git a/configs/coreboot64_defconfig
>> b/configs/coreboot64_defconfig
>> index 49c982ef756..c4571090859 100644
>> --- a/configs/coreboot64_defconfig
>> +++ b/configs/coreboot64_defconfig
>> @@ -64,6 +64,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 d4e44e00dca..7aa841bb54b 100644
>> --- a/configs/coreboot_defconfig
>> +++ b/configs/coreboot_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_CMD_DHRYSTONE=y
>> # CONFIG_GZIP is not set
>> diff --git a/test/cmd/font.c b/test/cmd/font.c
>> index 9c1eebf799e..ee1c610106d 100644
>> --- a/test/cmd/font.c
>> +++ b/test/cmd/font.c
>> @@ -29,14 +29,20 @@ static int font_test_base(struct unit_test_state
>> *uts)
>>
>> ut_assertok(console_record_reset_enable());
>> 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_assertok(ut_check_console_end(uts));
>>
>> 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;
>> --
>> 2.34.1
>>
>>
More information about the U-Boot
mailing list