[pango/arabic-format] Fix Arabic format chars




commit 95a25708f696ccccfe44c1e993465208bc155823
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Dec 15 23:45:25 2021 -0500

    Fix Arabic format chars
    
    We can't treat these like spaces, since they are visible
    and need the proper font.
    
    Fixes: #642

 pango/itemize.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
---
diff --git a/pango/itemize.c b/pango/itemize.c
index 1d71b5c6..f64dac80 100644
--- a/pango/itemize.c
+++ b/pango/itemize.c
@@ -507,8 +507,7 @@ itemize_state_init (ItemizeState               *state,
 
   if (!PANGO_GRAVITY_IS_VERTICAL (state->context->resolved_gravity))
     state->width_iter.end = state->end;
-  else
-  if (state->emoji_iter.is_emoji)
+  else if (state->emoji_iter.is_emoji)
     state->width_iter.end = MAX (state->width_iter.end, state->emoji_iter.end);
 
   update_end (state);
@@ -923,7 +922,7 @@ consider_as_space (gunichar wc)
 {
   GUnicodeType type = g_unichar_type (wc);
   return type == G_UNICODE_CONTROL ||
-         type == G_UNICODE_FORMAT ||
+         (type == G_UNICODE_FORMAT && !(wc >= 0x600 && wc <= 0x06ff)) ||
          type == G_UNICODE_SURROGATE ||
          type == G_UNICODE_LINE_SEPARATOR ||
          type == G_UNICODE_PARAGRAPH_SEPARATOR ||


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]