FSlateFontMeasure::FindLastWholeCharacterIndexBeforeOffset

Finds the last whole character index before the specified position in pixels along the text horizontally

Windows
MacOS
Linux

References

Module

SlateCore

Header

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

Include

#include "Fonts/FontMeasure.h"

Source

/Engine/Source/Runtime/SlateCore/Private/Fonts/FontMeasure.cpp

Syntax

int32 FindLastWholeCharacterIndexBeforeOffset
(
    const FString & Text,
    int32 StartIndex,
    int32 EndIndex,
    const FSlateFontInfo & InFontInfo,
    const int32 HorizontalOffset,
    bool IncludeKerningWithPrecedingChar,
    float FontScale
) const

Remarks

Finds the last whole character index before the specified position in pixels along the text horizontally

Returns

The index of the last whole character before the specified horizontal offset

Parameters

Parameter

Description

Text

The text to measure

StartIndex

The inclusive index to start measuring the string at

EndIndex

The inclusive index to stop measuring the string at

InFontInfo

Information about the font used to draw the string

HorizontalOffset

Offset horizontally into the string, in pixels

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