Various alignment tidying/fixups.
[dcpomatic.git] / src / lib / render_text.cc
index e47098ee906916da55ce02ba71686a6c486726d0..76c0fb79d0917ca0b81ae95d3113363381a44586 100644 (file)
@@ -48,8 +48,6 @@ using std::min;
 using std::pair;
 using std::shared_ptr;
 using std::string;
-using boost::optional;
-using boost::algorithm::replace_all;
 using namespace dcpomatic;
 
 
@@ -77,11 +75,7 @@ marked_up (list<StringText> subtitles, int target_height, float fade_factor)
                /* Between 1-65535 inclusive, apparently... */
                out += "alpha=\"" + dcp::raw_convert<string>(int(floor(fade_factor * 65534)) + 1) + "\" ";
                out += "color=\"#" + i.colour().to_rgb_string() + "\">";
-
-               string t = i.text();
-               replace_all(t, "&", "&amp;");
-               out += t;
-
+               out += i.text();
                out += "</span>";
        }
 
@@ -100,7 +94,7 @@ static shared_ptr<Image>
 create_image (dcp::Size size)
 {
        /* FFmpeg BGRA means first byte blue, second byte green, third byte red, fourth byte alpha */
-       auto image = make_shared<Image>(AV_PIX_FMT_BGRA, size, false);
+       auto image = make_shared<Image>(AV_PIX_FMT_BGRA, size, Image::Alignment::COMPACT);
        image->make_black ();
        return image;
 }