From ddcd4f3ba0af3e9d49dbb68127317cd0d871a248 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 20 Dec 2020 23:41:52 +0100 Subject: Pass fonts from content around as FontData. i.e. as a block of memory rather than a file. Also, get the fonts from the decoder rather than the content. Together, these changes allow us to use fonts from SMPTE DCPs added as content. Before, fonts would be messed up in those cases (#1885). --- src/lib/dcp_subtitle_decoder.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/lib/dcp_subtitle_decoder.h') diff --git a/src/lib/dcp_subtitle_decoder.h b/src/lib/dcp_subtitle_decoder.h index 5bf6363ad..b53b88ded 100644 --- a/src/lib/dcp_subtitle_decoder.h +++ b/src/lib/dcp_subtitle_decoder.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Carl Hetherington + Copyright (C) 2014-2020 Carl Hetherington This file is part of DCP-o-matic. @@ -20,6 +20,7 @@ #include "text_decoder.h" #include "dcp_subtitle.h" +#include "font_data.h" class DCPSubtitleContent; @@ -31,9 +32,13 @@ public: bool pass (); void seek (dcpomatic::ContentTime time, bool accurate); + std::vector fonts () const; + private: dcpomatic::ContentTimePeriod content_time_period (boost::shared_ptr s) const; std::list > _subtitles; std::list >::const_iterator _next; + + std::vector _fonts; }; -- cgit v1.2.3