diff options
author | Matthias Clasen <mclasen@redhat.com> | 2019-07-22 16:20:37 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2019-07-22 16:20:37 +0000 |
commit | f401cb1789400384aca0e3679e47213148c9403b (patch) | |
tree | b2c949dda55a6199efdd35d0815acf384af8b065 /pango/pango-attributes.c | |
parent | 5319f448a052ab328deefea2a6a697fab2903ddf (diff) | |
parent | 2036d2b6be2254f97f23944b04a58d224bd1409d (diff) | |
download | pango-f401cb1789400384aca0e3679e47213148c9403b.tar.gz |
Merge branch 'better-hyphens' into 'master'
Better hyphens
See merge request GNOME/pango!89
Diffstat (limited to 'pango/pango-attributes.c')
-rw-r--r-- | pango/pango-attributes.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c index 894555d1..15edfbe8 100644 --- a/pango/pango-attributes.c +++ b/pango/pango-attributes.c @@ -1179,6 +1179,33 @@ pango_attr_background_alpha_new (guint16 alpha) return pango_attr_int_new (&klass, (int)alpha); } +/** + * pango_attr_allow_breaks_new: + * @allow_breaks: %TRUE if we line breaks are allowed + * + * Create a new allow-breaks attribute. + * + * If breaks are disabled, the range will be kept in a + * single run, as far as possible. + * + * Return value: (transfer full): the newly allocated #PangoAttribute, + * which should be freed with pango_attribute_destroy() + * + * Since: 1.44 + */ +PangoAttribute * +pango_attr_allow_breaks_new (gboolean allow_breaks) +{ + static const PangoAttrClass klass = { + PANGO_ATTR_ALLOW_BREAKS, + pango_attr_int_copy, + pango_attr_int_destroy, + pango_attr_int_equal, + }; + + return pango_attr_int_new (&klass, (int)allow_breaks); +} + /* * Attribute List */ |