]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/HiiDatabaseDxe/Font.c
Update the copyright notice format
[mirror_edk2.git] / MdeModulePkg / Universal / HiiDatabaseDxe / Font.c
index 4bb72c81d417cc2cf094b2100d32965049a03e02..a3b6d63e79c04f74b505986c4ad964b1c6498f2c 100644 (file)
@@ -2,8 +2,8 @@
 Implementation for EFI_HII_FONT_PROTOCOL.\r
 \r
 \r
-Copyright (c) 2007 - 2009, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
+Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
+This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
 http://opensource.org/licenses/bsd-license.php\r
@@ -1766,6 +1766,7 @@ HiiStringToImage (
         // It forces a line break that ends this row.\r
         //\r
         Index++;\r
+        LineBreak = TRUE;\r
         break;\r
       }\r
 \r
@@ -1842,6 +1843,12 @@ HiiStringToImage (
             Index = Index1 + 1;\r
             break;\r
           }\r
+          //\r
+          // If don't find a line break opportunity from EndIndex to StartIndex,\r
+          // then jump out.\r
+          //\r
+          if (Index1 == RowInfo[RowIndex].StartIndex)\r
+            break;\r
         }\r
       }\r
       //\r
@@ -1968,9 +1975,9 @@ HiiStringToImage (
     Index++;\r
     RowIndex++;\r
 \r
-    if (Flags & EFI_HII_IGNORE_LINE_BREAK) {\r
+    if (!LineBreak) {\r
       //\r
-      // If setting IGNORE_LINE_BREAK attribute, only render one line to image\r
+      // If there is not a mandatory line break or line break opportunity, only render one line to image\r
       //\r
       break;\r
     }\r
@@ -2385,6 +2392,7 @@ HiiGetGlyph (
     if (EFI_ERROR (Status)) {\r
       goto Exit;\r
     }\r
+    ASSERT (StringInfoOut != NULL);\r
     FontInfo   = &StringInfoOut->FontInfo;\r
     Foreground = StringInfoOut->ForegroundColor;\r
     Background = StringInfoOut->BackgroundColor;\r
@@ -2615,7 +2623,7 @@ HiiGetFontInfo (
     InfoOut.BackgroundColor = SystemDefault->BackgroundColor;\r
   }\r
   \r
-\r
+  ASSERT (FontInfo != NULL);\r
   FontInfo->FontSize  = InfoOut.FontInfo.FontSize;\r
   FontInfo->FontStyle = InfoOut.FontInfo.FontStyle;\r
 \r