UCanvas::StrLen

Calculate the length of a string, taking text wrapping into account.

Windows
MacOS
Linux

References

Module

Engine

Header

/Engine/Source/Runtime/Engine/Classes/Engine/Canvas.h

Include

#include "Engine/Canvas.h"

Source

/Engine/Source/Runtime/Engine/Private/UserInterface/Canvas.cpp

Syntax

void StrLen
(
    const UFont * InFont,
    const FString & InText,
    float & XL,
    float & YL,
    bool bDPIAware
)

Remarks

Calculate the length of a string, taking text wrapping into account.

Parameters

Parameter

Description

InFont

The Font use.

Text

The string to calculate for.

XL

out Horizontal length of string.

YL

out Vertical length of string.

bDPUAware

If true measures text considering the current DPI scale factor of the canvas. Defaults to false for backwards compatibility

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