[pango/more-rtl-cluster-fixes: 20/20] pango-view: Use pango_glyph_string_index_to_x_full




commit b709842f94c962feb7ca0e70b0f402dc0c8ea5e3
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Aug 28 13:41:37 2021 -0400

    pango-view: Use pango_glyph_string_index_to_x_full

 utils/viewer-pangocairo.c | 15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)
---
diff --git a/utils/viewer-pangocairo.c b/utils/viewer-pangocairo.c
index e82724a0..4f552a01 100644
--- a/utils/viewer-pangocairo.c
+++ b/utils/viewer-pangocairo.c
@@ -504,13 +504,14 @@ render_callback (PangoLayout *layout,
                 {
                   if (attrs[offset + i].is_cursor_position)
                     {
-                      pango_glyph_string_index_to_x (run->glyphs,
-                                                     text + run->item->offset,
-                                                     run->item->length,
-                                                     &run->item->analysis,
-                                                     p - start,
-                                                     trailing,
-                                                     &x);
+                      pango_glyph_string_index_to_x_full (run->glyphs,
+                                                          text + run->item->offset,
+                                                          run->item->length,
+                                                          &run->item->analysis,
+                                                          (PangoLogAttr *)attrs + offset,
+                                                          p - start,
+                                                          trailing,
+                                                          &x);
                       x += rect.x;
 
                       cairo_set_source_rgba (cr, 1.0, 0.0, 1.0, 0.5);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]