Module |
|
Header |
/Engine/Source/Runtime/Engine/Classes/Engine/Font.h |
Include |
#include "Engine/Font.h" |
class UFont :
public UObject,
public IFontProviderInterface
A font object, for use by Slate, UMG, and Canvas.
A font can either be:
Runtime cached - The font contains a series of TTF files that combine to form a composite font. The glyphs are cached on demand when required at runtime.
Offline cached - The font contains a series of textures containing pre-baked cached glyphs and their associated texture coordinates.
Name | Description | ||
---|---|---|---|
|
float |
Ascent |
|
|
TArray< struct ... |
Characters |
List of characters in the font. |
|
TMap< uint16, u... |
CharRemap |
When IsRemapped is true, this array maps unicode values to entries in the Characters array |
|
CompositeFont |
Embedded composite font data |
|
|
float |
Descent |
|
|
float |
EmScale |
Font metrics. |
|
EFontCacheType |
FontCacheType |
What kind of font caching should we use? This controls which options we see |
|
ImportOptions |
Options used when importing this font |
|
|
int32 |
IsRemapped |
True if font is 'remapped'. |
|
int32 |
Kerning |
Default horizontal spacing between characters when rendering text with this font |
|
float |
Leading |
|
|
LegacyFontName |
The default font name to use for legacy Canvas APIs that don't specify a font name |
|
|
int32 |
LegacyFontSize |
The default size of the font used for legacy Canvas APIs that don't specify a font size |
|
TArray< int32 > |
MaxCharHeight |
The maximum height of a character in this font. |
|
int32 |
NumCharacters |
Number of characters in the font, not including multiple instances of the same character (for multi-fonts). |
|
float |
ScalingFactor |
Scale to apply to the font. |
|
Textures |
NOTE: Do not expose this to the editor as it has nasty crash potential. |
Name | Description | |
---|---|---|
|
UFont ( |
Name | Description | ||
---|---|---|---|
|
void |
CacheCharacterCountAndMaxCharHeight() |
Caches the character count and maximum character height for this font (as well as sub-fonts, in the multi-font case) |
|
int16 |
GetCharHorizontalOffset ( |
Gets the horizontal distance from the origin to the left most border of the given character |
|
int8 |
GetCharKerning ( |
Gets the kerning value for a pair of characters |
|
void |
GetCharSize ( |
Calculate the width and height of a single character using this font's default size and scale. |
|
float |
GetFontScalingFactor() |
Get the scaling factor |
|
FSlateFontIn... |
GetLegacySlateFontInfo() |
Get the info needed to use this UFont with Slate, using the fallback data for legacy Canvas APIs |
|
float |
GetMaxCharHeight() |
Returns the maximum height for any character in this font using this font's default size and scale. |
|
void |
GetStringHeightAndWidth ( |
Determines the height and width for the passed in string. |
|
void |
GetStringHeightAndWidth ( |
Determines the height and width for the passed in string. |
|
int32 |
GetStringHeightSize ( |
Calculate the height of the string using this font's default size and scale. |
|
int32 |
GetStringSize ( |
Calculate the width of the string using this font's default size and scale. |
|
TCHAR |
RemapChar ( |
|
|
void |
SetFontScalingFactor ( |
Set the scaling factor |
Name | Description | ||
---|---|---|---|
|
void |
BeginDestroy() |
Called before destroying the object. |
|
void |
GetResourceSizeEx ( |
Returns the size of the object/ resource for display to artists/ LDs in the Editor. |
|
void |
PostLoad() |
Do any object-specific cleanup required immediately after loading an object. |
|
void |
Serialize ( |
Handles reading, writing, and reference collecting using FArchive. |
Name | Description | ||
---|---|---|---|
|
const FCompo... |
GetCompositeFont() |
Name |
Description |
---|---|
NULLCHARACTER |
This is the character that RemapChar will return if the specified character doesn't exist in the font |