Re: SIMPLE_FONT package in OptionROM code


Felix Polyudov
 

There is no standard way to query platform glyph styles.
Overall, list of supported languages is typically a property of the system firmware.
If system firmware does not support the language you need, there likely will be no way for the end user to switch to the language even if your OpROM driver supports it.
On the other hand, if system firmware does support the language and the language is alphabet-based the font package should already be available.
Your driver just needs to publish the string package.

-----Original Message-----
From: discuss@edk2.groups.io <discuss@edk2.groups.io> On Behalf Of Konstantin Aladyshev via groups.io
Sent: Thursday, January 19, 2023 8:29 AM
To: discuss <discuss@edk2.groups.io>
Subject: [EXTERNAL] [edk2-discuss] SIMPLE_FONT package in OptionROM code


**CAUTION: The e-mail below is from an external source. Please exercise caution before opening attachments, clicking links, or following guidance.**

Hello!

Currently I develop an OptionROM for a custom PCI-E device.
In this OptionROM I want to publish a HII form for the device configuration. Therefore I use the "HiiAddPackages" in the driver's "EFI_DRIVER_BINDING_PROTOCOL.Start()" function. And everything works fine.

Now I want to use my local language in the OptionROM form. The problem is that my local language is not very often implemented in the UEFI Firmware by default.
For these cases I've decided to publish the "SIMPLE_FONT" HII package with my language glyphs directly from the OptionROM code.
And it worked fine until I noticed that UEFI firmware on different motherboards has different font saturation.

For example here are pseudo-graphics for the "1" code glyph in AMI and InsydeH2O firmware:

AMI

0x0031
--------
--------
--------
--------
--------
----X---
---XX---
--X-X---
----X---
----X---
----X---
----X---
----X---
----X---
--XXXXX-
--------
--------
--------
--------

Insyde H2O

0x0031
--------
--------
--------
--------
---XX---
-XXXX---
---XX---
---XX---
---XX---
---XX---
---XX---
---XX---
---XX---
---XX---
---XX---
---XX---
--------
--------
--------

This gives me a problem, what font saturation should I use in my SIMPLE_FONT package. In any choice it would look good on some motherboards, but bad on others.
I'm thinking that I should get some glyph bitmap and based on its saturation publish one font version or another. How can I do it?
Or is there any other solution to this problem?

Best regards,
Konstantin Aladyshev





-The information contained in this message may be confidential and proprietary to American Megatrends (AMI). This communication is intended to be read only by the individual or entity to whom it is addressed or by their designee. If the reader of this message is not the intended recipient, you are on notice that any distribution of this message, in any form, is strictly prohibited. Please promptly notify the sender by reply e-mail or by telephone at 770-246-8600, and then delete or destroy all copies of the transmission.

Join {discuss@edk2.groups.io to automatically receive all group messages.