Code

Removed duplication of menu items.
[inkscape.git] / src / libnrtype / Layout-TNG-Compute.cpp
index 96ea2be7c9032978f5f0b16c604ab6230fe18d7f..2e65c2b24dd08f8cec2bd32466c58f85d8e3a6d6 100644 (file)
@@ -615,7 +615,6 @@ class Layout::Calculator
                             iter_source_text++;
                             char_index_in_unbroken_span++;
                             char_byte = iter_source_text.base() - unbroken_span.input_stream_first_character.base();
-                            glyph_rotate = 0.0;
                         }
 
                         advance_width *= direction_sign;
@@ -1014,6 +1013,7 @@ unsigned Layout::Calculator::_buildSpansForPara(ParagraphInfo *para) const
                     if (text_source->dy.size() > char_index_in_source) new_span.dx = text_source->dy[char_index_in_source];
                 }
                 if (text_source->rotate.size() > char_index_in_source) new_span.rotate = text_source->rotate[char_index_in_source];
+                else if (char_index_in_source == 0) new_span.rotate = 0.f;
                 if (input_index == 0 && para->unbroken_spans.empty() && !new_span.y._set && _flow._input_wrap_shapes.empty()) {
                     // if we don't set an explicit y some of the automatic wrapping code takes over and moves the text vertically
                     // so that the top of the letters is at zero, not the baseline
@@ -1469,7 +1469,7 @@ bool Layout::Calculator::calculate()
 
 void Layout::_calculateCursorShapeForEmpty()
 {
-    _empty_cursor_shape.position = NR::Point(0, 0);
+    _empty_cursor_shape.position = Geom::Point(0, 0);
     _empty_cursor_shape.height = 0.0;
     _empty_cursor_shape.rotation = 0.0;
     if (_input_stream.empty() || _input_stream.front()->Type() != TEXT_SOURCE)
@@ -1496,7 +1496,7 @@ void Layout::_calculateCursorShapeForEmpty()
     _empty_cursor_shape.rotation = caret_slope;
 
     if (_input_wrap_shapes.empty()) {
-        _empty_cursor_shape.position = NR::Point(text_source->x.empty() || !text_source->x.front()._set ? 0.0 : text_source->x.front().computed,
+        _empty_cursor_shape.position = Geom::Point(text_source->x.empty() || !text_source->x.front()._set ? 0.0 : text_source->x.front().computed,
                                                  text_source->y.empty() || !text_source->y.front()._set ? 0.0 : text_source->y.front().computed);
     } else {
         Direction block_progression = text_source->styleGetBlockProgression();
@@ -1504,9 +1504,9 @@ void Layout::_calculateCursorShapeForEmpty()
         std::vector<ScanlineMaker::ScanRun> scan_runs = scanline_maker.makeScanline(line_height);
         if (!scan_runs.empty()) {
             if (block_progression == LEFT_TO_RIGHT || block_progression == RIGHT_TO_LEFT)
-                _empty_cursor_shape.position = NR::Point(scan_runs.front().y + font_size, scan_runs.front().x_start);
+                _empty_cursor_shape.position = Geom::Point(scan_runs.front().y + font_size, scan_runs.front().x_start);
             else
-                _empty_cursor_shape.position = NR::Point(scan_runs.front().x_start, scan_runs.front().y + font_size);
+                _empty_cursor_shape.position = Geom::Point(scan_runs.front().x_start, scan_runs.front().y + font_size);
         }
     }
 }