Class FontManager
Fonts management and character atlases management utility service.
Inheritance
Assembly: FlaxEngine.dll
File: Engine/Render2D/FontManager.h
Syntax
public class FontManager
Fields
FontScale
The global characters font scale factor. Used to upscale characters on high-DPI monitors.
Declaration
public static float FontScale
Field Value
float
|
Methods
AddNewEntry(Font* font, Char c, FontCharacterEntry& entry)
Adds character from given font to the cache.
Declaration
public static bool AddNewEntry(Font* font, Char c, FontCharacterEntry& entry)
Parameters
Font
font
The font to create character entry for it. |
Char
c
The character to add. |
FontCharacterEntry
entry
The created character entry. |
Returns
bool
True if cannot add new character entry to the font cache, otherwise false. |
EnsureAtlasCreated(int32 index)
Declaration
public static void EnsureAtlasCreated(int32 index)
Parameters
int32
index
|
Flush()
Flushes all font atlases.
Declaration
public static void Flush()
GetAtlas(int32 index)
Gets the texture atlas.
Declaration
public static FontTextureAtlas* GetAtlas(int32 index)
Parameters
int32
index
The atlas index. |
Returns
FontTextureAtlas
The texture atlas. |
GetLibrary()
Gets the FreeType library.
Declaration
public static FT_Library GetLibrary()
Returns
FT_Library
The library. |
HasDataSyncWithGPU()
Determines whether all atlases has been synced with the GPU memory and data is up to date.
Declaration
public static bool HasDataSyncWithGPU()
Returns
bool
|
Invalidate(FontCharacterEntry& entry)
Invalidates the cached dynamic font character. Can be used to reload font characters after changing font asset options.
Declaration
public static void Invalidate(FontCharacterEntry& entry)
Parameters
FontCharacterEntry
entry
The font character entry. |
IsDirty()
Determines whether one or more font atlases is dirty.
Declaration
public static bool IsDirty()
Returns
bool
|