Fix text AutoScroll ellipsis issue
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit-internal / dali-toolkit-test-utils / toolkit-text-utils.cpp
index e9d0ef0..5b8469d 100644 (file)
@@ -102,7 +102,8 @@ void CreateTextModel(const std::string&                text,
                      LineWrap::Mode                    wrapMode,
                      bool                              ellipsisEnabled,
                      DevelText::EllipsisPosition::Type ellipsisPosition,
-                     float                             lineSpacing)
+                     float                             lineSpacing,
+                     float                             characterSpacing)
 {
   textModel                    = Model::New(); ///< Pointer to the text's model.
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
@@ -114,7 +115,9 @@ void CreateTextModel(const std::string&                text,
                                       logicalModel->mAnchors,
                                       logicalModel->mUnderlinedCharacterRuns,
                                       logicalModel->mBackgroundColorRuns,
-                                      logicalModel->mStrikethroughCharacterRuns);
+                                      logicalModel->mStrikethroughCharacterRuns,
+                                      logicalModel->mBoundedParagraphRuns,
+                                      logicalModel->mCharacterSpacingCharacterRuns);
 
   Length         textSize = 0u;
   const uint8_t* utf8     = NULL;
@@ -299,6 +302,8 @@ void CreateTextModel(const std::string&                text,
   visualModel->CreateGlyphsPerCharacterTable(0u, 0u, characterCount);
   visualModel->CreateCharacterToGlyphTable(0u, 0u, characterCount);
 
+  visualModel->SetCharacterSpacing(characterSpacing);
+
   const Length numberOfGlyphs = glyphs.Count();
 
   // 8) Get the glyph metrics
@@ -346,11 +351,13 @@ void CreateTextModel(const std::string&                text,
   layoutParameters.startLineIndex         = 0u;
   layoutParameters.estimatedNumberOfLines = logicalModel->mParagraphInfo.Count();
 
-  bool isAutoScroll = false;
+  bool isAutoScroll                   = false;
+  bool isAutoScrollMaxTextureExceeded = false;
   layoutEngine.LayoutText(layoutParameters,
                           layoutSize,
                           false,
                           isAutoScroll,
+                          isAutoScrollMaxTextureExceeded,
                           ellipsisPosition);
 
   if(options.align)