summaryrefslogtreecommitdiff
path: root/gtk/gtktextlayout.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-24 12:47:12 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-25 14:57:13 -0400
commitb9cad7cc545cd82dca4c9d11085d6b7026b22038 (patch)
tree7eb90efa5588f0098f97318a41749331da86d411 /gtk/gtktextlayout.c
parent357b97b5a6eda3c69b256ea270dad7e7c7f4dc99 (diff)
downloadgtk+-new-pango-attributes.tar.gz
textview: Implement new pango attributesnew-pango-attributes
Implement the word and sentence attributes.
Diffstat (limited to 'gtk/gtktextlayout.c')
-rw-r--r--gtk/gtktextlayout.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c
index 88d4c409b4..1873b03d74 100644
--- a/gtk/gtktextlayout.c
+++ b/gtk/gtktextlayout.c
@@ -1694,6 +1694,24 @@ add_text_attrs (GtkTextLayout *layout,
pango_attr_list_insert (attrs, attr);
}
+
+ if (style->word)
+ {
+ attr = pango_attr_word_new ();
+ attr->start_index = start;
+ attr->end_index = start + byte_count;
+
+ pango_attr_list_insert (attrs, attr);
+ }
+
+ if (style->sentence)
+ {
+ attr = pango_attr_sentence_new ();
+ attr->start_index = start;
+ attr->end_index = start + byte_count;
+
+ pango_attr_list_insert (attrs, attr);
+ }
}
static void