Finish PlayerSubtitles -> PlayerText and SubtitleString -> PlainText.
[dcpomatic.git] / src / lib / render_text.cc
index 673078347980e9012b93ce8a2ef6858ab9649b72..77a8036e811e5c621869fbf64fef03d215b5371e 100644 (file)
@@ -51,11 +51,11 @@ static FcConfig* fc_config = 0;
 static list<pair<FontFiles, string> > fc_config_fonts;
 
 string
-marked_up (list<SubtitleString> subtitles, int target_height, float fade_factor)
+marked_up (list<PlainText> subtitles, int target_height, float fade_factor)
 {
        string out;
 
-       BOOST_FOREACH (SubtitleString const & i, subtitles) {
+       BOOST_FOREACH (PlainText const & i, subtitles) {
                out += "<span ";
                if (i.italic()) {
                        out += "style=\"italic\" ";
@@ -91,7 +91,7 @@ set_source_rgba (Cairo::RefPtr<Cairo::Context> context, dcp::Colour colour, floa
  *  at the same time and with the same fade in/out.
  */
 static PositionImage
-render_line (list<SubtitleString> subtitles, list<shared_ptr<Font> > fonts, dcp::Size target, DCPTime time, int frame_rate)
+render_line (list<PlainText> subtitles, list<shared_ptr<Font> > fonts, dcp::Size target, DCPTime time, int frame_rate)
 {
        /* XXX: this method can only handle italic / bold changes mid-line,
           nothing else yet.
@@ -365,12 +365,12 @@ render_line (list<SubtitleString> subtitles, list<shared_ptr<Font> > fonts, dcp:
  *  @param frame_rate DCP frame rate.
  */
 list<PositionImage>
-render_text (list<SubtitleString> subtitles, list<shared_ptr<Font> > fonts, dcp::Size target, DCPTime time, int frame_rate)
+render_text (list<PlainText> subtitles, list<shared_ptr<Font> > fonts, dcp::Size target, DCPTime time, int frame_rate)
 {
-       list<SubtitleString> pending;
+       list<PlainText> pending;
        list<PositionImage> images;
 
-       BOOST_FOREACH (SubtitleString const & i, subtitles) {
+       BOOST_FOREACH (PlainText const & i, subtitles) {
                if (!pending.empty() && fabs (i.v_position() - pending.back().v_position()) > 1e-4) {
                        images.push_back (render_line (pending, fonts, target, time, frame_rate));
                        pending.clear ();