Stop using hb_buffer_set_invisible_glyph when Shape 66/277666/5
authorssabah <s.sabah@samsung.com>
Tue, 12 Jul 2022 01:27:14 +0000 (04:27 +0300)
committershrouq Sabah <s.sabah@samsung.com>
Mon, 18 Jul 2022 13:02:58 +0000 (13:02 +0000)
commit9b1e76ed3ae9776244e3149985e6b5bba1a79b94
treea0d75c19422948caf3a1d4298e18b09d6fc352fc
parent114ca8f7dcb208198f5beafa1c39fcf53507e260
Stop using hb_buffer_set_invisible_glyph when Shape

Fix: Emoji character with VS15 at the end of line produces noise

hb_buffer_set_invisible_glyph has been used to solve the invisible unicodes like U+FE0F and U+FE0E.
They should be replaced by zero width glyph.
i.e: This text "&#x262a;&#xfe0f;&#xfe0f;&#xfe0f;&#x262a;&#xfe0f;" should be rendered as two adjacent glyphs.

But, using this function with ZWS produce a noise (un-wanted glyph) when compine "Negative Squared Latin Capital Letter" with U+FE0E at the end of line.
i.e: Like this text "&#x1f170;&#xfe0e;"

Using hb_buffer_set_invisible_glyph has been stopped because the original issue was resolved by other modifications.
Maybe the optimization code has resolved the original issue.

Sample code:

std::string textAtoE = "&#x1f170;&#xfe0e;";

TextLabel textLabel01 = TextLabel::New(textAtoE);
textLabel01.SetProperty(Actor::Property::ANCHOR_POINT, AnchorPoint::TOP_LEFT);
textLabel01.SetProperty(Dali::Actor::Property::POSITION, Vector2(10, 40));
textLabel01.SetProperty(Dali::Toolkit::TextLabel::Property::ENABLE_MARKUP, true);
textLabel01.SetProperty(Dali::Toolkit::TextLabel::Property::MULTI_LINE, true);
textLabel01.SetProperty(Dali::Toolkit::TextLabel::Property::ELLIPSIS, false);

Also try, to make sure there is not extra spaces
std::string textAtoE    = "&#x1f170;&#xfe0f;&#xfe0f;&#xfe0f;&#x1f170;&#xfe0e;";

Change-Id: I6750ff0f3f80f329e5ca3c3d921903809a97748e
dali/internal/text/text-abstraction/shaping-impl.cpp