Only add fonts to assets when they are required.
[dcpomatic.git] / src / lib / reel_writer.h
index d5b531f410ed9b6793237305296fbf43c83e66d9..fff298cb7be6d0512b36902ba53aed138067bc99 100644 (file)
@@ -27,7 +27,6 @@
 #include "player_text.h"
 #include "referenced_reel_asset.h"
 #include "render_text.h"
-#include "types.h"
 #include "weak_film.h"
 #include <dcp/atmos_asset_writer.h>
 #include <dcp/file.h>
@@ -73,14 +72,12 @@ public:
        void fake_write (int size);
        void repeat_write (Frame frame, Eyes eyes);
        void write (std::shared_ptr<const AudioBuffers> audio);
-       void write (PlayerText text, TextType type, boost::optional<DCPTextTrack> track, dcpomatic::DCPTimePeriod period, FontIdMap const& fonts);
+       void write(PlayerText text, TextType type, boost::optional<DCPTextTrack> track, dcpomatic::DCPTimePeriod period, FontIdMap const& fonts, std::shared_ptr<dcpomatic::Font> chosen_interop_font);
        void write (std::shared_ptr<const dcp::AtmosFrame> atmos, AtmosMetadata metadata);
 
        void finish (boost::filesystem::path output_dcp);
        std::shared_ptr<dcp::Reel> create_reel (
                std::list<ReferencedReelAsset> const & refs,
-               FontIdMap const & fonts,
-               std::shared_ptr<dcpomatic::Font> chosen_interop_font,
                boost::filesystem::path output_dcp,
                bool ensure_subtitles,
                std::set<DCPTextTrack> ensure_closed_captions
@@ -114,15 +111,13 @@ private:
        void create_reel_text (
                std::shared_ptr<dcp::Reel> reel,
                std::list<ReferencedReelAsset> const & refs,
-               FontIdMap const& fonts,
-               std::shared_ptr<dcpomatic::Font> chosen_interop_font,
                int64_t duration,
                boost::filesystem::path output_dcp,
                bool ensure_subtitles,
                std::set<DCPTextTrack> ensure_closed_captions
                ) const;
        void create_reel_markers (std::shared_ptr<dcp::Reel> reel) const;
-       float convert_vertical_position(StringText const& subtitle, dcp::Standard to) const;
+       float convert_vertical_position(StringText const& subtitle, dcp::SubtitleStandard to) const;
 
        dcpomatic::DCPTimePeriod _period;
        /** the first picture frame index that does not already exist in our MXF */