aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/Font.h
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-12 20:45:49 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-12 20:45:49 +0100
commit431d7cceb25db86f31a8c89440f3cdd2c7bf061f (patch)
treeeb32cf71b0f3fe369cd4509c54b8df960e2765e4 /src/crepe/facade/Font.h
parente75e355c3a59d53a1d64fd8fae3331b2234083e2 (diff)
load font almost working
Diffstat (limited to 'src/crepe/facade/Font.h')
-rw-r--r--src/crepe/facade/Font.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/crepe/facade/Font.h b/src/crepe/facade/Font.h
index 8bf9fc9..dd1cebf 100644
--- a/src/crepe/facade/Font.h
+++ b/src/crepe/facade/Font.h
@@ -17,17 +17,20 @@ class Font : public Resource{
public:
/**
* \param src Asset with font data to load.
- * \param mediator use the SDLContext reference to load text
+ * \param mediator use the SDLContext reference to get_font()
*/
- Font( src, Mediator & mediator);
+ Font(const Asset & src, Mediator & mediator);
-
- ~Font() = default
- const TTF_Font& get_font() const;
+ /**
+ * \brief getter for TTF_Font
+ *
+ * \param src Asset with font data to load.
+ * \param mediator use the SDLContext reference to get_font()
+ */
+ TTF_Font* get_font() const;
private:
//! The SDL_ttf font object with custom deleter.
std::unique_ptr<TTF_Font, decltype(&TTF_CloseFont)> font;
- unsigned int default_font_size = Config::get_instance().font.size;
};
} // namespace crepe