- 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 );