Merge "fix issue with text size with negative line spacing" into devel/master
authorBowon Ryu <bowon.ryu@samsung.com>
Fri, 4 Mar 2022 03:02:45 +0000 (03:02 +0000)
committerGerrit Code Review <gerrit@review>
Fri, 4 Mar 2022 03:02:45 +0000 (03:02 +0000)
1  2 
automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
dali-toolkit/internal/text/layouts/layout-engine.cpp

index 8c8ea9424cfd7b9a418562c89ca5b526ce0d8e19,a85f5f6b301fc77387f943f3d2041d8368bbe7d7..53030e25645a52227d34145c146a1e465de93cd8
@@@ -1447,9 -1417,12 +1454,9 @@@ struct Engine::Imp
      lineRun.direction                       = LTR;
      lineRun.ellipsis                        = false;
  
 -    lineRun.lineSpacing = mDefaultLineSize - (lineRun.ascender + -lineRun.descender);
 -    lineRun.lineSpacing = lineRun.lineSpacing < 0.f ? 0.f : lineRun.lineSpacing;
 -
 -    lineRun.lineSpacing += mDefaultLineSpacing;
 +    lineRun.lineSpacing = GetLineSpacing(lineRun.ascender + -lineRun.descender);
  
-     layoutSize.height += GetLineHeight(lineRun);
+     layoutSize.height += GetLineHeight(lineRun, true);
    }
  
    /**