EDK2 support for EFI_WIDE_GLYPH on graphics console


Aron Wong
 

I'm wondering if EDK2 has support for non-Latin based wide glyph character sets, i.e, CJK (Chinese Japanese Korean) characters.
Although it seems that by implementing these changes:

1. A .c source file with a newly created+populated EFI_WIDE_GLYPH gUsStdWideGlyphData[] structure.

This structure would be similar to EFI_NARROW_GLYPH gUsStdNarrowGlyphData[] in

./edk2/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c

1. A related .uni file with \wide and \narrow attributes placed appropriately around the EFI_WIDE_GLYPH characters.
2. Some minor edits to RegisterFontPackage() in

./edk2/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c

to pickup additional gUsStdWideGlyphData[] data.
then the graphics console would be able to properly display wide glyphs.

However, this doesn't seem to be the case, at least in the context of the UEFI Boot Menu on the graphics console, which suffers from minor cosmetic/truncation issues with wide glyphs.

Should upstream EDK2 fully support wide glyph display on the graphics console, without modification to the source, beyond an appropriate .uni file, and matching glyph data?
If so, can I get a pointer to an implementation example?

References:
https://uefi.blogspot.com/2009/<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuefi.blogspot.com%2F2009%2F&data=05%7C01%7CAWong%40nvidia.com%7C1acd46abe5364b556ca108db2beda505%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638152071890458494%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Q4OPh6utooDt2JABmeVgY%2FHqF7NNppLMPhzvnecK3G0%3D&reserved=0>
https://edk2-docs.gitbook.io/edk-ii-uni-specification/2_unicode_strings_file_format<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2-docs.gitbook.io%2Fedk-ii-uni-specification%2F2_unicode_strings_file_format&data=05%7C01%7CAWong%40nvidia.com%7C1acd46abe5364b556ca108db2beda505%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638152071890458494%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=yz%2F%2FibF0tXTaFeuhtzRU115cpQ0U48shtd5hHMv2k5g%3D&reserved=0>


Aron Wong
 

pinging this thread, and cc'ing the maintainers for MdeModulePkg/Universal/Console/GraphicsConsoleDxe.


From: Aron Wong
Sent: Monday, March 27, 2023 12:16 PM
To: discuss@edk2.groups.io
Cc: Aron Wong <AWong@...>
Subject: EDK2 support for EFI_WIDE_GLYPH on graphics console

I'm wondering if EDK2 has support for non-Latin based wide glyph character sets, i.e, CJK (Chinese Japanese Korean) characters.
Although it seems that by implementing these changes:

1. A .c source file with a newly created+populated EFI_WIDE_GLYPH gUsStdWideGlyphData[] structure.

This structure would be similar to EFI_NARROW_GLYPH gUsStdNarrowGlyphData[] in

./edk2/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/LaffStd.c

1. A related .uni file with \wide and \narrow attributes placed appropriately around the EFI_WIDE_GLYPH characters.
2. Some minor edits to RegisterFontPackage() in

./edk2/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c

to pickup additional gUsStdWideGlyphData[] data.
then the graphics console would be able to properly display wide glyphs.

However, this doesn't seem to be the case, at least in the context of the UEFI Boot Menu on the graphics console, which suffers from minor cosmetic/truncation issues with wide glyphs.

Should upstream EDK2 fully support wide glyph display on the graphics console, without modification to the source, beyond an appropriate .uni file, and matching glyph data?
If so, can I get a pointer to an implementation example?

References:
https://uefi.blogspot.com/2009/<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuefi.blogspot.com%2F2009%2F&data=05%7C01%7CAWong%40nvidia.com%7C1acd46abe5364b556ca108db2beda505%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638152071890458494%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Q4OPh6utooDt2JABmeVgY%2FHqF7NNppLMPhzvnecK3G0%3D&reserved=0>
https://edk2-docs.gitbook.io/edk-ii-uni-specification/2_unicode_strings_file_format<https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fedk2-docs.gitbook.io%2Fedk-ii-uni-specification%2F2_unicode_strings_file_format&data=05%7C01%7CAWong%40nvidia.com%7C1acd46abe5364b556ca108db2beda505%7C43083d15727340c1b7db39efd9ccc17a%7C0%7C0%7C638152071890458494%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=yz%2F%2FibF0tXTaFeuhtzRU115cpQ0U48shtd5hHMv2k5g%3D&reserved=0>