Adjust text fit condition 43/281643/1
authorBowon Ryu <bowon.ryu@samsung.com>
Tue, 20 Sep 2022 06:29:01 +0000 (15:29 +0900)
committerBowon Ryu <bowon.ryu@samsung.com>
Tue, 20 Sep 2022 06:40:20 +0000 (15:40 +0900)
If the calculated text size and layout size are the same in the text fit case,
there is an issue of ellisis processing due to the influence of some glyph's advance.
So in most cases the layout needs a bit larger size.
This patch adds a condition to prevent this issue.

Change-Id: I4592c8741d19cce6d33474288d55957a3944149d
Signed-off-by: Bowon Ryu <bowon.ryu@samsung.com>
dali-toolkit/internal/text/controller/text-controller-relayouter.cpp

index 3b0c4c3..0d2f765 100644 (file)
@@ -230,7 +230,7 @@ bool Controller::Relayouter::CheckForTextFit(Controller& controller, float point
   textUpdateInfo.Clear();
   textUpdateInfo.mClearAll = true;
 
-  if(textSize.width > layoutSize.width || textSize.height > layoutSize.height)
+  if(textSize.width >= layoutSize.width || textSize.height >= layoutSize.height)
   {
     return false;
   }