+
+int UtcDaliToolkitTextlabelMaxTextureSet(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextlabelMaxTextureSet");
+
+ DevelText::BitmapFontDescription fontDescription;
+ fontDescription.name = "Digits";
+ fontDescription.glyphs.push_back( { TEST_RESOURCE_DIR "/fonts/bitmap/u0030.png", ":", 200.f, 0.f } );
+
+ TextAbstraction::BitmapFont bitmapFont;
+ DevelText::CreateBitmapFont( fontDescription, bitmapFont );
+
+ TextAbstraction::FontClient fontClient = TextAbstraction::FontClient::Get();
+ fontClient.GetFontId( bitmapFont );
+
+ TextLabel label = TextLabel::New();
+ label.SetProperty( TextLabel::Property::FONT_FAMILY, "Digits" );
+ label.SetProperty( TextLabel::Property::ENABLE_MARKUP, true );
+ label.SetProperty( TextLabel::Property::TEXT, ":This is a long sample text made to allow max texture size to be exceeded." );
+ label.SetProperty( TextLabel::Property::POINT_SIZE, 200.f );
+ label.SetProperty( TextLabel::Property::MULTI_LINE, true );
+
+ Property::Map underlineMapSet;
+ underlineMapSet.Clear();
+ underlineMapSet.Insert( "enable", true );
+ underlineMapSet.Insert( "color", Color::RED );
+ underlineMapSet.Insert( "height", 1 );
+ label.SetProperty( TextLabel::Property::UNDERLINE, underlineMapSet );
+ label.SetProperty( Toolkit::TextLabel::Property::TEXT_COLOR, Color::BLUE );
+
+ application.GetScene().Add( label );
+
+ application.SendNotification();
+ application.Render();
+
+ const int maxTextureSize = Dali::GetMaxTextureSize();
+ // Whether the rendered text is greater than maxTextureSize
+ DALI_TEST_CHECK( label.GetCurrentProperty< Vector3 >( Actor::Property::SIZE ).height > maxTextureSize );
+
+ // Check if the number of renderers is greater than 1.
+ DALI_TEST_CHECK( label.GetRendererCount() > 1u );
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextlabelLastCharacterIndex(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextlabelLastCharacterIndex");
+
+ Vector2 size( 300.0f, 100.0f );
+
+ Dali::Toolkit::DevelText::RendererParameters textParameters;
+ textParameters.text = "This is a sample text to get the last index.";
+ textParameters.layout = "multiLine";
+ textParameters.fontSize = 20.f;
+ textParameters.textWidth = 300u;
+ textParameters.textHeight = 100u;
+ textParameters.ellipsisEnabled = true;
+ Dali::Property::Array indexArray = Dali::Toolkit::DevelText::GetLastCharacterIndex( textParameters );
+
+ DALI_TEST_CHECK( !indexArray.Empty() );
+ DALI_TEST_EQUALS( indexArray.GetElementAt(0).Get<int>(), 10, TEST_LOCATION );
+
+ END_TEST;
+}
+
+int UtcDaliToolkitTextlabelFontSizeScale(void)
+{
+ ToolkitTestApplication application;
+ tet_infoline(" UtcDaliToolkitTextlabelFontSizeScale");
+
+ TextLabel label = TextLabel::New();
+ label.SetProperty( TextLabel::Property::POINT_SIZE, 30.f );
+ label.SetProperty( TextLabel::Property::TEXT, "Test" );
+ Vector3 nonScaledSize = label.GetNaturalSize();
+
+ TextLabel labelScaled = TextLabel::New();
+ labelScaled.SetProperty( TextLabel::Property::POINT_SIZE, 15.f );
+ labelScaled.SetProperty( Toolkit::DevelTextLabel::Property::FONT_SIZE_SCALE, 2.f );
+ labelScaled.SetProperty( TextLabel::Property::TEXT, "Test" );
+ Vector3 scaledSize = labelScaled.GetNaturalSize();
+
+ DALI_TEST_EQUALS( nonScaledSize, scaledSize, TEST_LOCATION );
+
+ label.SetProperty( TextLabel::Property::PIXEL_SIZE, 30.f );
+ label.SetProperty( TextLabel::Property::TEXT, "Test" );
+ nonScaledSize = label.GetNaturalSize();
+
+ labelScaled.SetProperty( TextLabel::Property::PIXEL_SIZE, 15.f );
+ labelScaled.SetProperty( Toolkit::DevelTextLabel::Property::FONT_SIZE_SCALE, 2.f );
+ labelScaled.SetProperty( TextLabel::Property::TEXT, "Test" );
+ scaledSize = labelScaled.GetNaturalSize();
+
+ DALI_TEST_EQUALS( nonScaledSize, scaledSize, TEST_LOCATION );
+
+ END_TEST;
+}