diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-08-20 17:16:52 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-08-20 23:15:03 -0400 |
commit | bf5e07101758040025d1bc3a592c9dcd982c0edc (patch) | |
tree | 1de53fefc67d4de6bb786d68387b9e6a906c6ee9 /pango/pango-attributes.c | |
parent | 5efdd7e05c3b30db0760625de2fd3b4e0e9e4b9f (diff) | |
download | pango-bf5e07101758040025d1bc3a592c9dcd982c0edc.tar.gz |
markup: Add a text transform attribute
Add a PangoTextTransform enum, a PangoAttribute
to set it on runs of text, and support for parsing
it out of markup.
Diffstat (limited to 'pango/pango-attributes.c')
-rw-r--r-- | pango/pango-attributes.c | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c index 5690aeaa..f5d5104b 100644 --- a/pango/pango-attributes.c +++ b/pango/pango-attributes.c @@ -1411,6 +1411,32 @@ pango_attr_line_height_new_absolute (int height) return pango_attr_int_new (&klass, height); } + +/** + * pango_attr_text_transform_new: + * @transform: `PangoTextTransform` to apply + * + * Create a new attribute that influences how characters + * are transformed during shaping. + * + * Return value: (transfer full): the newly allocated + * `PangoAttribute`, which should be freed with + * [method@Pango.Attribute.destroy] + * + * Since: 1.50 + */ +PangoAttribute * +pango_attr_text_transform_new (PangoTextTransform transform) +{ + static const PangoAttrClass klass = { + PANGO_ATTR_TEXT_TRANSFORM, + pango_attr_int_copy, + pango_attr_int_destroy, + pango_attr_int_equal + }; + + return pango_attr_int_new (&klass, transform); +} /* }}} */ /* {{{ Binding helpers */ |