diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-27 00:54:43 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-27 12:18:26 -0400 |
commit | 30a3d21c1337030fe6d0484d8899e5ab354b6d28 (patch) | |
tree | c619d6048546b81d2305b1d6f6c607c1c6dc8a05 /pango/glyphstring.c | |
parent | 609a00c9866037f2b9e05ec9c70071407e2f673f (diff) | |
download | pango-30a3d21c1337030fe6d0484d8899e5ab354b6d28.tar.gz |
Fixes for rtl cursor positions
Still not working quite right, but getting closer.
Diffstat (limited to 'pango/glyphstring.c')
-rw-r--r-- | pango/glyphstring.c | 5 |
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; } } |