Navigation
API > API/Runtime > API/Runtime/SlateCore > API/Runtime/SlateCore/FSlateFontMeasure
Overloads
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
int32 FindCharacterIndexAtOffset
(
FStringView Text, |
Finds the character index at the specified position in pixels along the string horizontally | Fonts/FontMeasure.h | |
int32 FindCharacterIndexAtOffset
(
const FText& Text, |
Finds the character index at the specified position in pixels along the text horizontally | Fonts/FontMeasure.h | |
int32 FindCharacterIndexAtOffset
(
FStringView Text, |
Finds the character index at the specified position in pixels along the string horizontally | Fonts/FontMeasure.h |
FindCharacterIndexAtOffset(FStringView, const FSlateFontInfo &, const int32, float)
Description
Finds the character index at the specified position in pixels along the string horizontally
| Name | FindCharacterIndexAtOffset |
| Type | function |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Fonts/FontMeasure.h |
| Include Path | #include "Fonts/FontMeasure.h" |
| Source | /Engine/Source/Runtime/SlateCore/Private/Fonts/FontMeasure.cpp |
int32 FindCharacterIndexAtOffset
(
FStringView Text,
const FSlateFontInfo & InFontInfo,
const int32 HorizontalOffset,
float FontScale
) const
The index of the character closest to the specified horizontal offset
Parameters
| Name | Remarks |
|---|---|
| Text | The string to measure |
| FontName | The name of the font the string is drawn with |
| FontSize | The size of the font |
| HorizontalOffset | Offset horizontally into the string, in pixels |
| FontScale | The scale to apply to the font |
FindCharacterIndexAtOffset(const FText &, const FSlateFontInfo &, const int32, float)
Description
Finds the character index at the specified position in pixels along the text horizontally
| Name | FindCharacterIndexAtOffset |
| Type | function |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Fonts/FontMeasure.h |
| Include Path | #include "Fonts/FontMeasure.h" |
| Source | /Engine/Source/Runtime/SlateCore/Private/Fonts/FontMeasure.cpp |
int32 FindCharacterIndexAtOffset
(
const FText & Text,
const FSlateFontInfo & InFontInfo,
const int32 HorizontalOffset,
float FontScale
) const
The index of the character closest to the specified horizontal offset
Parameters
| Name | Remarks |
|---|---|
| Text | The text to measure |
| FontName | The name of the font the text is drawn with |
| FontSize | The size of the font |
| HorizontalOffset | Offset horizontally into the text, in pixels |
| FontScale | The scale to apply to the font |
FindCharacterIndexAtOffset(FStringView, int32, int32, const FSlateFontInfo &, const int32, bool, float)
Description
Finds the character index at the specified position in pixels along the string horizontally
| Name | FindCharacterIndexAtOffset |
| Type | function |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Fonts/FontMeasure.h |
| Include Path | #include "Fonts/FontMeasure.h" |
| Source | /Engine/Source/Runtime/SlateCore/Private/Fonts/FontMeasure.cpp |
int32 FindCharacterIndexAtOffset
(
FStringView Text,
int32 StartIndex,
int32 EndIndex,
const FSlateFontInfo & InFontInfo,
const int32 HorizontalOffset,
bool IncludeKerningWithPrecedingChar,
float FontScale
) const
The index of the character closest to the specified horizontal offset
Parameters
| Name | Remarks |
|---|---|
| Text | The string to measure |
| StartIndex | The inclusive index to start measuring the string at |
| EndIndex | The inclusive index to stop measuring the string at |
| FontName | The name of the font the string is drawn with |
| FontSize | The size of the font |
| HorizontalOffset | Offset horizontally into the string, in pixels |
| FontScale | The scale to apply to the font |