UFont::GetStringSize

Calculate the width of the string using this font's default size and scale.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/Font.h

Include

#include "Engine/Font.h"

Source

/Engine/Source/Runtime/Engine/Private/Font.cpp

Syntax

int32 GetStringSize
(
    const TCHAR * Text
) const

Remarks

Calculate the width of the string using this font's default size and scale.

Returns

the width (in pixels) of the specified text, or 0 if Text was nullptr.

Parameters

Parameter

Description

Text

the string to size

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