aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/Font.cpp
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-17 13:29:58 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-17 13:29:58 +0100
commitbcaee968761c1d2e85c20925b237480c87da9747 (patch)
treef91ab2c2396a6365eb0696902e63975dc18b5259 /src/crepe/facade/Font.cpp
parentbfc07676707eae2c0161c6b86ccdd1583d96f71b (diff)
tmp fix
Diffstat (limited to 'src/crepe/facade/Font.cpp')
-rw-r--r--src/crepe/facade/Font.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/crepe/facade/Font.cpp b/src/crepe/facade/Font.cpp
index 8c16563..47d0e39 100644
--- a/src/crepe/facade/Font.cpp
+++ b/src/crepe/facade/Font.cpp
@@ -2,6 +2,7 @@
#include "../api/Config.h"
#include "util/Log.h"
#include <iostream>
+#include <string>
#include "Font.h"
@@ -13,11 +14,21 @@ Font::Font(const Asset & src, Mediator & mediator)
dbg_trace();
Config & config = Config::get_instance();
const std::string FONT_PATH = src.get_path();
+
+ this->path = FONT_PATH;
+
+ cout << this->path << endl;
+ /*
TTF_Font * loaded_font = TTF_OpenFont(FONT_PATH.c_str(), config.font.size);
if (loaded_font == NULL) {
throw runtime_error(format("Font: {} (path: {})", TTF_GetError(), FONT_PATH));
}
this->font = {loaded_font, [](TTF_Font * font) { TTF_CloseFont(font); }};
+ */
}
TTF_Font * Font::get_font() const { return this->font.get(); }
+
+const string & Font::get_path() const noexcept{
+ return this->path;
+}