aboutsummaryrefslogtreecommitdiff
path: root/src/ImageViewer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ImageViewer.cpp')
-rw-r--r--src/ImageViewer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/ImageViewer.cpp b/src/ImageViewer.cpp
index c704485..be03781 100644
--- a/src/ImageViewer.cpp
+++ b/src/ImageViewer.cpp
@@ -2,6 +2,7 @@
#include "../include/Notification.hpp"
#include "../include/Storage.hpp"
#include "../include/SfmlFixes.hpp"
+#include "../include/FontLoader.hpp"
#include "../plugins/Manga.hpp"
#include <cmath>
#include <SFML/Window/Event.hpp>
@@ -9,15 +10,15 @@
#include <SFML/Graphics/RectangleShape.hpp>
namespace QuickMedia {
- ImageViewer::ImageViewer(MangaImagesPage *manga_images_page, const std::string &content_title, const std::string &chapter_title, int current_page, const Path &chapter_cache_dir, sf::Font *font) :
+ ImageViewer::ImageViewer(MangaImagesPage *manga_images_page, const std::string &content_title, const std::string &chapter_title, int current_page, const Path &chapter_cache_dir) :
current_page(current_page),
num_pages(0),
content_title(content_title),
chapter_title(chapter_title),
chapter_cache_dir(chapter_cache_dir),
focused_page(current_page),
- font(font),
- page_text("", *font, 14)
+ font(FontLoader::get_font(FontLoader::FontType::LATIN)),
+ page_text("", *FontLoader::get_font(FontLoader::FontType::LATIN), 14)
{
if(manga_images_page->get_number_of_images(num_pages) != ImageResult::OK) {
show_notification("QuickMedia", "Failed to get number of images", Urgency::CRITICAL);