UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FFontData Struct Reference

#include <CompositeFont.h>

Public Member Functions

SLATECORE_API FFontData ()
 
SLATECORE_API FFontData (const UObject *const InFontFaceAsset, const int32 InSubFaceIndex=0)
 
SLATECORE_API FFontData (FString InFontFilename, const EFontHinting InHinting, const EFontLoadingPolicy InLoadingPolicy, const int32 InSubFaceIndex=0)
 
SLATECORE_API bool HasFont () const
 
SLATECORE_API const FString & GetFontFilename () const
 
SLATECORE_API EFontHinting GetHinting () const
 
SLATECORE_API EFontLoadingPolicy GetLoadingPolicy () const
 
SLATECORE_API int32 GetSubFaceIndex () const
 
SLATECORE_API void SetSubFaceIndex (const int32 InSubFaceIndex)
 
SLATECORE_API EFontLayoutMethod GetLayoutMethod () const
 
SLATECORE_API bool IsAscendOverridden () const
 
SLATECORE_API int32 GetAscendOverriddenValue () const
 
SLATECORE_API bool IsDescendOverridden () const
 
SLATECORE_API int32 GetDescendOverriddenValue () const
 
SLATECORE_API int32 GetStrikeBrushHeightPercentage () const
 
SLATECORE_API FFontFaceDataConstPtr GetFontFaceData () const
 
SLATECORE_API const UObjectGetFontFaceAsset () const
 
SLATECORE_API FFontRasterizationSettings GetFontRasterizationSettings () const
 
SLATECORE_API bool operator== (const FFontData &Other) const
 
SLATECORE_API bool operator!= (const FFontData &Other) const
 
SLATECORE_API bool Serialize (FArchive &Ar)
 
SLATECORE_API void AddReferencedObjects (FReferenceCollector &Collector)
 

Friends

uint32 GetTypeHash (const FFontData &Key)
 
FArchiveoperator<< (FArchive &Ar, FFontData &InFontData)
 

Detailed Description

Payload data describing an individual font in a typeface. Keep this lean as it's also used as a key!

Constructor & Destructor Documentation

◆ FFontData() [1/3]

FFontData::FFontData ( )

Default constructor

◆ FFontData() [2/3]

FFontData::FFontData ( const UObject *const  InFontFaceAsset,
const int32  InSubFaceIndex = 0 
)
explicit

Construct the raw data from a font face asset

◆ FFontData() [3/3]

FFontData::FFontData ( FString  InFontFilename,
const EFontHinting  InHinting,
const EFontLoadingPolicy  InLoadingPolicy,
const int32  InSubFaceIndex = 0 
)

Construct the raw data from a filename and the font data attributes

Member Function Documentation

◆ AddReferencedObjects()

void FFontData::AddReferencedObjects ( FReferenceCollector Collector)

Called by FStandaloneCompositeFont to prevent our objects from being GCd

◆ GetAscendOverriddenValue()

int32 FFontData::GetAscendOverriddenValue ( ) const

Returns the overridden value of the ascend. This value will be used only if IsAscendOverridden returns true.

◆ GetDescendOverriddenValue()

int32 FFontData::GetDescendOverriddenValue ( ) const

Returns the overridden value of the descend. This value will be used only if IsDescendOverridden returns true.

◆ GetFontFaceAsset()

const UObject * FFontData::GetFontFaceAsset ( ) const

Get the font face asset used by this data (if any).

◆ GetFontFaceData()

FFontFaceDataConstPtr FFontData::GetFontFaceData ( ) const

Get the data buffer containing the data for the current font face.

◆ GetFontFilename()

const FString & FFontData::GetFontFilename ( ) const

Get the filename of the font to use. This may not actually exist on disk in editor builds and we should load the face buffer instead.

◆ GetFontRasterizationSettings()

FFontRasterizationSettings FFontData::GetFontRasterizationSettings ( ) const

Get the font face rasterization settings.

◆ GetHinting()

EFontHinting FFontData::GetHinting ( ) const

Get the hinting algorithm to use with the font.

◆ GetLayoutMethod()

EFontLayoutMethod FFontData::GetLayoutMethod ( ) const

Get the method to use when laying out the font?

◆ GetLoadingPolicy()

EFontLoadingPolicy FFontData::GetLoadingPolicy ( ) const

Get the enum controlling how this font should be loaded at runtime.

◆ GetStrikeBrushHeightPercentage()

int32 FFontData::GetStrikeBrushHeightPercentage ( ) const

Gets the percentage of the font height that's used as the height of the strike brush.

◆ GetSubFaceIndex()

int32 FFontData::GetSubFaceIndex ( ) const

Get the index of the sub-face that should be used.

◆ HasFont()

bool FFontData::HasFont ( ) const

Is this font data set to a font? (either by filename or by inline data)

◆ IsAscendOverridden()

bool FFontData::IsAscendOverridden ( ) const

Returns true if the ascend is overridden.

◆ IsDescendOverridden()

bool FFontData::IsDescendOverridden ( ) const

Returns true if the descend is overridden.

◆ operator!=()

bool FFontData::operator!= ( const FFontData Other) const

Check to see whether this font data is not equal to the other font data

◆ operator==()

bool FFontData::operator== ( const FFontData Other) const

Check to see whether this font data is equal to the other font data

◆ Serialize()

bool FFontData::Serialize ( FArchive Ar)

Handle serialization for this struct.

◆ SetSubFaceIndex()

void FFontData::SetSubFaceIndex ( const int32  InSubFaceIndex)

Set the index of the sub-face that should be used.

Friends And Related Symbol Documentation

◆ GetTypeHash

uint32 GetTypeHash ( const FFontData Key)
friend

Get the type hash for this font data

◆ operator<<

FArchive & operator<< ( FArchive Ar,
FFontData InFontData 
)
friend

The documentation for this struct was generated from the following files: