summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
diff options
context:
space:
mode:
authorqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-02 01:21:43 +0000
committerqwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524>2008-09-02 01:21:43 +0000
commit08e6463a72f816b51793327ab5b0f2af08b9db1c (patch)
tree49817ac13b6a8c4e5c31ca5559f836c2adb264e9 /MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
parent217697afd2334086cceac42d1f6d8fc3dac0b025 (diff)
downloadedk2-platforms-08e6463a72f816b51793327ab5b0f2af08b9db1c.tar.xz
Merged in the bug fixes from EDK I.
*** Press F9 in Uefi64 FrontPage shouldnot enter sub-menu ** [FT] Some UI error on multiple platforms on framework_20080811 ** [FT] UI test of How tall are you(Hex) on framework_20080811 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5767 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/HiiDatabaseDxe/Font.c')
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/Font.c49
1 files changed, 23 insertions, 26 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
index 9c68ac89b6..23b15475da 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
@@ -1730,7 +1730,6 @@ HiiStringToImage (
if (LineHeight < Cell[Index].Height) {
LineHeight = (UINTN) Cell[Index].Height;
}
- BaseLineOffset += (UINTN) Cell[Index].OffsetY;
if ((Flags & EFI_HII_IGNORE_LINE_BREAK) == 0 &&
(Flags & EFI_HII_OUT_FLAG_WRAP) == 0 &&
@@ -1799,7 +1798,7 @@ HiiStringToImage (
if (Index > 0) {
RowInfo[RowIndex].EndIndex = Index - 1;
RowInfo[RowIndex].LineWidth = LineWidth - Cell[Index].AdvanceX;
- RowInfo[RowIndex].BaselineOffset = BaseLineOffset - Cell[Index].OffsetY;
+ RowInfo[RowIndex].BaselineOffset = BaseLineOffset;
if (LineHeight > Cell[Index - 1].Height) {
LineHeight = Cell[Index - 1].Height;
}
@@ -2497,10 +2496,10 @@ HiiGetFontInfo (
FontInfo->FontStyle = InfoOut.FontInfo.FontStyle;
if (IsFontInfoExisted (Private, FontInfo, &InfoOut.FontInfoMask, LocalFontHandle, &GlobalFont)) {
+ //
+ // Test to guarantee all characters are available in the found font.
+ //
if (String != NULL) {
- //
- // Test to guarantee all characters are available in the found font.
- //
StringIn = String;
while (*StringIn != 0) {
Status = FindGlyphBlock (GlobalFont->FontPackage, *StringIn, NULL, NULL, NULL);
@@ -2510,29 +2509,27 @@ HiiGetFontInfo (
}
StringIn++;
}
-
- //
- // Write to output parameter
- //
- if (StringInfoOut != NULL) {
- StringInfoOutLen = sizeof (EFI_FONT_DISPLAY_INFO) - sizeof (EFI_FONT_INFO) + GlobalFont->FontInfoSize;
- *StringInfoOut = (EFI_FONT_DISPLAY_INFO *) AllocateZeroPool (StringInfoOutLen);
- if (*StringInfoOut == NULL) {
- Status = EFI_OUT_OF_RESOURCES;
- LocalFontHandle = NULL;
- goto Exit;
- }
- CopyMem (*StringInfoOut, &InfoOut, sizeof (EFI_FONT_DISPLAY_INFO));
- CopyMem (&(*StringInfoOut)->FontInfo, GlobalFont->FontInfo, GlobalFont->FontInfoSize);
+ }
+ //
+ // Write to output parameter
+ //
+ if (StringInfoOut != NULL) {
+ StringInfoOutLen = sizeof (EFI_FONT_DISPLAY_INFO) - sizeof (EFI_FONT_INFO) + GlobalFont->FontInfoSize;
+ *StringInfoOut = (EFI_FONT_DISPLAY_INFO *) AllocateZeroPool (StringInfoOutLen);
+ if (*StringInfoOut == NULL) {
+ Status = EFI_OUT_OF_RESOURCES;
+ LocalFontHandle = NULL;
+ goto Exit;
}
- LocalFontHandle = GlobalFont->Entry.ForwardLink;
-
- Status = EFI_SUCCESS;
- goto Exit;
+
+ CopyMem (*StringInfoOut, &InfoOut, sizeof (EFI_FONT_DISPLAY_INFO));
+ CopyMem (&(*StringInfoOut)->FontInfo, GlobalFont->FontInfo, GlobalFont->FontInfoSize);
}
- } else {
- LocalFontHandle = NULL;
- }
+
+ LocalFontHandle = GlobalFont->Entry.ForwardLink;
+ Status = EFI_SUCCESS;
+ goto Exit;
+ }
Status = EFI_NOT_FOUND;