Navigation
API > API/Runtime > API/Runtime/SlateCore > API/Runtime/SlateCore/Fonts
Inheritance Hierarchy
- ISlateAtlasProvider
- FSlateFlushableAtlasCache
- FSlateFontCache
References
| Module | SlateCore |
| Header | /Engine/Source/Runtime/SlateCore/Public/Fonts/FontCache.h |
| Include | #include "Fonts/FontCache.h" |
Syntax
class FSlateFontCache :
public ISlateAtlasProvider ,
public FSlateFlushableAtlasCache
Remarks
Font caching implementation Caches characters into textures as needed
Constructors
| Type | Name | Description | |
|---|---|---|---|
FSlateFontCache
(
TSharedRef< ISlateFontAtlasFactory > InFontAtlasFactory, |
Constructor |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| bool | CanLoadCodepoint
(
const FFontData& InFontData, |
Whether or not the specified character, within the specified font, can be loaded with the specified maximum font fallback level | |
| bool | Flush the cache if needed | ||
| void | FlushCompositeFont
(
const FCompositeFont& InCompositeFont |
Flush the given composite font out of the cache | |
| void | FlushData () |
Clears just the cached font data, but leaves the atlases alone | |
| void | FlushObject
(
const UObject*const InObject |
Flush the given object out of the cache | |
| TArray< FString > | GetAvailableFontSubFaces
(
FFontFaceDataConstRef InMemory |
Get the available sub-face data from the given font. | |
| TArray< FString > | GetAvailableFontSubFaces
(
const FString& InFilename |
||
| int16 | GetBaseline
(
const FSlateFontInfo& InFontInfo, |
Returns the baseline for the specified font. | |
| FCharacterList & | GetCharacterList
(
const FSlateFontInfo& InFontInfo, |
Gets information for how to draw all non-shaped characters in the specified string. | |
| const FFontData & | GetDefaultFontData
(
const FSlateFontInfo& InFontInfo |
Returns the font to use from the default typeface | |
| const TSet< FName > & | GetFontAttributes
(
const FFontData& InFontData |
Returns the font attributes for the specified font. | |
| SIZE_T | GetFontDataAssetResidentMemory
(
const UObject* FontDataAsset |
Gets the allocated font face data for a font data asset | |
| const FFontData & | GetFontDataForCodepoint
(
const FSlateFontInfo& InFontInfo, |
Returns the font to use from the typeface associated with the given codepoint | |
| ISlateFontTexture * | GetFontTexture
(
uint32 Index |
Get the texture resource for a font atlas at a given index | |
| int8 | GetKerning
(
const FFontData& InFontData, |
Calculates the kerning amount for a pair of characters | |
| uint16 | GetMaxCharacterHeight
(
const FSlateFontInfo& InFontInfo, |
Returns the height of the largest character in the font. | |
| FShapedGlyphSequenceRef | GetOverflowEllipsisText
(
const FSlateFontInfo& InFontInfo, |
Gets the overflow glyph sequence for a given font. | |
| FSdfGlyphFontAtlasData | GetSdfGlyphFontAtlasData
(
const FShapedGlyphEntry& InShapedGlyph, |
Get the atlas information and the scaled metrics of a given shaped sdf glyph. | |
| FShapedGlyphFontAtlasData | GetShapedGlyphFontAtlasData
(
const FShapedGlyphEntry& InShapedGlyph, |
Get the atlas information for the given shaped glyph. This information will be cached if required | |
| void | GetStrikeMetrics
(
const FSlateFontInfo& InFontInfo, |
Get the strike metrics for the specified font. | |
| void | GetUnderlineMetrics
(
const FSlateFontInfo& InFontInfo, |
Get the underline metrics for the specified font. | |
| bool | HasKerning
(
const FFontData& InFontData |
||
| FOnReleaseFontResources & | Event called after releasing the rendering resources in ReleaseResources | ||
| void | Releases rendering resources | ||
| FShapedGlyphSequenceRef | ShapeBidirectionalText
(
const FString& InText, |
Performs text shaping on the given string using the given font info. | |
| FShapedGlyphSequenceRef | ShapeBidirectionalText
(
const TCHAR* InText, |
||
| FShapedGlyphSequenceRef | ShapeOverflowEllipsisText
(
const FSlateFontInfo& InFontInfo, |
Performs text shaping on the overflow glyph sequence for a given font. | |
| FShapedGlyphSequenceRef | ShapeUnidirectionalText
(
const FString& InText, |
Performs text shaping on the given range of the string using the given font info. | |
| FShapedGlyphSequenceRef | ShapeUnidirectionalText
(
const TCHAR* InText, |
||
| void | UpdateCache () |
Updates the texture used for rendering |
Overridden from ISlateAtlasProvider
| Type | Name | Description | |
|---|---|---|---|
| FSlateShaderResource * | GetAtlasPageResource
(
const int32 InIndex |
Get the page resource for the given index (verify with GetNumAtlasPages) | |
| FAtlasSlotInfo | GetAtlasSlotInfoAtPosition
(
FIntPoint InPosition, |
Finds a currently occupied slot at a position specified in atlas coordinates where 0,0 is the top left and the size of the atlas is bottom right | |
| int32 | ISlateAtlasProvider | ||
| bool | IsAtlasPageResourceAlphaOnly
(
const int32 InIndex |
Does the page resources for the given index only contain alpha information? This affects how the atlas visualizer will sample them (verify with GetNumAtlasPages) |
Overridden from FSlateFlushableAtlasCache
| Type | Name | Description | |
|---|---|---|---|
| void | RequestFlushCache
(
const FString& FlushReason |
Issues a request to clear all cached data from the cache |