UFontFace

A font face asset contains the raw payload data for a source TTF/OTF file as used by FreeType.

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/FontFace.h

Include

#include "Engine/FontFace.h"

Syntax

class UFontFace :
    public UObject,
    public IFontFaceInterface

Remarks

A font face asset contains the raw payload data for a source TTF/OTF file as used by FreeType. During cook this asset type generates a ".ufont" file containing the raw payload data (unless loaded "Inline").

Variables

Name Description

Public variable

FFontFaceDataRe...

 

FontFaceData

The data associated with the font face.

Public variable

EFontHinting

 

Hinting

The hinting algorithm to use with the font face.

Public variable

EFontLayoutMeth...

 

LayoutMethod

Which method should we use when laying out the font? Try changing this if you notice clipping or height issues with your font.

Public variable

EFontLoadingPol...

 

LoadingPolicy

Enum controlling how this font face should be loaded at runtime.

Public variable

FString

 

SourceFilename

The filename of the font face we were created from.

Public variable

TArray< FString...

 

SubFaces

Transient cache of the sub-faces available within this face

Constructors

Name Description

Public function

UFontFace()

Default constructor

Functions

Name Description

Public function

void

 

CacheSubFaces()

Overridden from UObject

Name Description

Public function Virtual Const

void

 

GetAssetRegistryTags

(
    TArray< FAssetRegistryTag >& OutTa...
)

Gathers a list of asset registry searchable tags which are name/value pairs with some type information This only needs to be implemented for asset objects

Public function Virtual

void

 

GetResourceSizeEx

(
    FResourceSizeEx& CumulativeResourc...
)

Get the size of the object/resource for use in memory tools or to display to artists/LDs in the Editor This is the extended version which separates up the used memory into different memory regions (the actual definition of which may be platform specific).

Public function Virtual

void

 

PostEditChangeProperty

(
    FPropertyChangedEvent& PropertyCha...
)

Called when a property on this object has been modified externally

Public function Virtual

void

 

PostEditUndo()

Called after applying a transaction to the object.

Public function Virtual

void

 

Serialize

(
    FArchive& Ar
)

Handles reading, writing, and reference collecting using FArchive.

Overridden from IFontFaceInterface

Name Description

Public function Virtual Const

FFontFaceDat...

 

GetFontFaceData()

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

Public function Virtual Const

const FStrin...

 

GetFontFilename()

Get the filename of the font to use.

Public function Virtual Const

EFontHinting

 

GetHinting()

Get the hinting algorithm to use with the font.

Public function Virtual Const

EFontLayoutM...

 

GetLayoutMethod()

Get the method to use when laying out the font?

Public function Virtual Const

EFontLoading...

 

GetLoadingPolicy()

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

Public function Virtual

void

 

InitializeFromBulkData

(
    const FString& InFilename,
    const EFontHinting InHinting,
    const void* InBulkDataPtr,
    const int32 InBulkDataSizeBytes
)

Initialize this font face from legacy bulk data.

Deprecated Variables

Name Description

Public variable

TArray< uint8 >

 

FontFaceData_DEPRECATED

The data associated with the font face.