FShapedGlyphSequence::GetMeasuredWidth

Get the measured width of the specified range of this shaped text @note 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

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< int32 > GetMeasuredWidth
(
    const int32 InStartIndex,
    const int32 InEndIndex,
    const bool InIncludeKerningWithPrecedingGlyph
) const

Remarks

Get the measured width of the specified range of this shaped text @note 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 measured width, or an unset value if the text couldn't be measured (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