From 431d7cceb25db86f31a8c89440f3cdd2c7bf061f Mon Sep 17 00:00:00 2001 From: WBoerenkamps Date: Thu, 12 Dec 2024 20:45:49 +0100 Subject: load font almost working --- src/crepe/facade/Font.h | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/crepe/facade/Font.h') 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 font; - unsigned int default_font_size = Config::get_instance().font.size; }; } // namespace crepe -- cgit v1.2.3