[gimp] plug-ins: forgot to look missing font duplicates recursively.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] plug-ins: forgot to look missing font duplicates recursively.
- Date: Wed, 1 Jan 2020 17:29:12 +0000 (UTC)
commit 34f05750d08c152408434c440c3cb4570f355a49
Author: Jehan <jehan girinstud io>
Date: Wed Jan 1 18:28:04 2020 +0100
plug-ins: forgot to look missing font duplicates recursively.
Fix for the previous commit, fixes cases with text layers inside groups.
plug-ins/common/file-pdf-save.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
---
diff --git a/plug-ins/common/file-pdf-save.c b/plug-ins/common/file-pdf-save.c
index 088c4fa81e..4f079a1dd3 100644
--- a/plug-ins/common/file-pdf-save.c
+++ b/plug-ins/common/file-pdf-save.c
@@ -653,8 +653,20 @@ get_missing_fonts (GList *layers)
if (gimp_item_is_group (GIMP_ITEM (layer)))
{
- missing_fonts = g_list_concat (missing_fonts,
- get_missing_fonts (gimp_item_list_children (GIMP_ITEM (layer))));
+ GList *child_missing_fonts;
+ GList *iter2;
+
+ child_missing_fonts = get_missing_fonts (gimp_item_list_children (GIMP_ITEM (layer)));
+ for (iter2 = child_missing_fonts; iter2; iter2 = iter2->next)
+ {
+ gchar *missing = iter2->data;
+
+ if (g_list_find_custom (missing_fonts, missing, (GCompareFunc) g_strcmp0) == NULL)
+ missing_fonts = g_list_prepend (missing_fonts, missing);
+ else
+ g_free (missing);
+ }
+ g_list_free (child_missing_fonts);
}
else if (gimp_item_is_text_layer (GIMP_ITEM (layer)))
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]