Merge branch '1.0' of ssh://main.carlh.net/home/carl/git/libdcp into 1.0
[libdcp.git] / src / text.cc
index 888cab2917433d17fdcb123d726caf30f7ada59a..6fbdbe6ef85b2d9f4001ce5c83a6fbaa3c023f12 100644 (file)
@@ -39,7 +39,12 @@ Text::Text (boost::shared_ptr<const cxml::Node> node)
        : v_align (CENTER)
 {
        text = node->content ();
-       v_position = node->number_attribute<float> ("VPosition");
+       optional<float> x = node->optional_number_attribute<float> ("VPosition");
+       if (!x) {
+               x = node->number_attribute<float> ("Vposition");
+       }
+       v_position = x.get ();
+       
        optional<string> v = node->optional_string_attribute ("VAlign");
        if (v) {
                v_align = string_to_valign (v.get ());