Dali-Text: Keyboard Shortcuts
[platform/core/uifw/dali-toolkit.git] / dali-toolkit / internal / text / layouts / layout-engine.cpp
index e13c842..89c01ca 100755 (executable)
@@ -1254,7 +1254,7 @@ struct Engine::Impl
         return false;
       }
 
-      // Set the line position. Discard if ellipsis is enabled and the position exceeds the boundaries
+      // Set the line position. DISCARD if ellipsis is enabled and the position exceeds the boundaries
       // of the box.
       penY += layout.ascender;
 
@@ -1360,6 +1360,13 @@ struct Engine::Impl
 
         // Updates the vertical pen's position.
         penY += -layout.descender + layout.lineSpacing + mDefaultLineSpacing;
+        // If there is a defaultLineSize, updates the pen's position.
+        if( mDefaultLineSize > 0.f )
+        {
+          float lineSpacing = mDefaultLineSize - ( layout.ascender + -layout.descender );
+          lineSpacing = lineSpacing < 0.f ? 0.f : lineSpacing;
+          penY += lineSpacing;
+        }
 
         // Increase the glyph index.
         index = nextIndex;