From 4690ba0cc66338b1f00e08fb6054ee95c1c0dcc6 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 23 Sep 2020 23:45:21 +0200 Subject: Fallback to cjk font, change font to system noto sans --- include/Body.hpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include/Body.hpp') diff --git a/include/Body.hpp b/include/Body.hpp index e4c21fc..235de72 100644 --- a/include/Body.hpp +++ b/include/Body.hpp @@ -36,17 +36,23 @@ namespace QuickMedia { dirty_description = true; } + void set_author(std::string str) { + author = std::move(str); + dirty_author = true; + } + const std::string& get_title() const { return title; } const std::string& get_description() const { return description; } + const std::string& get_author() const { return author; } // TODO: Use a list of strings instead, not all plugins need all of these fields std::string url; std::string thumbnail_url; std::string attached_content_url; // TODO: Remove and use |url| instead - std::string author; bool visible; bool dirty; bool dirty_description; + bool dirty_author; bool thumbnail_is_local; std::unique_ptr title_text; std::unique_ptr description_text; @@ -57,13 +63,14 @@ namespace QuickMedia { private: std::string title; std::string description; + std::string author; }; using BodyItems = std::vector>; class Body { public: - Body(Program *program, sf::Font *font, sf::Font *bold_font); + Body(Program *program, sf::Font *font, sf::Font *bold_font, sf::Font *cjk_font); // Select previous item, ignoring invisible items. Returns true if the item was changed. This can be used to check if the top was hit when wrap_around is set to false bool select_previous_item(); @@ -97,6 +104,7 @@ namespace QuickMedia { sf::Font *font; sf::Font *bold_font; + sf::Font *cjk_font; sf::Text progress_text; sf::Text author_text; sf::Text replies_text; -- cgit v1.2.3