FSlateFontInfo

A representation of a font in Slate.

Windows
MacOS
Linux

References

Module

SlateCore

Header

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

Include

#include "Fonts/SlateFontInfo.h"

Syntax

struct FSlateFontInfo

Remarks

A representation of a font in Slate.

Variables

Name Description

Public variable

TSharedPtr< con...

 

CompositeFont

The composite font data to use (valid when used with a Slate style set in C++)

Public variable

EFontFallback

 

FontFallback

The font fallback level.

Public variable

UObject *

 

FontMaterial

The material to use when rendering this font

Public variable

const UObject &...

 

FontObject

The font object (valid when used from UMG or a Slate widget style asset)

Public variable

FFontOutlineSet...

 

OutlineSettings

Settings for applying an outline to a font

Public variable

int32

 

Size

The font size is a measure in point values.

Public variable

FName

 

TypefaceFontName

The name of the font to use from the default typeface (None will use the first entry)

Constructors

Name Description

Public function

FSlateFontInfo()

Default constructor.

Public function

FSlateFontInfo

(
    const FName& InFontName,
    uint16 InSize,
    EFontHinting InHinting
)

DEPRECATED - Creates and initializes a new instance with the specified font name and size.

Public function

FSlateFontInfo

(
    const ANSICHAR* InFontName,
    uint16 InSize,
    EFontHinting InHinting
)

DEPRECATED - Creates and initializes a new instance with the specified font name and size.

Public function

FSlateFontInfo

(
    const WIDECHAR* InFontName,
    uint16 InSize,
    EFontHinting InHinting
)

DEPRECATED - Creates and initializes a new instance with the specified font name and size.

Public function

FSlateFontInfo

(
    TSharedPtr< const FCompositeFont > ...,
    const int32 InSize,
    const FName& InTypefaceFontName,
    const FFontOutlineSettings& InOutl...
)

Creates and initializes a new instance with the specified font, size, and emphasis.

Public function

FSlateFontInfo

(
    const UObject* InFontObject,
    const int32 InSize,
    const FName& InTypefaceFontName,
    const FFontOutlineSettings& InOutl...
)

Creates and initializes a new instance with the specified font, size, and emphasis.

Public function

FSlateFontInfo

(
    const FString& InFontName,
    uint16 InSize,
    EFontHinting InHinting,
    const FFontOutlineSettings& InOutl...
)

DEPRECATED - Creates and initializes a new instance with the specified font name and size.

Functions

Name Description

Public function

void

 

AddReferencedObjects

(
    FReferenceCollector& Collector
)

Public function Const

const FCompo...

 

GetCompositeFont()

Get the composite font pointer associated with this font info (either directly or via a UFont)

Public function Const

bool

 

HasValidFont()

Check to see whether this font info has a valid composite font pointer set (either directly or via a UFont)

Public function Const

bool

 

IsIdentialToForCaching

(
    const FSlateFontInfo& Other
)

Public function Const

bool

 

IsIdenticalTo

(
    const FSlateFontInfo& Other
)

Public function

void

 

PostSerialize

(
    const FArchive& Ar
)

Used to upgrade legacy font into so that it uses composite fonts

Operators

Name Description

Public function Const

bool

 

operator==

(
    const FSlateFontInfo& Other
)

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