X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffont.h;fp=src%2Flib%2Ffont.h;h=c165fea9fedcb30b7c5083f5c36725d99e7c5647;hb=9bf2cf3509380663e6943f6b0d22dbec6002c332;hp=ca7650cc1b68d43406e2c8f27dd27e68762ea760;hpb=8a673bcf0cd26268899face63723c0f201fabcce;p=dcpomatic.git diff --git a/src/lib/font.h b/src/lib/font.h index ca7650cc1..c165fea9f 100644 --- a/src/lib/font.h +++ b/src/lib/font.h @@ -20,6 +20,7 @@ #ifndef DCPOMATIC_FONT_H #define DCPOMATIC_FONT_H +#include "font_files.h" #include #include #include @@ -40,12 +41,21 @@ public: return _id; } - boost::optional file () const { - return _file; + boost::optional file (FontFiles::Variant variant) const { + return _files.get (variant); } - void set_file (boost::filesystem::path file) { - _file = file; + void set_file (FontFiles::Variant variant, boost::filesystem::path file) { + _files.set (variant, file); + Changed (); + } + + FontFiles files () const { + return _files; + } + + void set_files (FontFiles files) { + _files = files; Changed (); } @@ -54,10 +64,10 @@ public: private: /** Font ID, used to describe it in the subtitle content */ std::string _id; - boost::optional _file; + FontFiles _files; }; -bool -operator!= (Font const & a, Font const & b); +bool operator!= (Font const & a, Font const & b); +bool operator== (Font const & a, Font const & b); #endif