summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-27 00:54:43 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-27 12:18:26 -0400
commit30a3d21c1337030fe6d0484d8899e5ab354b6d28 (patch)
treec619d6048546b81d2305b1d6f6c607c1c6dc8a05
parent609a00c9866037f2b9e05ec9c70071407e2f673f (diff)
downloadpango-30a3d21c1337030fe6d0484d8899e5ab354b6d28.tar.gz
Fixes for rtl cursor positions
Still not working quite right, but getting closer.
-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;
}
}