TianoCore EDK2 master
Loading...
Searching...
No Matches
Font.c File Reference
#include "HiiDatabase.h"

Go to the source code of this file.

Functions

EFI_STATUS NewCell (IN CHAR16 CharValue, IN LIST_ENTRY *GlyphInfoList, IN EFI_HII_GLYPH_INFO *Cell)
 
EFI_STATUS GetCell (IN CHAR16 CharValue, IN LIST_ENTRY *GlyphInfoList, OUT EFI_HII_GLYPH_INFO *Cell)
 
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)
 
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 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)
 
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 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 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 GetSystemFont (IN HII_DATABASE_PRIVATE_DATA *Private, OUT EFI_FONT_DISPLAY_INFO **FontInfo, OUT UINTN *FontInfoSize 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)
 
INT8 IsLineBreak (IN CHAR16 Char)
 
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 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 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)
 
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)
 

Variables

EFI_GRAPHICS_OUTPUT_BLT_PIXEL mHiiEfiColors [16]
 

Detailed Description

Implementation for EFI_HII_FONT_PROTOCOL.

Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file Font.c.

Function Documentation

◆ FindGlyphBlock()

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 
)

Parse all glyph blocks to find a glyph block specified by CharValue. If CharValue = (CHAR16) (-1), collect all default character cell information within this font package and backup its information.

Parameters
FontPackageHii string package instance.
CharValueUnicode character value, which identifies a glyph block.
GlyphBufferOutput the corresponding bitmap data of the found block. It is the caller's responsibility to free this buffer.
CellOutput cell information of the encoded bitmap.
GlyphBufferLenIf not NULL, output the length of GlyphBuffer.
Return values
EFI_SUCCESSThe bitmap data is retrieved successfully.
EFI_NOT_FOUNDThe specified CharValue does not exist in current database.
EFI_OUT_OF_RESOURCESThe system is out of resources to accomplish the task.

Definition at line 658 of file Font.c.

◆ GetCell()

EFI_STATUS GetCell ( IN CHAR16  CharValue,
IN LIST_ENTRY GlyphInfoList,
OUT EFI_HII_GLYPH_INFO Cell 
)

Get a character cell information from the list specified by GlyphInfoList.

This is a internal function.

Parameters
CharValueUnicode character value, which identifies a glyph block.
GlyphInfoListHII_GLYPH_INFO list head.
CellBuffer which stores output character cell information.
Return values
EFI_SUCCESSCell information is added to the GlyphInfoList.
EFI_NOT_FOUNDThe character info specified by CharValue does not exist.

Definition at line 98 of file Font.c.

◆ GetGlyphBuffer()

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 
)

Convert the glyph for a single character into a bitmap.

This is a internal function.

Parameters
PrivateHII database driver private data.
CharCharacter to retrieve.
StringInfoPoints to the string font and color information or NULL if the string should use the default system font and color.
GlyphBufferBuffer to store the retrieved bitmap data.
CellPoints to EFI_HII_GLYPH_INFO structure.
AttributesIf not NULL, output the glyph attributes if any.
Return values
EFI_SUCCESSGlyph bitmap outputted.
EFI_OUT_OF_RESOURCESUnable to allocate the output buffer GlyphBuffer.
EFI_NOT_FOUNDThe glyph was unknown can not be found.
EFI_INVALID_PARAMETERAny input parameter is invalid.

Definition at line 151 of file Font.c.

◆ GetSystemFont()

EFI_STATUS GetSystemFont ( IN HII_DATABASE_PRIVATE_DATA Private,
OUT EFI_FONT_DISPLAY_INFO **  FontInfo,
OUT UINTN *FontInfoSize  OPTIONAL 
)

Retrieve system default font and color.

Parameters
PrivateHII database driver private data.
FontInfoPoints to system default font output-related information. It's caller's responsibility to free this buffer.
FontInfoSizeIf not NULL, output the size of buffer FontInfo.
Return values
EFI_SUCCESSCell information is added to the GlyphInfoList.
EFI_OUT_OF_RESOURCESThe system is out of resources to accomplish the task.
EFI_INVALID_PARAMETERAny input parameter is invalid.

Definition at line 993 of file Font.c.

◆ GlyphToBlt()

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 
)

Convert bitmap data of the glyph to blt structure.

This is a internal function.

Parameters
GlyphBufferBuffer points to bitmap data of glyph.
ForegroundThe color of the "on" pixels in the glyph in the bitmap.
BackgroundThe color of the "off" pixels in the glyph in the bitmap.
ImageWidthWidth of the whole image in pixels.
BaseLineBaseLine in the line.
RowWidthThe width of the text on the line, in pixels.
RowHeightThe height of the line, in pixels.
TransparentIf TRUE, the Background color is ignored and all "off" pixels in the character's drawn will use the pixel value from BltBuffer.
CellPoints to EFI_HII_GLYPH_INFO structure.
AttributesThe attribute of incoming glyph in GlyphBuffer.
OriginOn input, points to the origin of the to be displayed character, on output, points to the next glyph's origin.

Definition at line 365 of file Font.c.

◆ GlyphToImage()

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 
)

Convert bitmap data of the glyph to blt structure.

This is a internal function.

Parameters
GlyphBufferBuffer points to bitmap data of glyph.
ForegroundThe color of the "on" pixels in the glyph in the bitmap.
BackgroundThe color of the "off" pixels in the glyph in the bitmap.
ImageWidthWidth of the whole image in pixels.
BaseLineBaseLine in the line.
RowWidthThe width of the text on the line, in pixels.
RowHeightThe height of the line, in pixels.
TransparentIf TRUE, the Background color is ignored and all "off" pixels in the character's drawn will use the pixel value from BltBuffer.
CellPoints to EFI_HII_GLYPH_INFO structure.
AttributesThe attribute of incoming glyph in GlyphBuffer.
OriginOn input, points to the origin of the to be displayed character, on output, points to the next glyph's origin.
Returns
Points to the address of next origin node in BltBuffer.

Definition at line 481 of file Font.c.

◆ HiiGetFontInfo()

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 
)

This function iterates through fonts which match the specified font, using the specified criteria. If String is non-NULL, then all of the characters in the string must exist in order for a candidate font to be returned.

Parameters
ThisA pointer to the EFI_HII_FONT_PROTOCOL instance.
FontHandleOn entry, points to the font handle returned by a previous call to GetFontInfo() or NULL to start with the first font. On return, points to the returned font handle or points to NULL if there are no more matching fonts.
StringInfoInUpon entry, points to the font to return information about. If NULL, then the information about the system default font will be returned.
StringInfoOutUpon return, contains the matching font's information. If NULL, then no information is returned. This buffer is allocated with a call to the Boot Service AllocatePool(). It is the caller's responsibility to call the Boot Service FreePool() when the caller no longer requires the contents of StringInfoOut.
StringPoints to the string which will be tested to determine if all characters are available. If NULL, then any font is acceptable.
Return values
EFI_SUCCESSMatching font returned successfully.
EFI_NOT_FOUNDNo matching font was found.
EFI_INVALID_PARAMETERStringInfoIn->FontInfoMask is an invalid combination.
EFI_OUT_OF_RESOURCESThere were insufficient resources to complete the request.

Definition at line 2836 of file Font.c.

◆ HiiGetGlyph()

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 
)

Convert the glyph for a single character into a bitmap.

Parameters
ThisA pointer to the EFI_HII_FONT_PROTOCOL instance.
CharCharacter to retrieve.
StringInfoPoints to the string font and color information or NULL if the string should use the default system font and color.
BltThus must point to a NULL on entry. A buffer will be allocated to hold the output and the pointer updated on exit. It is the caller's responsibility to free this buffer.
BaselineNumber of pixels from the bottom of the bitmap to the baseline.
Return values
EFI_SUCCESSGlyph bitmap created.
EFI_OUT_OF_RESOURCESUnable to allocate the output buffer Blt.
EFI_WARN_UNKNOWN_GLYPHThe glyph was unknown and was replaced with the glyph for Unicode character 0xFFFD.
EFI_INVALID_PARAMETERBlt is NULL or *Blt is not NULL.

Definition at line 2642 of file Font.c.

◆ HiiStringIdToImage()

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 
)

Render a string to a bitmap or the screen containing the contents of the specified string.

Parameters
ThisA pointer to the EFI_HII_FONT_PROTOCOL instance.
FlagsDescribes how the string is to be drawn.
PackageListThe package list in the HII database to search for the specified string.
StringIdThe string's id, which is unique within PackageList.
LanguagePoints to the language for the retrieved string. If NULL, then the current system language is used.
StringInfoPoints to the string output information, including the color and font. If NULL, then the string will be output in the default system font and color.
BltIf this points to a non-NULL on entry, this points to the image, which is Width pixels wide and Height pixels high. The string will be drawn onto this image and EFI_HII_OUT_FLAG_CLIP is implied. If this points to a NULL on entry, then a buffer will be allocated to hold the generated image and the pointer updated on exit. It is the caller's responsibility to free this buffer.
BltXSpecifies the offset from the left and top edge of the image of the first character cell in the image.
BltYSpecifies the offset from the left and top edge of the image of the first character cell in the image.
RowInfoArrayIf this is non-NULL on entry, then on exit, this will point to an allocated buffer containing row information and RowInfoArraySize will be updated to contain the number of elements. This array describes the characters which were at least partially drawn and the heights of the rows. It is the caller's responsibility to free this buffer.
RowInfoArraySizeIf this is non-NULL on entry, then on exit it contains the number of elements in RowInfoArray.
ColumnInfoArrayIf this is non-NULL, then on return it will be filled with the horizontal offset for each character in the string on the row where it is displayed. Non-printing characters will have the offset ~0. The caller is responsible to allocate a buffer large enough so that there is one entry for each character in the string, not including the null-terminator. It is possible when character display is normalized that some character cells overlap.
Return values
EFI_SUCCESSThe string was successfully rendered.
EFI_OUT_OF_RESOURCESUnable to allocate an output buffer for RowInfoArray or Blt.
EFI_INVALID_PARAMETERThe Blt or PackageList was NULL.
EFI_INVALID_PARAMETERFlags were invalid combination.
EFI_NOT_FOUNDThe specified PackageList is not in the Database or the string id is not in the specified PackageList.

Definition at line 2403 of file Font.c.

◆ HiiStringToImage()

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 
)

Renders a string to a bitmap or to the display.

Parameters
ThisA pointer to the EFI_HII_FONT_PROTOCOL instance.
FlagsDescribes how the string is to be drawn.
StringPoints to the null-terminated string to be displayed.
StringInfoPoints to the string output information, including the color and font. If NULL, then the string will be output in the default system font and color.
BltIf this points to a non-NULL on entry, this points to the image, which is Width pixels wide and Height pixels high. The string will be drawn onto this image and EFI_HII_OUT_FLAG_CLIP is implied. If this points to a NULL on entry, then a buffer will be allocated to hold the generated image and the pointer updated on exit. It is the caller's responsibility to free this buffer.
BltXSpecifies the offset from the left and top edge of the image of the first character cell in the image.
BltYSpecifies the offset from the left and top edge of the image of the first character cell in the image.
RowInfoArrayIf this is non-NULL on entry, then on exit, this will point to an allocated buffer containing row information and RowInfoArraySize will be updated to contain the number of elements. This array describes the characters which were at least partially drawn and the heights of the rows. It is the caller's responsibility to free this buffer.
RowInfoArraySizeIf this is non-NULL on entry, then on exit it contains the number of elements in RowInfoArray.
ColumnInfoArrayIf this is non-NULL, then on return it will be filled with the horizontal offset for each character in the string on the row where it is displayed. Non-printing characters will have the offset ~0. The caller is responsible to allocate a buffer large enough so that there is one entry for each character in the string, not including the null-terminator. It is possible when character display is normalized that some character cells overlap.
Return values
EFI_SUCCESSThe string was successfully rendered.
EFI_OUT_OF_RESOURCESUnable to allocate an output buffer for RowInfoArray or Blt.
EFI_INVALID_PARAMETERThe String or Blt was NULL.
EFI_INVALID_PARAMETERFlags were invalid combination..

Definition at line 1624 of file Font.c.

◆ IsFontInfoExisted()

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 
)

This function checks whether EFI_FONT_INFO exists in current database. If FontInfoMask is specified, check what options can be used to make a match. Note that the masks relate to where the system default should be supplied are ignored by this function.

Parameters
PrivateHii database private structure.
FontInfoPoints to EFI_FONT_INFO structure.
FontInfoMaskIf not NULL, describes what options can be used to make a match between the font requested and the font available. The caller must guarantee this mask is valid.
FontHandleOn entry, Points to the font handle returned by a previous call to GetFontInfo() or NULL to start with the first font.
GlobalFontInfoIf not NULL, output the corresponding global font info.
Return values
TRUEExisted
FALSENot existed

Definition at line 1175 of file Font.c.

◆ IsLineBreak()

INT8 IsLineBreak ( IN CHAR16  Char)

Check whether the unicode represents a line break or not.

This is a internal function. Please see Section 27.2.6 of the UEFI Specification for a description of the supported string format.

Parameters
CharUnicode character
Return values
0Yes, it forces a line break.
1Yes, it presents a line break opportunity
2Yes, it requires a line break happen before and after it.
-1No, it is not a link break.

Definition at line 1502 of file Font.c.

◆ IsSystemFontInfo()

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 
)

Check whether EFI_FONT_DISPLAY_INFO points to system default font and color or returns the system default according to the optional inputs.

This is a internal function.

Parameters
PrivateHII database driver private data.
StringInfoPoints to the string output information, including the color and font.
SystemInfoIf not NULL, points to system default font and color.
SystemInfoLenIf not NULL, output the length of default system info.
Return values
TRUEYes, it points to system default.
FALSENo.

Definition at line 1056 of file Font.c.

◆ NarrowGlyphToBlt()

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 
)

Convert bitmap data of the glyph to blt structure.

This is a internal function.

Parameters
GlyphBufferBuffer points to bitmap data of glyph.
ForegroundThe color of the "on" pixels in the glyph in the bitmap.
BackgroundThe color of the "off" pixels in the glyph in the bitmap.
ImageWidthWidth of the whole image in pixels.
RowWidthThe width of the text on the line, in pixels.
RowHeightThe height of the line, in pixels.
TransparentIf TRUE, the Background color is ignored and all "off" pixels in the character's drawn will use the pixel value from BltBuffer.
OriginOn input, points to the origin of the to be displayed character, on output, points to the next glyph's origin.

Definition at line 286 of file Font.c.

◆ NewCell()

EFI_STATUS NewCell ( IN CHAR16  CharValue,
IN LIST_ENTRY GlyphInfoList,
IN EFI_HII_GLYPH_INFO Cell 
)

Insert a character cell information to the list specified by GlyphInfoList.

This is a internal function.

Parameters
CharValueUnicode character value, which identifies a glyph block.
GlyphInfoListHII_GLYPH_INFO list head.
CellIncoming character cell information.
Return values
EFI_SUCCESSCell information is added to the GlyphInfoList.
EFI_OUT_OF_RESOURCESThe system is out of resources to accomplish the task.

Definition at line 50 of file Font.c.

◆ SaveFontName()

EFI_STATUS SaveFontName ( IN EFI_STRING  FontName,
OUT EFI_FONT_INFO **  FontInfo 
)

Copy a Font Name to a new created EFI_FONT_INFO structure.

This is a internal function.

Parameters
FontNameNULL-terminated string.
FontInfoa new EFI_FONT_INFO which stores the FontName. It's caller's responsibility to free this buffer.
Return values
EFI_SUCCESSFontInfo is allocated and copied with FontName.
EFI_OUT_OF_RESOURCESThe system is out of resources to accomplish the task.

Definition at line 956 of file Font.c.

◆ WriteOutputParam()

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 
)

Write the output parameters of FindGlyphBlock().

This is a internal function.

Parameters
BufferInBuffer which stores the bitmap data of the found block.
BufferLenLength of BufferIn.
InputCellBuffer which stores cell information of the encoded bitmap.
GlyphBufferOutput the corresponding bitmap data of the found block. It is the caller's responsibility to free this buffer.
CellOutput cell information of the encoded bitmap.
GlyphBufferLenIf not NULL, output the length of GlyphBuffer.
Return values
EFI_SUCCESSThe operation is performed successfully.
EFI_INVALID_PARAMETERAny input parameter is invalid.
EFI_OUT_OF_RESOURCESThe system is out of resources to accomplish the task.

Definition at line 603 of file Font.c.

Variable Documentation

◆ mHiiEfiColors

EFI_GRAPHICS_OUTPUT_BLT_PIXEL mHiiEfiColors[16]
Initial value:
= {
{ 0x00, 0x00, 0x00, 0x00 },
{ 0x98, 0x00, 0x00, 0x00 },
{ 0x00, 0x98, 0x00, 0x00 },
{ 0x98, 0x98, 0x00, 0x00 },
{ 0x00, 0x00, 0x98, 0x00 },
{ 0x98, 0x00, 0x98, 0x00 },
{ 0x00, 0x98, 0x98, 0x00 },
{ 0x98, 0x98, 0x98, 0x00 },
{ 0x30, 0x30, 0x30, 0x00 },
{ 0xff, 0x00, 0x00, 0x00 },
{ 0x00, 0xff, 0x00, 0x00 },
{ 0xff, 0xff, 0x00, 0x00 },
{ 0x00, 0x00, 0xff, 0x00 },
{ 0xff, 0x00, 0xff, 0x00 },
{ 0x00, 0xff, 0xff, 0x00 },
{ 0xff, 0xff, 0xff, 0x00 },
}

Definition at line 12 of file Font.c.