X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffont.h;h=a6bf61e340c445c25970e620c15ac1d489b7efa4;hb=9a97c1b4116d7fb80e8ab145c0cc738dbf14d617;hp=bbf88b34ad0247d1bf9468bb826e11710e4128ab;hpb=3828baf56467224f5d44049bf1e7a7ed11f43a05;p=dcpomatic.git diff --git a/src/lib/font.h b/src/lib/font.h index bbf88b34a..a6bf61e34 100644 --- a/src/lib/font.h +++ b/src/lib/font.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014-2015 Carl Hetherington + Copyright (C) 2014-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,23 +18,33 @@ */ + #ifndef DCPOMATIC_FONT_H #define DCPOMATIC_FONT_H -#include "font_files.h" + #include #include #include #include #include + +namespace dcpomatic { + + class Font { public: - Font (std::string id) + explicit Font (std::string id) : _id (id) {} - Font (cxml::NodePtr node); + explicit Font (cxml::NodePtr node); + + Font (std::string id, boost::filesystem::path file) + : _id (id) + , _file (file) + {} void as_xml (xmlpp::Node* node); @@ -42,21 +52,12 @@ public: return _id; } - boost::optional file (FontFiles::Variant variant) const { - return _files.get (variant); - } - - void set_file (FontFiles::Variant variant, boost::filesystem::path file) { - _files.set (variant, file); - Changed (); - } - - FontFiles files () const { - return _files; + boost::optional file () const { + return _file; } - void set_files (FontFiles files) { - _files = files; + void set_file (boost::filesystem::path file) { + _file = file; Changed (); } @@ -65,10 +66,14 @@ public: private: /** Font ID, used to describe it in the subtitle content */ std::string _id; - FontFiles _files; + boost::optional _file; }; + bool operator!= (Font const & a, Font const & b); bool operator== (Font const & a, Font const & b); + +} + #endif