Update Font.cpp
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m33s

fix memleak
This commit is contained in:
2024-07-17 16:36:45 -04:00
parent 162732e4b7
commit 4ff8d8ff07
4 changed files with 7 additions and 4 deletions

View File

@@ -71,6 +71,7 @@ public:
auto aspect = (float) window_size[0] / (float) window_size[1];
gladLoadGL();
JGL::InitTextEngine();
JGL::Update(getSize());
FreeSans = JGL::Font("assets/fonts/FreeSans.ttf");
Jupiteroid = JGL::Font("assets/fonts/Jupiteroid.ttf");
@@ -121,7 +122,7 @@ public:
J2D::DrawGradientLine(JGL::Colors::Red, JGL::Colors::Blue, {105, 375}, {200, 275}, 2);
auto result = Jupiteroid.MeasureString("Jupiteroid Font", 16);
DEBUG(std::format("Result: {},{}", result.x, result.y ));
//DEBUG(std::format("Result: {},{}", result.x, result.y ));
// TODO: Note the discrepancy in Y between the FillRect and DrawString call here.
J2D::FillRect(JGL::Colors::Gray, {0, 0}, result);