[pango/ligature-caret-rtl-fixes: 4/7] Fixes for rtl cursor positions
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/ligature-caret-rtl-fixes: 4/7] Fixes for rtl cursor positions
- Date: Fri, 27 Aug 2021 15:43:55 +0000 (UTC)
commit 543c5bde7f3abf07b2082200f89c94c78c50d138
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Aug 27 00:54:43 2021 -0400
Fixes for rtl cursor positions
Still not working quite right, but getting closer.
pango/glyphstring.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
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;
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]