diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-24 12:47:12 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-25 14:57:13 -0400 |
commit | b9cad7cc545cd82dca4c9d11085d6b7026b22038 (patch) | |
tree | 7eb90efa5588f0098f97318a41749331da86d411 /gtk/gtktextlayout.c | |
parent | 357b97b5a6eda3c69b256ea270dad7e7c7f4dc99 (diff) | |
download | gtk+-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.c | 18 |
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 |