From: Joogab Yun Date: Thu, 20 Aug 2020 04:51:21 +0000 (+0900) Subject: There is a problem that ellipsis does not work properly when MIN_LINE_SIZE is set. X-Git-Tag: dali_1.9.26~3 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=bb9b5c8a2b3f0ce6bcf368e3bdea380d65353b1f;hp=be93fd772a1b1b09425ac0aaec1ea1b64e9a9e60;ds=sidebyside There is a problem that ellipsis does not work properly when MIN_LINE_SIZE is set. Update the penY value. Change-Id: Iaab2f2590bda4c80316262dcf4f9fcb0f5a91343 --- diff --git a/dali-toolkit/internal/text/layouts/layout-engine.cpp b/dali-toolkit/internal/text/layouts/layout-engine.cpp index e13c842..5e5cce7 100755 --- a/dali-toolkit/internal/text/layouts/layout-engine.cpp +++ b/dali-toolkit/internal/text/layouts/layout-engine.cpp @@ -1360,6 +1360,13 @@ struct Engine::Impl // Updates the vertical pen's position. penY += -layout.descender + layout.lineSpacing + mDefaultLineSpacing; + // If there is a defaultLineSize, updates the pen's position. + if( mDefaultLineSize > 0.f ) + { + float lineSpacing = mDefaultLineSize - ( layout.ascender + -layout.descender ); + lineSpacing = lineSpacing < 0.f ? 0.f : lineSpacing; + penY += lineSpacing; + } // Increase the glyph index. index = nextIndex;