X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Ffont.h;h=24d8ed2bb93103027795c838a3b800ad1668b5c0;hb=7274622a833c05eee36b7e59d8ec2ca3e136d140;hp=ed3ecc38f3075498d2051545a38df5ab4c2382fb;hpb=39fb8198febde1937019db1c300ec363aab5aa56;p=dcpomatic.git diff --git a/src/lib/font.h b/src/lib/font.h index ed3ecc38f..24d8ed2bb 100644 --- a/src/lib/font.h +++ b/src/lib/font.h @@ -23,6 +23,7 @@ #define DCPOMATIC_FONT_H +#include #include #include #include @@ -41,12 +42,26 @@ public: explicit Font (cxml::NodePtr node); + Font (std::string id, boost::filesystem::path file) + : _id (id) + , _file (file) + {} + + Font (std::string id, dcp::ArrayData data) + : _id (id) + , _data (data) + {} + void as_xml (xmlpp::Node* node); std::string id () const { return _id; } + void set_id (std::string id) { + _id = id; + } + boost::optional file () const { return _file; } @@ -56,11 +71,16 @@ public: Changed (); } + boost::optional data() const; + boost::signals2::signal Changed; private: - /** Font ID, used to describe it in the subtitle content */ + /** Font ID, used to describe it in the subtitle content; could be either a + * font family name or an ID from some DCP font XML. + */ std::string _id; + boost::optional _data; boost::optional _file; };