diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-05-15 20:48:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-05-21 21:35:05 +0100 |
| commit | 1e1dc6d6d15a5c20d61fd084fa305162c93f47c9 (patch) | |
| tree | 9105b96d6d8140e024cf3035232ecee8646062a5 | |
| parent | d5ece4a49930f905b767855e4310bae74b7fdac8 (diff) | |
Fix up ChangeLog and cherry-pick 011d403 from master: fix missing burn-in/preview with subtitles containing ampersands.
| -rw-r--r-- | ChangeLog | 10 | ||||
| -rw-r--r-- | src/lib/render_subtitles.cc | 8 |
2 files changed, 15 insertions, 3 deletions
@@ -1,12 +1,18 @@ -2018-05-18 Carl Hetherington <cth@carlh.net> +2018-05-15 Carl Hetherington <cth@carlh.net> + + * Fix missing burnt-in / previewed subtitles containing ampersands. * Fix slow exports from DCP content (#1285). 2018-05-15 Carl Hetherington <cth@carlh.net> - * Fix incorrect subtitle positining in a VF when there are more than + * Fix incorrect subtitle positioning in a VF when there are more than two consecutive reels with no subtitles. +2018-05-15 Carl Hetherington <cth@carlh.net> + + * Version 2.12.5 released. + 2018-05-08 Carl Hetherington <cth@carlh.net> * Look at subtitle colour and effect when deciding whether or not to diff --git a/src/lib/render_subtitles.cc b/src/lib/render_subtitles.cc index 5f587c313..f4eb625cc 100644 --- a/src/lib/render_subtitles.cc +++ b/src/lib/render_subtitles.cc @@ -32,6 +32,7 @@ #include <pango/pangocairo.h> #endif #include <boost/foreach.hpp> +#include <boost/algorithm/string.hpp> #include <iostream> using std::list; @@ -44,6 +45,7 @@ using std::cerr; using std::make_pair; using boost::shared_ptr; using boost::optional; +using boost::algorithm::replace_all; static FcConfig* fc_config = 0; static list<pair<FontFiles, string> > fc_config_fonts; @@ -68,7 +70,11 @@ marked_up (list<SubtitleString> 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() + "\">"; - out += i.text (); + + string t = i.text(); + replace_all(t, "&", "&"); + out += t; + out += "</span>"; } |
