
On 10.02.24 13:46, Janne Grunau via B4 Relay wrote:
From: Andre Przywara andre.przywara@arm.com
UEFI relies entirely on unicode output, which actual fonts displayed on the screen might not be ready for.
Add a test displaying some international characters, to reveal missing glyphs, especially in our builtin fonts. This would be needed to be manually checked on the screen for correctness.
Signed-off-by: Andre Przywara andre.przywara@arm.com Suggested-by: Heinrich Schuchardt xypron.glpk@gmx.de Signed-off-by: Janne Grunau j@jannau.net
lib/efi_selftest/efi_selftest_textoutput.c | 8 ++++++++ 1 file changed, 8 insertions(+)
diff --git a/lib/efi_selftest/efi_selftest_textoutput.c b/lib/efi_selftest/efi_selftest_textoutput.c index cc44b38bc2..2aa81b0a80 100644 --- a/lib/efi_selftest/efi_selftest_textoutput.c +++ b/lib/efi_selftest/efi_selftest_textoutput.c @@ -30,6 +30,9 @@ static int execute(void) 0xD804, 0xDC05, 0xD804, 0xDC22, 0};
- const u16 text[] =
A person not speaking German, Danish, French, Spanish, and Greek would not know which characters to look for.
How about printing
U+00D6 Ö - Latin capital O with diaresis U+00DF ß - Latin small letter sharp s U+00E5 å - Latin small a with ring above U+00E5 é - Latin small e with acute U+00F1 ñ - Latin small n with tilde U+00F6 ö - Latin small o with diaresis U+00F8 ø - Latin small letter o with stroke U+03AC ά - Greek small letter alpha with tonus U+03BB λ - Greek small letter lambda U+03C2 ς - Greek small letter final sigma U+1F19 Ἑ - Greek capital letter epsilon with dasia
Best regards
Heinrich
+u"\u00d6sterreich Edelwei\u00df Sm\u00f8rrebr\u00f8d Sm\u00f6rg" +u"\u00e5s Ni\u00f1o Ren\u00e9 >\u1f19\u03bb\u03bb\u03ac\u03c2<\n";
/* SetAttribute */ efi_st_printf("\nColor palette\n"); @@ -118,6 +121,11 @@ static int execute(void) efi_st_printf("Unicode not handled properly\n"); return EFI_ST_FAILURE; }
ret = con_out->output_string(con_out, text);
if (ret != EFI_ST_SUCCESS) {
efi_st_error("OutputString failed for international chars\n");
return EFI_ST_FAILURE;
} efi_st_printf("\n");
return EFI_ST_SUCCESS;