[pango/visible-things: 2/11] markup: Support the new attributes
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pango/visible-things: 2/11] markup: Support the new attributes
- Date: Sat, 13 Jul 2019 23:53:02 +0000 (UTC)
commit b66c9877722ca0b4b6e0c52e475337a6b0110692
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 7420fa85..09fa23a8 100644
--- a/pango/pango-markup.c
+++ b/pango/pango-markup.c
@@ -1127,6 +1127,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;
@@ -1192,6 +1195,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);
@@ -1511,6 +1517,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]