diff options
| author | Carl Hetherington <cth@carlh.net> | 2016-04-05 00:22:32 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2016-04-05 00:22:32 +0100 |
| commit | bc118b663b0582cf4afdce3000beb8bac35b16ef (patch) | |
| tree | ac058ad2af7c88705606e7fe139d4d1a4ff80ac2 /src/font_node.cc | |
| parent | bc7089956cefc9f8528918f8a5d48174ab680f13 (diff) | |
Basic untested support for bold in subtitles.
Diffstat (limited to 'src/font_node.cc')
| -rw-r--r-- | src/font_node.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/font_node.cc b/src/font_node.cc index 5d857bc1..a5047211 100644 --- a/src/font_node.cc +++ b/src/font_node.cc @@ -39,6 +39,7 @@ FontNode::FontNode (cxml::ConstNodePtr node, int tcr, string font_id_attribute) 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"; optional<string> c = node->optional_string_attribute ("Color"); if (c) { colour = Colour (c.get ()); @@ -71,6 +72,7 @@ FontNode::FontNode (cxml::ConstNodePtr node, int tcr, string font_id_attribute) FontNode::FontNode (std::list<boost::shared_ptr<FontNode> > const & font_nodes) : size (0) , italic (false) + , bold (false) , colour ("FFFFFFFF") , effect_colour ("FFFFFFFF") { @@ -87,6 +89,9 @@ FontNode::FontNode (std::list<boost::shared_ptr<FontNode> > const & font_nodes) if ((*i)->italic) { italic = (*i)->italic.get (); } + if ((*i)->bold) { + bold = (*i)->bold.get (); + } if ((*i)->colour) { colour = (*i)->colour.get (); } |
