1
1
mirror of https://gitlab.gnome.org/GNOME/gimp.git synced 2025-10-06 01:12:40 +02:00

Compare commits

...

1 Commits

Author SHA1 Message Date
Jacob Boerema
286610971a app, libgimp: Fix warning that fcinit is required since fontconfig 2.17
A recent change in Fontconfig 2.17 is that `FcInit()` became mandatory
for proper initialization. Not having that generates a warning in the
terminal:
`Fontconfig warning: using without calling FcInit()`

We fix this in the same way as GTK3 does: by calling
`pango_cairo_font_map_get_default ()`
See https://gitlab.gnome.org/GNOME/gtk/-/issues/7639

We need to add this in two places, in app for GIMP itself, and in
libgimp for plug-ins.
This adds a dependency on pangocairo for libgimp.
2025-08-10 11:38:31 -04:00
3 changed files with 11 additions and 0 deletions

View File

@@ -53,6 +53,8 @@
#include <gdk-pixbuf/gdk-pixbuf.h>
#endif
#include <pango/pangocairo.h>
#include <babl/babl.h>
#include "libgimpbase/gimpbase.h"
@@ -644,6 +646,9 @@ main (int argc,
g_free (bin_dir);
}
/* Trigger fontconfig initialization early */
pango_cairo_font_map_get_default ();
#ifndef _WIN64
{
typedef BOOL (WINAPI *t_SetProcessDEPPolicy) (DWORD dwFlags);

View File

@@ -82,6 +82,8 @@
#include <locale.h>
#include <pango/pangocairo.h>
#include "gimp.h"
#include "libgimpbase/gimpbase-private.h"
@@ -273,6 +275,9 @@ gimp_main (GType plug_in_type,
}
#endif /* HAVE_EXCHNDL */
/* Trigger fontconfig initialization early */
pango_cairo_font_map_get_default ();
#ifndef _WIN64
{
typedef BOOL (WINAPI *t_SetProcessDEPPolicy) (DWORD dwFlags);

View File

@@ -364,6 +364,7 @@ libgimp = library('gimp-'+ gimp_api_version,
drmingw,
math,
pango,
pangocairo,
pangoft2,
],
sources: [