summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2019-07-07 16:44:35 -0400
committerMatthias Clasen <mclasen@redhat.com>2019-07-12 18:23:03 -0400
commit77d487a478ff845af350e46a687e7a285f13cc9a (patch)
treee2d71533b01d63f91fd9df2f52d20e45ac32c758
parent5471998d7079b8081f8bc212ac61d1e952baabc4 (diff)
downloadpango-77d487a478ff845af350e46a687e7a285f13cc9a.tar.gz
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.
-rw-r--r--pango/pango-layout.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/pango/pango-layout.c b/pango/pango-layout.c
index ab8805a4..9f041670 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;