Add Prores 4444 support (#2263).
[dcpomatic.git] / src / lib / string_text.h
index feef90d61c68b0182fcb48d1fa7e88a4ab751e36..8c505f36a10d1b48f49279dfb4f1c5ca81c51402 100644 (file)
 
 */
 
-#ifndef DCPOMATIC_PLAIN_TEXT_H
-#define DCPOMATIC_PLAIN_TEXT_H
 
+#ifndef DCPOMATIC_STRING_TEXT_H
+#define DCPOMATIC_STRING_TEXT_H
+
+
+#include "font.h"
 #include <dcp/subtitle_string.h>
 
-/** A wrapper for SubtitleString which allows us to include settings that are not
- *  applicable to true DCP subtitles.  For example, we can set outline width for burn-in
- *  but this cannot be specified in DCP XML.
+
+/** A wrapper for SubtitleString which allows us to:
+ *
+ *    - include settings that are not applicable to true DCP subtitles.
+ *      For example, we can set outline width for burn-in but this cannot be specified in DCP XML.
+ *
+ *    - specify the font by referring to a Font object from the content we came from, rather than
+ *      having to use a DCP ID like in dcp::SubtitleString.
  */
 class StringText : public dcp::SubtitleString
 {
 public:
-       explicit StringText (dcp::SubtitleString dcp_)
-               : dcp::SubtitleString (dcp_)
-               , outline_width (2)
-       {}
-
-       StringText (dcp::SubtitleString dcp_, int outline_width_)
+       StringText (dcp::SubtitleString dcp_, int outline_width_, std::shared_ptr<dcpomatic::Font> font_)
                : dcp::SubtitleString (dcp_)
                , outline_width (outline_width_)
+               , font (font_)
        {}
 
        int outline_width;
+       std::shared_ptr<dcpomatic::Font> font;
 };
 
+
 #endif