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 ());
: size (0)
, italic (false)
, bold (false)
+ , underline (false)
, colour ("FFFFFFFF")
, effect_colour ("FFFFFFFF")
{
if ((*i)->bold) {
bold = (*i)->bold.get ();
}
+ if ((*i)->underline) {
+ underline = (*i)->underline.get ();
+ }
if ((*i)->colour) {
colour = (*i)->colour.get ();
}
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;
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),
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;
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 ||
font = i.font ();
italic = i.italic ();
bold = i.bold ();
+ underline = i.underline ();
colour = i.colour ();
size = i.size ();
aspect_adjust = i.aspect_adjust ();
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");
}
optional<string> font,
bool italic,
bool bold,
+ bool underline,
Colour colour,
int size,
float aspect_adjust,
: _font (font)
, _italic (italic)
, _bold (bold)
+ , _underline (underline)
, _colour (colour)
, _size (size)
, _aspect_adjust (aspect_adjust)
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 &&
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())
boost::optional<std::string> font,
bool italic,
bool bold,
+ bool underline,
Colour colour,
int size,
float aspect_adjust,
return _bold;
}
+ bool underline () const {
+ return _underline;
+ }
+
Colour colour () const {
return _colour;
}
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
<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>
string ("theFontId"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
39,
1.0,
string ("theFontId"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
39,
1.0,
string ("theFontId"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
39,
1.0,
string ("theFontId"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
39,
1.0,
string ("theFontId"),
false,
true,
+ true,
dcp::Colour (255, 255, 255),
39,
1.0,
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("theFont"),
true,
false,
+ false,
dcp::Colour (255, 255, 255),
42,
1.0,
string ("Frutiger"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
48,
1.0,
boost::optional<string> (),
true,
true,
+ true,
dcp::Colour (128, 0, 64),
91,
1.0,
" <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"
string ("Frutiger"),
false,
false,
+ false,
dcp::Colour (255, 255, 255),
48,
1.0,
boost::optional<string> (),
true,
true,
+ true,
dcp::Colour (128, 0, 64),
91,
1.0,
" <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"