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 },
58 ASSERT (Cell !=
NULL && GlyphInfoList !=
NULL);
61 if (GlyphInfo ==
NULL) {
62 return EFI_OUT_OF_RESOURCES;
69 GlyphInfo->Signature = HII_GLYPH_INFO_SIGNATURE;
70 GlyphInfo->CharId = CharValue;
71 if (Cell->AdvanceX == 0) {
72 Cell->AdvanceX = Cell->Width;
107 ASSERT (Cell !=
NULL && GlyphInfoList !=
NULL);
119 for (Link = GlyphInfoList->BackLink; Link != GlyphInfoList; Link = Link->BackLink) {
121 if (GlyphInfo->CharId <= CharValue) {
127 return EFI_NOT_FOUND;
155 OUT UINT8 **GlyphBuffer,
157 OUT UINT8 *Attributes OPTIONAL
172 if ((GlyphBuffer ==
NULL) || (Cell ==
NULL)) {
173 return EFI_INVALID_PARAMETER;
176 if ((Private ==
NULL) || (Private->Signature != HII_DATABASE_PRIVATE_DATA_SIGNATURE)) {
177 return EFI_INVALID_PARAMETER;
188 if (StringInfo !=
NULL) {
190 return EFI_INVALID_PARAMETER;
193 if (Attributes !=
NULL) {
194 *Attributes = PROPORTIONAL_GLYPH;
201 for (Link = Private->DatabaseList.ForwardLink; Link != &Private->DatabaseList; Link = Link->ForwardLink) {
203 for (Link1 = Node->PackageList->SimpleFontPkgHdr.ForwardLink;
204 Link1 != &Node->PackageList->SimpleFontPkgHdr;
205 Link1 = Link1->ForwardLink
212 NarrowPtr = (
EFI_NARROW_GLYPH *)((UINT8 *)(SimpleFont->SimpleFontPkgHdr) + HeaderSize);
213 for (Index = 0; Index < SimpleFont->SimpleFontPkgHdr->NumberOfNarrowGlyphs; Index++) {
217 if (*GlyphBuffer ==
NULL) {
218 return EFI_OUT_OF_RESOURCES;
221 Cell->Width = EFI_GLYPH_WIDTH;
222 Cell->Height = EFI_GLYPH_HEIGHT;
223 Cell->AdvanceX = Cell->Width;
225 if (Attributes !=
NULL) {
226 *Attributes = (UINT8)(Narrow.
Attributes | NARROW_GLYPH);
236 WidePtr = (
EFI_WIDE_GLYPH *)(NarrowPtr + SimpleFont->SimpleFontPkgHdr->NumberOfNarrowGlyphs);
237 for (Index = 0; Index < SimpleFont->SimpleFontPkgHdr->NumberOfWideGlyphs; Index++) {
241 if (*GlyphBuffer ==
NULL) {
242 return EFI_OUT_OF_RESOURCES;
245 Cell->Width = EFI_GLYPH_WIDTH * 2;
246 Cell->Height = EFI_GLYPH_HEIGHT;
247 Cell->AdvanceX = Cell->Width;
249 CopyMem (*GlyphBuffer + EFI_GLYPH_HEIGHT, Wide.
GlyphCol2, EFI_GLYPH_HEIGHT);
250 if (Attributes !=
NULL) {
251 *Attributes = (UINT8)(Wide.
Attributes | EFI_GLYPH_WIDE);
261 return EFI_NOT_FOUND;
287 IN UINT8 *GlyphBuffer,
290 IN UINT16 ImageWidth,
293 IN BOOLEAN Transparent,
303 ASSERT (GlyphBuffer !=
NULL && Origin !=
NULL && *Origin !=
NULL);
305 Height = EFI_GLYPH_HEIGHT;
306 Width = EFI_GLYPH_WIDTH;
311 Buffer = *Origin - EFI_GLYPH_HEIGHT * ImageWidth;
316 if (RowHeight < Height) {
317 Height = (UINT8)RowHeight;
320 if (RowWidth < Width) {
321 Width = (UINT8)RowWidth;
324 for (Ypos = 0; Ypos < Height; Ypos++) {
325 for (Xpos = 0; Xpos < Width; Xpos++) {
326 if ((GlyphBuffer[Ypos] & (1 << (EFI_GLYPH_WIDTH - Xpos - 1))) != 0) {
327 Buffer[Ypos * ImageWidth + Xpos] = Foreground;
330 Buffer[Ypos * ImageWidth + Xpos] = Background;
336 *Origin = *Origin + EFI_GLYPH_WIDTH;
366 IN UINT8 *GlyphBuffer,
369 IN UINT16 ImageWidth,
373 IN BOOLEAN Transparent,
387 ASSERT (Origin !=
NULL && *Origin !=
NULL && Cell !=
NULL);
392 if (GlyphBuffer ==
NULL) {
393 *Origin = *Origin + Cell->AdvanceX;
400 BltBuffer = *Origin + Cell->OffsetX - (Cell->OffsetY + Cell->Height) * ImageWidth;
401 YposOffset = (UINT16)(BaseLine - (Cell->OffsetY + Cell->Height));
415 for (Ypos = 0; Ypos < Cell->Height && (((UINT32)Ypos + YposOffset) < RowHeight); Ypos++) {
416 OffsetY = BITMAP_LEN_1_BIT (Cell->Width, Ypos);
421 for (Xpos = 0; Xpos < Cell->Width / 8; Xpos++) {
422 Data = *(GlyphBuffer + OffsetY + Xpos);
423 for (Index = 0; Index < 8 && (((UINT32)Xpos * 8 + Index + Cell->OffsetX) < RowWidth); Index++) {
424 if ((Data & (1 << (8 - Index - 1))) != 0) {
425 BltBuffer[Ypos * ImageWidth + Xpos * 8 + Index] = Foreground;
428 BltBuffer[Ypos * ImageWidth + Xpos * 8 + Index] = Background;
434 if (Cell->Width % 8 != 0) {
438 Data = *(GlyphBuffer + OffsetY + Xpos);
439 for (Index = 0; Index < Cell->Width % 8 && (((UINT32)Xpos * 8 + Index + Cell->OffsetX) < RowWidth); Index++) {
440 if ((Data & (1 << (8 - Index - 1))) != 0) {
441 BltBuffer[Ypos * ImageWidth + Xpos * 8 + Index] = Foreground;
444 BltBuffer[Ypos * ImageWidth + Xpos * 8 + Index] = Background;
451 *Origin = *Origin + Cell->AdvanceX;
482 IN UINT8 *GlyphBuffer,
485 IN UINT16 ImageWidth,
489 IN BOOLEAN Transparent,
497 ASSERT (Origin !=
NULL && *Origin !=
NULL && Cell !=
NULL);
506 Buffer -= Cell->AdvanceX;
520 }
else if ((Attributes & EFI_GLYPH_WIDE) == EFI_GLYPH_WIDE) {
537 GlyphBuffer + EFI_GLYPH_HEIGHT,
546 }
else if ((Attributes & NARROW_GLYPH) == NARROW_GLYPH) {
560 }
else if ((Attributes & PROPORTIONAL_GLYPH) == PROPORTIONAL_GLYPH) {
607 OUT UINT8 **GlyphBuffer OPTIONAL,
612 if ((BufferIn ==
NULL) || (InputCell ==
NULL)) {
613 return EFI_INVALID_PARAMETER;
620 if ((GlyphBuffer !=
NULL) && (BufferLen > 0)) {
622 if (*GlyphBuffer ==
NULL) {
623 return EFI_OUT_OF_RESOURCES;
626 CopyMem (*GlyphBuffer, BufferIn, BufferLen);
629 if (GlyphBufferLen !=
NULL) {
630 *GlyphBufferLen = BufferLen;
661 OUT UINT8 **GlyphBuffer OPTIONAL,
679 ASSERT (FontPackage !=
NULL);
680 ASSERT (FontPackage->Signature == HII_FONT_PACKAGE_SIGNATURE);
684 if (CharValue == (CHAR16)(-1)) {
691 &FontPackage->GlyphInfoList,
694 if (EFI_ERROR (Status)) {
700 (UINT8 *)FontPackage->FontPkgHdr + 3 * sizeof (UINT32),
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,
722 if (EFI_ERROR (Status)) {
731 if (BaseLine < LocalCell.Height + LocalCell.OffsetY) {
732 BaseLine = (UINT16)(LocalCell.Height + LocalCell.OffsetY);
735 if (MinOffsetY > LocalCell.OffsetY) {
736 MinOffsetY = LocalCell.OffsetY;
743 case EFI_HII_GIBT_DUPLICATE:
744 if (CharCurrent == CharValue) {
747 BlockPtr = FontPackage->GlyphBlock;
755 case EFI_HII_GIBT_EXT1:
758 case EFI_HII_GIBT_EXT2:
764 BlockPtr += Length16;
766 case EFI_HII_GIBT_EXT4:
772 BlockPtr += Length32;
775 case EFI_HII_GIBT_GLYPH:
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;
791 BufferLen = BITMAP_LEN_1_BIT (LocalCell.Width, LocalCell.Height);
792 if (CharCurrent == CharValue) {
807 case EFI_HII_GIBT_GLYPHS:
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;
824 BufferLen = BITMAP_LEN_1_BIT (Glyphs.Cell.Width, Glyphs.Cell.Height);
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;
859 BufferLen = BITMAP_LEN_1_BIT (DefaultCell.Width, DefaultCell.Height);
861 if (CharCurrent == CharValue) {
876 case EFI_HII_GIBT_GLYPHS_DEFAULT:
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;
893 BufferLen = BITMAP_LEN_1_BIT (DefaultCell.Width, DefaultCell.Height);
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))));
917 case EFI_HII_GIBT_SKIP2:
919 CharCurrent = (UINT16)(CharCurrent + Length16);
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;
957 IN EFI_STRING FontName,
964 ASSERT (FontName !=
NULL && FontInfo !=
NULL);
967 FontInfoLen =
sizeof (
EFI_FONT_INFO) -
sizeof (CHAR16) + NameSize;
969 if (*FontInfo ==
NULL) {
970 return EFI_OUT_OF_RESOURCES;
973 StrCpyS ((*FontInfo)->FontName, NameSize / sizeof (CHAR16), FontName);
1003 if ((Private ==
NULL) || (Private->Signature != HII_DATABASE_PRIVATE_DATA_SIGNATURE)) {
1004 return EFI_INVALID_PARAMETER;
1007 if (FontInfo ==
NULL) {
1008 return EFI_INVALID_PARAMETER;
1014 NameSize =
StrSize (L
"sysdefault");
1018 return EFI_OUT_OF_RESOURCES;
1021 Info->ForegroundColor = mHiiEfiColors[Private->Attribute & 0x0f];
1022 ASSERT ((Private->Attribute >> 4) < 8);
1023 Info->BackgroundColor = mHiiEfiColors[Private->Attribute >> 4];
1024 Info->FontInfoMask = EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_SYS_STYLE;
1025 Info->FontInfo.FontStyle = 0;
1026 Info->FontInfo.
FontSize = EFI_GLYPH_HEIGHT;
1027 StrCpyS (Info->FontInfo.FontName, NameSize / sizeof (CHAR16), L
"sysdefault");
1030 if (FontInfoSize !=
NULL) {
1031 *FontInfoSize = InfoSize;
1068 ASSERT (Private !=
NULL && Private->Signature == HII_DATABASE_PRIVATE_DATA_SIGNATURE);
1070 if ((StringInfo ==
NULL) && (SystemInfo ==
NULL)) {
1074 SystemDefault =
NULL;
1077 Status =
GetSystemFont (Private, &SystemDefault, &DefaultLen);
1079 ASSERT ((SystemDefault !=
NULL) && (DefaultLen != 0));
1084 if (SystemInfo !=
NULL) {
1085 *SystemInfo = SystemDefault;
1088 if (SystemInfoLen !=
NULL) {
1089 *SystemInfoLen = DefaultLen;
1092 if (StringInfo ==
NULL) {
1100 if ((StringInfo->FontInfoMask & (EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_ANY_FONT)) == 0) {
1101 if (
StrCmp (StringInfo->FontInfo.FontName, SystemDefault->FontInfo.FontName) != 0) {
1106 if ((StringInfo->FontInfoMask & (EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_ANY_SIZE)) == 0) {
1107 if (StringInfo->FontInfo.FontSize != SystemDefault->FontInfo.
FontSize) {
1112 if ((StringInfo->FontInfoMask & (EFI_FONT_INFO_SYS_STYLE | EFI_FONT_INFO_ANY_STYLE)) == 0) {
1113 if (StringInfo->FontInfo.FontStyle != SystemDefault->FontInfo.FontStyle) {
1118 if ((StringInfo->FontInfoMask & EFI_FONT_INFO_SYS_FORE_COLOR) == 0) {
1120 &StringInfo->ForegroundColor,
1121 &SystemDefault->ForegroundColor,
1129 if ((StringInfo->FontInfoMask & EFI_FONT_INFO_SYS_BACK_COLOR) == 0) {
1131 &StringInfo->BackgroundColor,
1132 &SystemDefault->BackgroundColor,
1143 if (SystemInfo ==
NULL) {
1144 if (SystemDefault !=
NULL) {
1179 IN EFI_FONT_HANDLE FontHandle OPTIONAL,
1189 BOOLEAN VagueMatched1;
1190 BOOLEAN VagueMatched2;
1192 ASSERT (Private !=
NULL && Private->Signature == HII_DATABASE_PRIVATE_DATA_SIGNATURE);
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;
1224 for ( ; Link != &Private->FontInfoList; Link = Link->ForwardLink) {
1226 if (FontInfoMask ==
NULL) {
1227 if (
CompareMem (GlobalFont->FontInfo, FontInfo, GlobalFont->FontInfoSize) == 0) {
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:
1331 GlobalFont->FontInfo->FontName,
1335 (GlobalFont->FontInfo->
FontSize == FontInfo->FontSize))
1341 case EFI_FONT_INFO_ANY_STYLE | EFI_FONT_INFO_ANY_SIZE:
1343 GlobalFont->FontInfo->FontName,
1352 case EFI_FONT_INFO_ANY_STYLE | EFI_FONT_INFO_RESIZE:
1354 GlobalFont->FontInfo->FontName,
1359 if (GlobalFont->FontInfo->
FontSize == FontInfo->FontSize) {
1362 VagueMatched1 =
TRUE;
1363 GlobalFontBackup1 = GlobalFont;
1368 case EFI_FONT_INFO_ANY_SIZE:
1370 GlobalFont->FontInfo->FontName,
1374 (GlobalFont->FontInfo->FontStyle == FontInfo->FontStyle))
1380 case EFI_FONT_INFO_ANY_SIZE | EFI_FONT_INFO_RESTYLE:
1382 GlobalFont->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:
1398 GlobalFont->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:
1415 GlobalFont->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:
1432 GlobalFont->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;
1633 OUT UINTN *RowInfoArraySize OPTIONAL,
1634 OUT UINTN *ColumnInfoArray OPTIONAL
1643 EFI_STRING StringPtr;
1644 EFI_STRING StringTmp;
1649 UINTN LastLineHeight;
1650 UINTN BaseLineOffset;
1658 EFI_FONT_HANDLE FontHandle;
1659 EFI_STRING StringIn;
1660 EFI_STRING StringIn2;
1664 BOOLEAN SysFontFlag;
1667 BOOLEAN Transparent;
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;
1721 if (Image ==
NULL) {
1722 return EFI_OUT_OF_RESOURCES;
1726 Image->Height = 600;
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);
1742 ASSERT (GlyphBuf !=
NULL);
1744 ASSERT (Cell !=
NULL);
1746 ASSERT (Attributes !=
NULL);
1752 SystemDefault =
NULL;
1760 StringInfoOut =
NULL;
1762 Private = HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS (This);
1766 ASSERT (SystemDefault !=
NULL);
1768 Height = SystemDefault->FontInfo.
FontSize;
1769 BaseLine = SystemDefault->FontInfo.
FontSize;
1770 Foreground = SystemDefault->ForegroundColor;
1771 Background = SystemDefault->BackgroundColor;
1776 ASSERT (StringInfo !=
NULL);
1778 if (Status == EFI_NOT_FOUND) {
1785 Height = SystemDefault->FontInfo.
FontSize;
1786 BaseLine = SystemDefault->FontInfo.
FontSize;
1790 FontInfo = &StringInfoOut->FontInfo;
1792 Height = GlobalFont->FontPackage->Height;
1793 BaseLine = GlobalFont->FontPackage->BaseLine;
1794 Foreground = StringInfoOut->ForegroundColor;
1795 Background = StringInfoOut->BackgroundColor;
1808 LineHeight = Height;
1809 LastLineHeight = Height;
1810 BaseLineOffset = Height - BaseLine;
1822 if ((Flags & EFI_HII_IGNORE_LINE_BREAK) == EFI_HII_IGNORE_LINE_BREAK) {
1824 if (StringIn ==
NULL) {
1825 Status = EFI_OUT_OF_RESOURCES;
1829 StringTmp = StringIn;
1830 while (*StringPtr != 0) {
1834 *StringTmp++ = *StringPtr++;
1839 StringPtr = StringIn;
1847 if (StringIn2 ==
NULL) {
1848 Status = EFI_OUT_OF_RESOURCES;
1853 StringTmp = StringIn2;
1854 StrLength =
StrLen (StringPtr);
1855 while (*StringPtr != 0 && Index < StrLength) {
1857 *StringTmp++ = *StringPtr++;
1862 Status =
GetGlyphBuffer (Private, *StringPtr, FontInfo, &GlyphBuf[Index], &Cell[Index], &Attributes[Index]);
1863 if (Status == EFI_NOT_FOUND) {
1864 if ((Flags & EFI_HII_IGNORE_IF_NO_GLYPH) == EFI_HII_IGNORE_IF_NO_GLYPH) {
1865 GlyphBuf[Index] =
NULL;
1866 ZeroMem (&Cell[Index],
sizeof (Cell[Index]));
1874 REPLACE_UNKNOWN_GLYPH,
1880 if (EFI_ERROR (Status)) {
1881 Status = EFI_INVALID_PARAMETER;
1886 if (EFI_ERROR (Status)) {
1890 *StringTmp++ = *StringPtr++;
1895 StringPtr = StringIn2;
1904 BufferPtr = Image->Image.Bitmap + Image->Width * BltY + BltX;
1905 if (Image->Height < BltY) {
1909 Status = EFI_INVALID_PARAMETER;
1913 MaxRowNum = (UINT16)((Image->Height - BltY) / Height);
1914 if ((Image->Height - BltY) % Height != 0) {
1915 LastLineHeight = (Image->Height - BltY) % Height;
1920 if (RowInfo ==
NULL) {
1921 Status = EFI_OUT_OF_RESOURCES;
1928 Transparent = (BOOLEAN)((Flags & EFI_HII_OUT_FLAG_TRANSPARENT) == EFI_HII_OUT_FLAG_TRANSPARENT ?
TRUE :
FALSE);
1930 for (RowIndex = 0, Index = 0; RowIndex < MaxRowNum && StringPtr[Index] != 0; ) {
1938 if (RowIndex == MaxRowNum - 1) {
1939 if (((Flags & EFI_HII_OUT_FLAG_CLIP_CLEAN_Y) == EFI_HII_OUT_FLAG_CLIP_CLEAN_Y) && (LastLineHeight < LineHeight)) {
1946 LineHeight = LastLineHeight;
1954 while (LineWidth + BltX < Image->Width && StringPtr[Index] != 0) {
1955 if (((Flags & EFI_HII_IGNORE_LINE_BREAK) == 0) &&
1969 LineWidth += (
UINTN)Cell[Index].AdvanceX;
1982 if (LineBreak && (Index > 0)) {
1993 LineWidth -= (Cell[Index].AdvanceX - Cell[Index].Width - Cell[Index].OffsetX);
1998 if ((LineWidth + BltX <= Image->Width) ||
1999 ((LineWidth + BltX > Image->Width) && ((Flags & EFI_HII_OUT_FLAG_CLIP_CLEAN_X) == 0)))
2004 RowInfo[RowIndex].
EndIndex = Index;
2005 RowInfo[RowIndex].
LineWidth = LineWidth;
2013 if (Index > RowInfo[RowIndex].StartIndex) {
2017 LineWidth -= (Cell[Index].Width + Cell[Index].OffsetX);
2018 LineWidth -= (Cell[Index - 1].AdvanceX - Cell[Index - 1].Width - Cell[Index - 1].OffsetX);
2019 RowInfo[RowIndex].
EndIndex = Index - 1;
2020 RowInfo[RowIndex].
LineWidth = LineWidth;
2038 if (((Flags & EFI_HII_OUT_FLAG_WRAP) == EFI_HII_OUT_FLAG_WRAP) &&
2039 ((RowInfo[RowIndex].LineWidth + BltX > Image->Width) || (StringPtr[NextIndex] != 0)) &&
2042 if ((Flags & EFI_HII_IGNORE_LINE_BREAK) == 0) {
2043 LineWidth = RowInfo[RowIndex].
LineWidth;
2044 for (Index1 = RowInfo[RowIndex].EndIndex; Index1 >= RowInfo[RowIndex].
StartIndex; Index1--) {
2045 if (Index1 == RowInfo[RowIndex].EndIndex) {
2046 LineWidth -= (Cell[Index1].Width + Cell[Index1].OffsetX);
2048 LineWidth -= Cell[Index1].AdvanceX;
2053 if (Index1 > RowInfo[RowIndex].StartIndex) {
2054 RowInfo[RowIndex].
EndIndex = Index1 - 1;
2060 NextIndex = Index1 + 1;
2068 if (Index1 == RowInfo[RowIndex].StartIndex) {
2077 if (Index1 == RowInfo[RowIndex].StartIndex) {
2080 LineWidth -= (Cell[Index1 - 1].AdvanceX - Cell[Index1 - 1].Width - Cell[Index1 - 1].OffsetX);
2083 RowInfo[RowIndex].
LineWidth = LineWidth;
2092 LineWidth = RowInfo[RowIndex].
LineWidth;
2093 Index1 = RowInfo[RowIndex].
EndIndex;
2094 if (LineWidth + BltX > Image->Width) {
2095 if (Index1 > RowInfo[RowIndex].StartIndex) {
2099 LineWidth -= (Cell[Index1].Width + Cell[Index1].OffsetX);
2100 LineWidth -= (Cell[Index1 - 1].AdvanceX - Cell[Index1 - 1].Width - Cell[Index1 - 1].OffsetX);
2101 RowInfo[RowIndex].
EndIndex = Index1 - 1;
2102 RowInfo[RowIndex].
LineWidth = LineWidth;
2118 if (RowInfo[RowIndex].LineWidth + BltX > Image->Width) {
2119 RowInfo[RowIndex].
LineWidth = Image->Width - BltX;
2127 if ((Flags & EFI_HII_DIRECT_TO_SCREEN) == EFI_HII_DIRECT_TO_SCREEN) {
2129 if (RowInfo[RowIndex].LineWidth != 0) {
2131 if (BltBuffer ==
NULL) {
2132 Status = EFI_OUT_OF_RESOURCES;
2139 PreInitBkgnd = Background.Blue | Background.Green << 8 | Background.Red << 16;
2144 BufferPtr = BltBuffer + BaseLine * RowInfo[RowIndex].
LineWidth;
2147 for (Index1 = RowInfo[RowIndex].StartIndex; Index1 <= RowInfo[RowIndex].
EndIndex; Index1++) {
2148 if ((RowInfo[RowIndex].LineWidth > 0) && (RowInfo[RowIndex].LineWidth > LineOffset)) {
2156 (UINT16)RowInfo[RowIndex].LineWidth,
2158 RowInfo[RowIndex].LineWidth - LineOffset,
2159 RowInfo[RowIndex].LineHeight,
2167 if (ColumnInfoArray !=
NULL) {
2168 if ( ((GlyphBuf[Index1] ==
NULL) && (Cell[Index1].AdvanceX == 0))
2169 || (RowInfo[RowIndex].LineWidth == 0))
2171 *ColumnInfoArray = (
UINTN) ~0;
2173 *ColumnInfoArray = LineOffset + Cell[Index1].OffsetX + BltX;
2179 LineOffset += Cell[Index1].AdvanceX;
2182 if (BltBuffer !=
NULL) {
2183 Status = Image->Image.Screen->Blt (
2184 Image->Image.Screen,
2195 if (EFI_ERROR (Status)) {
2206 RowBufferPtr = BufferPtr;
2210 BufferPtr = BufferPtr + BaseLine * Image->Width;
2211 for (Index1 = RowInfo[RowIndex].StartIndex; Index1 <= RowInfo[RowIndex].
EndIndex; Index1++) {
2212 if ((RowInfo[RowIndex].LineWidth > 0) && (RowInfo[RowIndex].LineWidth > LineOffset)) {
2222 RowInfo[RowIndex].
LineWidth - LineOffset,
2231 if (ColumnInfoArray !=
NULL) {
2232 if ( ((GlyphBuf[Index1] ==
NULL) && (Cell[Index1].AdvanceX == 0))
2233 || (RowInfo[RowIndex].LineWidth == 0))
2235 *ColumnInfoArray = (
UINTN) ~0;
2237 *ColumnInfoArray = LineOffset + Cell[Index1].OffsetX + BltX;
2243 LineOffset += Cell[Index1].AdvanceX;
2249 if (RowIndex == 0) {
2250 BufferPtr = RowBufferPtr - BltX + LineHeight * Image->Width;
2252 BufferPtr = RowBufferPtr + LineHeight * Image->Width;
2277 if (RowInfoArray !=
NULL) {
2278 if (RowInfoSize > 0) {
2280 if (*RowInfoArray ==
NULL) {
2281 Status = EFI_OUT_OF_RESOURCES;
2285 CopyMem (*RowInfoArray, RowInfo, RowInfoSize);
2287 *RowInfoArray =
NULL;
2291 if (RowInfoArraySize !=
NULL) {
2292 *RowInfoArraySize = RowIndex;
2299 for (Index = 0; Index < StrLength; Index++) {
2300 if (GlyphBuf[Index] !=
NULL) {
2305 if (StringIn !=
NULL) {
2309 if (StringIn2 !=
NULL) {
2313 if (StringInfoOut !=
NULL) {
2317 if (RowInfo !=
NULL) {
2321 if (SystemDefault !=
NULL) {
2325 if (GlyphBuf !=
NULL) {
2333 if (Attributes !=
NULL) {
2407 IN EFI_STRING_ID StringId,
2414 OUT UINTN *RowInfoArraySize OPTIONAL,
2415 OUT UINTN *ColumnInfoArray OPTIONAL
2427 CHAR8 TempSupportedLanguages;
2428 CHAR8 *SupportedLanguages;
2429 UINTN SupportedLanguagesSize;
2430 CHAR8 *CurrentLanguage;
2431 CHAR8 *BestLanguage;
2433 if ((This ==
NULL) || (PackageList ==
NULL) || (Blt ==
NULL) || (PackageList ==
NULL)) {
2434 return EFI_INVALID_PARAMETER;
2438 return EFI_NOT_FOUND;
2444 SupportedLanguages =
NULL;
2445 CurrentLanguage =
NULL;
2446 BestLanguage =
NULL;
2448 StringFontInfo =
NULL;
2449 NewStringInfo =
NULL;
2454 Private = HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS (This);
2455 HiiString = &Private->HiiString;
2460 SupportedLanguagesSize = 0;
2461 Status = HiiString->GetLanguages (
2464 &TempSupportedLanguages,
2465 &SupportedLanguagesSize
2467 if (Status != EFI_BUFFER_TOO_SMALL) {
2471 SupportedLanguages =
AllocatePool (SupportedLanguagesSize);
2472 if (SupportedLanguages ==
NULL) {
2473 return EFI_OUT_OF_RESOURCES;
2476 Status = HiiString->GetLanguages (
2480 &SupportedLanguagesSize
2482 if (EFI_ERROR (Status)) {
2486 if (Language ==
NULL) {
2495 (CurrentLanguage ==
NULL) ? CurrentLanguage :
"",
2496 (CHAR8 *)
PcdGetPtr (PcdUefiVariableDefaultPlatformLang),
2499 if (BestLanguage ==
NULL) {
2500 Status = EFI_NOT_FOUND;
2504 StringSize = MAX_STRING_LENGTH;
2506 if (String ==
NULL) {
2507 Status = EFI_OUT_OF_RESOURCES;
2511 Status = HiiString->GetString (
2520 if (Status == EFI_BUFFER_TOO_SMALL) {
2523 if (String ==
NULL) {
2524 Status = EFI_OUT_OF_RESOURCES;
2528 Status = HiiString->GetString (
2539 if (EFI_ERROR (Status)) {
2549 NameSize =
StrSize (StringFontInfo->FontName);
2552 if (NewStringInfo ==
NULL) {
2553 Status = EFI_OUT_OF_RESOURCES;
2557 NewStringInfo->FontInfoMask = EFI_FONT_INFO_SYS_FORE_COLOR | EFI_FONT_INFO_SYS_BACK_COLOR;
2558 NewStringInfo->FontInfo.FontStyle = StringFontInfo->FontStyle;
2560 StrCpyS (NewStringInfo->FontInfo.FontName, NameSize / sizeof (CHAR16), StringFontInfo->FontName);
2591 if (SupportedLanguages !=
NULL) {
2595 if (CurrentLanguage !=
NULL) {
2599 if (BestLanguage !=
NULL) {
2603 if (String !=
NULL) {
2607 if (StringFontInfo !=
NULL) {
2611 if (NewStringInfo !=
NULL) {
2657 EFI_FONT_HANDLE FontHandle;
2667 if ((This ==
NULL) || (Blt ==
NULL) || (*Blt !=
NULL)) {
2668 return EFI_INVALID_PARAMETER;
2671 Private = HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS (This);
2675 SystemDefault =
NULL;
2679 StringInfoOut =
NULL;
2693 if (String ==
NULL) {
2694 Status = EFI_OUT_OF_RESOURCES;
2701 Status =
HiiGetFontInfo (This, &FontHandle, StringInfo, &StringInfoOut, String);
2702 if (EFI_ERROR (Status)) {
2706 ASSERT (StringInfoOut !=
NULL);
2707 FontInfo = &StringInfoOut->FontInfo;
2708 Foreground = StringInfoOut->ForegroundColor;
2709 Background = StringInfoOut->BackgroundColor;
2711 ASSERT (SystemDefault !=
NULL);
2712 Foreground = SystemDefault->ForegroundColor;
2713 Background = SystemDefault->BackgroundColor;
2716 Status =
GetGlyphBuffer (Private, Char, FontInfo, &GlyphBuffer, &Cell, &Attributes);
2717 if (EFI_ERROR (Status)) {
2722 if (Image ==
NULL) {
2723 Status = EFI_OUT_OF_RESOURCES;
2727 Image->Width = Cell.Width;
2728 Image->Height = Cell.Height;
2730 if (Image->Width * Image->Height > 0) {
2732 if (Image->Image.Bitmap ==
NULL) {
2734 Status = EFI_OUT_OF_RESOURCES;
2741 BaseLine = (UINT16)(Cell.Height + Cell.OffsetY);
2745 BltBuffer = Image->Image.Bitmap + (Cell.Height + Cell.OffsetY) * Image->Width - Cell.OffsetX;
2752 Cell.Width + Cell.OffsetX,
2753 BaseLine - Cell.OffsetY,
2762 if (Baseline !=
NULL) {
2763 *Baseline = Cell.OffsetY;
2770 if (Status == EFI_NOT_FOUND) {
2774 if (Char != REPLACE_UNKNOWN_GLYPH) {
2775 Status =
HiiGetGlyph (This, REPLACE_UNKNOWN_GLYPH, StringInfo, Blt, Baseline);
2776 if (!EFI_ERROR (Status)) {
2777 Status = EFI_WARN_UNKNOWN_GLYPH;
2780 Status = EFI_WARN_UNKNOWN_GLYPH;
2784 if (SystemDefault !=
NULL) {
2788 if (StringInfoOut !=
NULL) {
2792 if (String !=
NULL) {
2796 if (GlyphBuffer !=
NULL) {
2838 IN OUT EFI_FONT_HANDLE *FontHandle,
2841 IN CONST EFI_STRING String OPTIONAL
2848 UINTN StringInfoOutLen;
2851 EFI_STRING StringIn;
2852 EFI_FONT_HANDLE LocalFontHandle;
2855 return EFI_INVALID_PARAMETER;
2858 StringInfoOutLen = 0;
2860 SystemDefault =
NULL;
2861 LocalFontHandle =
NULL;
2862 if (FontHandle !=
NULL) {
2863 LocalFontHandle = *FontHandle;
2866 Private = HII_FONT_DATABASE_PRIVATE_DATA_FROM_THIS (This);
2871 if (LocalFontHandle == &Private->FontInfoList) {
2872 LocalFontHandle =
NULL;
2873 Status = EFI_NOT_FOUND;
2886 if (LocalFontHandle ==
NULL) {
2887 if (StringInfoOut !=
NULL) {
2889 if (*StringInfoOut ==
NULL) {
2890 Status = EFI_OUT_OF_RESOURCES;
2891 LocalFontHandle =
NULL;
2896 LocalFontHandle = Private->FontInfoList.ForwardLink;
2900 LocalFontHandle =
NULL;
2901 Status = EFI_NOT_FOUND;
2909 ASSERT (StringInfoIn !=
NULL);
2913 if (((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_ANY_FONT)) ==
2914 (EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_ANY_FONT)) ||
2915 ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_ANY_SIZE)) ==
2916 (EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_ANY_SIZE)) ||
2917 ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_STYLE | EFI_FONT_INFO_ANY_STYLE)) ==
2918 (EFI_FONT_INFO_SYS_STYLE | EFI_FONT_INFO_ANY_STYLE)) ||
2919 ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) ==
2920 (EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) ||
2921 ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESTYLE | EFI_FONT_INFO_ANY_STYLE)) ==
2922 (EFI_FONT_INFO_RESTYLE | EFI_FONT_INFO_ANY_STYLE)))
2924 return EFI_INVALID_PARAMETER;
2933 if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_FONT) == EFI_FONT_INFO_SYS_FONT) {
2934 Status =
SaveFontName (SystemDefault->FontInfo.FontName, &FontInfo);
2939 if (EFI_ERROR (Status)) {
2943 if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_SIZE) == EFI_FONT_INFO_SYS_SIZE) {
2947 if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_STYLE) == EFI_FONT_INFO_SYS_STYLE) {
2948 InfoOut.FontInfo.FontStyle = SystemDefault->FontInfo.FontStyle;
2951 if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_FORE_COLOR) == EFI_FONT_INFO_SYS_FORE_COLOR) {
2952 InfoOut.ForegroundColor = SystemDefault->ForegroundColor;
2955 if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_BACK_COLOR) == EFI_FONT_INFO_SYS_BACK_COLOR) {
2956 InfoOut.BackgroundColor = SystemDefault->BackgroundColor;
2959 ASSERT (FontInfo !=
NULL);
2961 FontInfo->FontStyle = InfoOut.FontInfo.FontStyle;
2963 if (
IsFontInfoExisted (Private, FontInfo, &InfoOut.FontInfoMask, LocalFontHandle, &GlobalFont)) {
2967 if (String !=
NULL) {
2969 while (*StringIn != 0) {
2971 if (EFI_ERROR (Status)) {
2972 LocalFontHandle =
NULL;
2983 if (StringInfoOut !=
NULL) {
2986 if (*StringInfoOut ==
NULL) {
2987 Status = EFI_OUT_OF_RESOURCES;
2988 LocalFontHandle =
NULL;
2993 CopyMem (&(*StringInfoOut)->FontInfo, GlobalFont->FontInfo, GlobalFont->FontInfoSize);
2996 LocalFontHandle = GlobalFont->Entry.ForwardLink;
3001 Status = EFI_NOT_FOUND;
3005 if (FontHandle !=
NULL) {
3006 *FontHandle = LocalFontHandle;
3009 if (SystemDefault !=
NULL) {
3013 if (FontInfo !=
NULL) {
UINTN EFIAPI StrSize(IN CONST CHAR16 *String)
RETURN_STATUS EFIAPI StrCpyS(OUT CHAR16 *Destination, IN UINTN DestMax, IN CONST CHAR16 *Source)
INTN EFIAPI StrCmp(IN CONST CHAR16 *FirstString, IN CONST CHAR16 *SecondString)
UINTN EFIAPI StrLen(IN CONST CHAR16 *String)
LIST_ENTRY *EFIAPI InsertTailList(IN OUT LIST_ENTRY *ListHead, IN OUT LIST_ENTRY *Entry)
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI CopyMem(OUT VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID *EFIAPI SetMem32(OUT VOID *Buffer, IN UINTN Length, IN UINT32 Value)
VOID *EFIAPI ZeroMem(OUT VOID *Buffer, IN UINTN Length)
BOOLEAN IsHiiHandleValid(EFI_HII_HANDLE Handle)
VOID *EFIAPI AllocateZeroPool(IN UINTN AllocationSize)
VOID EFIAPI FreePool(IN VOID *Buffer)
VOID *EFIAPI AllocateCopyPool(IN UINTN AllocationSize, IN CONST VOID *Buffer)
EFI_STATUS WriteOutputParam(IN UINT8 *BufferIn, IN UINTN BufferLen, IN EFI_HII_GLYPH_INFO *InputCell, OUT UINT8 **GlyphBuffer OPTIONAL, OUT EFI_HII_GLYPH_INFO *Cell OPTIONAL, OUT UINTN *GlyphBufferLen OPTIONAL)
EFI_STATUS EFIAPI HiiGetGlyph(IN CONST EFI_HII_FONT_PROTOCOL *This, IN CHAR16 Char, IN CONST EFI_FONT_DISPLAY_INFO *StringInfo, OUT EFI_IMAGE_OUTPUT **Blt, OUT UINTN *Baseline OPTIONAL)
INT8 IsLineBreak(IN CHAR16 Char)
VOID GlyphToBlt(IN UINT8 *GlyphBuffer, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background, IN UINT16 ImageWidth, IN UINT16 BaseLine, IN UINTN RowWidth, IN UINTN RowHeight, IN BOOLEAN Transparent, IN CONST EFI_HII_GLYPH_INFO *Cell, IN UINT8 Attributes, IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **Origin)
EFI_STATUS GetSystemFont(IN HII_DATABASE_PRIVATE_DATA *Private, OUT EFI_FONT_DISPLAY_INFO **FontInfo, OUT UINTN *FontInfoSize OPTIONAL)
EFI_STATUS GetCell(IN CHAR16 CharValue, IN LIST_ENTRY *GlyphInfoList, OUT EFI_HII_GLYPH_INFO *Cell)
VOID NarrowGlyphToBlt(IN UINT8 *GlyphBuffer, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background, IN UINT16 ImageWidth, IN UINTN RowWidth, IN UINTN RowHeight, IN BOOLEAN Transparent, IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **Origin)
VOID GlyphToImage(IN UINT8 *GlyphBuffer, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground, IN EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background, IN UINT16 ImageWidth, IN UINT16 BaseLine, IN UINTN RowWidth, IN UINTN RowHeight, IN BOOLEAN Transparent, IN CONST EFI_HII_GLYPH_INFO *Cell, IN UINT8 Attributes, IN OUT EFI_GRAPHICS_OUTPUT_BLT_PIXEL **Origin)
EFI_STATUS EFIAPI HiiStringToImage(IN CONST EFI_HII_FONT_PROTOCOL *This, IN EFI_HII_OUT_FLAGS Flags, IN CONST EFI_STRING String, IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL, IN OUT EFI_IMAGE_OUTPUT **Blt, IN UINTN BltX, IN UINTN BltY, OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL, OUT UINTN *RowInfoArraySize OPTIONAL, OUT UINTN *ColumnInfoArray OPTIONAL)
EFI_STATUS GetGlyphBuffer(IN HII_DATABASE_PRIVATE_DATA *Private, IN CHAR16 Char, IN EFI_FONT_INFO *StringInfo, OUT UINT8 **GlyphBuffer, OUT EFI_HII_GLYPH_INFO *Cell, OUT UINT8 *Attributes OPTIONAL)
EFI_STATUS NewCell(IN CHAR16 CharValue, IN LIST_ENTRY *GlyphInfoList, IN EFI_HII_GLYPH_INFO *Cell)
EFI_STATUS FindGlyphBlock(IN HII_FONT_PACKAGE_INSTANCE *FontPackage, IN CHAR16 CharValue, OUT UINT8 **GlyphBuffer OPTIONAL, OUT EFI_HII_GLYPH_INFO *Cell OPTIONAL, OUT UINTN *GlyphBufferLen OPTIONAL)
EFI_STATUS SaveFontName(IN EFI_STRING FontName, OUT EFI_FONT_INFO **FontInfo)
EFI_STATUS EFIAPI HiiStringIdToImage(IN CONST EFI_HII_FONT_PROTOCOL *This, IN EFI_HII_OUT_FLAGS Flags, IN EFI_HII_HANDLE PackageList, IN EFI_STRING_ID StringId, IN CONST CHAR8 *Language, IN CONST EFI_FONT_DISPLAY_INFO *StringInfo OPTIONAL, IN OUT EFI_IMAGE_OUTPUT **Blt, IN UINTN BltX, IN UINTN BltY, OUT EFI_HII_ROW_INFO **RowInfoArray OPTIONAL, OUT UINTN *RowInfoArraySize OPTIONAL, OUT UINTN *ColumnInfoArray OPTIONAL)
EFI_STATUS EFIAPI HiiGetFontInfo(IN CONST EFI_HII_FONT_PROTOCOL *This, IN OUT EFI_FONT_HANDLE *FontHandle, IN CONST EFI_FONT_DISPLAY_INFO *StringInfoIn OPTIONAL, OUT EFI_FONT_DISPLAY_INFO **StringInfoOut, IN CONST EFI_STRING String OPTIONAL)
BOOLEAN IsSystemFontInfo(IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_FONT_DISPLAY_INFO *StringInfo, OUT EFI_FONT_DISPLAY_INFO **SystemInfo OPTIONAL, OUT UINTN *SystemInfoLen OPTIONAL)
BOOLEAN IsFontInfoExisted(IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_FONT_INFO *FontInfo, IN EFI_FONT_INFO_MASK *FontInfoMask OPTIONAL, IN EFI_FONT_HANDLE FontHandle OPTIONAL, OUT HII_GLOBAL_FONT_INFO **GlobalFontInfo OPTIONAL)
UINT32 EFI_FONT_INFO_MASK
struct _EFI_HII_ROW_INFO EFI_HII_ROW_INFO
struct _EFI_FONT_DISPLAY_INFO EFI_FONT_DISPLAY_INFO
#define ASSERT_EFI_ERROR(StatusParameter)
#define CR(Record, TYPE, Field, TestSignature)
#define PcdGetPtr(TokenName)
VOID *EFIAPI AllocatePool(IN UINTN AllocationSize)
VOID EFIAPI Exit(IN EFI_STATUS Status)
EFI_STATUS EFIAPI GetEfiGlobalVariable2(IN CONST CHAR16 *Name, OUT VOID **Value, OUT UINTN *Size OPTIONAL)
CHAR8 *EFIAPI GetBestLanguage(IN CONST CHAR8 *SupportedLanguages, IN UINTN Iso639Language,...)
UINTN LineHeight
The height of the line, in pixels.
UINTN LineWidth
The width of the text on the line, in pixels.
UINT16 FontSize
character cell height in pixels
UINT8 GlyphCol1[EFI_GLYPH_HEIGHT]
UINT8 GlyphCol2[EFI_GLYPH_HEIGHT]
UINT8 GlyphCol1[EFI_GLYPH_HEIGHT]