Merge branch 'devel/master' into tizen
authorWonsik Jung <sidein@samsung.com>
Tue, 29 Jan 2019 05:51:01 +0000 (14:51 +0900)
committerWonsik Jung <sidein@samsung.com>
Tue, 29 Jan 2019 05:51:01 +0000 (14:51 +0900)
automated-tests/src/dali-toolkit/utc-Dali-Visual.cpp
dali-toolkit/public-api/dali-toolkit-version.cpp
packaging/dali-toolkit.spec

index 301685b..c4df701 100644 (file)
@@ -370,18 +370,29 @@ int UtcDaliVisualSize(void)
 
   fontClient.GetFontId( pathName + DEFAULT_FONT_DIR + "/tizen/TizenSansRegular.ttf" );
 
+  // Create a TextVisual with a font size of 12 first
   propertyMap.Clear();
   propertyMap.Insert( Toolkit::Visual::Property::TYPE, Visual::TEXT );
   propertyMap.Insert( TextVisual::Property::ENABLE_MARKUP, true );
-  propertyMap.Insert( TextVisual::Property::TEXT, "<font family='TizenSansRegular' size='12'>Hello world</font>" );
+  propertyMap.Insert( TextVisual::Property::TEXT, "<font family='TizenSans' size='12'>Hello world</font>" );
   propertyMap.Insert( TextVisual::Property::MULTI_LINE, true );
 
-  Visual::Base textVisual = factory.CreateVisual( propertyMap );
-  textVisual.GetNaturalSize( naturalSize );
-  DALI_TEST_EQUALS( naturalSize, Size( 86.f, 20.f ), TEST_LOCATION );
+  Visual::Base smallTextVisual = factory.CreateVisual( propertyMap );
+  Vector2 smallTextVisualNaturalSize;
+  smallTextVisual.GetNaturalSize( smallTextVisualNaturalSize );
+
+  // Then create a TextVisual with a font size of 20
+  propertyMap[ TextVisual::Property::TEXT ] = "<font family='TizenSans' size='20'>Hello world</font>";
+  Visual::Base largeTextVisual = factory.CreateVisual( propertyMap );
+  Vector2 largeTextVisualNaturalSize;
+  largeTextVisual.GetNaturalSize( largeTextVisualNaturalSize );
+
+  // Compare the sizes of the two text visuals, the second one should be bigger as it has a larger point size in the markup.
+  DALI_TEST_CHECK( smallTextVisualNaturalSize.width < largeTextVisualNaturalSize.width &&
+                   smallTextVisualNaturalSize.height < largeTextVisualNaturalSize.height );
 
-  const float height = textVisual.GetHeightForWidth( 40.f );
-  DALI_TEST_EQUALS( height, 57.f, Math::MACHINE_EPSILON_1000, TEST_LOCATION );
+  // The height returned for a particular width should also be greater for the large text visual
+  DALI_TEST_CHECK( smallTextVisual.GetHeightForWidth( 40.f ) < largeTextVisual.GetHeightForWidth( 40.f ) );
 
   //AnimatedImageVisual
   Visual::Base animatedImageVisual = factory.CreateVisual( TEST_GIF_FILE_NAME, ImageDimensions() );
index c0c71d9..4027521 100644 (file)
@@ -31,7 +31,7 @@ namespace Toolkit
 
 const unsigned int TOOLKIT_MAJOR_VERSION = 1;
 const unsigned int TOOLKIT_MINOR_VERSION = 4;
-const unsigned int TOOLKIT_MICRO_VERSION = 3;
+const unsigned int TOOLKIT_MICRO_VERSION = 4;
 const char * const TOOLKIT_BUILD_DATE    = __DATE__ " " __TIME__;
 
 #ifdef DEBUG_ENABLED
index bb3560c..b6e3c76 100644 (file)
@@ -1,6 +1,6 @@
 Name:       dali-toolkit
 Summary:    Dali 3D engine Toolkit
-Version:    1.4.3
+Version:    1.4.4
 Release:    1
 Group:      System/Libraries
 License:    Apache-2.0 and BSD-3-Clause and MIT