From 70251cc6dd04a8e1a23860e72d2e60b4ab0a870b Mon Sep 17 00:00:00 2001 From: Lorenzo Arena Date: Fri, 28 Apr 2023 14:19:47 +0200 Subject: [PATCH] fix(bidi): add more Hebrew checks to RTL characters set (#4171) --- src/misc/lv_bidi.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/misc/lv_bidi.c b/src/misc/lv_bidi.c index bcb76bd84..b696c25dc 100644 --- a/src/misc/lv_bidi.c +++ b/src/misc/lv_bidi.c @@ -376,7 +376,6 @@ static bool lv_bidi_letter_is_weak(uint32_t letter) */ static bool lv_bidi_letter_is_rtl(uint32_t letter) { - if(letter >= 0x5d0 && letter <= 0x5ea) return true; if(letter == 0x202E) return true; /*Unicode of LV_BIDI_RLO*/ /*Check for Persian and Arabic characters [https://en.wikipedia.org/wiki/Arabic_script_in_Unicode]*/ @@ -384,6 +383,10 @@ static bool lv_bidi_letter_is_rtl(uint32_t letter) if(letter >= 0xFB50 && letter <= 0xFDFF) return true; if(letter >= 0xFE70 && letter <= 0xFEFF) return true; + /*Check for Hebrew characters [https://en.wikipedia.org/wiki/Unicode_and_HTML_for_the_Hebrew_alphabet]*/ + if(letter >= 0x590 && letter <= 0x5FF) return true; + if(letter >= 0xFB1D && letter <= 0xFB4F) return true; + return false; }