UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FontCache.cpp File Reference

Functions

 DECLARE_DWORD_ACCUMULATOR_STAT (TEXT("Num Font Atlases"), STAT_SlateNumFontAtlases, STATGROUP_SlateMemory)
 
 DECLARE_DWORD_ACCUMULATOR_STAT (TEXT("Num Font Non-Atlased Textures"), STAT_SlateNumFontNonAtlasedTextures, STATGROUP_SlateMemory)
 
 DECLARE_MEMORY_STAT (TEXT("Shaped Glyph Sequence Memory"), STAT_SlateShapedGlyphSequenceMemory, STATGROUP_SlateMemory)
 
 DEFINE_STAT (STAT_SlateFontMeasureCacheMemory)
 
FAutoConsoleVariableRef CVarMaxAtlasPagesBeforeFlush (TEXT("Slate.MaxFontAtlasPagesBeforeFlush"), FontAtlasFlushParams.InitialMaxAtlasPagesBeforeFlushRequest, TEXT("The number of font atlas textures created and used before we flush the font cache if a texture atlas is full"))
 
FAutoConsoleVariableRef CVarMaxFontNonAtlasPagesBeforeFlush (TEXT("Slate.MaxFontNonAtlasTexturesBeforeFlush"), FontAtlasFlushParams.InitialMaxNonAtlasPagesBeforeFlushRequest, TEXT("The number of large glyph font textures initially."))
 
FAutoConsoleVariableRef CVarGrowFontAtlasFrameWindow (TEXT("Slate.GrowFontAtlasFrameWindow"), FontAtlasFlushParams.GrowAtlasFrameWindow, TEXT("The number of frames within the font atlas will resize rather than flush."))
 
FAutoConsoleVariableRef CVarGrowFontNonAtlasFrameWindow (TEXT("Slate.GrowFontNonAtlasFrameWindow"), FontAtlasFlushParams.GrowNonAtlasFrameWindow, TEXT("The number of frames within the large font glyph pool will resize rather than flush."))
 
void OnSlateSdfTextEnablementChanged (IConsoleVariable *Var)
 
bool IsSlateSdfTextFeatureEnabled ()
 
ETextShapingMethod GetDefaultTextShapingMethod ()
 

Variables

FAutoConsoleVariableRef CVarUnloadFreeTypeDataOnFlush (TEXT("Slate.UnloadFreeTypeDataOnFlush"), UnloadFreeTypeDataOnFlush, TEXT("Releases the free type data when the font cache is flushed"))
 
FAutoConsoleVariableRef CVarDumpFontCacheStats (TEXT("Slate.DumpFontCacheStats"), bDumpFontCacheStats, TEXT("Dump statistics about font cache usage."))
 
FAutoConsoleVariableRef CVarFlushFontCache (TEXT("Slate.FlushFontCache"), bFlushFontCache, TEXT("Flush the font cache."))
 
FAutoConsoleVariableRef CVarSlateSdfTextEnable (TEXT("UI.SlateSDFText.Enable"), bSlateSdfTextEnable, TEXT("Enables signed distance field-based text rendering in Slate"), FConsoleVariableDelegate::CreateStatic(OnSlateSdfTextEnablementChanged))
 
FAutoConsoleVariableShadow ShadowCVarSlateSdfTextEnable (TEXT("SlateSdfText.Enable"), TEXT("UI.SlateSDFText.Enable"))
 

Function Documentation

◆ CVarGrowFontAtlasFrameWindow()

FAutoConsoleVariableRef CVarGrowFontAtlasFrameWindow ( TEXT("Slate.GrowFontAtlasFrameWindow")  ,
FontAtlasFlushParams.  GrowAtlasFrameWindow,
TEXT("The number of frames within the font atlas will resize rather than flush."  
)

◆ CVarGrowFontNonAtlasFrameWindow()

FAutoConsoleVariableRef CVarGrowFontNonAtlasFrameWindow ( TEXT("Slate.GrowFontNonAtlasFrameWindow")  ,
FontAtlasFlushParams.  GrowNonAtlasFrameWindow,
TEXT("The number of frames within the large font glyph pool will resize rather than flush."  
)

◆ CVarMaxAtlasPagesBeforeFlush()

FAutoConsoleVariableRef CVarMaxAtlasPagesBeforeFlush ( TEXT("Slate.MaxFontAtlasPagesBeforeFlush")  ,
FontAtlasFlushParams.  InitialMaxAtlasPagesBeforeFlushRequest,
TEXT("The number of font atlas textures created and used before we flush the font cache if a texture atlas is full"  
)

◆ CVarMaxFontNonAtlasPagesBeforeFlush()

FAutoConsoleVariableRef CVarMaxFontNonAtlasPagesBeforeFlush ( TEXT("Slate.MaxFontNonAtlasTexturesBeforeFlush")  ,
FontAtlasFlushParams.  InitialMaxNonAtlasPagesBeforeFlushRequest,
TEXT("The number of large glyph font textures initially."  
)

◆ DECLARE_DWORD_ACCUMULATOR_STAT() [1/2]

DECLARE_DWORD_ACCUMULATOR_STAT ( TEXT("Num Font Atlases" ,
STAT_SlateNumFontAtlases  ,
STATGROUP_SlateMemory   
)

◆ DECLARE_DWORD_ACCUMULATOR_STAT() [2/2]

DECLARE_DWORD_ACCUMULATOR_STAT ( TEXT("Num Font Non-Atlased Textures" ,
STAT_SlateNumFontNonAtlasedTextures  ,
STATGROUP_SlateMemory   
)

◆ DECLARE_MEMORY_STAT()

DECLARE_MEMORY_STAT ( TEXT("Shaped Glyph Sequence Memory" ,
STAT_SlateShapedGlyphSequenceMemory  ,
STATGROUP_SlateMemory   
)

◆ DEFINE_STAT()

◆ GetDefaultTextShapingMethod()

ETextShapingMethod GetDefaultTextShapingMethod ( )

Get the default shaping method (from the "Slate.DefaultTextShapingMethod" CVar)

◆ IsSlateSdfTextFeatureEnabled()

bool IsSlateSdfTextFeatureEnabled ( )

Controls whether the signed distance field rendering mode feature for text is enabled.

◆ OnSlateSdfTextEnablementChanged()

void OnSlateSdfTextEnablementChanged ( IConsoleVariable Var)

Variable Documentation

◆ CVarDumpFontCacheStats

FAutoConsoleVariableRef CVarDumpFontCacheStats(TEXT("Slate.DumpFontCacheStats"), bDumpFontCacheStats, TEXT("Dump statistics about font cache usage.")) ( TEXT("Slate.DumpFontCacheStats")  ,
bDumpFontCacheStats  ,
TEXT("Dump statistics about font cache usage."  
)

◆ CVarFlushFontCache

FAutoConsoleVariableRef CVarFlushFontCache(TEXT("Slate.FlushFontCache"), bFlushFontCache, TEXT("Flush the font cache.")) ( TEXT("Slate.FlushFontCache")  ,
bFlushFontCache  ,
TEXT("Flush the font cache."  
)

◆ CVarSlateSdfTextEnable

FAutoConsoleVariableRef CVarSlateSdfTextEnable(TEXT("UI.SlateSDFText.Enable"), bSlateSdfTextEnable, TEXT("Enables signed distance field-based text rendering in Slate"), FConsoleVariableDelegate::CreateStatic(OnSlateSdfTextEnablementChanged)) ( TEXT("UI.SlateSDFText.Enable")  ,
bSlateSdfTextEnable  ,
TEXT("Enables signed distance field-based text rendering in Slate" ,
FConsoleVariableDelegate::CreateStatic(OnSlateSdfTextEnablementChanged  
)

◆ CVarUnloadFreeTypeDataOnFlush

FAutoConsoleVariableRef CVarUnloadFreeTypeDataOnFlush(TEXT("Slate.UnloadFreeTypeDataOnFlush"), UnloadFreeTypeDataOnFlush, TEXT("Releases the free type data when the font cache is flushed")) ( TEXT("Slate.UnloadFreeTypeDataOnFlush")  ,
UnloadFreeTypeDataOnFlush  ,
TEXT("Releases the free type data when the font cache is flushed"  
)

◆ ShadowCVarSlateSdfTextEnable

FAutoConsoleVariableShadow ShadowCVarSlateSdfTextEnable(TEXT("SlateSdfText.Enable"), TEXT("UI.SlateSDFText.Enable")) ( TEXT("SlateSdfText.Enable")  ,
TEXT("UI.SlateSDFText.Enable")   
)