[pango/visible-things: 13/13] pango-view: Add an option to show space



commit 678253a225229df7ccad4504298b2867fcbc5977
Author: Matthias Clasen <mclasen redhat com>
Date:   Sun Jul 7 14:20:30 2019 -0400

    pango-view: Add an option to show space

 utils/viewer-render.c | 5 +++++
 1 file changed, 5 insertions(+)
---
diff --git a/utils/viewer-render.c b/utils/viewer-render.c
index 4525e7df..8180bb1c 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",                                  "show"},
+    {"show-space",     0, 0, G_OPTION_ARG_NONE,                        &opt_show_space,
+     "Show space",                                 "show"},
     {"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,


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