* in this object's member variables.
* @param node Node to read.
*/
-TextNode::TextNode (boost::shared_ptr<const cxml::Node> node, int tcr)
+TextNode::TextNode (boost::shared_ptr<const cxml::Node> node, int tcr, string font_id_attribute)
: h_position (0)
, h_align (HALIGN_CENTER)
, v_position (0)
, v_align (VALIGN_CENTER)
+ , direction (DIRECTION_LTR)
{
text = node->content ();
v_align = string_to_valign (va.get ());
}
+ optional<string> d = node->optional_string_attribute ("Direction");
+ if (d) {
+ direction = string_to_direction (d.get ());
+ }
+
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_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, tcr, font_id_attribute)));
}
}