From 62580f2fa5e46d51bb2377d4028471926108bab3 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Sat, 20 Jul 2019 10:34:15 -0700 Subject: Add an allow-breaks attribute Add a new attribute type, and parse allow_breaks="false" in markup. This is useful to prevent hyphenation of words. --- pango/pango-attributes.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pango/pango-attributes.h') diff --git a/pango/pango-attributes.h b/pango/pango-attributes.h index cff495b2..4249f8f4 100644 --- a/pango/pango-attributes.h +++ b/pango/pango-attributes.h @@ -147,6 +147,7 @@ typedef struct _PangoAttrIterator PangoAttrIterator; * @PANGO_ATTR_FONT_FEATURES: OpenType font features (#PangoAttrString). Since 1.38 * @PANGO_ATTR_FOREGROUND_ALPHA: foreground alpha (#PangoAttrInt). Since 1.38 * @PANGO_ATTR_BACKGROUND_ALPHA: background alpha (#PangoAttrInt). Since 1.38 + * @PANGO_ATTR_ALLOW_BREAKS: whether breaks are allowed (#PangoAttrInt). Since 1.44 * * The #PangoAttrType * distinguishes between different types of attributes. Along with the @@ -182,7 +183,8 @@ typedef enum PANGO_ATTR_GRAVITY_HINT, /* PangoAttrInt */ PANGO_ATTR_FONT_FEATURES, /* PangoAttrString */ PANGO_ATTR_FOREGROUND_ALPHA, /* PangoAttrInt */ - PANGO_ATTR_BACKGROUND_ALPHA /* PangoAttrInt */ + PANGO_ATTR_BACKGROUND_ALPHA, /* PangoAttrInt */ + PANGO_ATTR_ALLOW_BREAKS /* PangoAttrInt */ } PangoAttrType; /** @@ -522,6 +524,8 @@ PANGO_AVAILABLE_IN_1_38 PangoAttribute *pango_attr_foreground_alpha_new (guint16 alpha); PANGO_AVAILABLE_IN_1_38 PangoAttribute *pango_attr_background_alpha_new (guint16 alpha); +PANGO_AVAILABLE_IN_1_44 +PangoAttribute *pango_attr_allow_breaks_new (gboolean allow_breaks); PANGO_AVAILABLE_IN_ALL GType pango_attr_list_get_type (void) G_GNUC_CONST; -- cgit v1.2.1