[pango/visible-things-2: 14/16] layout: Make tab visible too



commit 4b52df5fefdbe238e1387ff63688a3fdd43f1d03
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jul 7 16:44:35 2019 -0400

    layout: Make tab visible too
    
    When the 'visible space' option is set, also
    arrange for tab characters to be passed on to
    the rendering layer as non-empty.

 pango/pango-layout.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index 780f236e..a7257753 100644
--- a/pango/pango-layout.c
+++ b/pango/pango-layout.c
@@ -3198,7 +3198,10 @@ shape_tab (PangoLayoutLine  *line,
 
   pango_glyph_string_set_size (glyphs, 1);
 
-  glyphs->glyphs[0].glyph = PANGO_GLYPH_EMPTY;
+  if (line->layout->shape_flags & PANGO_SHAPE_SHOW_SPACE)
+    glyphs->glyphs[0].glyph = PANGO_GET_UNKNOWN_GLYPH ('\t');
+  else
+    glyphs->glyphs[0].glyph = PANGO_GLYPH_EMPTY;
   glyphs->glyphs[0].geometry.x_offset = 0;
   glyphs->glyphs[0].geometry.y_offset = 0;
   glyphs->glyphs[0].attr.is_cluster_start = 1;


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