implement font deletion
This commit is contained in:
@@ -70,6 +70,7 @@ class PD_API Drawlist {
|
||||
/** Font Handling */
|
||||
void SetFont(Font* font) { pFont = font; }
|
||||
void SetFontscale(float fontscale = 1.f) { pFontScale = fontscale; }
|
||||
const float& GetFontScale() const { return pFontScale; }
|
||||
|
||||
/** Data geters */
|
||||
const Pool<Command>& Data() const { return pCommands; }
|
||||
|
||||
@@ -64,6 +64,11 @@ class PD_API Font {
|
||||
void CmdTextEx(Drawlist& dl, const fvec2& pos, u32 color, float scale,
|
||||
const char* text, LiTextFlags flags = 0, const fvec2& box = 0);
|
||||
|
||||
/**
|
||||
* Cleanup Font and unload Textures
|
||||
*/
|
||||
void Delete();
|
||||
|
||||
/**
|
||||
* Garbage collection for TextMapSystem
|
||||
*/
|
||||
@@ -80,7 +85,7 @@ class PD_API Font {
|
||||
|
||||
/** Data Section */
|
||||
int PixelHeight = 0;
|
||||
int DefaultPixelHeight = 24;
|
||||
int DefaultPixelHeight = 32;
|
||||
std::vector<TextureID> Textures;
|
||||
/**
|
||||
* 32Bit Codepoint Dataholder reference map
|
||||
|
||||
Reference in New Issue
Block a user