diff options
author | Matthias Clasen <mclasen@redhat.com> | 2015-07-29 18:28:56 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2015-07-29 21:42:58 -0400 |
commit | c6838fbff0dba67cc067978beb9cd4a2dbe90e5f (patch) | |
tree | 7dd6046705e2c41893ff30aaf201aafedc38b781 /gtk/gtktextlayout.c | |
parent | 98f9532a22bc37118f5958f795c5167714d31e00 (diff) | |
download | gtk+-c6838fbff0dba67cc067978beb9cd4a2dbe90e5f.tar.gz |
GtkTextView: Support font features
Add a ::font-features attribute to GtkTextTag, and support
font features when inserting Pango markup into a text buffer.
Diffstat (limited to 'gtk/gtktextlayout.c')
-rw-r--r-- | gtk/gtktextlayout.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c index 763ef3b7c8..041f062f11 100644 --- a/gtk/gtktextlayout.c +++ b/gtk/gtktextlayout.c @@ -1639,10 +1639,9 @@ add_text_attrs (GtkTextLayout *layout, if (style->font_scale != 1.0) { attr = pango_attr_scale_new (style->font_scale); - attr->start_index = start; attr->end_index = start + byte_count; - + pango_attr_list_insert (attrs, attr); } @@ -1663,6 +1662,15 @@ add_text_attrs (GtkTextLayout *layout, pango_attr_list_insert (attrs, attr); } + + if (style->font_features) + { + attr = pango_attr_font_features_new (style->font_features); + attr->start_index = start; + attr->end_index = start + byte_count; + + pango_attr_list_insert (attrs, attr); + } } static void |