summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pango/glyphstring.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pango/glyphstring.c b/pango/glyphstring.c
index 8d4aa604..74462d26 100644
--- a/pango/glyphstring.c
+++ b/pango/glyphstring.c
@@ -534,7 +534,10 @@ pango_glyph_string_index_to_x (PangoGlyphString *glyphs,
cluster_offset - 1, &caret_count, &caret);
if (caret_count > 0)
{
- *x_pos = start_xpos + caret;
+ if (analysis->level % 2) /* Right to left */
+ *x_pos = end_xpos + caret;
+ else
+ *x_pos = start_xpos + caret;
return;
}
}