Merge "Fixed IsCandidate bug" into devel/master
[platform/core/uifw/dali-toolkit.git] / automated-tests / src / dali-toolkit-internal / utc-Dali-Text-Shaping.cpp
index 9dd7d57..8c056dd 100755 (executable)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2019 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2021 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -87,7 +87,7 @@ bool IsEqualGlyph ( const GlyphInfoData& glyphData, const GlyphInfo& glyph )
   {
     return false;
   }
-  if( fabsf( glyphData.advance - glyph.advance ) > Math::MACHINE_EPSILON_1000 )
+  if( fabsf( glyphData.advance - floor(glyph.advance) ) > Math::MACHINE_EPSILON_1000 )
   {
     return false;
   }
@@ -140,7 +140,10 @@ bool ShapeInfoTest( const ShapeInfoData& data )
                    layoutSize,
                    textModel,
                    metrics,
-                   false );
+                   false,
+                   LineWrap::WORD,
+                   false,
+                   Toolkit::DevelText::EllipsisPosition::END );
 
   LogicalModelPtr logicalModel = textModel->mLogicalModel;
   VisualModelPtr visualModel = textModel->mVisualModel;
@@ -247,7 +250,7 @@ bool ShapeInfoTest( const ShapeInfoData& data )
       std::cout << "            height : " << glyphInfo.height << std::endl;
       std::cout << "          xBearing : " << glyphInfo.xBearing << std::endl;
       std::cout << "          yBearing : " << glyphInfo.yBearing << std::endl;
-      std::cout << "           advance : " << glyphInfo.advance << std::endl;
+      std::cout << "           advance : " << floor(glyphInfo.advance) << std::endl;
       std::cout << "       scaleFactor : " << glyphInfo.scaleFactor << std::endl;
       std::cout << "  isItalicRequired : " << glyphInfo.isItalicRequired << std::endl;
       std::cout << "    isBoldRequired : " << glyphInfo.isBoldRequired << std::endl;