implement font deletion

This commit is contained in:
2026-03-26 21:01:43 +01:00
parent d2ab60c824
commit bc06a3fee8
5 changed files with 20 additions and 4 deletions

View File

@@ -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; }

View File

@@ -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