From: Joogab Yun Date: Tue, 25 Aug 2020 08:59:40 +0000 (+0900) Subject: If the size of the text is larger than the size of the control, X-Git-Tag: accepted/tizen/unified/20200831.001930~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5720f95a1b45530762ca5b0d7dabb0e88a4a7298;p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git If the size of the text is larger than the size of the control, setting it to VerticalAlignment::Center cuts the top and bottom of the text. The VerticalAlignment::CENTER setting works when the size of the control is enough. Change-Id: I3d35b4dfceb4297c89bddfc5c5364de4be5bc646 --- diff --git a/dali-toolkit/internal/text/rendering/text-typesetter.cpp b/dali-toolkit/internal/text/rendering/text-typesetter.cpp index 5b424be..0256a43 100755 --- a/dali-toolkit/internal/text/rendering/text-typesetter.cpp +++ b/dali-toolkit/internal/text/rendering/text-typesetter.cpp @@ -337,6 +337,7 @@ PixelData Typesetter::Render( const Vector2& size, Toolkit::DevelText::TextDirec case VerticalAlignment::CENTER: { penY = static_cast( 0.5f * ( size.height - layoutSize.height ) ); + penY = penY < 0.f ? 0.f : penY; break; } case VerticalAlignment::BOTTOM: