summaryrefslogtreecommitdiff
path: root/pango/pango-markup.c
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-21 04:32:48 +0000
committerMatthias Clasen <mclasen@redhat.com>2021-08-21 04:32:48 +0000
commit1ac4f5d3dc9d88abb6f0a196291449c244f39b71 (patch)
tree5d0846958eaba2fa2d7f59b65968e458db15a19d /pango/pango-markup.c
parentf72ff7d4752318b48e3dd0db83a2ef0300aa898f (diff)
parentb2c3b6a7ac43fbdedf1f13a240893159c329767f (diff)
downloadpango-1ac4f5d3dc9d88abb6f0a196291449c244f39b71.tar.gz
Merge branch 'text-transform-3' into 'main'
Add support for text transformation See merge request GNOME/pango!421
Diffstat (limited to 'pango/pango-markup.c')
-rw-r--r--pango/pango-markup.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/pango/pango-markup.c b/pango/pango-markup.c
index a897a52d..f82aacef 100644
--- a/pango/pango-markup.c
+++ b/pango/pango-markup.c
@@ -1226,6 +1226,7 @@ span_parse_func (MarkupData *md G_GNUC_UNUSED,
const char *insert_hyphens = NULL;
const char *show = NULL;
const char *line_height = NULL;
+ const char *text_transform = NULL;
g_markup_parse_context_get_position (context,
&line_number, &char_number);
@@ -1294,6 +1295,9 @@ span_parse_func (MarkupData *md G_GNUC_UNUSED,
CHECK_ATTRIBUTE (strikethrough_color);
CHECK_ATTRIBUTE (style);
break;
+ case 't':
+ CHECK_ATTRIBUTE (text_transform);
+ break;
case 'g':
CHECK_ATTRIBUTE (gravity);
CHECK_ATTRIBUTE (gravity_hint);
@@ -1637,6 +1641,16 @@ span_parse_func (MarkupData *md G_GNUC_UNUSED,
add_attribute (tag, pango_attr_show_new (flags));
}
+ if (G_UNLIKELY (text_transform))
+ {
+ PangoTextTransform tf;
+
+ if (!span_parse_enum ("text_transform", text_transform, PANGO_TYPE_TEXT_TRANSFORM, (int*)(void*)&tf, line_number, error))
+ goto error;
+
+ add_attribute (tag, pango_attr_text_transform_new (tf));
+ }
+
if (G_UNLIKELY (rise))
{
gint n = 0;