diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-12 21:26:03 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-12 21:26:03 +0100 |
commit | 5ef7c56e44a864e580810952450c43c0f9a7b6e0 (patch) | |
tree | 2a0faeaef514558b991832fbae63500f9f6e0228 /src/crepe/facade/Font.cpp | |
parent | f9f06f54dd1a66350afd42f6eec761565a4d3d77 (diff) |
make format
Diffstat (limited to 'src/crepe/facade/Font.cpp')
-rw-r--r-- | src/crepe/facade/Font.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/crepe/facade/Font.cpp b/src/crepe/facade/Font.cpp index 37dee3a..85b0e13 100644 --- a/src/crepe/facade/Font.cpp +++ b/src/crepe/facade/Font.cpp @@ -5,21 +5,21 @@ using namespace std; using namespace crepe; -Font::Font(const Asset& src, Mediator& mediator) - : Resource(src, mediator), font(nullptr, TTF_CloseFont) { - // Get the font file path from the Asset - const std::string font_path = src.get_path(); +Font::Font(const Asset & src, Mediator & mediator) + : Resource(src, mediator), + font(nullptr, TTF_CloseFont) { + // Get the font file path from the Asset + const std::string font_path = src.get_path(); - // Attempt to load the font - this->font.reset(TTF_OpenFont(font_path.c_str(), Config::get_instance().font.size)); + // Attempt to load the font + this->font.reset(TTF_OpenFont(font_path.c_str(), Config::get_instance().font.size)); - // Check if font loading failed - if (!this->font) { - throw runtime_error(format("Failed to load font from path: {}" - ". SDL_ttf error: {}",font_path, TTF_GetError())); - } + // Check if font loading failed + if (!this->font) { + throw runtime_error(format("Failed to load font from path: {}" + ". SDL_ttf error: {}", + font_path, TTF_GetError())); + } } -TTF_Font* Font::get_font() const { - return this->font.get(); -} +TTF_Font * Font::get_font() const { return this->font.get(); } |