FSlateFontMeasure::FindFirstWholeCharacterIndexAfterOffset

Finds the first whole character index after the specified position in pixels along the string 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 FindFirstWholeCharacterIndexAfterOffset
(
    const FString & Text,
    const FSlateFontInfo & InFontInfo,
    const int32 HorizontalOffset,
    float FontScale
) const

Remarks

Finds the first whole character index after the specified position in pixels along the string horizontally

Returns

The index of the first whole character after the specified horizontal offset

Parameters

Parameter

Description

String

The string to measure

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