aboutsummaryrefslogtreecommitdiff
path: root/src/example/loadfont.cpp
diff options
context:
space:
mode:
authorWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-14 14:45:28 +0100
committerWBoerenkamps <wrj.boerenkamps@student.avans.nl>2024-12-14 14:45:28 +0100
commit9579f2a385de42cf74d50038c79a58c14eb0d980 (patch)
tree7e8f96e943705fccf2904fa20ee58aeb5242f943 /src/example/loadfont.cpp
parentfda61be91cd8667fa2b51e3b8a17ba6b93b728c8 (diff)
make format
Diffstat (limited to 'src/example/loadfont.cpp')
-rw-r--r--src/example/loadfont.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/example/loadfont.cpp b/src/example/loadfont.cpp
index 6020908..dae64bc 100644
--- a/src/example/loadfont.cpp
+++ b/src/example/loadfont.cpp
@@ -14,13 +14,13 @@ int main() {
SDLContext sdl_context{mediator};
try {
// Correct way to create a unique pointer for Text
- std::unique_ptr<Text> label
- = std::make_unique<Text>(1, vec2(100, 100), vec2(0, 0), "test test", "OpenSymbol",Text::Data{});
+ std::unique_ptr<Text> label = std::make_unique<Text>(
+ 1, vec2(100, 100), vec2(0, 0), "test test", "OpenSymbol", Text::Data{});
Asset asset = font_facade.get_font_asset(label->font_family);
std::cout << "path: " << asset.get_path() << std::endl;
std::unique_ptr<Font> font = std::make_unique<Font>(asset, mediator);
// Get the TTF_Font from the Font object
- TTF_Font* ttf_font = font->get_font();
+ TTF_Font * ttf_font = font->get_font();
//example if the asset is not correct for font
//std::unique_ptr<Font> fontThrow = std::make_unique<Font>(Asset("../help.txt"), mediator);
// Check if the font is loaded properly