summaryrefslogtreecommitdiff
path: root/pango/pango-attributes.h
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-08-20 17:16:52 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-08-20 23:15:03 -0400
commitbf5e07101758040025d1bc3a592c9dcd982c0edc (patch)
tree1de53fefc67d4de6bb786d68387b9e6a906c6ee9 /pango/pango-attributes.h
parent5efdd7e05c3b30db0760625de2fd3b4e0e9e4b9f (diff)
downloadpango-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.h')
-rw-r--r--pango/pango-attributes.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h
index e3012008..ca0f74b8 100644
--- a/pango/pango-attributes.h
+++ b/pango/pango-attributes.h
@@ -120,6 +120,7 @@ typedef enum
PANGO_ATTR_OVERLINE_COLOR, /* PangoAttrColor */
PANGO_ATTR_LINE_HEIGHT, /* PangoAttrFloat */
PANGO_ATTR_ABSOLUTE_LINE_HEIGHT, /* PangoAttrInt */
+ PANGO_ATTR_TEXT_TRANSFORM, /* PangoAttrInt */
} PangoAttrType;
/**
@@ -203,6 +204,25 @@ typedef enum {
} PangoShowFlags;
/**
+ * PangoTextTransform:
+ * @PANGO_TEXT_TRANSFORM_NONE: Leave text unchanged
+ * @PANGO_TEXT_TRANSFORM_LOWERCASE: Display letters and numbers as lowercase
+ * @PANGO_TEXT_TRANSFORM_UPPERCASE: Display letters and numbers as uppercase
+ * @PANGO_TEXT_TRANSFORM_CAPITALIZE: Display the first character of a word
+ * in titlecase
+ *
+ * An enumeration that affects how Pango treats characters during shaping.
+ *
+ * Since: 1.50
+ */
+typedef enum {
+ PANGO_TEXT_TRANSFORM_NONE,
+ PANGO_TEXT_TRANSFORM_LOWERCASE,
+ PANGO_TEXT_TRANSFORM_UPPERCASE,
+ PANGO_TEXT_TRANSFORM_CAPITALIZE,
+} PangoTextTransform;
+
+/**
* PANGO_ATTR_INDEX_FROM_TEXT_BEGINNING:
*
* Value for @start_index in `PangoAttribute` that indicates
@@ -532,6 +552,8 @@ PANGO_AVAILABLE_IN_1_50
PangoAttribute * pango_attr_line_height_new (double factor);
PANGO_AVAILABLE_IN_1_50
PangoAttribute * pango_attr_line_height_new_absolute (int height);
+PANGO_AVAILABLE_IN_1_50
+PangoAttribute * pango_attr_text_transform_new (PangoTextTransform transform);
PANGO_AVAILABLE_IN_1_50
PangoAttrString * pango_attribute_as_string (PangoAttribute *attr);