Revert "[Tizen] bug fixed : Characters are truncated when HorizontalAlignment.End in"
authorSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 5 Nov 2018 08:19:18 +0000 (17:19 +0900)
committerSeoyeon Kim <seoyeon2.kim@samsung.com>
Mon, 5 Nov 2018 08:19:18 +0000 (17:19 +0900)
This reverts commit f7c5362ccc3535a6a59b44213813af7807fd7075.

automated-tests/src/dali-toolkit-internal/utc-Dali-Text-Layout.cpp
dali-toolkit/internal/text/layouts/layout-engine.cpp

index 5b67476..bc9d08b 100755 (executable)
@@ -5316,7 +5316,7 @@ int UtcDaliTextAlign10(void)
   fontDescriptionRuns.PushBack( fontDescriptionRun05 );
   fontDescriptionRuns.PushBack( fontDescriptionRun06 );
 
-  float positions[] = { 0.f, 0.f, 0.f, 0.f, 0.f, 0.f };
+  float positions[] = { -4.f, 0.f, 0.f, 0.f, 0.f, 0.f };
 
   Size textArea( 100.f, 300.f );
   AlignData data =
index 7b29200..0c3d9df 100755 (executable)
@@ -1150,8 +1150,7 @@ struct Engine::Impl
                                      bool matchSystemLanguageDirection )
   {
     line.alignmentOffset = 0.f;
-    bool isLineRTL = RTL == line.direction;
-    bool isRTL = isLineRTL;
+    bool isRTL = RTL == line.direction;
     float lineLength = line.width;
     HorizontalAlignment::Type alignment = horizontalAlignment;
 
@@ -1192,7 +1191,7 @@ struct Engine::Impl
       {
         line.alignmentOffset = 0.f;
 
-        if( isLineRTL )
+        if( isRTL )
         {
           // 'Remove' the white spaces at the end of the line (which are at the beginning in visual order)
           line.alignmentOffset -= line.extraLength;
@@ -1203,7 +1202,7 @@ struct Engine::Impl
       {
         line.alignmentOffset = 0.5f * ( boxWidth - lineLength );
 
-        if( isLineRTL )
+        if( isRTL )
         {
           line.alignmentOffset -= line.extraLength;
         }
@@ -1213,7 +1212,7 @@ struct Engine::Impl
       }
       case HorizontalAlignment::END:
       {
-        if( isLineRTL )
+        if( isRTL )
         {
           lineLength += line.extraLength;
         }