context->set_line_width (1);
for (list<dcp::SubtitleString>::const_iterator i = subtitles.begin(); i != subtitles.end(); ++i) {
- string f = i->font ();
- if (f.empty ()) {
- f = "Arial";
- }
- Pango::FontDescription font (f);
+ Pango::FontDescription font (i->font().get_value_or ("Arial"));
font.set_absolute_size (i->size_in_pixels (target.height) * PANGO_SCALE);
if (i->italic ()) {
font.set_style (Pango::STYLE_ITALIC);
using std::list;
using std::vector;
+using std::string;
using boost::shared_ptr;
+using boost::optional;
SubRipDecoder::SubRipDecoder (shared_ptr<const SubRipContent> content)
: SubtitleDecoder (content)
for (list<sub::Block>::const_iterator j = i->blocks.begin(); j != i->blocks.end(); ++j) {
out.push_back (
dcp::SubtitleString (
- "Arial",
+ optional<string> (),
j->italic,
dcp::Color (255, 255, 255),
/* .srt files don't specify size, so this is an arbitrary value */
#include <dcp/dcp.h>
#include <dcp/cpl.h>
#include <dcp/signer.h>
+#include <dcp/interop_subtitle_content.h>
#include <fstream>
#include <cerrno>
}
if (!_subtitle_content) {
- _subtitle_content.reset (new dcp::SubtitleContent (_film->name(), subs.language));
+ _subtitle_content.reset (new dcp::InteropSubtitleContent (_film->name(), subs.language));
}
for (list<dcp::SubtitleString>::const_iterator i = subs.text.begin(); i != subs.text.end(); ++i) {