[pango/visible-things: 50/52] layout: Make tab visible too
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/visible-things: 50/52] layout: Make tab visible too
- Date: Sat, 13 Jul 2019 03:33:43 +0000 (UTC)
commit 5e210e67ee536a9eaa6772ef43f6e05afeda4847
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 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]