From: joogab yun Date: Wed, 26 Aug 2020 00:49:08 +0000 (+0000) Subject: Merge "If the size of the text is larger than the size of the control, setting it... X-Git-Tag: dali_1.9.27~3 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fdali-toolkit.git;a=commitdiff_plain;h=64e89646c0a787aa20eda7a464604357100d5b0e;hp=01c086f17e2af89f6c6b1bd30a0240da2fda1e75 Merge "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." into devel/master --- 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: