diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-12-14 23:01:42 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-12-14 23:01:42 +0000 |
| commit | 1871b099bea92122feaa293b24daa88cade7aad5 (patch) | |
| tree | 81c8d877e8845595dcd2e34bbb0bbeef1b68933b /src/font.cc | |
| parent | 861117816d557cd048d56b26f8903ac26a94b395 (diff) | |
Support multiple fonts in subtitles.
Diffstat (limited to 'src/font.cc')
| -rw-r--r-- | src/font.cc | 4 |
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) { |
