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

#include <FontCache.h>

Public Member Functions

SLATECORE_API FCharacterList (const FSlateFontKey &InFontKey, FSlateFontCache &InFontCache)
 
SLATECORE_API const FCharacterEntryGetCharacter (TCHAR Character, const EFontFallback MaxFontFallback)
 
SLATECORE_API int8 GetKerning (TCHAR FirstChar, TCHAR SecondChar, const EFontFallback MaxFontFallback)
 
SLATECORE_API int8 GetKerning (const FCharacterEntry &FirstCharacterEntry, const FCharacterEntry &SecondCharacterEntry)
 
SLATECORE_API uint16 GetMaxHeight () const
 
SLATECORE_API int16 GetBaseline () const
 

Detailed Description

Manages a potentially large list of non-shaped characters Uses a directly indexed by TCHAR array until space runs out and then maps the rest to conserve memory Every character indexed by TCHAR could potentially cost a lot of memory of a lot of empty entries are created because characters being used are far apart

Constructor & Destructor Documentation

◆ FCharacterList()

FCharacterList::FCharacterList ( const FSlateFontKey InFontKey,
FSlateFontCache InFontCache 
)

Member Function Documentation

◆ GetBaseline()

int16 FCharacterList::GetBaseline ( ) const

Returns the baseline for the font used by this character

Returns
The offset from the bottom of the max character height to the baseline. Be aware that the value will be negative.

◆ GetCharacter()

const FCharacterEntry & FCharacterList::GetCharacter ( TCHAR  Character,
const EFontFallback  MaxFontFallback 
)

Gets data about how to render and measure a character. Caching and atlasing it if needed. Subsequent calls may invalidate previous pointers.

Parameters
CharacterThe character to get
MaxFontFallbackThe maximum fallback level that can be used when resolving glyphs
Returns
Data about the character

◆ GetKerning() [1/2]

int8 FCharacterList::GetKerning ( const FCharacterEntry FirstCharacterEntry,
const FCharacterEntry SecondCharacterEntry 
)

Gets a kerning value for a pair of character entries

Parameters
FirstCharacterEntryThe first character entry in the pair
SecondCharacterEntryThe second character entry in the pair
Returns
The kerning value

◆ GetKerning() [2/2]

int8 FCharacterList::GetKerning ( TCHAR  FirstChar,
TCHAR  SecondChar,
const EFontFallback  MaxFontFallback 
)

Gets a kerning value for a pair of characters

Parameters
FirstCharThe first character in the pair
SecondCharThe second character in the pair
MaxFontFallbackThe maximum fallback level that can be used when resolving glyphs
Returns
The kerning value

◆ GetMaxHeight()

uint16 FCharacterList::GetMaxHeight ( ) const
Returns
The global max height for any character in this font

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