From 8361d89a55a9f8c5e78b802e594fc3168e7f2eaa Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 21 Nov 2020 23:49:37 +0100 Subject: [PATCH 1/2] fix(arabic): support processing again alraedy processed texts with _lv_txt_ap_proc --- CHANGELOG.md | 1 + src/lv_misc/lv_txt_ap.c | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 23431e2df..bf0abdcc7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ ### Bugfixes - fix(btnmatrix) handle arabic texts in button matrices - fix(indev) disabled object shouldn't absorb clicks but let the parent to be clicked +- fix(arabic) support processing again already processed texts with _lv_txt_ap_proc ## v7.7.2 (Planned to 17.11.2020) ### Bugfixes diff --git a/src/lv_misc/lv_txt_ap.c b/src/lv_misc/lv_txt_ap.c index 727a0dcef..4c68a2773 100644 --- a/src/lv_misc/lv_txt_ap.c +++ b/src/lv_misc/lv_txt_ap.c @@ -211,6 +211,13 @@ static uint32_t lv_ap_get_char_index(uint16_t c) for(uint8_t i = 0; ap_chars_map[i].char_end_form; i++) { if(c == (ap_chars_map[i].char_offset + LV_AP_ALPHABET_BASE_CODE)) return i; + else if (c == ap_chars_map[i].char_end_form //is it an End form + || c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_begining_form_offset) //is it a Begining form + || c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_middle_form_offset) //is it a middle form + || c == (ap_chars_map[i].char_end_form + ap_chars_map[i].char_isolated_form_offset)) //is it an isolated form + { + return i; + } } return LV_UNDEF_ARABIC_PERSIAN_CHARS; } From 07c63b8ad31bad0bf4a98787270c68a12bf5569c Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Sat, 21 Nov 2020 23:53:05 +0100 Subject: [PATCH 2/2] fix(textarea): support Arabic letter connections fixes #1888 --- CHANGELOG.md | 1 + src/lv_widgets/lv_label.c | 9 +++------ 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index bf0abdcc7..68e590055 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ - fix(btnmatrix) handle arabic texts in button matrices - fix(indev) disabled object shouldn't absorb clicks but let the parent to be clicked - fix(arabic) support processing again already processed texts with _lv_txt_ap_proc +- fix(textarea) support Arabic letter connections ## v7.7.2 (Planned to 17.11.2020) ### Bugfixes diff --git a/src/lv_widgets/lv_label.c b/src/lv_widgets/lv_label.c index 865a8f02b..a2d19daf6 100644 --- a/src/lv_widgets/lv_label.c +++ b/src/lv_widgets/lv_label.c @@ -185,11 +185,8 @@ void lv_label_set_text(lv_obj_t * label, const char * text) lv_label_ext_t * ext = lv_obj_get_ext_attr(label); - /*If text is NULL then refresh */ - if(text == NULL) { - lv_label_refr_text(label); - return; - } + /*If text is NULL then just refresh with the current text */ + if(text == NULL) text = ext->text; LV_ASSERT_STR(text); @@ -962,7 +959,7 @@ void lv_label_ins_text(lv_obj_t * label, uint32_t pos, const char * txt) #else _lv_txt_ins(ext->text, pos, txt); #endif - lv_label_refr_text(label); + lv_label_set_text(label, NULL); } /**