summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xrun/tests4
-rw-r--r--src/font_node.cc23
-rw-r--r--src/font_node.h3
-rw-r--r--src/interop_subtitle_asset.cc4
-rw-r--r--src/smpte_subtitle_asset.cc4
-rw-r--r--src/subtitle_asset.cc10
-rw-r--r--src/subtitle_node.cc6
-rw-r--r--src/subtitle_node.h2
-rw-r--r--src/subtitle_string.cc7
-rw-r--r--src/subtitle_string.h7
-rw-r--r--src/text_node.cc4
-rw-r--r--src/text_node.h2
-rw-r--r--test/data/subs1.xml2
-rw-r--r--test/read_interop_subtitle_test.cc23
-rw-r--r--test/text_test.cc4
-rw-r--r--test/write_subtitle_test.cc8
16 files changed, 88 insertions, 25 deletions
diff --git a/run/tests b/run/tests
index dc1382ce..4bc3e5f3 100755
--- a/run/tests
+++ b/run/tests
@@ -28,6 +28,10 @@ elif [ "$1" == "--callgrind" ]; then
valgrind --tool="callgrind" $work/tests $private $*
else
$work/tests $private $*
+ if [ "$?" != "0" ]; then
+ echo "FAIL: unit tests"
+ exit 1
+ fi
fi
# Check a MXF written by the unit tests
diff --git a/src/font_node.cc b/src/font_node.cc
index 6dd6e58f..1aa4be6b 100644
--- a/src/font_node.cc
+++ b/src/font_node.cc
@@ -45,15 +45,24 @@ using boost::shared_ptr;
using boost::optional;
using namespace dcp;
-FontNode::FontNode (cxml::ConstNodePtr node, optional<int> tcr, string font_id_attribute)
+FontNode::FontNode (cxml::ConstNodePtr node, optional<int> tcr, Standard standard)
{
text = node->content ();
- id = node->optional_string_attribute (font_id_attribute);
+ if (standard == INTEROP) {
+ id = node->optional_string_attribute ("Id");
+ } else {
+ id = node->optional_string_attribute ("ID");
+ }
size = node->optional_number_attribute<int64_t> ("Size").get_value_or (0);
aspect_adjust = node->optional_number_attribute<float> ("AspectAdjust");
italic = node->optional_bool_attribute ("Italic");
bold = node->optional_string_attribute("Weight").get_value_or("normal") == "bold";
+ if (standard == INTEROP) {
+ underline = node->optional_bool_attribute ("Underlined");
+ } else {
+ underline = node->optional_bool_attribute ("Underline");
+ }
optional<string> c = node->optional_string_attribute ("Color");
if (c) {
colour = Colour (c.get ());
@@ -69,17 +78,17 @@ FontNode::FontNode (cxml::ConstNodePtr node, optional<int> tcr, string font_id_a
list<cxml::NodePtr> s = node->node_children ("Subtitle");
BOOST_FOREACH (cxml::NodePtr& i, s) {
- subtitle_nodes.push_back (shared_ptr<SubtitleNode> (new SubtitleNode (i, tcr, font_id_attribute)));
+ subtitle_nodes.push_back (shared_ptr<SubtitleNode> (new SubtitleNode (i, tcr, standard)));
}
list<cxml::NodePtr> f = node->node_children ("Font");
BOOST_FOREACH (cxml::NodePtr& i, f) {
- font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, tcr, font_id_attribute)));
+ font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, tcr, standard)));
}
list<cxml::NodePtr> t = node->node_children ("Text");
BOOST_FOREACH (cxml::NodePtr& i, t) {
- text_nodes.push_back (shared_ptr<TextNode> (new TextNode (i, tcr, font_id_attribute)));
+ text_nodes.push_back (shared_ptr<TextNode> (new TextNode (i, tcr, standard)));
}
}
@@ -87,6 +96,7 @@ FontNode::FontNode (std::list<boost::shared_ptr<FontNode> > const & font_nodes)
: size (0)
, italic (false)
, bold (false)
+ , underline (false)
, colour ("FFFFFFFF")
, effect_colour ("FFFFFFFF")
{
@@ -106,6 +116,9 @@ FontNode::FontNode (std::list<boost::shared_ptr<FontNode> > const & font_nodes)
if ((*i)->bold) {
bold = (*i)->bold.get ();
}
+ if ((*i)->underline) {
+ underline = (*i)->underline.get ();
+ }
if ((*i)->colour) {
colour = (*i)->colour.get ();
}
diff --git a/src/font_node.h b/src/font_node.h
index 8f7cc2aa..2108af9e 100644
--- a/src/font_node.h
+++ b/src/font_node.h
@@ -54,7 +54,7 @@ public:
: size (0)
{}
- FontNode (cxml::ConstNodePtr node, boost::optional<int> tcr, std::string font_id_attribute);
+ FontNode (cxml::ConstNodePtr node, boost::optional<int> tcr, Standard standard);
explicit FontNode (std::list<boost::shared_ptr<FontNode> > const & font_nodes);
std::string text;
@@ -63,6 +63,7 @@ public:
boost::optional<float> aspect_adjust;
boost::optional<bool> italic;
boost::optional<bool> bold;
+ boost::optional<bool> underline;
boost::optional<Colour> colour;
boost::optional<Effect> effect;
boost::optional<Colour> effect_colour;
diff --git a/src/interop_subtitle_asset.cc b/src/interop_subtitle_asset.cc
index b32ac790..b0b94995 100644
--- a/src/interop_subtitle_asset.cc
+++ b/src/interop_subtitle_asset.cc
@@ -68,12 +68,12 @@ InteropSubtitleAsset::InteropSubtitleAsset (boost::filesystem::path file)
list<shared_ptr<dcp::FontNode> > font_nodes;
BOOST_FOREACH (cxml::NodePtr const & i, xml->node_children ("Font")) {
- font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, optional<int>(), "Id")));
+ font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, optional<int>(), INTEROP)));
}
list<shared_ptr<dcp::SubtitleNode> > subtitle_nodes;
BOOST_FOREACH (cxml::NodePtr const & i, xml->node_children ("Subtitle")) {
- subtitle_nodes.push_back (shared_ptr<SubtitleNode> (new SubtitleNode (i, optional<int>(), "Id")));
+ subtitle_nodes.push_back (shared_ptr<SubtitleNode> (new SubtitleNode (i, optional<int>(), INTEROP)));
}
parse_subtitles (xml, font_nodes, subtitle_nodes);
diff --git a/src/smpte_subtitle_asset.cc b/src/smpte_subtitle_asset.cc
index 685b4fc7..2a6a5093 100644
--- a/src/smpte_subtitle_asset.cc
+++ b/src/smpte_subtitle_asset.cc
@@ -134,12 +134,12 @@ SMPTESubtitleAsset::SMPTESubtitleAsset (boost::filesystem::path file)
list<shared_ptr<dcp::FontNode> > font_nodes;
BOOST_FOREACH (cxml::NodePtr const & i, subtitle_list->node_children ("Font")) {
- font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, _time_code_rate, "ID")));
+ font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, _time_code_rate, SMPTE)));
}
list<shared_ptr<dcp::SubtitleNode> > subtitle_nodes;
BOOST_FOREACH (cxml::NodePtr const & i, subtitle_list->node_children ("Subtitle")) {
- subtitle_nodes.push_back (shared_ptr<SubtitleNode> (new SubtitleNode (i, _time_code_rate, "ID")));
+ subtitle_nodes.push_back (shared_ptr<SubtitleNode> (new SubtitleNode (i, _time_code_rate, SMPTE)));
}
parse_subtitles (xml, font_nodes, subtitle_nodes);
diff --git a/src/subtitle_asset.cc b/src/subtitle_asset.cc
index f1365118..35ca6174 100644
--- a/src/subtitle_asset.cc
+++ b/src/subtitle_asset.cc
@@ -158,6 +158,7 @@ SubtitleAsset::maybe_add_subtitle (string text, ParseState const & parse_state)
effective_font.id,
effective_font.italic.get_value_or (false),
effective_font.bold.get_value_or (false),
+ effective_font.underline.get_value_or (false),
effective_font.colour.get_value_or (dcp::Colour (255, 255, 255)),
effective_font.size,
effective_font.aspect_adjust.get_value_or (1.0),
@@ -249,11 +250,12 @@ SubtitleAsset::subtitles_as_xml (xmlpp::Element* root, int time_code_rate, Stand
string const xmlns = standard == SMPTE ? "dcst" : "";
- /* XXX: script, underlined not supported */
+ /* XXX: script not supported */
optional<string> font;
bool italic = false;
bool bold = false;
+ bool underline = false;
Colour colour;
int size = 0;
float aspect_adjust = 1.0;
@@ -279,6 +281,7 @@ SubtitleAsset::subtitles_as_xml (xmlpp::Element* root, int time_code_rate, Stand
font != i.font() ||
italic != i.italic() ||
bold != i.bold() ||
+ underline != i.underline() ||
colour != i.colour() ||
size != i.size() ||
fabs (aspect_adjust - i.aspect_adjust()) > ASPECT_ADJUST_EPSILON ||
@@ -289,6 +292,7 @@ SubtitleAsset::subtitles_as_xml (xmlpp::Element* root, int time_code_rate, Stand
font = i.font ();
italic = i.italic ();
bold = i.bold ();
+ underline = i.underline ();
colour = i.colour ();
size = i.size ();
aspect_adjust = i.aspect_adjust ();
@@ -315,9 +319,9 @@ SubtitleAsset::subtitles_as_xml (xmlpp::Element* root, int time_code_rate, Stand
font_element->set_attribute ("EffectColor", effect_colour.to_argb_string());
font_element->set_attribute ("Script", "normal");
if (standard == SMPTE) {
- font_element->set_attribute ("Underline", "no");
+ font_element->set_attribute ("Underline", underline ? "yes" : "no");
} else {
- font_element->set_attribute ("Underlined", "no");
+ font_element->set_attribute ("Underlined", underline ? "yes" : "no");
}
font_element->set_attribute ("Weight", bold ? "bold" : "normal");
}
diff --git a/src/subtitle_node.cc b/src/subtitle_node.cc
index 44c32e26..82c11401 100644
--- a/src/subtitle_node.cc
+++ b/src/subtitle_node.cc
@@ -46,19 +46,19 @@ using boost::lexical_cast;
using namespace dcp;
/** @param tcr Timecode rate for SMPTE, or empty for Interop */
-SubtitleNode::SubtitleNode (boost::shared_ptr<const cxml::Node> node, optional<int> tcr, string font_id_attribute)
+SubtitleNode::SubtitleNode (boost::shared_ptr<const cxml::Node> node, optional<int> tcr, Standard standard)
{
in = Time (node->string_attribute ("TimeIn"), tcr);
out = Time (node->string_attribute ("TimeOut"), tcr);
list<cxml::NodePtr> f = node->node_children ("Font");
for (list<cxml::NodePtr>::iterator i = f.begin(); i != f.end(); ++i) {
- font_nodes.push_back (shared_ptr<FontNode> (new FontNode (*i, tcr, font_id_attribute)));
+ font_nodes.push_back (shared_ptr<FontNode> (new FontNode (*i, tcr, standard)));
}
list<cxml::NodePtr> t = node->node_children ("Text");
for (list<cxml::NodePtr>::iterator i = t.begin(); i != t.end(); ++i) {
- text_nodes.push_back (shared_ptr<TextNode> (new TextNode (*i, tcr, font_id_attribute)));
+ text_nodes.push_back (shared_ptr<TextNode> (new TextNode (*i, tcr, standard)));
}
fade_up_time = fade_time (node, "FadeUpTime", tcr);
diff --git a/src/subtitle_node.h b/src/subtitle_node.h
index 37d41f01..e08ecfd4 100644
--- a/src/subtitle_node.h
+++ b/src/subtitle_node.h
@@ -52,7 +52,7 @@ class SubtitleNode
{
public:
SubtitleNode () {}
- SubtitleNode (boost::shared_ptr<const cxml::Node> node, boost::optional<int> tcr, std::string font_id_attribute);
+ SubtitleNode (boost::shared_ptr<const cxml::Node> node, boost::optional<int> tcr, Standard standard);
Time in;
Time out;
diff --git a/src/subtitle_string.cc b/src/subtitle_string.cc
index 8e106c6d..5a22475c 100644
--- a/src/subtitle_string.cc
+++ b/src/subtitle_string.cc
@@ -45,6 +45,7 @@ SubtitleString::SubtitleString (
optional<string> font,
bool italic,
bool bold,
+ bool underline,
Colour colour,
int size,
float aspect_adjust,
@@ -64,6 +65,7 @@ SubtitleString::SubtitleString (
: _font (font)
, _italic (italic)
, _bold (bold)
+ , _underline (underline)
, _colour (colour)
, _size (size)
, _aspect_adjust (aspect_adjust)
@@ -101,6 +103,7 @@ dcp::operator== (SubtitleString const & a, SubtitleString const & b)
a.font() == b.font() &&
a.italic() == b.italic() &&
a.bold() == b.bold() &&
+ a.underline() == b.underline() &&
a.colour() == b.colour() &&
a.size() == b.size() &&
fabs (a.aspect_adjust() - b.aspect_adjust()) < ASPECT_ADJUST_EPSILON &&
@@ -138,6 +141,10 @@ dcp::operator<< (ostream& s, SubtitleString const & sub)
s << "normal, ";
}
+ if (sub.underline()) {
+ s << "underlined, ";
+ }
+
s << "size " << sub.size() << ", aspect " << sub.aspect_adjust() << ", colour " << sub.colour()
<< ", vpos " << sub.v_position() << ", valign " << ((int) sub.v_align())
<< ", hpos " << sub.h_position() << ", halign " << ((int) sub.h_align())
diff --git a/src/subtitle_string.h b/src/subtitle_string.h
index b16f764b..51b37564 100644
--- a/src/subtitle_string.h
+++ b/src/subtitle_string.h
@@ -55,6 +55,7 @@ public:
boost::optional<std::string> font,
bool italic,
bool bold,
+ bool underline,
Colour colour,
int size,
float aspect_adjust,
@@ -85,6 +86,10 @@ public:
return _bold;
}
+ bool underline () const {
+ return _underline;
+ }
+
Colour colour () const {
return _colour;
}
@@ -189,6 +194,8 @@ private:
bool _italic;
/** true if the weight is bold, false for normal */
bool _bold;
+ /** true to enable underlining, false otherwise */
+ bool _underline;
/** text colour */
Colour _colour;
/** Size in points as if the screen height is 11 inches, so a 72pt font
diff --git a/src/text_node.cc b/src/text_node.cc
index cfd0557f..6a48470d 100644
--- a/src/text_node.cc
+++ b/src/text_node.cc
@@ -51,7 +51,7 @@ using namespace dcp;
* in this object's member variables.
* @param node Node to read.
*/
-TextNode::TextNode (boost::shared_ptr<const cxml::Node> node, optional<int> tcr, string font_id_attribute)
+TextNode::TextNode (boost::shared_ptr<const cxml::Node> node, optional<int> tcr, Standard standard)
: h_position (0)
, h_align (HALIGN_CENTER)
, v_position (0)
@@ -99,6 +99,6 @@ TextNode::TextNode (boost::shared_ptr<const cxml::Node> node, optional<int> tcr,
list<cxml::NodePtr> f = node->node_children ("Font");
BOOST_FOREACH (cxml::NodePtr& i, f) {
- font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, tcr, font_id_attribute)));
+ font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, tcr, standard)));
}
}
diff --git a/src/text_node.h b/src/text_node.h
index 313bdbcb..21246cb2 100644
--- a/src/text_node.h
+++ b/src/text_node.h
@@ -63,7 +63,7 @@ public:
, direction (DIRECTION_LTR)
{}
- TextNode (boost::shared_ptr<const cxml::Node> node, boost::optional<int> tcr, std::string font_id_attribute);
+ TextNode (boost::shared_ptr<const cxml::Node> node, boost::optional<int> tcr, Standard standard);
float h_position;
HAlign h_align;
diff --git a/test/data/subs1.xml b/test/data/subs1.xml
index f4a4ded8..ee57db02 100644
--- a/test/data/subs1.xml
+++ b/test/data/subs1.xml
@@ -20,7 +20,7 @@
<Subtitle SpotNumber="3" TimeIn="00:00:11:094" TimeOut="00:00:13:063" FadeUpTime="1" FadeDownTime="1">
<Text VAlign="bottom" VPosition="15.0">Once belonged to the Shah</Text>
</Subtitle>
- <Font Weight="bold">
+ <Font Weight="bold" Underlined="yes">
<Subtitle SpotNumber="4" TimeIn="00:00:13:104" TimeOut="00:00:15:177" FadeUpTime="1" FadeDownTime="1">
<Text VAlign="bottom" VPosition="15.0">And these are Roy Hattersley's jeans</Text>
</Subtitle>
diff --git a/test/read_interop_subtitle_test.cc b/test/read_interop_subtitle_test.cc
index 3ec70296..7febaab4 100644
--- a/test/read_interop_subtitle_test.cc
+++ b/test/read_interop_subtitle_test.cc
@@ -50,6 +50,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
string ("theFontId"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
39,
1.0,
@@ -73,6 +74,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
string ("theFontId"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
39,
1.0,
@@ -93,6 +95,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
string ("theFontId"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
39,
1.0,
@@ -116,6 +119,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
string ("theFontId"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
39,
1.0,
@@ -139,6 +143,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
string ("theFontId"),
false,
true,
+ true,
dcp::Colour (255, 255, 255),
39,
1.0,
@@ -168,6 +173,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -188,6 +194,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -211,6 +218,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -231,6 +239,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -254,6 +263,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -274,6 +284,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -297,6 +308,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -317,6 +329,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -340,6 +353,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -360,6 +374,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -383,6 +398,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -403,6 +419,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -426,6 +443,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -446,6 +464,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -469,6 +488,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -489,6 +509,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -512,6 +533,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
@@ -532,6 +554,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test2)
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
diff --git a/test/text_test.cc b/test/text_test.cc
index 23a3ae77..1c0cf9c4 100644
--- a/test/text_test.cc
+++ b/test/text_test.cc
@@ -31,7 +31,7 @@ BOOST_AUTO_TEST_CASE (text_test1)
text->set_attribute("VAlign", "top");
text->add_child_text("Hello world");
- dcp::TextNode t (cxml::NodePtr (new cxml::Node (text)), 250, "Id");
+ dcp::TextNode t (cxml::NodePtr (new cxml::Node (text)), 250, dcp::INTEROP);
BOOST_CHECK_CLOSE (t.v_position, 0.042, 0.001);
BOOST_CHECK_EQUAL (t.v_align, dcp::VALIGN_TOP);
BOOST_CHECK_EQUAL (t.text, "Hello world");
@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE (text_test2)
text->set_attribute("Valign", "top");
text->add_child_text("Hello world");
- dcp::TextNode t (cxml::NodePtr (new cxml::Node (text)), 250, "Id");
+ dcp::TextNode t (cxml::NodePtr (new cxml::Node (text)), 250, dcp::INTEROP);
BOOST_CHECK_CLOSE (t.v_position, 0.042, 0.001);
BOOST_CHECK_EQUAL (t.v_align, dcp::VALIGN_TOP);
BOOST_CHECK_EQUAL (t.text, "Hello world");
diff --git a/test/write_subtitle_test.cc b/test/write_subtitle_test.cc
index 648d5928..14d19d8b 100644
--- a/test/write_subtitle_test.cc
+++ b/test/write_subtitle_test.cc
@@ -40,6 +40,7 @@ BOOST_AUTO_TEST_CASE (write_interop_subtitle_test)
string ("Frutiger"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
48,
1.0,
@@ -63,6 +64,7 @@ BOOST_AUTO_TEST_CASE (write_interop_subtitle_test)
boost::optional<string> (),
true,
true,
+ true,
dcp::Colour (128, 0, 64),
91,
1.0,
@@ -95,7 +97,7 @@ BOOST_AUTO_TEST_CASE (write_interop_subtitle_test)
" <Text VAlign=\"top\" VPosition=\"80\">Hello world</Text>\n"
" </Subtitle>\n"
" </Font>\n"
- " <Font Italic=\"yes\" Color=\"FF800040\" Size=\"91\" Effect=\"border\" EffectColor=\"FF010203\" Script=\"normal\" Underlined=\"no\" Weight=\"bold\">\n"
+ " <Font Italic=\"yes\" Color=\"FF800040\" Size=\"91\" Effect=\"border\" EffectColor=\"FF010203\" Script=\"normal\" Underlined=\"yes\" Weight=\"bold\">\n"
" <Subtitle SpotNumber=\"2\" TimeIn=\"05:41:00:218\" TimeOut=\"06:12:15:218\" FadeUpTime=\"930792\" FadeDownTime=\"4591834\">\n"
" <Text VAlign=\"bottom\" VPosition=\"40\">What's going on</Text>\n"
" </Subtitle>\n"
@@ -119,6 +121,7 @@ BOOST_AUTO_TEST_CASE (write_smpte_subtitle_test)
string ("Frutiger"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
48,
1.0,
@@ -142,6 +145,7 @@ BOOST_AUTO_TEST_CASE (write_smpte_subtitle_test)
boost::optional<string> (),
true,
true,
+ true,
dcp::Colour (128, 0, 64),
91,
1.0,
@@ -179,7 +183,7 @@ BOOST_AUTO_TEST_CASE (write_smpte_subtitle_test)
" <dcst:Text Valign=\"top\" Vposition=\"80\">Hello world</dcst:Text>\n"
" </dcst:Subtitle>\n"
" </dcst:Font>\n"
- " <dcst:Font Italic=\"yes\" Color=\"FF800040\" Size=\"91\" Effect=\"border\" EffectColor=\"FF010203\" Script=\"normal\" Underline=\"no\" Weight=\"bold\">\n"
+ " <dcst:Font Italic=\"yes\" Color=\"FF800040\" Size=\"91\" Effect=\"border\" EffectColor=\"FF010203\" Script=\"normal\" Underline=\"yes\" Weight=\"bold\">\n"
" <dcst:Subtitle SpotNumber=\"2\" TimeIn=\"05:41:00:21\" TimeOut=\"06:12:15:21\" FadeUpTime=\"01:02:03:04\" FadeDownTime=\"05:06:07:08\">\n"
" <dcst:Text Valign=\"bottom\" Vposition=\"40\" Direction=\"rtl\">What's going on</dcst:Text>\n"
" </dcst:Subtitle>\n"