diff options
| author | Carl Hetherington <cth@carlh.net> | 2022-06-01 13:03:38 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2022-06-07 17:01:06 +0200 |
| commit | 5a820bb8fae34591be5ac6d19a73461b9dab532a (patch) | |
| tree | 098e2dc959b6df0fefa62b2976976afc9f81b96b /src/lib/font.h | |
| parent | 9a7b67aee32a40539f29bc2d7017edd4a4f65f11 (diff) | |
Rearrange subtitle font management.
With this change each subtitle coming out of the player has a reference
to a dcpomatic::Font that belongs to the TextContent. This hopefully
solves a few problems which all basically stemmed from the fact that
previously the decoders/player were deciding what the font ID in the
output DCP would be - they can't do that properly.
Diffstat (limited to 'src/lib/font.h')
| -rw-r--r-- | src/lib/font.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/lib/font.h b/src/lib/font.h index a6bf61e34..c1405d0f6 100644 --- a/src/lib/font.h +++ b/src/lib/font.h @@ -23,6 +23,7 @@ #define DCPOMATIC_FONT_H +#include <dcp/array_data.h> #include <libcxml/cxml.h> #include <boost/optional.hpp> #include <boost/signals2.hpp> @@ -52,6 +53,10 @@ public: return _id; } + void set_id (std::string id) { + _id = id; + } + boost::optional<boost::filesystem::path> file () const { return _file; } @@ -61,11 +66,16 @@ public: Changed (); } + boost::optional<dcp::ArrayData> data() const; + boost::signals2::signal<void()> 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<dcp::ArrayData> _data; boost::optional<boost::filesystem::path> _file; }; |
