Navigation
API > API/Runtime > API/Runtime/SlateCore
Payload data describing an individual font in a typeface. Keep this lean as it's also used as a key!
| Name | FFontData |
| Type | struct |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Fonts/CompositeFont.h |
| Include Path | #include "Fonts/CompositeFont.h" |
Syntax
USTRUCT ()
struct FFontData
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
FFontData () |
Default constructor | Fonts/CompositeFont.h | |
| Construct the raw data from a font face asset | Fonts/CompositeFont.h | ||
FFontData
(
FString InFontFilename, |
Construct the raw data from a filename and the font data attributes | Fonts/CompositeFont.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| FontFaceAsset | TObjectPtr< const UObject > | Font data v3. This points to a font face asset. | Fonts/CompositeFont.h | |
| FontFilename | FString | The filename of the font to use. | Fonts/CompositeFont.h | |
| FontFilenameHash | uint32 | Cached hash value of FontFilename. Must be updated everytime FontFilename changes. | Fonts/CompositeFont.h | |
| Hinting | EFontHinting | The hinting algorithm to use with the font. | Fonts/CompositeFont.h | |
| LoadingPolicy | EFontLoadingPolicy | Enum controlling how this font should be loaded at runtime. | Fonts/CompositeFont.h | |
| SubFaceIndex | int32 | The index of the sub-face that should be used. This is typically zero unless using a TTC/OTC font. | Fonts/CompositeFont.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddReferencedObjects
(
FReferenceCollector& Collector |
Called by FStandaloneCompositeFont to prevent our objects from being GCd | Fonts/CompositeFont.h | |
| Upgrade v2 bulk data to v3 font face. | Fonts/CompositeFont.h | ||
void ConditionalUpgradeFontDataToBulkData
(
UObject* InOuter |
Upgrade v1 font data to v2 bulk data. | Fonts/CompositeFont.h | |
int32 GetAscendOverriddenValue () |
Returns the overridden value of the ascend. | Fonts/CompositeFont.h | |
int32 GetDescendOverriddenValue () |
Returns the overridden value of the descend. | Fonts/CompositeFont.h | |
const UObject * GetFontFaceAsset() |
Get the font face asset used by this data (if any). | Fonts/CompositeFont.h | |
FFontFaceDataConstPtr GetFontFaceData() |
Get the data buffer containing the data for the current font face. | Fonts/CompositeFont.h | |
const FString & GetFontFilename () |
Get the filename of the font to use. | Fonts/CompositeFont.h | |
FFontRasterizationSettings GetFontRasterizationSettings() |
Get the font face rasterization settings. | Fonts/CompositeFont.h | |
EFontHinting GetHinting() |
Get the hinting algorithm to use with the font. | Fonts/CompositeFont.h | |
EFontLayoutMethod GetLayoutMethod() |
Get the method to use when laying out the font? | Fonts/CompositeFont.h | |
EFontLoadingPolicy GetLoadingPolicy() |
Get the enum controlling how this font should be loaded at runtime. | Fonts/CompositeFont.h | |
int32 GetStrikeBrushHeightPercentage() |
Gets the percentage of the font height that's used as the height of the strike brush. | Fonts/CompositeFont.h | |
int32 GetSubFaceIndex() |
Get the index of the sub-face that should be used. | Fonts/CompositeFont.h | |
bool HasFont() |
Is this font data set to a font? (either by filename or by inline data) | Fonts/CompositeFont.h | |
bool HasLegacyData() |
True if this object contains any legacy data that needs to be upgraded PostLoad by calling the functions below (in order). | Fonts/CompositeFont.h | |
bool IsAscendOverridden() |
Returns true if the ascend is overridden. | Fonts/CompositeFont.h | |
bool IsDescendOverridden() |
Returns true if the descend is overridden. | Fonts/CompositeFont.h | |
bool Serialize
(
FArchive& Ar |
Handle serialization for this struct. | Fonts/CompositeFont.h | |
void SetSubFaceIndex
(
const int32 InSubFaceIndex |
Set the index of the sub-face that should be used. | Fonts/CompositeFont.h |
Operators
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
bool operator!=
(
const FFontData& Other |
Check to see whether this font data is not equal to the other font data | Fonts/CompositeFont.h | |
bool operator==
(
const FFontData& Other |
Check to see whether this font data is equal to the other font data | Fonts/CompositeFont.h |