When set to italic, some text ends cut off.
authorJoogab Yun <joogab.yun@samsung.com>
Thu, 16 Jan 2020 05:53:37 +0000 (14:53 +0900)
committerJoogab Yun <joogab.yun@samsung.com>
Fri, 17 Jan 2020 03:55:50 +0000 (12:55 +0900)
Run the sample below and then look at 'I', 'J', 'N' text.
These letters in the upper right corner are cut off.
So I adjuct the widthOut value.

sample)
    Dali::Property::Map fontStyleMapSet;
    fontStyleMapSet.Insert( "slant", "italic" );
    TextLabel textLabelN = TextLabel::New( "ABCDEFGHIJKLMN\nOPQRSTUVWXYZ" );
    textLabelN.SetAnchorPoint( AnchorPoint::TOP_LEFT );
    textLabelN.SetProperty(TextLabel::Property::POINT_SIZE, 18.f);
    textLabelN.SetPosition(100.f, 400.f);
    textLabelN.SetProperty(TextLabel::Property::MULTI_LINE, true);
    textLabelN.SetProperty( TextLabel::Property::FONT_STYLE, fontStyleMapSet );
    stage.Add( textLabelN );

Change-Id: I95429189350546169ea4de2fb6f58f2a480324cb

dali/internal/imaging/common/image-operations.cpp

index b44a024..e9b8f51 100755 (executable)
@@ -2384,7 +2384,7 @@ void HorizontalShear( const uint8_t* const pixelsIn,
     return;
   }
 
-  widthOut = widthIn + static_cast<unsigned int>( absRadians * static_cast<float>( heightIn ) );
+  widthOut = widthIn + static_cast<unsigned int>( ceil ( absRadians * static_cast<float>( heightIn ) ) );
   heightOut = heightIn;
 
   // Allocate the buffer for the shear.