FSlateFontMeasure

Windows
MacOS
Linux

References

Module

SlateCore

Header

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

Include

#include "Fonts/FontMeasure.h"

Syntax

class FSlateFontMeasure

Constructors

No constructors are accessible with public or protected access.

Destructors

Name Description

Public function Virtual

~FSlateFontMeasure()

Functions

Name Description

Public function Static

TSharedRef< ...

 

Create

(
    const TSharedRef< class FSlateFontC...
)

Public function Virtual Const

int32

 

FindCharacterIndexAtOffset

(
    const FText& Text,
    const FSlateFontInfo& InFontInfo,
    const int32 HorizontalOffset,
    float FontScale
)

Finds the character index at the specified position in pixels along the text horizontally

Public function Virtual Const

int32

 

FindCharacterIndexAtOffset

(
    const FString& Text,
    const FSlateFontInfo& InFontInfo,
    const int32 HorizontalOffset,
    float FontScale
)

Finds the character index at the specified position in pixels along the string horizontally

Public function Virtual Const

int32

 

FindCharacterIndexAtOffset

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

Finds the character index at the specified position in pixels along the string horizontally

Public function Const

int32

 

FindFirstWholeCharacterIndexAfterOffset

(
    const FString& Text,
    const FSlateFontInfo& InFontInfo,
    const int32 HorizontalOffset,
    float FontScale
)

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

Public function Const

int32

 

FindFirstWholeCharacterIndexAfterOffset

(
    const FText& Text,
    const FSlateFontInfo& InFontInfo,
    const int32 HorizontalOffset,
    float FontScale
)

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

Public function Const

int32

 

FindFirstWholeCharacterIndexAfterOffset

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

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

Public function Const

int32

 

FindLastWholeCharacterIndexBeforeOffset

(
    const FString& Text,
    const FSlateFontInfo& InFontInfo,
    const int32 HorizontalOffset,
    float FontScale
)

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

Public function Const

int32

 

FindLastWholeCharacterIndexBeforeOffset

(
    const FText& Text,
    const FSlateFontInfo& InFontInfo,
    const int32 HorizontalOffset,
    float FontScale
)

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

Public function Const

int32

 

FindLastWholeCharacterIndexBeforeOffset

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

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

Public function

void

 

FlushCache()

Public function Const

int16

 

GetBaseline

(
    const FSlateFontInfo& InFontInfo,
    float FontScale
)

Returns the baseline for the specified font.

Public function Const

int8

 

GetKerning

(
    const FSlateFontInfo& InFontInfo,
    float FontScale,
    TCHAR PreviousCharacter,
    TCHAR CurrentCharacter
)

Returns the kerning value for the specified pair of characters.

Public function Const

uint16

 

GetMaxCharacterHeight

(
    const FSlateFontInfo& InFontInfo,
    float FontScale
)

Returns the height of the largest character in the font.

Public function Virtual Const

FVector2D

 

Measure

(
    const FText& Text,
    const FSlateFontInfo& InFontInfo,
    float FontScale
)

Measures the width and height of a passed in text.

Public function Virtual Const

FVector2D

 

Measure

(
    const FString& Text,
    const FSlateFontInfo& InFontInfo,
    float FontScale
)

Measures the width and height of a passed in string.

Public function Virtual Const

FVector2D

 

Measure

(
    const FString& Text,
    int32 StartIndex,
    int32 EndIndex,
    const FSlateFontInfo& InFontInfo,
    bool IncludeKerningWithPrecedingCha...,
    float FontScale
)

Measures the width and height of a passed in string.

Enums

Name

Description

Private enum

ELastCharacterIndexFormat

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