From 81b25968ca82f3acd2ef346089eee19a7886d682 Mon Sep 17 00:00:00 2001 From: Vincent Wei Date: Tue, 1 Aug 2023 15:57:27 +0800 Subject: [PATCH] do not return ARCH_TYPE_BASIC_VOWEL for Arabic chars --- src/font/charset-arabic.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/font/charset-arabic.c b/src/font/charset-arabic.c index 16985153..b6b65a51 100644 --- a/src/font/charset-arabic.c +++ b/src/font/charset-arabic.c @@ -226,7 +226,7 @@ static int iso8859_6_conv_from_uc32 (Uchar32 wc, unsigned char* mchar) } #endif -/* must attetion the para s is arabic chv value.*/ +#if 0 static int is_arabic_char_vowel(Uint8 c) { @@ -240,6 +240,7 @@ static int is_arabic_char_vowel(Uint8 c) */ return 0; } +#endif /* ISO8859-6 charset vowel relative define and judge */ #define ISARABIC_VOWEL(s) ((s >= FATHATAN) && (s <= SUKUN)) @@ -469,9 +470,12 @@ static int iso8859_6_len_first_char (const unsigned char* mstr, int len) static unsigned int iso8859_6_char_type (Achar32 chv) { + chv = REAL_ACHAR(chv); +#if 1 + return sb_char_type(chv); +#else unsigned int ch_type = ACHAR_BASIC_UNKNOWN; - chv = REAL_ACHAR(chv); if (is_arabic_char_vowel (chv)) { /* is vowel */ ch_type = ACHAR_BASIC_VOWEL; } @@ -480,6 +484,7 @@ static unsigned int iso8859_6_char_type (Achar32 chv) } return ch_type; +#endif } static BidiType __mg_iso8859_6_bidi_char_type_map[] = {