UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FShapedGlyphSequence Class Reference

#include <FontCache.h>

Classes

struct  FGlyphOffsetResult
 
struct  FSourceTextRange
 

Public Member Functions

 FShapedGlyphSequence ()
 
SLATECORE_API FShapedGlyphSequence (TArray< FShapedGlyphEntry > InGlyphsToRender, const int16 InTextBaseline, const uint16 InMaxTextHeight, const UObject *InFontMaterial, const bool InMaterialIsStencil, const FFontOutlineSettings &InOutlineSettings, const FSourceTextRange &InSourceTextRange)
 
SLATECORE_API ~FShapedGlyphSequence ()
 
SLATECORE_API SIZE_T GetAllocatedSize () const
 
const TArray< FShapedGlyphEntry > & GetGlyphsToRender () const
 
int16 GetTextBaseline () const
 
uint16 GetMaxTextHeight () const
 
const UObjectGetFontMaterial () const
 
bool IsMaterialStencil () const
 
const FFontOutlineSettingsGetFontOutlineSettings () const
 
SLATECORE_API bool IsDirty () const
 
float GetFontSkew () const
 
SLATECORE_API int32 GetMeasuredWidth () const
 
SLATECORE_API TOptional< int32GetMeasuredWidth (const int32 InStartIndex, const int32 InEndIndex, const bool InIncludeKerningWithPrecedingGlyph=true) const
 
SLATECORE_API FGlyphOffsetResult GetGlyphAtOffset (FSlateFontCache &InFontCache, const int32 InHorizontalOffset, const int32 InStartOffset=0) const
 
SLATECORE_API TOptional< FGlyphOffsetResultGetGlyphAtOffset (FSlateFontCache &InFontCache, const int32 InStartIndex, const int32 InEndIndex, const int32 InHorizontalOffset, const int32 InStartOffset=0, const bool InIncludeKerningWithPrecedingGlyph=true) const
 
SLATECORE_API TOptional< int8GetKerning (const int32 InIndex) const
 
SLATECORE_API FShapedGlyphSequencePtr GetSubSequence (const int32 InStartIndex, const int32 InEndIndex) const
 
SLATECORE_API void AddReferencedObjects (FReferenceCollector &Collector)
 

Detailed Description

Information for rendering a shaped text sequence

Constructor & Destructor Documentation

◆ FShapedGlyphSequence() [1/2]

FShapedGlyphSequence::FShapedGlyphSequence ( )
inlineexplicit

◆ FShapedGlyphSequence() [2/2]

FShapedGlyphSequence::FShapedGlyphSequence ( TArray< FShapedGlyphEntry InGlyphsToRender,
const int16  InTextBaseline,
const uint16  InMaxTextHeight,
const UObject InFontMaterial,
const bool  InMaterialIsStencil,
const FFontOutlineSettings InOutlineSettings,
const FSourceTextRange InSourceTextRange 
)

◆ ~FShapedGlyphSequence()

FShapedGlyphSequence::~FShapedGlyphSequence ( )

Member Function Documentation

◆ AddReferencedObjects()

void FShapedGlyphSequence::AddReferencedObjects ( FReferenceCollector Collector)

◆ GetAllocatedSize()

SIZE_T FShapedGlyphSequence::GetAllocatedSize ( ) const

Get the amount of memory allocated to this sequence

◆ GetFontMaterial()

const UObject * FShapedGlyphSequence::GetFontMaterial ( ) const
inline

Get the material to use when rendering these glyphs

◆ GetFontOutlineSettings()

const FFontOutlineSettings & FShapedGlyphSequence::GetFontOutlineSettings ( ) const
inline

Get the font outline settings to use when rendering these glyphs

◆ GetFontSkew()

float FShapedGlyphSequence::GetFontSkew ( ) const

Get the font skew applied when this glyph sequence was shaped

◆ GetGlyphAtOffset() [1/2]

FShapedGlyphSequence::FGlyphOffsetResult FShapedGlyphSequence::GetGlyphAtOffset ( FSlateFontCache InFontCache,
const int32  InHorizontalOffset,
const int32  InStartOffset = 0 
) const

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

Returns
The result data (see FGlyphOffsetResult)

◆ GetGlyphAtOffset() [2/2]

TOptional< FShapedGlyphSequence::FGlyphOffsetResult > FShapedGlyphSequence::GetGlyphAtOffset ( FSlateFontCache InFontCache,
const int32  InStartIndex,
const int32  InEndIndex,
const int32  InHorizontalOffset,
const int32  InStartOffset = 0,
const bool  InIncludeKerningWithPrecedingGlyph = true 
) const

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

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 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)

◆ GetGlyphsToRender()

const TArray< FShapedGlyphEntry > & FShapedGlyphSequence::GetGlyphsToRender ( ) const
inline

Get the array of glyphs in this sequence. This data will be ordered so that you can iterate and draw left-to-right, which means it will be backwards for right-to-left languages

◆ GetKerning()

TOptional< int8 > FShapedGlyphSequence::GetKerning ( const int32  InIndex) const

Get the kerning value between the given entry and the next entry in the sequence

Note
The index used here is 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 kerning, or an unset value if we couldn't get the kerning (eg, because you specified a merged ligature, or because the index is out-of-bounds)

◆ GetMaxTextHeight()

uint16 FShapedGlyphSequence::GetMaxTextHeight ( ) const
inline

Get the maximum height of any glyph in the font we're using

◆ GetMeasuredWidth() [1/2]

int32 FShapedGlyphSequence::GetMeasuredWidth ( ) const

Get the measured width of the entire shaped text

Returns
The measured width

◆ GetMeasuredWidth() [2/2]

TOptional< int32 > FShapedGlyphSequence::GetMeasuredWidth ( const int32  InStartIndex,
const int32  InEndIndex,
const bool  InIncludeKerningWithPrecedingGlyph = true 
) const

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)

◆ GetSubSequence()

FShapedGlyphSequencePtr FShapedGlyphSequence::GetSubSequence ( const int32  InStartIndex,
const int32  InEndIndex 
) const

Get a sub-sequence of the specified range

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 sub-sequence, or an null if the sub-sequence couldn't be created (eg, because you started or ended on a merged ligature, or because the range is out-of-bounds)

◆ GetTextBaseline()

int16 FShapedGlyphSequence::GetTextBaseline ( ) const
inline

Get the baseline to use when drawing the glyphs in this sequence

◆ IsDirty()

bool FShapedGlyphSequence::IsDirty ( ) const

Check to see whether this glyph sequence is dirty (ie, contains glyphs with invalid font pointers)

◆ IsMaterialStencil()

bool FShapedGlyphSequence::IsMaterialStencil ( ) const
inline

Get "Material is stencil" flag


The documentation for this class was generated from the following files: