summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/Font.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
index 5ecd6bd4a1..7e5d3bdc71 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
@@ -839,6 +839,14 @@ FindGlyphBlock (
if (EFI_ERROR (Status)) {
return Status;
}
+ if (CharValue == (CHAR16) (-1)) {
+ if (BaseLine < DefaultCell.Height + DefaultCell.OffsetY) {
+ BaseLine = (UINT16) (DefaultCell.Height + DefaultCell.OffsetY);
+ }
+ if (MinOffsetY > DefaultCell.OffsetY) {
+ MinOffsetY = DefaultCell.OffsetY;
+ }
+ }
BufferLen = BITMAP_LEN_1_BIT (DefaultCell.Width, DefaultCell.Height);
if (CharCurrent == CharValue) {
@@ -861,6 +869,14 @@ FindGlyphBlock (
if (EFI_ERROR (Status)) {
return Status;
}
+ if (CharValue == (CHAR16) (-1)) {
+ if (BaseLine < DefaultCell.Height + DefaultCell.OffsetY) {
+ BaseLine = (UINT16) (DefaultCell.Height + DefaultCell.OffsetY);
+ }
+ if (MinOffsetY > DefaultCell.OffsetY) {
+ MinOffsetY = DefaultCell.OffsetY;
+ }
+ }
BufferLen = BITMAP_LEN_1_BIT (DefaultCell.Width, DefaultCell.Height);
BlockPtr += sizeof (EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK) - sizeof (UINT8);
for (Index = 0; Index < Length16; Index++) {