Update Font.cpp
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m33s
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 1m33s
fix memleak
This commit is contained in:
3
main.cpp
3
main.cpp
@@ -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);
|
||||
|
Reference in New Issue
Block a user