SIMPLE_FONT package in OptionROM code


Konstantin Aladyshev
 

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

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