FFontData

Payload data describing an individual font in a typeface.

Windows
MacOS
Linux

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Fonts/CompositeFont.h

Include

#include "Fonts/CompositeFont.h"

Syntax

struct FFontData

Remarks

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

Constructors

Name Description

Public function

FFontData()

Default constructor

Public function

FFontData

(
    const UObject*const InFontFace...,
    const int32 InSubFaceIndex
)

Construct the raw data from a font face asset

Public function

FFontData

(
    FString InFontFilename,
    const EFontHinting InHinting,
    const EFontLoadingPolicy InLoadingP...,
    const int32 InSubFaceIndex
)

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

Functions

Name Description

Public function

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

Called by FStandaloneCompositeFont to prevent our objects from being GCd

Public function

void

 

ConditionalUpgradeBulkDataToFontFace

(
    UObject* InOuter,
    UClass* InFontFaceClass,
    const FName InFontFaceName
)

Upgrade v2 bulk data to v3 font face.

Public function

void

 

ConditionalUpgradeFontDataToBulkData

(
    UObject* InOuter
)

Upgrade v1 font data to v2 bulk data.

Public function Const

const UObjec...

 

GetFontFaceAsset()

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

Public function Const

FFontFaceDat...

 

GetFontFaceData()

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

Public function Const

const FStrin...

 

GetFontFilename()

Get the filename of the font to use.

Public function Const

EFontHinting

 

GetHinting()

Get the hinting algorithm to use with the font.

Public function Const

EFontLayoutM...

 

GetLayoutMethod()

Get the method to use when laying out the font?

Public function Const

EFontLoading...

 

GetLoadingPolicy()

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

Public function Const

int32

 

GetSubFaceIndex()

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

Public function Const

bool

 

HasFont()

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

Public function Const

bool

 

HasLegacyData()

True if this object contains any legacy data that needs to be upgraded PostLoad by calling the functions below (in order).

Public function

bool

 

Serialize

(
    FArchive& Ar
)

Handle serialization for this struct.

Public function

void

 

SetSubFaceIndex

(
    const int32 InSubFaceIndex
)

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

Operators

Name Description

Public function Const

bool

 

operator!=

(
    const FFontData& Other
)

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

Public function Const

bool

 

operator==

(
    const FFontData& Other
)

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

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss