diff options
author | Matthias Clasen <mclasen@redhat.com> | 2021-07-22 11:42:29 +0000 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2021-07-22 11:42:29 +0000 |
commit | c7a65e873e7dc8580f0d13eadb6391564ae15d73 (patch) | |
tree | 28138ae3f6a9bb6de9bf4c6049a26c6d0c58e668 /pango/pango-attributes.c | |
parent | 0978052c9c61032082d60bafba6ec1961b047ce2 (diff) | |
parent | 9bed4e1865ffd827d862ac9543d19b9ce108152e (diff) | |
download | pango-c7a65e873e7dc8580f0d13eadb6391564ae15d73.tar.gz |
Merge branch 'better-ellipsize' into 'main'
ellipsize: Try harder to find the right font
Closes #575
See merge request GNOME/pango!380
Diffstat (limited to 'pango/pango-attributes.c')
-rw-r--r-- | pango/pango-attributes.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/pango/pango-attributes.c b/pango/pango-attributes.c index 26d08404..cb3d917d 100644 --- a/pango/pango-attributes.c +++ b/pango/pango-attributes.c @@ -2479,15 +2479,16 @@ pango_attr_iterator_get_attrs (PangoAttrIterator *iterator) GSList *tmp_list2; gboolean found = FALSE; - for (tmp_list2 = attrs; tmp_list2; tmp_list2 = tmp_list2->next) - { - PangoAttribute *old_attr = tmp_list2->data; - if (attr->klass->type == old_attr->klass->type) - { - found = TRUE; - break; - } - } + if (attr->klass->type != PANGO_ATTR_FONT_DESC) + for (tmp_list2 = attrs; tmp_list2; tmp_list2 = tmp_list2->next) + { + PangoAttribute *old_attr = tmp_list2->data; + if (attr->klass->type == old_attr->klass->type) + { + found = TRUE; + break; + } + } if (!found) attrs = g_slist_prepend (attrs, pango_attribute_copy (attr)); |