Resolved incorrect size when call GetTextSize(TextLabel) for one glyph 18/274118/1
authorssabah <s.sabah@samsung.com>
Wed, 20 Apr 2022 09:03:48 +0000 (12:03 +0300)
committerssabah <s.sabah@samsung.com>
Thu, 21 Apr 2022 11:49:05 +0000 (14:49 +0300)
commitcd5b6f3ff9138207df66d93e95a750fa9f56c70b
treeac29ccdfbb0a55a60c082cf4cde2ce59a3661f6c
parentb04ffbb54b26f82e3292bef2381f591b6102f9db
Resolved incorrect size when call GetTextSize(TextLabel) for one glyph

GetTextSize(TextLabel) for one glyph return zero size with ellipsis end.
But it works fine with GetTextSize(TextEditor).

To check it:
===========================================================
    Window window = application.GetWindow();
    window.SetBackgroundColor(Color::WHITE);

    textLabel = TextLabel::New();
    textLabel.SetProperty(TextLabel::Property::POINT_SIZE, 7.f);
    textLabel.SetProperty(Actor::Property::SIZE, Vector2(200.f, 200.f));
    textLabel.SetProperty(Actor::Property::PARENT_ORIGIN, ParentOrigin::TOP_LEFT);
    textLabel.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
    textLabel.SetProperty(TextLabel::Property::TEXT, "H");
    window.Add(textLabel);

...

    Vector<Vector2> sizesList = DevelTextLabel::GetTextSize(textLabel, 0u, 0u);
===========================================================

Change-Id: I38f6177c46f7485663412d55d95a5ffc318341f9
automated-tests/src/dali-toolkit/utc-Dali-TextEditor.cpp
automated-tests/src/dali-toolkit/utc-Dali-TextLabel.cpp
dali-toolkit/internal/text/text-geometry.cpp
dali-toolkit/internal/text/text-view.cpp