FShapedGlyphSequence::GetGlyphAtOffset

Get the information for the glyph at the specified position in pixels along the string horizontally

Windows
MacOS
Linux

References

Module

SlateCore

Header

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

Include

#include "Fonts/FontCache.h"

Source

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

Syntax

TOptional< FGlyphOffsetResult > GetGlyphAtOffset
(
    FSlateFontCache & InFontCache,
    const int32 InStartIndex,
    const int32 InEndIndex,
    const int32 InHorizontalOffset,
    const int32 InStartOffset,
    const bool InIncludeKerningWithPrecedingGlyph
) const

Remarks

Get the information for the glyph at the specified position in pixels along the string horizontally

The indices used here are relative to the start of the text we were shaped from, even if we were only shaped from a sub-section of that text

Returns

The result data (see FGlyphOffsetResult), or an unset value if we couldn't find the character (eg, because you started or ended on a merged ligature, or because the range is out-of-bounds)

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