summaryrefslogtreecommitdiff
path: root/src/font.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-12-14 23:01:42 +0000
committerCarl Hetherington <cth@carlh.net>2014-12-14 23:01:42 +0000
commit1871b099bea92122feaa293b24daa88cade7aad5 (patch)
tree81c8d877e8845595dcd2e34bbb0bbeef1b68933b /src/font.cc
parent861117816d557cd048d56b26f8903ac26a94b395 (diff)
Support multiple fonts in subtitles.
Diffstat (limited to 'src/font.cc')
-rw-r--r--src/font.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/font.cc b/src/font.cc
index 51bd866e..f43e83df 100644
--- a/src/font.cc
+++ b/src/font.cc
@@ -34,7 +34,7 @@ Font::Font (boost::shared_ptr<const cxml::Node> node)
{
text = node->content ();
- id = node->optional_string_attribute ("Id").get_value_or ("");
+ id = node->optional_string_attribute ("Id");
size = node->optional_number_attribute<int64_t> ("Size").get_value_or (0);
italic = node->optional_bool_attribute ("Italic");
optional<string> c = node->optional_string_attribute ("Color");
@@ -61,7 +61,7 @@ Font::Font (std::list<boost::shared_ptr<Font> > const & font_nodes)
, effect_color ("FFFFFFFF")
{
for (list<shared_ptr<Font> >::const_iterator i = font_nodes.begin(); i != font_nodes.end(); ++i) {
- if (!(*i)->id.empty ()) {
+ if ((*i)->id) {
id = (*i)->id;
}
if ((*i)->size != 0) {