diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-07-10 09:03:13 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-07-12 18:23:03 -0400 |
commit | 643689b3a3c59d7cd710713ec55bab5ce3fe8ee8 (patch) | |
tree | 6fccbf5a859ea8a8fe49ec7274906e2e07adb9eb | |
parent | cf7ee836257807680e98b29e134e087f434429be (diff) | |
download | pango-643689b3a3c59d7cd710713ec55bab5ce3fe8ee8.tar.gz |
pango-view: Add an option to show space
-rw-r--r-- | utils/viewer-render.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/utils/viewer-render.c b/utils/viewer-render.c index f149384a..f369218a 100644 --- a/utils/viewer-render.c +++ b/utils/viewer-render.c @@ -54,6 +54,7 @@ int opt_indent = 0; int opt_spacing = 0; double opt_line_spacing = 0.0; gboolean opt_show_ignorables = FALSE; +gboolean opt_show_space = FALSE; gboolean opt_justify = 0; int opt_runs = 1; PangoAlignment opt_align = PANGO_ALIGN_LEFT; @@ -135,6 +136,8 @@ make_layout(PangoContext *context, flags = PANGO_SHAPE_NONE; if (opt_show_ignorables) flags |= PANGO_SHAPE_SHOW_IGNORABLES; + if (opt_show_space) + flags |= PANGO_SHAPE_SHOW_SPACE; pango_layout_set_shape_flags (layout, flags); align = opt_align; @@ -725,6 +728,8 @@ parse_options (int argc, char *argv[]) "Spread factor for line height", "factor"}, {"show-ignorables", 0, 0, G_OPTION_ARG_NONE, &opt_show_ignorables, "Show invisible characters", NULL}, + {"show-space", 0, 0, G_OPTION_ARG_NONE, &opt_show_space, + "Show space", NULL}, {"justify", 0, 0, G_OPTION_ARG_NONE, &opt_justify, "Align paragraph lines to be justified", NULL}, {"language", 0, 0, G_OPTION_ARG_STRING, &opt_language, |