Code

Merge from fe-moved
[inkscape.git] / src / libnrtype / Layout-TNG-Input.cpp
index a5ae1cd81dcc92f17303effbac7364aabd92fa9f..2ee0051a4b80fd544a24670bd16db3d32cd6ac5f 100644 (file)
@@ -54,6 +54,14 @@ void Layout::appendText(Glib::ustring const &text, SPStyle *style, void *source_
         _copyInputVector(optional_attributes->dx, optional_attributes_offset, &new_source->dx, new_source->text_length);
         _copyInputVector(optional_attributes->dy, optional_attributes_offset, &new_source->dy, new_source->text_length);
         _copyInputVector(optional_attributes->rotate, optional_attributes_offset, &new_source->rotate, new_source->text_length);
+        if (!optional_attributes->rotate.empty() && optional_attributes_offset >= optional_attributes->rotate.size()) {
+            SVGLength last_rotate;
+            last_rotate = 0.f;
+            for (std::vector<SVGLength>::const_iterator it = optional_attributes->rotate.begin() ; it != optional_attributes->rotate.end() ; ++it)
+                if (it->_set)
+                    last_rotate = *it;
+            new_source->rotate.resize(1, last_rotate);
+        }
     }
     
     _input_stream.push_back(new_source);