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

#include <FontTypes.h>

+ Inheritance diagram for FSlateFontAtlas:

Public Member Functions

SLATECORE_API FSlateFontAtlas (uint32 InWidth, uint32 InHeight, ESlateFontAtlasContentType InContentType, ESlateTextureAtlasPaddingStyle InPaddingStyle)
 
virtual SLATECORE_API ~FSlateFontAtlas ()
 
virtual SLATECORE_API ESlateFontAtlasContentType GetContentType () const override final
 
virtual FSlateShaderResourceGetAtlasTexture () const override
 
virtual void ReleaseRenderingResources ()
 
virtual SLATECORE_API void GetAtlasDataCopy (TArray< uint8 > &OutData) const override
 
SLATECORE_API void Flush ()
 
SLATECORE_API const struct FAtlasedTextureSlotAddCharacter (const FCharacterRenderData &CharInfo)
 
bool BeginDeferredAddCharacter (const int16 InSizeX, const int16 InSizeY, FDeferredCharacterRenderData &OutCharInfo)
 
void EndDeferredAddCharacter (const FDeferredCharacterRenderData &CharInfo)
 
- Public Member Functions inherited from ISlateFontTexture
virtual ~ISlateFontTexture ()
 
virtual class FSlateShaderResourceGetSlateTexture () const =0
 
virtual class FTextureResourceGetEngineTexture ()=0
 
- Public Member Functions inherited from FSlateTextureAtlas
SLATECORE_API FSlateTextureAtlas (uint32 InWidth, uint32 InHeight, uint32 InBytesPerPixel, ESlateTextureAtlasPaddingStyle InPaddingStyle, bool bInUpdatesAfterInitialization)
 
virtual SLATECORE_API ~FSlateTextureAtlas ()
 
SLATECORE_API void EmptyAtlasData ()
 
SLATECORE_API const FAtlasedTextureSlotAddTexture (uint32 TextureWidth, uint32 TextureHeight, const TArray< uint8 > &Data)
 
uint32 GetWidth () const
 
uint32 GetHeight () const
 
SLATECORE_API void MarkTextureDirty ()
 
virtual void ConditionalUpdateTexture ()=0
 
virtual void ReleaseResources ()=0
 

Protected Attributes

ESlateFontAtlasContentType ContentType
 
- Protected Attributes inherited from FSlateTextureAtlas
TArray< uint8AtlasData
 
FAtlasedTextureSlotAtlasUsedSlots
 
TArray< FAtlasedTextureSlot * > AtlasEmptySlotsMap
 
uint32 AtlasWidth
 
uint32 AtlasHeight
 
uint32 BytesPerPixel
 
ESlateTextureAtlasPaddingStyle PaddingStyle
 
bool bNeedsUpdate
 
bool bUpdatesAfterInitialization
 
ESlateTextureAtlasThreadId AtlasOwnerThread
 

Additional Inherited Members

- Protected Member Functions inherited from FSlateTextureAtlas
SLATECORE_API const FAtlasedTextureSlotFindSlotForTexture (uint32 InWidth, uint32 InHeight)
 
void AddFreeSlot (uint32 InX, uint32 InY, uint32 InWidth, uint32 InHeight)
 
SLATECORE_API void InitAtlasData ()
 
SLATECORE_API void CopyRow (const FCopyRowData &CopyRowData)
 
SLATECORE_API void ZeroRow (const FCopyRowData &CopyRowData)
 
SLATECORE_API void CopyDataIntoSlot (const FAtlasedTextureSlot *SlotToCopyTo, const TArray< uint8 > &Data)
 
- Static Protected Member Functions inherited from FSlateTextureAtlas
static int32 GetFreeSlotSearchIndex (uint32 InWidth, uint32 InHeight)
 

Detailed Description

Representation of a texture for fonts in which characters are packed tightly based on their bounding rectangle

Constructor & Destructor Documentation

◆ FSlateFontAtlas()

FSlateFontAtlas::FSlateFontAtlas ( uint32  InWidth,
uint32  InHeight,
ESlateFontAtlasContentType  InContentType,
ESlateTextureAtlasPaddingStyle  InPaddingStyle 
)

◆ ~FSlateFontAtlas()

FSlateFontAtlas::~FSlateFontAtlas ( )
virtual

Member Function Documentation

◆ AddCharacter()

const FAtlasedTextureSlot * FSlateFontAtlas::AddCharacter ( const FCharacterRenderData CharInfo)

Adds a character to the texture.

Parameters
CharInfoInformation about the size of the character

◆ BeginDeferredAddCharacter()

bool FSlateFontAtlas::BeginDeferredAddCharacter ( const int16  InSizeX,
const int16  InSizeY,
FDeferredCharacterRenderData OutCharInfo 
)

Reserve a slot for a character but dont't update the texture yet.

Parameters
InSizeXWidth of the character
InSizeYHeight of the character

◆ EndDeferredAddCharacter()

void FSlateFontAtlas::EndDeferredAddCharacter ( const FDeferredCharacterRenderData CharInfo)

Update a character in the texture for already reserved or added slot.

Parameters
CharInfoInformation about the location and size of the character

◆ Flush()

void FSlateFontAtlas::Flush ( )

Flushes all cached data.

◆ GetAtlasDataCopy()

void FSlateFontAtlas::GetAtlasDataCopy ( TArray< uint8 > &  OutData) const
overridevirtual

Retrieves a copy of the texture atlas data in this texture. This is a slow operation so this is recommended primarily for debugging and visualization tools.

Parameters
OutDataAn array that a caller provides. This array will be populated with a copy of the data in the atlas. It is up to the caller to verify that the array is populated and not empty.

Implements ISlateFontTexture.

◆ GetAtlasTexture()

virtual FSlateShaderResource * FSlateFontAtlas::GetAtlasTexture ( ) const
inlineoverridevirtual

Implements FSlateTextureAtlas.

◆ GetContentType()

ESlateFontAtlasContentType FSlateFontAtlas::GetContentType ( ) const
finaloverridevirtual

Returns the type of content in the texture

Implements ISlateFontTexture.

◆ ReleaseRenderingResources()

virtual void FSlateFontAtlas::ReleaseRenderingResources ( )
inlinevirtual

Releases rendering resources of this texture

Implements ISlateFontTexture.

Member Data Documentation

◆ ContentType

ESlateFontAtlasContentType FSlateFontAtlas::ContentType
protected

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