16 { 0x00, 0x00, 0x00, 0x00 },
17 { 0x98, 0x00, 0x00, 0x00 },
18 { 0x00, 0x98, 0x00, 0x00 },
19 { 0x98, 0x98, 0x00, 0x00 },
20 { 0x00, 0x00, 0x98, 0x00 },
21 { 0x98, 0x00, 0x98, 0x00 },
22 { 0x00, 0x98, 0x98, 0x00 },
23 { 0x98, 0x98, 0x98, 0x00 },
24 { 0x30, 0x30, 0x30, 0x00 },
25 { 0xff, 0x00, 0x00, 0x00 },
26 { 0x00, 0xff, 0x00, 0x00 },
27 { 0xff, 0xff, 0x00, 0x00 },
28 { 0x00, 0x00, 0xff, 0x00 },
29 { 0xff, 0x00, 0xff, 0x00 },
30 { 0x00, 0xff, 0xff, 0x00 },
31 { 0xff, 0xff, 0xff, 0x00 },
661 OUT UINT8 **GlyphBuffer, OPTIONAL
662 OUT EFI_HII_GLYPH_INFO *Cell, OPTIONAL
663 OUT UINTN *GlyphBufferLen OPTIONAL
671 EFI_HII_GIBT_GLYPHS_BLOCK Glyphs;
674 EFI_HII_GLYPH_INFO DefaultCell;
675 EFI_HII_GLYPH_INFO LocalCell;
679 ASSERT (FontPackage != NULL);
684 if (CharValue == (CHAR16)(-1)) {
691 &FontPackage->GlyphInfoList,
692 (EFI_HII_GLYPH_INFO *)((UINT8 *)FontPackage->FontPkgHdr + 3 * sizeof (UINT32))
694 if (EFI_ERROR (Status)) {
700 (UINT8 *)FontPackage->FontPkgHdr + 3 * sizeof (UINT32),
701 sizeof (EFI_HII_GLYPH_INFO)
705 BlockPtr = FontPackage->GlyphBlock;
709 while (*BlockPtr != EFI_HII_GIBT_END) {
711 case EFI_HII_GIBT_DEFAULTS:
716 if (CharValue == (CHAR16)(-1)) {
719 &FontPackage->GlyphInfoList,
720 (EFI_HII_GLYPH_INFO *)(BlockPtr + sizeof (EFI_HII_GLYPH_BLOCK))
722 if (EFI_ERROR (Status)) {
728 BlockPtr +
sizeof (EFI_HII_GLYPH_BLOCK),
729 sizeof (EFI_HII_GLYPH_INFO)
731 if (BaseLine < LocalCell.Height + LocalCell.OffsetY) {
732 BaseLine = (UINT16)(LocalCell.Height + LocalCell.OffsetY);
735 if (MinOffsetY > LocalCell.OffsetY) {
736 MinOffsetY = LocalCell.OffsetY;
740 BlockPtr +=
sizeof (EFI_HII_GIBT_DEFAULTS_BLOCK);
743 case EFI_HII_GIBT_DUPLICATE:
744 if (CharCurrent == CharValue) {
745 CopyMem (&CharValue, BlockPtr +
sizeof (EFI_HII_GLYPH_BLOCK),
sizeof (CHAR16));
747 BlockPtr = FontPackage->GlyphBlock;
752 BlockPtr +=
sizeof (EFI_HII_GIBT_DUPLICATE_BLOCK);
755 case EFI_HII_GIBT_EXT1:
756 BlockPtr += *(UINT8 *)((UINTN)BlockPtr +
sizeof (EFI_HII_GLYPH_BLOCK) +
sizeof (UINT8));
758 case EFI_HII_GIBT_EXT2:
761 (UINT8 *)((UINTN)BlockPtr +
sizeof (EFI_HII_GLYPH_BLOCK) +
sizeof (UINT8)),
764 BlockPtr += Length16;
766 case EFI_HII_GIBT_EXT4:
769 (UINT8 *)((UINTN)BlockPtr +
sizeof (EFI_HII_GLYPH_BLOCK) +
sizeof (UINT8)),
772 BlockPtr += Length32;
775 case EFI_HII_GIBT_GLYPH:
778 BlockPtr +
sizeof (EFI_HII_GLYPH_BLOCK),
779 sizeof (EFI_HII_GLYPH_INFO)
781 if (CharValue == (CHAR16)(-1)) {
782 if (BaseLine < LocalCell.Height + LocalCell.OffsetY) {
783 BaseLine = (UINT16)(LocalCell.Height + LocalCell.OffsetY);
786 if (MinOffsetY > LocalCell.OffsetY) {
787 MinOffsetY = LocalCell.OffsetY;
792 if (CharCurrent == CharValue) {
794 (UINT8 *)((UINTN)BlockPtr +
sizeof (EFI_HII_GIBT_GLYPH_BLOCK) -
sizeof (UINT8)),
804 BlockPtr +=
sizeof (EFI_HII_GIBT_GLYPH_BLOCK) -
sizeof (UINT8) + BufferLen;
807 case EFI_HII_GIBT_GLYPHS:
808 BlockPtr +=
sizeof (EFI_HII_GLYPH_BLOCK);
809 CopyMem (&Glyphs.Cell, BlockPtr, sizeof (EFI_HII_GLYPH_INFO));
810 BlockPtr +=
sizeof (EFI_HII_GLYPH_INFO);
811 CopyMem (&Glyphs.Count, BlockPtr, sizeof (UINT16));
812 BlockPtr +=
sizeof (UINT16);
814 if (CharValue == (CHAR16)(-1)) {
815 if (BaseLine < Glyphs.Cell.Height + Glyphs.Cell.OffsetY) {
816 BaseLine = (UINT16)(Glyphs.Cell.Height + Glyphs.Cell.OffsetY);
819 if (MinOffsetY > Glyphs.Cell.OffsetY) {
820 MinOffsetY = Glyphs.Cell.OffsetY;
825 for (Index = 0; Index < Glyphs.Count; Index++) {
826 if (CharCurrent + Index == CharValue) {
837 BlockPtr += BufferLen;
840 CharCurrent = (UINT16)(CharCurrent + Glyphs.Count);
843 case EFI_HII_GIBT_GLYPH_DEFAULT:
844 Status =
GetCell (CharCurrent, &FontPackage->GlyphInfoList, &DefaultCell);
845 if (EFI_ERROR (Status)) {
849 if (CharValue == (CHAR16)(-1)) {
850 if (BaseLine < DefaultCell.Height + DefaultCell.OffsetY) {
851 BaseLine = (UINT16)(DefaultCell.Height + DefaultCell.OffsetY);
854 if (MinOffsetY > DefaultCell.OffsetY) {
855 MinOffsetY = DefaultCell.OffsetY;
861 if (CharCurrent == CharValue) {
863 BlockPtr +
sizeof (EFI_HII_GLYPH_BLOCK),
873 BlockPtr +=
sizeof (EFI_HII_GLYPH_BLOCK) + BufferLen;
876 case EFI_HII_GIBT_GLYPHS_DEFAULT:
877 CopyMem (&Length16, BlockPtr +
sizeof (EFI_HII_GLYPH_BLOCK),
sizeof (UINT16));
878 Status =
GetCell (CharCurrent, &FontPackage->GlyphInfoList, &DefaultCell);
879 if (EFI_ERROR (Status)) {
883 if (CharValue == (CHAR16)(-1)) {
884 if (BaseLine < DefaultCell.Height + DefaultCell.OffsetY) {
885 BaseLine = (UINT16)(DefaultCell.Height + DefaultCell.OffsetY);
888 if (MinOffsetY > DefaultCell.OffsetY) {
889 MinOffsetY = DefaultCell.OffsetY;
894 BlockPtr +=
sizeof (EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK) -
sizeof (UINT8);
895 for (Index = 0; Index < Length16; Index++) {
896 if (CharCurrent + Index == CharValue) {
907 BlockPtr += BufferLen;
910 CharCurrent = (UINT16)(CharCurrent + Length16);
913 case EFI_HII_GIBT_SKIP1:
914 CharCurrent = (UINT16)(CharCurrent + (UINT16)(*(BlockPtr +
sizeof (EFI_HII_GLYPH_BLOCK))));
915 BlockPtr +=
sizeof (EFI_HII_GIBT_SKIP1_BLOCK);
917 case EFI_HII_GIBT_SKIP2:
918 CopyMem (&Length16, BlockPtr +
sizeof (EFI_HII_GLYPH_BLOCK),
sizeof (UINT16));
919 CharCurrent = (UINT16)(CharCurrent + Length16);
920 BlockPtr +=
sizeof (EFI_HII_GIBT_SKIP2_BLOCK);
927 if (CharValue < CharCurrent) {
928 return EFI_NOT_FOUND;
932 if (CharValue == (CHAR16)(-1)) {
933 FontPackage->BaseLine = BaseLine;
934 FontPackage->Height = (UINT16)(BaseLine - MinOffsetY);
938 return EFI_NOT_FOUND;
1177 IN EFI_FONT_INFO *FontInfo,
1178 IN EFI_FONT_INFO_MASK *FontInfoMask, OPTIONAL
1179 IN EFI_FONT_HANDLE FontHandle, OPTIONAL
1187 EFI_FONT_INFO_MASK Mask;
1189 BOOLEAN VagueMatched1;
1190 BOOLEAN VagueMatched2;
1193 ASSERT (FontInfo != NULL);
1200 VagueMatched1 = FALSE;
1201 VagueMatched2 = FALSE;
1204 GlobalFontBackup1 = NULL;
1205 GlobalFontBackup2 = NULL;
1210 if (FontInfoMask != NULL) {
1211 Mask = *FontInfoMask & (~SYS_FONT_INFO_MASK);
1218 if (FontHandle == NULL) {
1219 Link = Private->FontInfoList.ForwardLink;
1221 Link = (LIST_ENTRY *)FontHandle;
1224 for ( ; Link != &Private->FontInfoList; Link = Link->ForwardLink) {
1226 if (FontInfoMask == NULL) {
1228 if (GlobalFontInfo != NULL) {
1229 *GlobalFontInfo = GlobalFont;
1239 case EFI_FONT_INFO_ANY_FONT:
1240 if ((GlobalFont->
FontInfo->FontStyle == FontInfo->FontStyle) &&
1241 (GlobalFont->
FontInfo->FontSize == FontInfo->FontSize))
1247 case EFI_FONT_INFO_ANY_FONT | EFI_FONT_INFO_ANY_STYLE:
1248 if (GlobalFont->
FontInfo->FontSize == FontInfo->FontSize) {
1253 case EFI_FONT_INFO_ANY_FONT | EFI_FONT_INFO_ANY_SIZE:
1254 if (GlobalFont->
FontInfo->FontStyle == FontInfo->FontStyle) {
1259 case EFI_FONT_INFO_ANY_FONT | EFI_FONT_INFO_ANY_SIZE | EFI_FONT_INFO_ANY_STYLE:
1266 case EFI_FONT_INFO_ANY_FONT | EFI_FONT_INFO_RESTYLE:
1267 if (GlobalFont->
FontInfo->FontSize == FontInfo->FontSize) {
1268 if (GlobalFont->
FontInfo->FontStyle == FontInfo->FontStyle) {
1270 }
else if ((GlobalFont->
FontInfo->FontStyle & FontInfo->FontStyle) == FontInfo->FontStyle) {
1271 VagueMatched1 = TRUE;
1272 GlobalFontBackup1 = GlobalFont;
1281 case EFI_FONT_INFO_ANY_FONT | EFI_FONT_INFO_RESIZE:
1282 if (GlobalFont->
FontInfo->FontStyle == FontInfo->FontStyle) {
1283 if (GlobalFont->
FontInfo->FontSize == FontInfo->FontSize) {
1286 VagueMatched1 = TRUE;
1287 GlobalFontBackup1 = GlobalFont;
1292 case EFI_FONT_INFO_ANY_FONT | EFI_FONT_INFO_RESTYLE | EFI_FONT_INFO_RESIZE:
1293 if (GlobalFont->
FontInfo->FontStyle == FontInfo->FontStyle) {
1294 if (GlobalFont->
FontInfo->FontSize == FontInfo->FontSize) {
1297 VagueMatched1 = TRUE;
1298 GlobalFontBackup1 = GlobalFont;
1300 }
else if ((GlobalFont->
FontInfo->FontStyle & FontInfo->FontStyle) == FontInfo->FontStyle) {
1301 if (GlobalFont->
FontInfo->FontSize == FontInfo->FontSize) {
1302 VagueMatched1 = TRUE;
1303 GlobalFontBackup1 = GlobalFont;
1305 VagueMatched2 = TRUE;
1306 GlobalFontBackup2 = GlobalFont;
1311 case EFI_FONT_INFO_ANY_FONT | EFI_FONT_INFO_ANY_STYLE | EFI_FONT_INFO_RESIZE:
1312 if (GlobalFont->
FontInfo->FontSize == FontInfo->FontSize) {
1315 VagueMatched1 = TRUE;
1316 GlobalFontBackup1 = GlobalFont;
1320 case EFI_FONT_INFO_ANY_FONT | EFI_FONT_INFO_ANY_SIZE | EFI_FONT_INFO_RESTYLE:
1321 if (GlobalFont->
FontInfo->FontStyle == FontInfo->FontStyle) {
1323 }
else if ((GlobalFont->
FontInfo->FontStyle & FontInfo->FontStyle) == FontInfo->FontStyle) {
1324 VagueMatched1 = TRUE;
1325 GlobalFontBackup1 = GlobalFont;
1329 case EFI_FONT_INFO_ANY_STYLE:
1333 StrSize (FontInfo->FontName)
1335 (GlobalFont->
FontInfo->FontSize == FontInfo->FontSize))
1341 case EFI_FONT_INFO_ANY_STYLE | EFI_FONT_INFO_ANY_SIZE:
1345 StrSize (FontInfo->FontName)
1352 case EFI_FONT_INFO_ANY_STYLE | EFI_FONT_INFO_RESIZE:
1356 StrSize (FontInfo->FontName)
1359 if (GlobalFont->
FontInfo->FontSize == FontInfo->FontSize) {
1362 VagueMatched1 = TRUE;
1363 GlobalFontBackup1 = GlobalFont;
1368 case EFI_FONT_INFO_ANY_SIZE:
1372 StrSize (FontInfo->FontName)
1374 (GlobalFont->
FontInfo->FontStyle == FontInfo->FontStyle))
1380 case EFI_FONT_INFO_ANY_SIZE | EFI_FONT_INFO_RESTYLE:
1384 StrSize (FontInfo->FontName)
1387 if (GlobalFont->
FontInfo->FontStyle == FontInfo->FontStyle) {
1389 }
else if ((GlobalFont->
FontInfo->FontStyle & FontInfo->FontStyle) == FontInfo->FontStyle) {
1390 VagueMatched1 = TRUE;
1391 GlobalFontBackup1 = GlobalFont;
1396 case EFI_FONT_INFO_RESTYLE:
1400 StrSize (FontInfo->FontName)
1402 (GlobalFont->
FontInfo->FontSize == FontInfo->FontSize))
1404 if (GlobalFont->
FontInfo->FontStyle == FontInfo->FontStyle) {
1406 }
else if ((GlobalFont->
FontInfo->FontStyle & FontInfo->FontStyle) == FontInfo->FontStyle) {
1407 VagueMatched1 = TRUE;
1408 GlobalFontBackup1 = GlobalFont;
1413 case EFI_FONT_INFO_RESIZE:
1417 StrSize (FontInfo->FontName)
1419 (GlobalFont->
FontInfo->FontStyle == FontInfo->FontStyle))
1421 if (GlobalFont->
FontInfo->FontSize == FontInfo->FontSize) {
1424 VagueMatched1 = TRUE;
1425 GlobalFontBackup1 = GlobalFont;
1430 case EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_RESTYLE:
1434 StrSize (FontInfo->FontName)
1437 if (GlobalFont->
FontInfo->FontStyle == FontInfo->FontStyle) {
1438 if (GlobalFont->
FontInfo->FontSize == FontInfo->FontSize) {
1441 VagueMatched1 = TRUE;
1442 GlobalFontBackup1 = GlobalFont;
1444 }
else if ((GlobalFont->
FontInfo->FontStyle & FontInfo->FontStyle) == FontInfo->FontStyle) {
1445 if (GlobalFont->
FontInfo->FontSize == FontInfo->FontSize) {
1446 VagueMatched1 = TRUE;
1447 GlobalFontBackup1 = GlobalFont;
1449 VagueMatched2 = TRUE;
1450 GlobalFontBackup2 = GlobalFont;
1461 if (GlobalFontInfo != NULL) {
1462 *GlobalFontInfo = GlobalFont;
1470 if (VagueMatched1) {
1471 if (GlobalFontInfo != NULL) {
1472 *GlobalFontInfo = GlobalFontBackup1;
1476 }
else if (VagueMatched2) {
1477 if (GlobalFontInfo != NULL) {
1478 *GlobalFontInfo = GlobalFontBackup2;
1625 IN CONST EFI_HII_FONT_PROTOCOL *This,
1626 IN EFI_HII_OUT_FLAGS Flags,
1627 IN CONST EFI_STRING String,
1628 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,
1629 IN OUT EFI_IMAGE_OUTPUT **Blt,
1632 OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
1633 OUT UINTN *RowInfoArraySize OPTIONAL,
1634 OUT UINTN *ColumnInfoArray OPTIONAL
1640 EFI_HII_GLYPH_INFO *Cell;
1642 EFI_IMAGE_OUTPUT *Image;
1643 EFI_STRING StringPtr;
1644 EFI_STRING StringTmp;
1645 EFI_HII_ROW_INFO *RowInfo;
1649 UINTN LastLineHeight;
1650 UINTN BaseLineOffset;
1656 EFI_FONT_DISPLAY_INFO *StringInfoOut;
1657 EFI_FONT_DISPLAY_INFO *SystemDefault;
1658 EFI_FONT_HANDLE FontHandle;
1659 EFI_STRING StringIn;
1660 EFI_STRING StringIn2;
1663 EFI_FONT_INFO *FontInfo;
1664 BOOLEAN SysFontFlag;
1665 EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground;
1666 EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background;
1667 BOOLEAN Transparent;
1668 EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer;
1669 EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BufferPtr;
1673 EFI_GRAPHICS_OUTPUT_BLT_PIXEL *RowBufferPtr;
1675 UINT32 PreInitBkgnd;
1681 if ((This == NULL) || (String == NULL) || (Blt == NULL)) {
1682 return EFI_INVALID_PARAMETER;
1689 if ((Flags & EFI_HII_OUT_FLAG_TRANSPARENT) == EFI_HII_OUT_FLAG_TRANSPARENT) {
1690 return EFI_INVALID_PARAMETER;
1693 if ((Flags & EFI_HII_OUT_FLAG_CLIP) == EFI_HII_OUT_FLAG_CLIP) {
1694 return EFI_INVALID_PARAMETER;
1701 if ((Flags & (EFI_HII_OUT_FLAG_CLIP | EFI_HII_OUT_FLAG_CLIP_CLEAN_X)) == EFI_HII_OUT_FLAG_CLIP_CLEAN_X) {
1702 return EFI_INVALID_PARAMETER;
1705 if ((Flags & (EFI_HII_OUT_FLAG_CLIP | EFI_HII_OUT_FLAG_CLIP_CLEAN_Y)) == EFI_HII_OUT_FLAG_CLIP_CLEAN_Y) {
1706 return EFI_INVALID_PARAMETER;
1712 if ((Flags & (EFI_HII_OUT_FLAG_WRAP | EFI_HII_OUT_FLAG_CLIP_CLEAN_X)) == (EFI_HII_OUT_FLAG_WRAP | EFI_HII_OUT_FLAG_CLIP_CLEAN_X)) {
1713 return EFI_INVALID_PARAMETER;
1720 Image = AllocateZeroPool (
sizeof (EFI_IMAGE_OUTPUT));
1721 if (Image == NULL) {
1722 return EFI_OUT_OF_RESOURCES;
1726 Image->Height = 600;
1727 Image->Image.Bitmap = AllocateZeroPool (Image->Width * Image->Height *sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
1728 if (Image->Image.Bitmap == NULL) {
1730 return EFI_OUT_OF_RESOURCES;
1736 Flags &= EFI_HII_OUT_FLAG_WRAP | EFI_HII_IGNORE_IF_NO_GLYPH | EFI_HII_IGNORE_LINE_BREAK;
1740 StrLength = StrLen (String);
1741 GlyphBuf = (UINT8 **)AllocateZeroPool (StrLength *
sizeof (UINT8 *));
1742 ASSERT (GlyphBuf != NULL);
1743 Cell = (EFI_HII_GLYPH_INFO *)AllocateZeroPool (StrLength *
sizeof (EFI_HII_GLYPH_INFO));
1745 Attributes = (UINT8 *)AllocateZeroPool (StrLength *
sizeof (UINT8));
1746 ASSERT (Attributes != NULL);
1749 Status = EFI_SUCCESS;
1751 SystemDefault = NULL;
1759 StringInfoOut = NULL;
1762 SysFontFlag =
IsSystemFontInfo (Private, (EFI_FONT_DISPLAY_INFO *)StringInfo, &SystemDefault, NULL);
1765 ASSERT (SystemDefault != NULL);
1767 Height = SystemDefault->FontInfo.FontSize;
1768 BaseLine = SystemDefault->FontInfo.FontSize;
1769 Foreground = SystemDefault->ForegroundColor;
1770 Background = SystemDefault->BackgroundColor;
1775 ASSERT (StringInfo != NULL);
1776 Status =
HiiGetFontInfo (This, &FontHandle, (EFI_FONT_DISPLAY_INFO *)StringInfo, &StringInfoOut, NULL);
1777 if (Status == EFI_NOT_FOUND) {
1784 Height = SystemDefault->FontInfo.FontSize;
1785 BaseLine = SystemDefault->FontInfo.FontSize;
1786 Foreground = ((EFI_FONT_DISPLAY_INFO *)StringInfo)->ForegroundColor;
1787 Background = ((EFI_FONT_DISPLAY_INFO *)StringInfo)->BackgroundColor;
1788 }
else if (Status == EFI_SUCCESS) {
1789 FontInfo = &StringInfoOut->FontInfo;
1793 Foreground = StringInfoOut->ForegroundColor;
1794 Background = StringInfoOut->BackgroundColor;
1804 LineHeight = Height;
1805 LastLineHeight = Height;
1806 BaseLineOffset = Height - BaseLine;
1818 if ((Flags & EFI_HII_IGNORE_LINE_BREAK) == EFI_HII_IGNORE_LINE_BREAK) {
1819 StringIn = AllocateZeroPool (StrSize (StringPtr));
1820 if (StringIn == NULL) {
1821 Status = EFI_OUT_OF_RESOURCES;
1825 StringTmp = StringIn;
1826 while (*StringPtr != 0) {
1830 *StringTmp++ = *StringPtr++;
1835 StringPtr = StringIn;
1842 StringIn2 = AllocateZeroPool (StrSize (StringPtr));
1843 if (StringIn2 == NULL) {
1844 Status = EFI_OUT_OF_RESOURCES;
1849 StringTmp = StringIn2;
1850 StrLength = StrLen (StringPtr);
1851 while (*StringPtr != 0 && Index < StrLength) {
1853 *StringTmp++ = *StringPtr++;
1858 Status =
GetGlyphBuffer (Private, *StringPtr, FontInfo, &GlyphBuf[Index], &Cell[Index], &Attributes[Index]);
1859 if (Status == EFI_NOT_FOUND) {
1860 if ((Flags & EFI_HII_IGNORE_IF_NO_GLYPH) == EFI_HII_IGNORE_IF_NO_GLYPH) {
1861 GlyphBuf[Index] = NULL;
1862 ZeroMem (&Cell[Index],
sizeof (Cell[Index]));
1863 Status = EFI_SUCCESS;
1876 if (EFI_ERROR (Status)) {
1877 Status = EFI_INVALID_PARAMETER;
1882 if (EFI_ERROR (Status)) {
1886 *StringTmp++ = *StringPtr++;
1891 StringPtr = StringIn2;
1900 BufferPtr = Image->Image.Bitmap + Image->Width * BltY + BltX;
1901 if (Image->Height < BltY) {
1905 Status = EFI_INVALID_PARAMETER;
1909 MaxRowNum = (UINT16)((Image->Height - BltY) / Height);
1910 if ((Image->Height - BltY) % Height != 0) {
1911 LastLineHeight = (Image->Height - BltY) % Height;
1915 RowInfo = (EFI_HII_ROW_INFO *)AllocateZeroPool (MaxRowNum *
sizeof (EFI_HII_ROW_INFO));
1916 if (RowInfo == NULL) {
1917 Status = EFI_OUT_OF_RESOURCES;
1924 Transparent = (BOOLEAN)((Flags & EFI_HII_OUT_FLAG_TRANSPARENT) == EFI_HII_OUT_FLAG_TRANSPARENT ? TRUE : FALSE);
1926 for (RowIndex = 0, Index = 0; RowIndex < MaxRowNum && StringPtr[Index] != 0; ) {
1934 if (RowIndex == MaxRowNum - 1) {
1935 if (((Flags & EFI_HII_OUT_FLAG_CLIP_CLEAN_Y) == EFI_HII_OUT_FLAG_CLIP_CLEAN_Y) && (LastLineHeight < LineHeight)) {
1942 LineHeight = LastLineHeight;
1948 RowInfo[RowIndex].StartIndex = Index;
1950 while (LineWidth + BltX < Image->Width && StringPtr[Index] != 0) {
1951 if (((Flags & EFI_HII_IGNORE_LINE_BREAK) == 0) &&
1965 LineWidth += (UINTN)Cell[Index].AdvanceX;
1978 if (LineBreak && (Index > 0)) {
1989 LineWidth -= (Cell[Index].AdvanceX - Cell[Index].Width - Cell[Index].OffsetX);
1994 if ((LineWidth + BltX <= Image->Width) ||
1995 ((LineWidth + BltX > Image->Width) && ((Flags & EFI_HII_OUT_FLAG_CLIP_CLEAN_X) == 0)))
2000 RowInfo[RowIndex].EndIndex = Index;
2001 RowInfo[RowIndex].LineWidth = LineWidth;
2002 RowInfo[RowIndex].LineHeight = LineHeight;
2003 RowInfo[RowIndex].BaselineOffset = BaseLineOffset;
2009 if (Index > RowInfo[RowIndex].StartIndex) {
2013 LineWidth -= (Cell[Index].Width + Cell[Index].OffsetX);
2014 LineWidth -= (Cell[Index - 1].AdvanceX - Cell[Index - 1].Width - Cell[Index - 1].OffsetX);
2015 RowInfo[RowIndex].EndIndex = Index - 1;
2016 RowInfo[RowIndex].LineWidth = LineWidth;
2017 RowInfo[RowIndex].LineHeight = LineHeight;
2018 RowInfo[RowIndex].BaselineOffset = BaseLineOffset;
2024 RowInfo[RowIndex].LineWidth = 0;
2034 if (((Flags & EFI_HII_OUT_FLAG_WRAP) == EFI_HII_OUT_FLAG_WRAP) &&
2035 ((RowInfo[RowIndex].LineWidth + BltX > Image->Width) || (StringPtr[NextIndex] != 0)) &&
2038 if ((Flags & EFI_HII_IGNORE_LINE_BREAK) == 0) {
2039 LineWidth = RowInfo[RowIndex].LineWidth;
2040 for (Index1 = RowInfo[RowIndex].EndIndex; Index1 >= RowInfo[RowIndex].StartIndex; Index1--) {
2041 if (Index1 == RowInfo[RowIndex].EndIndex) {
2042 LineWidth -= (Cell[Index1].Width + Cell[Index1].OffsetX);
2044 LineWidth -= Cell[Index1].AdvanceX;
2049 if (Index1 > RowInfo[RowIndex].StartIndex) {
2050 RowInfo[RowIndex].EndIndex = Index1 - 1;
2056 NextIndex = Index1 + 1;
2064 if (Index1 == RowInfo[RowIndex].StartIndex) {
2073 if (Index1 == RowInfo[RowIndex].StartIndex) {
2076 LineWidth -= (Cell[Index1 - 1].AdvanceX - Cell[Index1 - 1].Width - Cell[Index1 - 1].OffsetX);
2079 RowInfo[RowIndex].LineWidth = LineWidth;
2088 LineWidth = RowInfo[RowIndex].LineWidth;
2089 Index1 = RowInfo[RowIndex].EndIndex;
2090 if (LineWidth + BltX > Image->Width) {
2091 if (Index1 > RowInfo[RowIndex].StartIndex) {
2095 LineWidth -= (Cell[Index1].Width + Cell[Index1].OffsetX);
2096 LineWidth -= (Cell[Index1 - 1].AdvanceX - Cell[Index1 - 1].Width - Cell[Index1 - 1].OffsetX);
2097 RowInfo[RowIndex].EndIndex = Index1 - 1;
2098 RowInfo[RowIndex].LineWidth = LineWidth;
2104 RowInfo[RowIndex].LineWidth = 0;
2114 if (RowInfo[RowIndex].LineWidth + BltX > Image->Width) {
2115 RowInfo[RowIndex].LineWidth = Image->Width - BltX;
2123 if ((Flags & EFI_HII_DIRECT_TO_SCREEN) == EFI_HII_DIRECT_TO_SCREEN) {
2125 if (RowInfo[RowIndex].LineWidth != 0) {
2126 BltBuffer = AllocatePool (RowInfo[RowIndex].LineWidth * RowInfo[RowIndex].LineHeight *
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
2127 if (BltBuffer == NULL) {
2128 Status = EFI_OUT_OF_RESOURCES;
2135 PreInitBkgnd = Background.Blue | Background.Green << 8 | Background.Red << 16;
2136 SetMem32 (BltBuffer, RowInfo[RowIndex].LineWidth * RowInfo[RowIndex].LineHeight *
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL), PreInitBkgnd);
2140 BufferPtr = BltBuffer + BaseLine * RowInfo[RowIndex].LineWidth;
2143 for (Index1 = RowInfo[RowIndex].StartIndex; Index1 <= RowInfo[RowIndex].EndIndex; Index1++) {
2144 if ((RowInfo[RowIndex].LineWidth > 0) && (RowInfo[RowIndex].LineWidth > LineOffset)) {
2152 (UINT16)RowInfo[RowIndex].LineWidth,
2154 RowInfo[RowIndex].LineWidth - LineOffset,
2155 RowInfo[RowIndex].LineHeight,
2163 if (ColumnInfoArray != NULL) {
2164 if ( ((GlyphBuf[Index1] == NULL) && (Cell[Index1].AdvanceX == 0))
2165 || (RowInfo[RowIndex].LineWidth == 0))
2167 *ColumnInfoArray = (UINTN) ~0;
2169 *ColumnInfoArray = LineOffset + Cell[Index1].OffsetX + BltX;
2175 LineOffset += Cell[Index1].AdvanceX;
2178 if (BltBuffer != NULL) {
2179 Status = Image->Image.Screen->Blt (
2180 Image->Image.Screen,
2182 EfiBltBufferToVideo,
2187 RowInfo[RowIndex].LineWidth,
2188 RowInfo[RowIndex].LineHeight,
2191 if (EFI_ERROR (Status)) {
2192 FreePool (BltBuffer);
2196 FreePool (BltBuffer);
2202 RowBufferPtr = BufferPtr;
2206 BufferPtr = BufferPtr + BaseLine * Image->Width;
2207 for (Index1 = RowInfo[RowIndex].StartIndex; Index1 <= RowInfo[RowIndex].EndIndex; Index1++) {
2208 if ((RowInfo[RowIndex].LineWidth > 0) && (RowInfo[RowIndex].LineWidth > LineOffset)) {
2218 RowInfo[RowIndex].LineWidth - LineOffset,
2219 RowInfo[RowIndex].LineHeight,
2227 if (ColumnInfoArray != NULL) {
2228 if ( ((GlyphBuf[Index1] == NULL) && (Cell[Index1].AdvanceX == 0))
2229 || (RowInfo[RowIndex].LineWidth == 0))
2231 *ColumnInfoArray = (UINTN) ~0;
2233 *ColumnInfoArray = LineOffset + Cell[Index1].OffsetX + BltX;
2239 LineOffset += Cell[Index1].AdvanceX;
2245 if (RowIndex == 0) {
2246 BufferPtr = RowBufferPtr - BltX + LineHeight * Image->Width;
2248 BufferPtr = RowBufferPtr + LineHeight * Image->Width;
2256 BltY += RowInfo[RowIndex].LineHeight;
2272 RowInfoSize = RowIndex *
sizeof (EFI_HII_ROW_INFO);
2273 if (RowInfoArray != NULL) {
2274 if (RowInfoSize > 0) {
2275 *RowInfoArray = AllocateZeroPool (RowInfoSize);
2276 if (*RowInfoArray == NULL) {
2277 Status = EFI_OUT_OF_RESOURCES;
2281 CopyMem (*RowInfoArray, RowInfo, RowInfoSize);
2283 *RowInfoArray = NULL;
2287 if (RowInfoArraySize != NULL) {
2288 *RowInfoArraySize = RowIndex;
2291 Status = EFI_SUCCESS;
2295 for (Index = 0; Index < StrLength; Index++) {
2296 if (GlyphBuf[Index] != NULL) {
2297 FreePool (GlyphBuf[Index]);
2301 if (StringIn != NULL) {
2302 FreePool (StringIn);
2305 if (StringIn2 != NULL) {
2306 FreePool (StringIn2);
2309 if (StringInfoOut != NULL) {
2310 FreePool (StringInfoOut);
2313 if (RowInfo != NULL) {
2317 if (SystemDefault != NULL) {
2318 FreePool (SystemDefault);
2321 if (GlyphBuf != NULL) {
2322 FreePool (GlyphBuf);
2329 if (Attributes != NULL) {
2330 FreePool (Attributes);
2400 IN CONST EFI_HII_FONT_PROTOCOL *This,
2401 IN EFI_HII_OUT_FLAGS Flags,
2402 IN EFI_HII_HANDLE PackageList,
2403 IN EFI_STRING_ID StringId,
2404 IN CONST CHAR8 *Language,
2405 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL,
2406 IN OUT EFI_IMAGE_OUTPUT **Blt,
2409 OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL,
2410 OUT UINTN *RowInfoArraySize OPTIONAL,
2411 OUT UINTN *ColumnInfoArray OPTIONAL
2416 EFI_HII_STRING_PROTOCOL *HiiString;
2421 EFI_FONT_INFO *StringFontInfo;
2422 EFI_FONT_DISPLAY_INFO *NewStringInfo;
2423 CHAR8 TempSupportedLanguages;
2424 CHAR8 *SupportedLanguages;
2425 UINTN SupportedLanguagesSize;
2426 CHAR8 *CurrentLanguage;
2427 CHAR8 *BestLanguage;
2429 if ((This == NULL) || (PackageList == NULL) || (Blt == NULL) || (PackageList == NULL)) {
2430 return EFI_INVALID_PARAMETER;
2434 return EFI_NOT_FOUND;
2440 SupportedLanguages = NULL;
2441 CurrentLanguage = NULL;
2442 BestLanguage = NULL;
2444 StringFontInfo = NULL;
2445 NewStringInfo = NULL;
2456 SupportedLanguagesSize = 0;
2457 Status = HiiString->GetLanguages (
2460 &TempSupportedLanguages,
2461 &SupportedLanguagesSize
2463 if (Status != EFI_BUFFER_TOO_SMALL) {
2467 SupportedLanguages = AllocatePool (SupportedLanguagesSize);
2468 if (SupportedLanguages == NULL) {
2469 return EFI_OUT_OF_RESOURCES;
2472 Status = HiiString->GetLanguages (
2476 &SupportedLanguagesSize
2478 if (EFI_ERROR (Status)) {
2482 if (Language == NULL) {
2486 GetEfiGlobalVariable2 (L
"PlatformLang", (VOID **)&CurrentLanguage, NULL);
2487 BestLanguage = GetBestLanguage (
2491 (CurrentLanguage == NULL) ? CurrentLanguage :
"",
2492 (CHAR8 *)PcdGetPtr (PcdUefiVariableDefaultPlatformLang),
2495 if (BestLanguage == NULL) {
2496 Status = EFI_NOT_FOUND;
2501 String = (EFI_STRING)AllocateZeroPool (StringSize);
2502 if (String == NULL) {
2503 Status = EFI_OUT_OF_RESOURCES;
2507 Status = HiiString->GetString (
2516 if (Status == EFI_BUFFER_TOO_SMALL) {
2518 String = (EFI_STRING)AllocateZeroPool (StringSize);
2519 if (String == NULL) {
2520 Status = EFI_OUT_OF_RESOURCES;
2524 Status = HiiString->GetString (
2535 if (EFI_ERROR (Status)) {
2544 if ((StringFontInfo != NULL) &&
IsSystemFontInfo (Private, (EFI_FONT_DISPLAY_INFO *)StringInfo, NULL, NULL)) {
2545 NameSize = StrSize (StringFontInfo->FontName);
2546 FontLen =
sizeof (EFI_FONT_DISPLAY_INFO) -
sizeof (CHAR16) + NameSize;
2547 NewStringInfo = AllocateZeroPool (FontLen);
2548 if (NewStringInfo == NULL) {
2549 Status = EFI_OUT_OF_RESOURCES;
2553 NewStringInfo->FontInfoMask = EFI_FONT_INFO_SYS_FORE_COLOR | EFI_FONT_INFO_SYS_BACK_COLOR;
2554 NewStringInfo->FontInfo.FontStyle = StringFontInfo->FontStyle;
2555 NewStringInfo->FontInfo.FontSize = StringFontInfo->FontSize;
2556 StrCpyS (NewStringInfo->FontInfo.FontName, NameSize / sizeof (CHAR16), StringFontInfo->FontName);
2587 if (SupportedLanguages != NULL) {
2588 FreePool (SupportedLanguages);
2591 if (CurrentLanguage != NULL) {
2592 FreePool (CurrentLanguage);
2595 if (BestLanguage != NULL) {
2596 FreePool (BestLanguage);
2599 if (String != NULL) {
2603 if (StringFontInfo != NULL) {
2604 FreePool (StringFontInfo);
2607 if (NewStringInfo != NULL) {
2608 FreePool (NewStringInfo);
2639 IN CONST EFI_HII_FONT_PROTOCOL *This,
2641 IN CONST EFI_FONT_DISPLAY_INFO *StringInfo,
2642 OUT EFI_IMAGE_OUTPUT **Blt,
2643 OUT UINTN *Baseline OPTIONAL
2648 EFI_IMAGE_OUTPUT *Image;
2650 EFI_FONT_DISPLAY_INFO *SystemDefault;
2651 EFI_FONT_DISPLAY_INFO *StringInfoOut;
2653 EFI_FONT_HANDLE FontHandle;
2655 EFI_HII_GLYPH_INFO Cell;
2656 EFI_FONT_INFO *FontInfo;
2658 EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground;
2659 EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background;
2660 EFI_GRAPHICS_OUTPUT_BLT_PIXEL *BltBuffer;
2663 if ((This == NULL) || (Blt == NULL) || (*Blt != NULL)) {
2664 return EFI_INVALID_PARAMETER;
2671 SystemDefault = NULL;
2675 StringInfoOut = NULL;
2678 ZeroMem (&Foreground,
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
2679 ZeroMem (&Background,
sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
2681 Default =
IsSystemFontInfo (Private, (EFI_FONT_DISPLAY_INFO *)StringInfo, &SystemDefault, NULL);
2688 String = (EFI_STRING)AllocateZeroPool (
sizeof (CHAR16) * 2);
2689 if (String == NULL) {
2690 Status = EFI_OUT_OF_RESOURCES;
2697 Status =
HiiGetFontInfo (This, &FontHandle, StringInfo, &StringInfoOut, String);
2698 if (EFI_ERROR (Status)) {
2702 ASSERT (StringInfoOut != NULL);
2703 FontInfo = &StringInfoOut->FontInfo;
2704 Foreground = StringInfoOut->ForegroundColor;
2705 Background = StringInfoOut->BackgroundColor;
2707 ASSERT (SystemDefault != NULL);
2708 Foreground = SystemDefault->ForegroundColor;
2709 Background = SystemDefault->BackgroundColor;
2712 Status =
GetGlyphBuffer (Private, Char, FontInfo, &GlyphBuffer, &Cell, &Attributes);
2713 if (EFI_ERROR (Status)) {
2717 Image = (EFI_IMAGE_OUTPUT *)AllocateZeroPool (
sizeof (EFI_IMAGE_OUTPUT));
2718 if (Image == NULL) {
2719 Status = EFI_OUT_OF_RESOURCES;
2723 Image->Width = Cell.Width;
2724 Image->Height = Cell.Height;
2726 if (Image->Width * Image->Height > 0) {
2727 Image->Image.Bitmap = AllocateZeroPool (Image->Width * Image->Height * sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL));
2728 if (Image->Image.Bitmap == NULL) {
2730 Status = EFI_OUT_OF_RESOURCES;
2737 BaseLine = (UINT16)(Cell.Height + Cell.OffsetY);
2741 BltBuffer = Image->Image.Bitmap + (Cell.Height + Cell.OffsetY) * Image->Width - Cell.OffsetX;
2748 Cell.Width + Cell.OffsetX,
2749 BaseLine - Cell.OffsetY,
2758 if (Baseline != NULL) {
2759 *Baseline = Cell.OffsetY;
2762 Status = EFI_SUCCESS;
2766 if (Status == EFI_NOT_FOUND) {
2772 if (!EFI_ERROR (Status)) {
2773 Status = EFI_WARN_UNKNOWN_GLYPH;
2776 Status = EFI_WARN_UNKNOWN_GLYPH;
2780 if (SystemDefault != NULL) {
2781 FreePool (SystemDefault);
2784 if (StringInfoOut != NULL) {
2785 FreePool (StringInfoOut);
2788 if (String != NULL) {
2792 if (GlyphBuffer != NULL) {
2793 FreePool (GlyphBuffer);
2833 IN CONST EFI_HII_FONT_PROTOCOL *This,
2834 IN OUT EFI_FONT_HANDLE *FontHandle,
2835 IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn, OPTIONAL
2836 OUT EFI_FONT_DISPLAY_INFO **StringInfoOut,
2837 IN CONST EFI_STRING String OPTIONAL
2842 EFI_FONT_DISPLAY_INFO *SystemDefault;
2843 EFI_FONT_DISPLAY_INFO InfoOut;
2844 UINTN StringInfoOutLen;
2845 EFI_FONT_INFO *FontInfo;
2847 EFI_STRING StringIn;
2848 EFI_FONT_HANDLE LocalFontHandle;
2851 return EFI_INVALID_PARAMETER;
2854 StringInfoOutLen = 0;
2856 SystemDefault = NULL;
2857 LocalFontHandle = NULL;
2858 if (FontHandle != NULL) {
2859 LocalFontHandle = *FontHandle;
2868 LocalFontHandle = NULL;
2869 Status = EFI_NOT_FOUND;
2877 if (
IsSystemFontInfo (Private, (EFI_FONT_DISPLAY_INFO *)StringInfoIn, &SystemDefault, &StringInfoOutLen)) {
2882 if (LocalFontHandle == NULL) {
2883 if (StringInfoOut != NULL) {
2884 *StringInfoOut = AllocateCopyPool (StringInfoOutLen, SystemDefault);
2885 if (*StringInfoOut == NULL) {
2886 Status = EFI_OUT_OF_RESOURCES;
2887 LocalFontHandle = NULL;
2893 Status = EFI_SUCCESS;
2896 LocalFontHandle = NULL;
2897 Status = EFI_NOT_FOUND;
2905 ASSERT (StringInfoIn != NULL);
2909 if (((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_ANY_FONT)) ==
2910 (EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_ANY_FONT)) ||
2911 ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_ANY_SIZE)) ==
2912 (EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_ANY_SIZE)) ||
2913 ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_STYLE | EFI_FONT_INFO_ANY_STYLE)) ==
2914 (EFI_FONT_INFO_SYS_STYLE | EFI_FONT_INFO_ANY_STYLE)) ||
2915 ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) ==
2916 (EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) ||
2917 ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESTYLE | EFI_FONT_INFO_ANY_STYLE)) ==
2918 (EFI_FONT_INFO_RESTYLE | EFI_FONT_INFO_ANY_STYLE)))
2920 return EFI_INVALID_PARAMETER;
2927 CopyMem (&InfoOut, (EFI_FONT_DISPLAY_INFO *)StringInfoIn,
sizeof (EFI_FONT_DISPLAY_INFO));
2929 if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_FONT) == EFI_FONT_INFO_SYS_FONT) {
2930 Status =
SaveFontName (SystemDefault->FontInfo.FontName, &FontInfo);
2932 Status =
SaveFontName (((EFI_FONT_DISPLAY_INFO *)StringInfoIn)->FontInfo.FontName, &FontInfo);
2935 if (EFI_ERROR (Status)) {
2939 if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_SIZE) == EFI_FONT_INFO_SYS_SIZE) {
2940 InfoOut.FontInfo.FontSize = SystemDefault->FontInfo.FontSize;
2943 if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_STYLE) == EFI_FONT_INFO_SYS_STYLE) {
2944 InfoOut.FontInfo.FontStyle = SystemDefault->FontInfo.FontStyle;
2947 if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_FORE_COLOR) == EFI_FONT_INFO_SYS_FORE_COLOR) {
2948 InfoOut.ForegroundColor = SystemDefault->ForegroundColor;
2951 if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_BACK_COLOR) == EFI_FONT_INFO_SYS_BACK_COLOR) {
2952 InfoOut.BackgroundColor = SystemDefault->BackgroundColor;
2955 ASSERT (FontInfo != NULL);
2956 FontInfo->FontSize = InfoOut.FontInfo.FontSize;
2957 FontInfo->FontStyle = InfoOut.FontInfo.FontStyle;
2959 if (
IsFontInfoExisted (Private, FontInfo, &InfoOut.FontInfoMask, LocalFontHandle, &GlobalFont)) {
2963 if (String != NULL) {
2965 while (*StringIn != 0) {
2967 if (EFI_ERROR (Status)) {
2968 LocalFontHandle = NULL;
2979 if (StringInfoOut != NULL) {
2980 StringInfoOutLen =
sizeof (EFI_FONT_DISPLAY_INFO) -
sizeof (EFI_FONT_INFO) + GlobalFont->
FontInfoSize;
2981 *StringInfoOut = (EFI_FONT_DISPLAY_INFO *)AllocateZeroPool (StringInfoOutLen);
2982 if (*StringInfoOut == NULL) {
2983 Status = EFI_OUT_OF_RESOURCES;
2984 LocalFontHandle = NULL;
2988 CopyMem (*StringInfoOut, &InfoOut,
sizeof (EFI_FONT_DISPLAY_INFO));
2992 LocalFontHandle = GlobalFont->
Entry.ForwardLink;
2993 Status = EFI_SUCCESS;
2997 Status = EFI_NOT_FOUND;
3001 if (FontHandle != NULL) {
3002 *FontHandle = LocalFontHandle;
3005 if (SystemDefault != NULL) {
3006 FreePool (SystemDefault);
3009 if (FontInfo != NULL) {
3010 FreePool (FontInfo);