[pango/visible-things: 31/40] markup: Support the new attributes



commit 62b96711e0f983e40174f3107045626594d86f9c
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Jul 13 15:49:57 2019 -0400

    markup: Support the new attributes

 pango/pango-markup.c | 36 ++++++++++++++++++++++++++++++++++++
 1 file changed, 36 insertions(+)
---
diff --git a/pango/pango-markup.c b/pango/pango-markup.c
index 2c509dac..0a4fd176 100644
--- a/pango/pango-markup.c
+++ b/pango/pango-markup.c
@@ -1292,6 +1292,9 @@ span_parse_func     (MarkupData            *md G_GNUC_UNUSED,
   const char *letter_spacing = NULL;
   const char *lang = NULL;
   const char *fallback = NULL;
+  const char *show_ignorables = NULL;
+  const char *show_space = NULL;
+  const char *show_line_separators = NULL;
   const char *gravity = NULL;
   const char *gravity_hint = NULL;
   const char *font_features = NULL;
@@ -1357,6 +1360,9 @@ span_parse_func     (MarkupData            *md G_GNUC_UNUSED,
        CHECK_ATTRIBUTE (font_features);
        break;
       case 's':
+       CHECK_ATTRIBUTE (show_ignorables);
+       CHECK_ATTRIBUTE (show_line_separators);
+       CHECK_ATTRIBUTE (show_space);
        CHECK_ATTRIBUTE (size);
        CHECK_ATTRIBUTE (stretch);
        CHECK_ATTRIBUTE (strikethrough);
@@ -1676,6 +1682,36 @@ span_parse_func     (MarkupData            *md G_GNUC_UNUSED,
       add_attribute (tag, pango_attr_fallback_new (b));
     }
 
+  if (G_UNLIKELY (show_ignorables))
+    {
+      gboolean b = FALSE;
+
+      if (!span_parse_boolean ("show_ignorables", show_ignorables, &b, line_number, error))
+       goto error;
+
+      add_attribute (tag, pango_attr_show_ignorables_new (b));
+    }
+
+  if (G_UNLIKELY (show_line_separators))
+    {
+      gboolean b = FALSE;
+
+      if (!span_parse_boolean ("show_line_separators", show_line_separators, &b, line_number, error))
+       goto error;
+
+      add_attribute (tag, pango_attr_show_line_separators_new (b));
+    }
+
+  if (G_UNLIKELY (show_space))
+    {
+      gboolean b = FALSE;
+
+      if (!span_parse_boolean ("show_space", show_space, &b, line_number, error))
+       goto error;
+
+      add_attribute (tag, pango_attr_show_space_new (b));
+    }
+
   if (G_UNLIKELY (rise))
     {
       gint n = 0;


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