forked from enlightenment/efl
evas_textblock: myanmar script rendering with e vowel.
Summary: Resolve rendering e vowel (0x1031) with Myanmar(Burmese) with zero width non joiner (0x200C) Test Plan: ninja test Reviewers: woohyun, bowonryu Reviewed By: bowonryu Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D12102
This commit is contained in:
parent
eb0f7183dd
commit
eed4068fa2
|
@ -5436,6 +5436,27 @@ skip:
|
|||
|
||||
script = evas_common_language_script_type_get(str, script_len);
|
||||
|
||||
/* FIXME Workaround for Burmese Vowel E Rendering, caused by bug in Harfbuzz
|
||||
breaking text run will fix the visual issue.
|
||||
*/
|
||||
if (script == EVAS_SCRIPT_MYANMAR && script_len > 1)
|
||||
{
|
||||
int i;
|
||||
for (i = 0 ; i < script_len - 1; i++)
|
||||
{
|
||||
if (str[i] == 0x200C)
|
||||
{
|
||||
if (str[i+1] == 0x1031)
|
||||
{
|
||||
cur_len += script_len;
|
||||
script_len = i + 1;
|
||||
cur_len -= script_len;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Evas_Object_Protected_Data *obj = efl_data_scope_get(c->obj, EFL_CANVAS_OBJECT_CLASS);
|
||||
while (script_len > 0)
|
||||
{
|
||||
|
|
|
@ -610,6 +610,27 @@ EFL_START_TEST(elm_entry_test_text_class)
|
|||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(elm_entry_test_burmese)
|
||||
{
|
||||
Evas_Object *win, *textblock;
|
||||
Evas_Textblock_Style *style;
|
||||
int w;
|
||||
|
||||
win = win_add(NULL, "entry", ELM_WIN_BASIC);
|
||||
textblock = evas_object_textblock_add(win);
|
||||
|
||||
style = evas_textblock_style_new();
|
||||
evas_textblock_style_set(style, "DEFAULT='font=arial font_size=20 color=red'");
|
||||
evas_object_textblock_style_set(textblock, style);
|
||||
evas_textblock_style_free(style);
|
||||
style = NULL;
|
||||
|
||||
evas_object_textblock_text_markup_set(textblock, "\u1006\u200C\u1031\u200C\u1031\u200C\u1031");
|
||||
evas_object_textblock_size_native_get(textblock, &w, NULL);
|
||||
ck_assert_int_ne(w, 0);
|
||||
}
|
||||
EFL_END_TEST
|
||||
|
||||
EFL_START_TEST(elm_entry_keycode)
|
||||
{
|
||||
Evas_Object *win, *entry;
|
||||
|
@ -651,5 +672,6 @@ void elm_test_entry(TCase *tc)
|
|||
tcase_add_test(tc, elm_entry_magnifier);
|
||||
tcase_add_test(tc, elm_entry_file_get_set);
|
||||
tcase_add_test(tc, elm_entry_test_text_class);
|
||||
tcase_add_test(tc, elm_entry_test_burmese);
|
||||
tcase_add_test(tc, elm_entry_keycode);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue