diff options
author | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-17 13:31:34 +0100 |
---|---|---|
committer | heavydemon21 <nielsstunnebrink1@gmail.com> | 2024-12-17 13:31:34 +0100 |
commit | 24578c9afb61ae65b300dd7fb645220e133089be (patch) | |
tree | c6451ea01a56f0bde33a803ea37169f59d0fc41d /src/crepe/facade/Font.cpp | |
parent | bcaee968761c1d2e85c20925b237480c87da9747 (diff) | |
parent | 707db8c94b6bb3921105f40658aab13511d8df07 (diff) |
Merge branch 'wouter/text-component' into niels/UI
Diffstat (limited to 'src/crepe/facade/Font.cpp')
-rw-r--r-- | src/crepe/facade/Font.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/crepe/facade/Font.cpp b/src/crepe/facade/Font.cpp index 47d0e39..51e9690 100644 --- a/src/crepe/facade/Font.cpp +++ b/src/crepe/facade/Font.cpp @@ -1,3 +1,5 @@ +#include <SDL2/SDL_ttf.h> + #include "../api/Asset.h" #include "../api/Config.h" #include "util/Log.h" @@ -10,8 +12,7 @@ using namespace std; using namespace crepe; Font::Font(const Asset & src, Mediator & mediator) - : Resource(src, mediator) { - dbg_trace(); + : Resource(src, mediator){ Config & config = Config::get_instance(); const std::string FONT_PATH = src.get_path(); @@ -23,8 +24,7 @@ Font::Font(const Asset & src, Mediator & mediator) if (loaded_font == NULL) { throw runtime_error(format("Font: {} (path: {})", TTF_GetError(), FONT_PATH)); } - this->font = {loaded_font, [](TTF_Font * font) { TTF_CloseFont(font); }}; - */ + this->font = {loaded_font, [](TTF_Font * close_font) { TTF_CloseFont(close_font); }}; } TTF_Font * Font::get_font() const { return this->font.get(); } |