Page MenuHomePhabricator

evas_object_textblock variation sequence issues
Closed, ResolvedPublic


1. font cash issue


expected: text emoji text 가
result : text emoji emoji 가

(* In my fallback priority, if there is no variation selector, it is expressed as text)

☪☪️ ☪가

And if separated by space, it is normally expressed as text.

This issue occurs when emoji unicode is followed by a char that is not in the default font.
(In case of font search again)

2. backspace for multibyte


In this case, can delete character by pressing backspace only once. (remove_cluster)

In this case, can delete character by pressing the backspace twice. (!remove_cluster)
1st backspace: ︎ deleted
2nd backspace: ☪ deleted

I checked a function _evas_textblock_cursor_cluster_pos_get(),

☪️ (emoji) is recognized as a cluster, that is, one character.
☪︎ (text) is recognized separately for each unicode.

I think need to find a way to cluster this.

Below is a my test codes

#include <stdio.h>
#include <Elementary.h>
gcc -o example test.c `pkg-config --cflags --libs elementary`

elm_main(int argc EINA_UNUSED, char **argv EINA_UNUSED)
   Evas_Object *win, *en;


   win = elm_win_util_standard_add("emoji-example", "emoji-example");
   elm_win_autodel_set(win, EINA_TRUE);

   en = elm_entry_add(win);
   elm_entry_scrollable_set(en, EINA_TRUE);
   evas_object_size_hint_weight_set(en, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
   evas_object_size_hint_align_set(en, EVAS_HINT_FILL, EVAS_HINT_FILL);

   elm_object_text_set(en, "<font_size=25>&#x262a;&#x262a;&#xfe0f;&#x262a;가<br>"
                           "&#x262a;&#x262a;&#xfe0f; &#x262a;가<br><br>"
                           "&#x262a;&#xfe0e;&#x262a;&#xfe0f; //delete using backspace</font_size>");


   elm_object_content_set(win, en);
   evas_object_resize(win, 400, 200);


   return 0;
bowonryu triaged this task as Showstopper Issues priority.
ali.alzyod added a comment.EditedDec 22 2019, 11:44 PM

For point 1


this should be


to specify exactly what glyph you want to draw.

But at the same time, I think this is not what user expect to do.

Thanks to reply :)
I agree with you.
There are some case of limitations on user font fallback priority and efl font cache logic.
(I think some are related to performance, trade off)

But now efl can distinguish emoji/text perfectly using U+FE0E/U+FE0F,
So I think it can cover some of the above limitations.

However, for U+FE0E [2. backspace for multibyte] I think this issue should be solved.
What do you think?

What do you think?

I think both should be fixed,

However, for U+FE0E [2. backspace for multibyte] I think this issue should be solved.

What is causing the issue?
This happens because there is no actual (&#x262a;&#xfe0e;) glyph representation in the font file, So harfbuzz assumes length is 2, not 1, as in the (&#x262a;&#xfe0f;) case where length is 1.
Anyway: this D10956 should fix the issue, we will remove variation sequences as part of glyph when deleting clusters

ali.alzyod closed this task as Resolved.Jan 22 2020, 11:34 PM