summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKhaled Hosny <khaledhosny@eglug.org>2015-08-04 04:23:15 +0200
committerKhaled Hosny <khaledhosny@eglug.org>2015-08-21 03:48:36 +0200
commit702e7cf1a336fed40bb2d89acc3c02b097c8bf84 (patch)
tree04707d349bb8582ed257b98be8e079eb8a544a2f
parent927585ea24482ec880fc8e1dcb63eade313f6d46 (diff)
downloadpango-702e7cf1a336fed40bb2d89acc3c02b097c8bf84.tar.gz
Port two minor bidi bug fixes from FriBidi 0.19.6
-rw-r--r--pango/mini-fribidi/fribidi.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/pango/mini-fribidi/fribidi.c b/pango/mini-fribidi/fribidi.c
index c4644efa..cef814ca 100644
--- a/pango/mini-fribidi/fribidi.c
+++ b/pango/mini-fribidi/fribidi.c
@@ -627,6 +627,13 @@ fribidi_analyse_string_utf8 ( /* input */
move_element_before (pp, explicits_list_end);
pp = &temp_link;
}
+ else if (this_type == FRIBIDI_TYPE_BS)
+ {
+ /* X8. All explicit directional embeddings and overrides are
+ completely terminated at the end of each paragraph. Paragraph
+ separators are not included in the embedding. */
+ break;
+ }
else
{
/* X6. For all typed besides RLE, LRE, RLO, LRO, and PDF:
@@ -639,11 +646,6 @@ fribidi_analyse_string_utf8 ( /* input */
if (!FRIBIDI_IS_NEUTRAL (override))
RL_TYPE (pp) = override;
}
- /* X8. All explicit directional embeddings and overrides are
- completely terminated at the end of each paragraph. Paragraph
- separators are not included in the embedding. */
- /* This function is running on a single paragraph, so we can do
- X8 after all the input is processed. */
}
/* Implementing X8. It has no effect on a single paragraph! */
@@ -699,6 +701,10 @@ fribidi_analyse_string_utf8 ( /* input */
pp = merge_with_prev (pp);
else
RL_TYPE (pp) = prev_type;
+ if (prev_type == next_type && RL_LEVEL (pp) == RL_LEVEL (pp->next))
+ {
+ pp = merge_with_prev (pp->next);
+ }
continue; /* As we know the next condition cannot be true. */
}
@@ -717,7 +723,7 @@ fribidi_analyse_string_utf8 ( /* input */
last_strong = base_dir;
/* Resolving dependency of loops for rules W4 and W5, W5 may
- want to prevent W4 to take effect in the next turn, do this
+ want to prevent W4 to take effect in the next turn, do this
through "w4". */
w4 = FRIBIDI_TRUE;
/* Resolving dependency of loops for rules W4 and W5 with W7,