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

Compare commits

...

23 Commits

Author SHA1 Message Date
Alx Sa
6c47a4536e menu: Add Gradient Editor to dockable menu 2025-05-17 13:49:39 +00:00
Alx Sa
3254d8e840 menus: Add Brush and Dynamics Editor to Windows menu
This allows these dockable dialogues to be added on their
own from the Windows -> Dockable Dialogs menu, rather
than requiring users to access them via the Brushes and
Dynamics dockable dialogues.
2025-05-17 13:49:39 +00:00
Jehan
672703eb60 devel-docs: Windows Aarch64 is not considered experimental anymore. 2025-05-17 15:00:49 +02:00
Jehan
286b80ac36 desktop: set GIMP 3.0.4 release date. 2025-05-17 11:24:00 +02:00
Jehan
caa03fd2e4 NEWS: update. 2025-05-17 11:15:15 +02:00
Alx Sa
b31e08012f widgets: Show palette name in Palette Color Selector 2025-05-16 22:44:19 -03:00
Bruno Lopes
c346731e1b build/windows: Fixes to make the installer script work locally again 2025-05-16 21:52:37 -03:00
Jehan
a1621427d6 build: clone the InnoSetup repository once instead of downloading individual files.
It turns out that commit bd6745ab40 is not a good solution either,
because now it is the "Making sure you're not a bot!" page from Anubis
which is blocking us.
I am hoping that a git clone should encounter neither the HTTP 429 error
(though we clone through HTTP, but maybe/hopefully the rate limitation
is set up only for actual web page requests) nor the bot protection.
2025-05-17 01:05:21 +02:00
Jehan
4b9e96f703 build: add the ability to add patches when using tagged babl/GEGL releases. 2025-05-16 16:56:35 +00:00
Bruno Lopes
f8d87fc293 meson: Do not generate CodeView symbols with GCC
Since GCC 15.1 CodeView generation is broken
2025-05-16 16:56:35 +00:00
Jehan
27f6d25677 libgimp: fix incompatible type for exported function address in gimp-win-x86 job.
This fixes:

> ../libgimp/gimp.c:280:27: error: assignment to 't_SetProcessDEPPolicy' {aka 'int (__attribute__((stdcall)) *)(long unsigned int)'} from incompatible pointer type 'FARPROC' {aka 'int (__attribute__((stdcall)) *)(void)'} [-Wincompatible-pointer-types]
>   280 |     p_SetProcessDEPPolicy = GetProcAddress (GetModuleHandleW (L"kernel32.dll"),
2025-05-16 16:56:35 +00:00
Jehan
a826e35a3e build: add option to select a dependency branch.
We'll make use of this now, and as a general rule, it may be useful when
we need to easily point to feature branches for testing.
2025-05-16 16:56:35 +00:00
Jehan
bd6745ab40 Issue #13957: Unnofficial Inno langs can't be downloaded (due to…
… GitHub rate limiting).

Let's just work with our own remote which will update manually (at least
before a release).
2025-05-16 16:55:01 +00:00
Jehan
be4b8a3ae3 gitlab-ci: use include:project to avoid making HTTP instance on same Gitlab.
This should fix this pipeline error:

> Remote file `https://gitlab.gnome.org/GNOME/citemplates/-/raw/master/flatpak/flatpak_ci_initiative.yml` could not be fetched because of HTTP code `429` error!

See: https://docs.gitlab.com/ci/yaml/#includeproject
2025-05-16 07:17:56 -03:00
Bruno Lopes
840519cb91 gitlab-ci: Go back to flatpak_ci_initiative.yml from GitLab 2025-05-15 21:41:49 -03:00
Bruno Lopes
1aef6f2c37 gitlab-ci: Add CYGWIN perl for 32-bit jobs only
There is no mingw32 perl.
2025-05-15 21:39:26 -03:00
Alx Sa
4eb462a7a4 display: Fix copy/paste typo for UNSCALEY
In 9fe8e849, we accidentally used UNSCALEX
rather than UNSCALEY for offset_y. This patch
corrects that typo.
2025-05-15 13:06:36 +00:00
Alx Sa
6475f0a6dc widgets: Change multi-window title bar based on theme
Applies ad8b47bf to title bars of GimpDockWindows so that
they adapt to the Windows system theme colors.
2025-05-14 23:48:51 -04:00
Jehan
51d69fa44b plug-ins: do not warn for invalid font names at startup.
While all other resources are supposed to be already loaded, this is not
the case of fonts which are loaded in a thread, and whose loading may
end after plug-ins are initialized. So ignore unknown font name as an
exception (because we can't know if it is really unknown or just not
loaded yet).

This fixes such WARNINGs:

> (script-fu:33006): scriptfu-WARNING **: 14:35:28.259: script_fu_add_resource_arg declared resource name is invalid Serif
2025-05-15 02:16:10 +02:00
Jehan
02fd84394c app: fix build warnings.
This fixes 2 such warnings:

> app/text/gimpfontfactory.c: In function ‘gimp_font_factory_load_names’:
> /usr/include/glib-2.0/glib/gstring.h:74:5: warning: ignoring return value of ‘g_string_free_and_steal’ declared with attribute ‘warn_unused_result’ [-Wunused-result]

The (void) ! trick was also possible but this is so ugly so I went for
actual usage of the return value as we should.

Also clean up some trailing whitespaces.
2025-05-15 01:02:53 +02:00
Idriss Fekir
8328dfb25b GimpFontFactory: Move font loading to another thread
This is to make sure than regardless of how many fonts there are, font loading
won't delay startup.

FontConfig if compiled against libxml2 might fail to parse huge xml configs.
So instead of passing it a huge xml, pass the xml every MAX_NUM_FONTS_PER_CONFIG (currently 1000) fonts.

Also made GimpFontFactory custom config strings private because there is no reason for them to be public.
2025-05-14 22:42:22 +00:00
Idriss Fekir
f63e8afe60 GimpFontFactory:Speed up font loading
Profiling showed that a significant amount of time was spent created the hb_blob, and calling FcParseAndLoadFromMemory.

To allow only fonts that pango/harfbuzz recognize, an hb_blob was created from
every font to test if harfbuzz recognizes it, which is obviously a lot of overhead.
FontConfig allows to check if the Font is SNFT and wether it's a WOFF[2] font.
2025-05-14 22:42:22 +00:00
Jehan
2702a47c9e NEWS: update. 2025-05-14 22:53:51 +02:00
25 changed files with 378 additions and 199 deletions

View File

@@ -542,6 +542,7 @@ gimp-win-x86:
variables:
GIT_SUBMODULE_STRATEGY: recursive
script:
- $env:PATH = "C:/msys64/usr/bin;" + $env:PATH
- !reference [gimp-win, script]
artifacts: !reference [gimp-win, artifacts]
@@ -734,7 +735,10 @@ dist-appimage-weekly:
- build/linux/appimage/_Output/
expire_in: 8 days
include: 'https://raw.githubusercontent.com/GNOME/citemplates/master/flatpak/flatpak_ci_initiative.yml'
include:
project: 'GNOME/citemplates'
file: 'flatpak/flatpak_ci_initiative.yml'
dist-flatpak-weekly:
extends:
- .default

17
NEWS
View File

@@ -17,6 +17,8 @@ Core:
- Module loading improved to be better cross-platform (in particular
on macOS both .so and .dylib modules are supported).
- Code compliant with GCC 15 (C23).
- Filter size updated when its drawable is rotated.
- Font loading (at startup) optimized.
Graphical User Interface:
@@ -37,11 +39,17 @@ Graphical User Interface:
- Removed size restrictions on Display Filters.
- Don't show hidden tools on toolbox tooltips.
- Fix "Keep above" Window Manager hint.
- Multi-Window mode on Windows: dock windows' title bars now adapt to
the Windows system theme colors too.
- Show palette name in Palette Color Selector.
Tools:
- MyPaint Brush: have consistent options layout compared to other
paint tools.
- Scissors Select Tool: close the curve on Enter, similar to the Path
tool.
- Path Tool: connect path on click in design mode.
Plug-ins:
@@ -74,6 +82,7 @@ Build:
* Downgrading is only possible by uninstalling first.
* Development warning is shown in dev build of stable series too.
* Add fractional scaling support to Installer welcome image.
* Restore points now have a timeout to prevent stuckness.
- Our AppImage won't ship debug symbols anymore. Better debugging can
be set with: export DEBUGINFOD_URLS="https://debuginfod.debian.net"
- Windows builds:
@@ -81,11 +90,17 @@ Build:
files for plug-in developers.
* Dedicated file icon for XCF files.
* Generate native .pdb CodeView symbols on Windows (smaller debug
data files, usable by MSIX and better debugging ability).
data files, usable by MSIX and better debugging ability), except
on x86 (32-bit).
- Crossbuilds are dropped from CI.
- Shell scripts used in the meson build are ported to Python (more
portable and much faster on some platforms, in particular Windows).
- Some build scripts were moved around for reorganization.
- Depency requirement bumped:
* babl 0.1.114
* GEGL 0.4.62
- New "Inputs" feature for simpler Gitlab pipelines running.
- Some in-repository documentation was cleaned up.
Overview of Changes from GIMP 3.0.0 to GIMP 3.0.2

View File

@@ -279,5 +279,6 @@ libappcore = static_library('appcore',
math,
dl,
libunwind,
pango,
],
)

View File

@@ -146,7 +146,7 @@ gimp_display_shell_canvas_tick (GtkWidget *widget,
if ((tick->prev_width != allocation.width) ||
(tick->prev_height != allocation.height))
{
if (shell->zoom_on_resize &&
if (shell->zoom_on_resize &&
tick->prev_width > 64 &&
tick->prev_height > 64 &&
allocation.width > 64 &&
@@ -167,7 +167,7 @@ gimp_display_shell_canvas_tick (GtkWidget *widget,
SQR (tick->prev_height)));
offset_x = UNSCALEX (shell, shell->offset_x);
offset_y = UNSCALEX (shell, shell->offset_y);
offset_y = UNSCALEY (shell, shell->offset_y);
gimp_zoom_model_zoom (shell->zoom, GIMP_ZOOM_TO, scale);

View File

@@ -68,7 +68,7 @@ fonts_get_custom_configs_invoker (GimpProcedure *procedure,
GimpValueArray *return_vals;
gchar *config = NULL;
gchar *sysconfig = NULL;
gchar *renaming_config = NULL;
gchar **renaming_config = NULL;
gchar **dirs = NULL;
if (! gimp_data_factory_data_wait (gimp->font_factory))
@@ -76,9 +76,10 @@ fonts_get_custom_configs_invoker (GimpProcedure *procedure,
if (success)
{
GList *list = gimp_font_factory_get_custom_fonts_dirs (GIMP_FONT_FACTORY (gimp->font_factory));
guint length = g_list_length (list);
gint i;
GList *list = gimp_font_factory_get_custom_fonts_dirs (GIMP_FONT_FACTORY (gimp->font_factory));
GSList *fonts_renaming_config = gimp_font_factory_get_fonts_renaming_config (GIMP_FONT_FACTORY (gimp->font_factory));
guint length = g_list_length (list);
gint i;
gimp_font_factory_get_custom_config_path (GIMP_FONT_FACTORY (gimp->font_factory),
&config,
@@ -86,14 +87,19 @@ fonts_get_custom_configs_invoker (GimpProcedure *procedure,
config = g_strdup (config);
sysconfig = g_strdup (sysconfig);
renaming_config = g_strdup (gimp_font_factory_get_fonts_renaming_config (GIMP_FONT_FACTORY (gimp->font_factory)));
dirs = g_new0 (gchar *, length + 1);
for (i = 0; list; list = g_list_next (list), i++)
dirs[i] = g_file_get_path (list->data);
g_list_free_full (list, (GDestroyNotify) g_object_unref);
length = g_slist_length (fonts_renaming_config);
renaming_config = g_new0 (gchar *, length + 1);
for (i = 0; fonts_renaming_config; fonts_renaming_config = g_slist_next (fonts_renaming_config), i++)
renaming_config[i] = g_strdup (fonts_renaming_config->data);
}
return_vals = gimp_procedure_get_return_values (procedure, success,
@@ -103,7 +109,7 @@ fonts_get_custom_configs_invoker (GimpProcedure *procedure,
{
g_value_take_string (gimp_value_array_index (return_vals, 1), config);
g_value_take_string (gimp_value_array_index (return_vals, 2), sysconfig);
g_value_take_string (gimp_value_array_index (return_vals, 3), renaming_config);
g_value_take_boxed (gimp_value_array_index (return_vals, 3), renaming_config);
g_value_take_boxed (gimp_value_array_index (return_vals, 4), dirs);
}
@@ -195,12 +201,11 @@ register_fonts_procs (GimpPDB *pdb)
NULL,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
gimp_param_spec_string ("renaming-config",
"renaming config",
"fonts renaming config",
FALSE, FALSE, FALSE,
NULL,
GIMP_PARAM_READWRITE));
g_param_spec_boxed ("renaming-config",
"renaming config",
"fonts renaming config",
G_TYPE_STRV,
GIMP_PARAM_READWRITE));
gimp_procedure_add_return_value (procedure,
g_param_spec_boxed ("dirs",
"dirs",

View File

@@ -83,7 +83,7 @@ libappinternalprocs = static_library('appinternalprocs',
include_directories: [ rootInclude, rootAppInclude, ],
c_args: '-DG_LOG_DOMAIN="Gimp-PDB"',
dependencies: [
cairo, gegl, gdk_pixbuf, pangocairo,
cairo, gegl, gdk_pixbuf, pangocairo, pango,
],
sources: [
pdbgen

View File

@@ -85,8 +85,6 @@ struct _GimpFont
{
GimpData parent_instance;
PangoContext *pango_context;
PangoLayout *popup_layout;
gint popup_width;
gint popup_height;
@@ -112,17 +110,13 @@ struct _GimpFont
struct _GimpFontClass
{
GimpDataClass parent_class;
GimpDataClass parent_class;
GimpContainer *fonts_container;
GimpFontFactory *font_factory;
};
static void gimp_font_finalize (GObject *object);
static void gimp_font_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec);
static void gimp_font_get_preview_size (GimpViewable *viewable,
gint size,
@@ -240,9 +234,9 @@ gimp_font_deserialize_create (GType type,
gpointer data)
{
GimpFont *font = NULL;
GimpContainer *fonts_container = GIMP_FONT_CLASS (g_type_class_peek (GIMP_TYPE_FONT))->fonts_container;
GimpContainer *fonts_container;
gint most_similar_font_index = -1;
gint font_count = gimp_container_get_n_children (fonts_container);
gint font_count;
gint largest_similarity = 0;
GList *similar_fonts = NULL;
GList *iter;
@@ -260,6 +254,8 @@ gimp_font_deserialize_create (GType type,
guint scope_id;
guint old_scope_id;
fonts_container = gimp_data_factory_get_container (GIMP_DATA_FACTORY (GIMP_FONT_CLASS (g_type_class_peek (GIMP_TYPE_FONT))->font_factory));
font_count = gimp_container_get_n_children (fonts_container);
/* This is for backward compatibility with older xcf files.
* The font used to be serialized as a string containing
* its name.
@@ -540,7 +536,7 @@ gimp_font_class_set_font_factory (GimpFontFactory *factory)
g_return_if_fail (GIMP_IS_FONT_FACTORY (factory));
klass->fonts_container = gimp_data_factory_get_container (GIMP_DATA_FACTORY (factory));
klass->font_factory = factory;
}
void
@@ -596,7 +592,6 @@ gimp_font_class_init (GimpFontClass *klass)
GimpObjectClass *gimp_object_class = GIMP_OBJECT_CLASS (klass);
object_class->finalize = gimp_font_finalize;
object_class->set_property = gimp_font_set_property;
gimp_object_class->get_memsize = gimp_font_get_memsize;
viewable_class->get_preview_size = gimp_font_get_preview_size;
@@ -604,12 +599,6 @@ gimp_font_class_init (GimpFontClass *klass)
viewable_class->get_new_preview = gimp_font_get_new_preview;
viewable_class->default_icon_name = "gtk-select-font";
g_object_class_install_property (object_class, PROP_PANGO_CONTEXT,
g_param_spec_object ("pango-context",
NULL, NULL,
PANGO_TYPE_CONTEXT,
GIMP_PARAM_WRITABLE));
}
static void
@@ -622,7 +611,6 @@ gimp_font_finalize (GObject *object)
{
GimpFont *font = GIMP_FONT (object);
g_clear_object (&font->pango_context);
g_clear_object (&font->popup_layout);
g_free (font->lookup_name);
g_free (font->hash);
@@ -637,28 +625,6 @@ gimp_font_finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
static void
gimp_font_set_property (GObject *object,
guint property_id,
const GValue *value,
GParamSpec *pspec)
{
GimpFont *font = GIMP_FONT (object);
switch (property_id)
{
case PROP_PANGO_CONTEXT:
if (font->pango_context)
g_object_unref (font->pango_context);
font->pango_context = g_value_dup_object (value);
break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
break;
}
}
static gint64
gimp_font_get_memsize (GimpObject *object,
gint64 *gui_size)
@@ -701,12 +667,15 @@ gimp_font_get_popup_size (GimpViewable *viewable,
gint *popup_height)
{
GimpFont *font = GIMP_FONT (viewable);
PangoContext *pango_context;
PangoFontDescription *font_desc;
PangoRectangle ink;
PangoRectangle logical;
const gchar *name;
if (! font->pango_context)
pango_context = gimp_font_factory_get_pango_context (GIMP_FONT_CLASS (g_type_class_peek (GIMP_TYPE_FONT))->font_factory);
if (! pango_context)
return FALSE;
name = font->lookup_name;
@@ -719,7 +688,7 @@ gimp_font_get_popup_size (GimpViewable *viewable,
if (font->popup_layout)
g_object_unref (font->popup_layout);
font->popup_layout = pango_layout_new (font->pango_context);
font->popup_layout = pango_layout_new (pango_context);
pango_layout_set_font_description (font->popup_layout, font_desc);
pango_font_description_free (font_desc);
@@ -744,6 +713,7 @@ gimp_font_get_new_preview (GimpViewable *viewable,
gint height)
{
GimpFont *font = GIMP_FONT (viewable);
PangoContext *pango_context;
PangoLayout *layout;
PangoRectangle ink;
PangoRectangle logical;
@@ -755,7 +725,9 @@ gimp_font_get_new_preview (GimpViewable *viewable,
cairo_t *cr;
cairo_surface_t *surface;
if (! font->pango_context)
pango_context = gimp_font_factory_get_pango_context (GIMP_FONT_CLASS (g_type_class_peek (GIMP_TYPE_FONT))->font_factory);
if (! pango_context)
return NULL;
if (! font->popup_layout ||
@@ -774,11 +746,11 @@ gimp_font_get_new_preview (GimpViewable *viewable,
pango_font_description_set_size (font_desc,
PANGO_SCALE * height * 2.0 / 3.0);
layout = pango_layout_new (font->pango_context);
layout = pango_layout_new (pango_context);
pango_layout_set_font_description (layout, font_desc);
pango_layout_set_text (layout,
gimp_font_get_sample_string (font->pango_context,
gimp_font_get_sample_string (pango_context,
font_desc),
-1);
@@ -1369,9 +1341,11 @@ gimp_font_get_hash (GimpFont *font)
*/
if (font->hash == NULL)
{
PangoFontDescription *pfd = pango_font_description_from_string (font->lookup_name);
PangoFcFont *pango_font = PANGO_FC_FONT (pango_context_load_font (font->pango_context, pfd));
GChecksum *checksum = g_checksum_new (G_CHECKSUM_SHA256);
PangoFontDescription *pfd = pango_font_description_from_string (font->lookup_name);
GimpFontFactory *font_factory = GIMP_FONT_CLASS (g_type_class_peek (GIMP_TYPE_FONT))->font_factory;
PangoContext *pango_context = gimp_font_factory_get_pango_context (font_factory);
PangoFcFont *pango_font = PANGO_FC_FONT (pango_context_load_font (pango_context, pfd));
GChecksum *checksum = g_checksum_new (G_CHECKSUM_SHA256);
gchar *file;
hb_blob_t *hb_blob;
guint length;

View File

@@ -23,6 +23,8 @@
#include "config.h"
#include <fcntl.h>
#include <glib/gstdio.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <pango/pangocairo.h>
#include <pango/pangofc-fontmap.h>
@@ -53,7 +55,10 @@
struct _GimpFontFactoryPrivate
{
gpointer foo; /* can't have an empty struct */
GSList *fonts_renaming_config;
gchar *conf;
gchar *sysconf;
PangoContext *pango_context;
};
#define GET_PRIVATE(obj) (((GimpFontFactory *) (obj))->priv)
@@ -85,11 +90,10 @@ static void gimp_font_factory_recursive_add_fontdir
(FcConfig *config,
GFile *file,
GError **error);
static void gimp_font_factory_load_names (GimpFontFactory *container,
PangoFontMap *fontmap,
static int gimp_font_factory_load_names (GimpFontFactory *container);
static void gimp_font_factory_load_aliases (GimpContainer *container,
PangoContext *context);
G_DEFINE_TYPE_WITH_PRIVATE (GimpFontFactory, gimp_font_factory,
GIMP_TYPE_DATA_FACTORY)
@@ -205,9 +209,11 @@ gimp_font_factory_finalize (GObject *object)
{
GimpFontFactory *font_factory = GIMP_FONT_FACTORY(object);
g_free (font_factory->fonts_renaming_config);
g_free (font_factory->sysconf);
g_free (font_factory->conf);
g_slist_free_full (GET_PRIVATE (font_factory)->fonts_renaming_config, (GDestroyNotify) g_free);
g_free (GET_PRIVATE (font_factory)->sysconf);
g_free (GET_PRIVATE (font_factory)->conf);
g_object_unref (GET_PRIVATE (font_factory)->pango_context);
FcConfigDestroy (FcConfigGetCurrent ());
G_OBJECT_CLASS (parent_class)->finalize (object);
}
@@ -242,29 +248,35 @@ gimp_font_factory_get_custom_config_path (GimpFontFactory *factory,
gchar **conf,
gchar **sysconf)
{
*conf = factory->conf;
*sysconf = factory->sysconf;
*conf = GET_PRIVATE (factory)->conf;
*sysconf = GET_PRIVATE (factory)->sysconf;
}
gchar *
GSList *
gimp_font_factory_get_fonts_renaming_config (GimpFontFactory *factory)
{
return factory->fonts_renaming_config;
return (GET_PRIVATE (factory))->fonts_renaming_config;
}
PangoContext *
gimp_font_factory_get_pango_context (GimpFontFactory *factory)
{
return GET_PRIVATE (factory)->pango_context;
}
/* private functions */
static void
gimp_font_factory_load_async (GimpAsync *async,
FcConfig *config)
gimp_font_factory_load_async (GimpAsync *async,
GimpFontFactory *factory)
{
if (FcConfigBuildFonts (config))
if (FcConfigBuildFonts (NULL))
{
gimp_async_finish (async, config);
gimp_async_finish (async, GINT_TO_POINTER (gimp_font_factory_load_names (factory)));
}
else
{
FcConfigDestroy (config);
FcConfigDestroy (FcConfigGetCurrent ());
gimp_async_abort (async);
}
@@ -286,12 +298,10 @@ gimp_font_factory_load_async_callback (GimpAsync *async,
if (gimp_async_is_finished (async))
{
FcConfig *config = gimp_async_get_result (async);
gint num_fonts = GPOINTER_TO_INT (gimp_async_get_result (async));
PangoFontMap *fontmap;
PangoContext *context;
FcConfigSetCurrent (config);
fontmap = pango_cairo_font_map_new_for_font_type (CAIRO_FONT_TYPE_FT);
if (! fontmap)
g_error ("You are using a Pango that has been built against a cairo "
@@ -300,11 +310,12 @@ gimp_font_factory_load_async_callback (GimpAsync *async,
pango_cairo_font_map_set_resolution (PANGO_CAIRO_FONT_MAP (fontmap),
72.0 /* FIXME */);
context = pango_font_map_create_context (fontmap);
GET_PRIVATE (factory)->pango_context = context;
g_object_unref (fontmap);
gimp_font_factory_load_names (factory, PANGO_FONT_MAP (fontmap), context);
g_object_unref (context);
FcConfigDestroy (config);
/* only create aliases if there is at least one font available */
if (num_fonts > 0)
gimp_font_factory_load_aliases (container, context);
}
gimp_container_thaw (container);
@@ -350,8 +361,8 @@ gimp_font_factory_load (GimpFontFactory *factory,
}
else
{
g_free (factory->conf);
factory->conf = g_file_get_path (fonts_conf);
g_free (GET_PRIVATE (factory)->conf);
GET_PRIVATE (factory)->conf = g_file_get_path (fonts_conf);
}
g_object_unref (fonts_conf);
@@ -364,8 +375,8 @@ gimp_font_factory_load (GimpFontFactory *factory,
}
else
{
g_free (factory->sysconf);
factory->sysconf = g_file_get_path (fonts_conf);
g_free (GET_PRIVATE (factory)->sysconf);
GET_PRIVATE (factory)->sysconf = g_file_get_path (fonts_conf);
}
g_object_unref (fonts_conf);
@@ -380,6 +391,7 @@ gimp_font_factory_load (GimpFontFactory *factory,
gimp_font_factory_add_directories (factory, config, path, error);
g_list_free_full (path, (GDestroyNotify) g_object_unref);
FcConfigSetCurrent (config);
/* We perform font cache initialization in a separate thread, so
* in the case a cache rebuild is to be done it will not block
* the UI.
@@ -387,7 +399,7 @@ gimp_font_factory_load (GimpFontFactory *factory,
async = gimp_parallel_run_async_independent_full (
+10,
(GimpRunAsyncFunc) gimp_font_factory_load_async,
config);
factory);
gimp_async_add_callback_for_object (
async,
@@ -589,7 +601,6 @@ gimp_font_factory_recursive_add_fontdir (FcConfig *config,
static void
gimp_font_factory_add_font (GimpContainer *container,
PangoContext *context,
PangoFontDescription *desc,
const gchar *full_name,
const gchar *path,
@@ -614,7 +625,6 @@ gimp_font_factory_add_font (GimpContainer *container,
font = g_object_new (GIMP_TYPE_FONT,
"name", name,
"pango-context", context,
NULL);
gimp_font_set_lookup_name (font, pango_font_description_to_string (desc));
@@ -715,7 +725,7 @@ gimp_font_factory_make_alias (GimpContainer *container,
* are the best way to have differing text renders over time (and that's not
* something to be wished for). XXX
*/
gimp_font_factory_add_font (container, context, desc, NULL, NULL, font_info);
gimp_font_factory_add_font (container, desc, NULL, NULL, font_info);
g_free (desc_str);
pango_font_description_free (desc);
@@ -741,19 +751,24 @@ gimp_font_factory_load_aliases (GimpContainer *container,
}
}
static void
gimp_font_factory_load_names (GimpFontFactory *factory,
PangoFontMap *fontmap,
PangoContext *context)
static gint
gimp_font_factory_load_names (GimpFontFactory *factory)
{
GimpContainer *container;
FcObjectSet *os;
FcPattern *pat;
FcFontSet *fontset;
FT_Library ft;
GSList *xml_configs_list;
GString *xml;
GString *xml_bold_variant;
GString *xml_italic_variant;
GString *xml_bold_italic_variant_and_global;
GString *ignored_fonts;
GString *global_xml = g_string_new ("<fontconfig>\n");
gint n_ignored = 0;
gint i;
gint num_fonts_in_current_config = 0;
gint n_loaded_fonts = 0;
container = gimp_data_factory_get_container (GIMP_DATA_FACTORY (factory));
@@ -767,33 +782,42 @@ gimp_font_factory_load_names (GimpFontFactory *factory,
FC_WIDTH,
FC_INDEX,
FC_FONTVERSION,
FC_FONTFORMAT,
NULL);
g_return_if_fail (os);
g_return_val_if_fail (os, -1);
pat = FcPatternCreate ();
if (! pat)
{
FcObjectSetDestroy (os);
g_critical ("%s: FcPatternCreate() returned NULL.", G_STRFUNC);
return;
return -1;
}
if (FT_Init_FreeType (&ft))
{
g_critical ("%s: FreeType Initialization Failed.", G_STRFUNC);
return -1;
}
fontset = FcFontList (NULL, pat, os);
ignored_fonts = g_string_new (NULL);
FcPatternDestroy (pat);
FcObjectSetDestroy (os);
g_return_if_fail (fontset);
g_return_val_if_fail (fontset, -1);
xml_configs_list = NULL;
xml = g_string_new (NULL);
xml_italic_variant = g_string_new (NULL);
xml_bold_variant = g_string_new (NULL);
xml_bold_italic_variant_and_global = g_string_new ("<fontconfig>");
ignored_fonts = g_string_new (NULL);
#define MAX_NUM_FONTS_PER_CONFIG 1000
for (i = 0; i < fontset->nfont; i++)
{
PangoFontDescription *pfd;
GString *xml;
GString *xml_bold_variant;
GString *xml_italic_variant;
GString *xml_bold_italic_variant;
gchar *family = NULL;
gchar *style = NULL;
gchar *psname = NULL;
@@ -803,7 +827,6 @@ gimp_font_factory_load_names (GimpFontFactory *factory,
gchar *fullname = NULL;
gchar *escaped_file = NULL;
gchar *file = NULL;
hb_blob_t *blob = NULL;
gint index = -1;
gint weight = -1;
gint width = -1;
@@ -812,6 +835,7 @@ gimp_font_factory_load_names (GimpFontFactory *factory,
gpointer font_info[PROPERTIES_COUNT];
PangoFontDescription *pattern_pfd;
gchar *pattern_pfd_desc;
FT_Face face;
FcPatternGetString (fontset->fonts[i], FC_FILE, 0, (FcChar8 **) &file);
@@ -822,21 +846,44 @@ gimp_font_factory_load_names (GimpFontFactory *factory,
continue;
}
blob = hb_blob_create_from_file_or_fail (file);
/*
* Pango doesn't support non SFNT fonts because harfbuzz doesn't support them.
* woff and woff2, not supported by pango (because they are not yet supported by harfbuzz).
* pcf,pcf.gz are bitmap font formats, not supported by pango (because of harfbuzz).
* afm, pfm, pfb are type1 font formats, not supported by pango (because of harfbuzz).
*/
if (blob == NULL || hb_face_count (blob) == 0)
if (FT_New_Face (ft, file, 0, &face))
{
g_string_append_printf (ignored_fonts, "- %s (not supported by pango)\n", file);
g_string_append_printf (ignored_fonts, "- %s (Failed To Create A FreeType Face)\n", file);
n_ignored++;
continue;
}
hb_blob_destroy (blob);
/*
* Pango doesn't support non SFNT fonts because harfbuzz doesn't support them.
* woff and woff2, not supported by pango (because they are not yet supported by harfbuzz,
* when using harfbuzz's default loader, which is how pango uses it).
* pcf,pcf.gz are bitmap font formats, not supported by pango (because of harfbuzz).
* afm, pfm, pfb are type1 font formats, not supported by pango (because of harfbuzz).
*/
if (face->face_flags & FT_FACE_FLAG_SFNT)
{
/* If this is an SFNT wrapper, read the first 4 bytes to see if it is a WOFF[2] font. */
char buf[4] = {0};
int fd = g_open ((gchar *) file, O_RDONLY, 0);
read (fd, buf, 4);
g_close (fd, NULL);
FT_Done_Face (face);
if (buf[0] == 'w' && buf[1] == 'O' && buf[2] == 'F' && (buf[3] == 'F' || buf[3] == '2'))
{
g_string_append_printf (ignored_fonts, "- %s (WOFF[2] font)\n", file);
n_ignored++;
continue;
}
}
else
{
FT_Done_Face (face);
g_string_append_printf (ignored_fonts, "- %s (NON SFNT font)\n", file);
n_ignored++;
continue;
}
/* Some variable fonts have only a family name and a font version.
* But we also check in case there is no family name */
@@ -876,12 +923,34 @@ gimp_font_factory_load_names (GimpFontFactory *factory,
newname = g_strdup_printf ("gimpfont%i", i);
xml = g_string_new ("<match>");
if (num_fonts_in_current_config == MAX_NUM_FONTS_PER_CONFIG)
{
xml_bold_italic_variant_and_global = g_string_append (xml_bold_italic_variant_and_global, xml_italic_variant->str);
xml_bold_italic_variant_and_global = g_string_append (xml_bold_italic_variant_and_global, xml_bold_variant->str);
xml_bold_italic_variant_and_global = g_string_append (xml_bold_italic_variant_and_global, xml->str);
xml_bold_italic_variant_and_global = g_string_append (xml_bold_italic_variant_and_global, "</fontconfig>");
FcConfigParseAndLoadFromMemory (FcConfigGetCurrent (), (const FcChar8 *) xml_bold_italic_variant_and_global->str, FcTrue);
xml_configs_list = g_slist_append (xml_configs_list, g_string_free (xml_bold_italic_variant_and_global, FALSE));
g_string_free (xml, TRUE);
g_string_free (xml_italic_variant, TRUE);
g_string_free (xml_bold_variant, TRUE);
xml = g_string_new (NULL);
xml_italic_variant = g_string_new (NULL);
xml_bold_variant = g_string_new (NULL);
xml_bold_italic_variant_and_global = g_string_new ("<fontconfig>");
num_fonts_in_current_config = 0;
}
xml = g_string_append (xml, "<match>");
/*We can't use faux bold (sometimes real bold) unless it is specified in fontconfig*/
xml_bold_variant = g_string_new ("<match>");
xml_italic_variant = g_string_new ("<match>");
xml_bold_italic_variant = g_string_new ("<match>");
xml_bold_variant = g_string_append (xml_bold_variant, "<match>");
xml_italic_variant = g_string_append (xml_italic_variant, "<match>");
xml_bold_italic_variant_and_global = g_string_append (xml_bold_italic_variant_and_global, "<match>");
g_string_append_printf (xml,
"<test name=\"family\"><string>%s</string></test>",
@@ -892,16 +961,16 @@ gimp_font_factory_load_names (GimpFontFactory *factory,
g_string_append_printf (xml_italic_variant,
"<test name=\"family\"><string>%s</string></test>",
newname);
g_string_append_printf (xml_bold_italic_variant,
g_string_append_printf (xml_bold_italic_variant_and_global,
"<test name=\"family\"><string>%s</string></test>",
newname);
g_string_append (xml_bold_variant,
"<test name=\"weight\" compare=\"eq\"><const>bold</const></test>");
g_string_append (xml_italic_variant,
"<test name=\"slant\" compare=\"eq\"><const>italic</const></test>");
g_string_append (xml_bold_italic_variant,
g_string_append (xml_bold_italic_variant_and_global,
"<test name=\"weight\" compare=\"eq\"><const>bold</const></test>");
g_string_append (xml_bold_italic_variant,
g_string_append (xml_bold_italic_variant_and_global,
"<test name=\"slant\" compare=\"eq\"><const>italic</const></test>");
escaped_fullname = g_markup_escape_text (fullname, -1);
@@ -919,7 +988,7 @@ gimp_font_factory_load_names (GimpFontFactory *factory,
g_string_append_printf (xml_italic_variant,
"<edit name=\"family\" mode=\"assign\" binding=\"strong\"><string>%s</string></edit>",
family);
g_string_append_printf (xml_bold_italic_variant,
g_string_append_printf (xml_bold_italic_variant_and_global,
"<edit name=\"family\" mode=\"assign\" binding=\"strong\"><string>%s</string></edit>",
family);
@@ -929,7 +998,7 @@ gimp_font_factory_load_names (GimpFontFactory *factory,
g_string_append_printf (xml_italic_variant,
"<edit name=\"family\" mode=\"prepend\" binding=\"strong\"><string>%s</string></edit>",
escaped_fullname);
g_string_append_printf (xml_bold_italic_variant,
g_string_append_printf (xml_bold_italic_variant_and_global,
"<edit name=\"family\" mode=\"prepend\" binding=\"strong\"><string>%s</string></edit>",
escaped_fullname);
g_free (escaped_fullname);
@@ -961,7 +1030,7 @@ gimp_font_factory_load_names (GimpFontFactory *factory,
}
g_string_append (xml_bold_variant, "<edit name=\"weight\" mode=\"assign\" binding=\"strong\"><const>bold</const></edit>");
g_string_append (xml_bold_italic_variant, "<edit name=\"weight\" mode=\"assign\" binding=\"strong\"><const>bold</const></edit>");
g_string_append (xml_bold_italic_variant_and_global, "<edit name=\"weight\" mode=\"assign\" binding=\"strong\"><const>bold</const></edit>");
if (weight != -1)
{
@@ -984,13 +1053,13 @@ gimp_font_factory_load_names (GimpFontFactory *factory,
g_string_append_printf (xml_italic_variant,
"<edit name=\"width\" mode=\"assign\" binding=\"strong\"><int>%i</int></edit>",
width);
g_string_append_printf (xml_bold_italic_variant,
g_string_append_printf (xml_bold_italic_variant_and_global,
"<edit name=\"width\" mode=\"assign\" binding=\"strong\"><int>%i</int></edit>",
width);
}
g_string_append (xml_italic_variant, "<edit name=\"slant\" mode=\"assign\" binding=\"strong\"><const>italic</const></edit>");
g_string_append (xml_bold_italic_variant, "<edit name=\"slant\" mode=\"assign\" binding=\"strong\"><const>italic</const></edit>");
g_string_append (xml_bold_italic_variant_and_global, "<edit name=\"slant\" mode=\"assign\" binding=\"strong\"><const>italic</const></edit>");
if (slant != -1)
{
@@ -1013,7 +1082,7 @@ gimp_font_factory_load_names (GimpFontFactory *factory,
g_string_append_printf (xml_italic_variant,
"<edit name=\"fontversion\" mode=\"assign\" binding=\"strong\"><int>%i</int></edit>",
fontversion);
g_string_append_printf (xml_bold_italic_variant,
g_string_append_printf (xml_bold_italic_variant_and_global,
"<edit name=\"fontversion\" mode=\"assign\" binding=\"strong\"><int>%i</int></edit>",
fontversion);
}
@@ -1026,47 +1095,50 @@ gimp_font_factory_load_names (GimpFontFactory *factory,
}
g_string_append (xml, "</match>\n");
g_string_append (xml_bold_variant, "</match>\n");
g_string_append (xml_italic_variant, "</match>\n");
g_string_append (xml_bold_italic_variant, "</match>\n");
FcConfigParseAndLoadFromMemory (FcConfigGetCurrent (), (const FcChar8 *) xml_bold_italic_variant->str, FcTrue);
FcConfigParseAndLoadFromMemory (FcConfigGetCurrent (), (const FcChar8 *) xml_italic_variant->str, FcTrue);
FcConfigParseAndLoadFromMemory (FcConfigGetCurrent (), (const FcChar8 *) xml_bold_variant->str, FcTrue);
FcConfigParseAndLoadFromMemory (FcConfigGetCurrent (), (const FcChar8 *) xml->str, FcTrue);
g_string_append (xml, "</match>");
g_string_append (xml_bold_variant, "</match>");
g_string_append (xml_italic_variant, "</match>");
g_string_append (xml_bold_italic_variant_and_global, "</match>");
pfd = pango_font_description_from_string (newname);
if (display_name != NULL)
{
gimp_font_factory_add_font (container, context, pfd, display_name, (const gchar *) file, font_info);
gimp_font_factory_add_font (container, pfd, display_name, (const gchar *) file, font_info);
g_free (display_name);
}
else
{
gimp_font_factory_add_font (container, context, pfd, fullname, (const gchar *) file, font_info);
gimp_font_factory_add_font (container, pfd, fullname, (const gchar *) file, font_info);
}
g_string_append (global_xml, xml_bold_italic_variant->str);
g_string_append (global_xml, xml_italic_variant->str);
g_string_append (global_xml, xml_bold_variant->str);
g_string_append (global_xml, xml->str);
pango_font_description_free (pattern_pfd);
g_free (pattern_pfd_desc);
pango_font_description_free (pfd);
g_free (newname);
g_string_free (xml, TRUE);
g_string_free (xml_bold_variant, TRUE);
g_string_free (xml_italic_variant, TRUE);
g_string_free (xml_bold_italic_variant, TRUE);
num_fonts_in_current_config++;
}
g_string_append (global_xml, "</fontconfig>");
#undef MAX_NUM_FONTS_PER_CONFIG
g_free (factory->fonts_renaming_config);
factory->fonts_renaming_config = g_strdup (global_xml->str);
if (num_fonts_in_current_config > 0)
{
xml_bold_italic_variant_and_global = g_string_append (xml_bold_italic_variant_and_global, xml_italic_variant->str);
xml_bold_italic_variant_and_global = g_string_append (xml_bold_italic_variant_and_global, xml_bold_variant->str);
xml_bold_italic_variant_and_global = g_string_append (xml_bold_italic_variant_and_global, xml->str);
xml_bold_italic_variant_and_global = g_string_append (xml_bold_italic_variant_and_global, "</fontconfig>");
FcConfigParseAndLoadFromMemory (FcConfigGetCurrent (), (const FcChar8 *) xml_bold_italic_variant_and_global->str, FcTrue);
xml_configs_list = g_slist_append (xml_configs_list, g_string_free (xml_bold_italic_variant_and_global, FALSE));
g_string_free (xml, TRUE);
g_string_free (xml_italic_variant, TRUE);
g_string_free (xml_bold_variant, TRUE);
}
g_slist_free_full (GET_PRIVATE (factory)->fonts_renaming_config, (GDestroyNotify) g_free);
GET_PRIVATE (factory)->fonts_renaming_config = xml_configs_list;
if (n_ignored > 0)
{
@@ -1078,12 +1150,11 @@ gimp_font_factory_load_names (GimpFontFactory *factory,
#endif
}
n_loaded_fonts = fontset->nfont - n_ignored;
g_string_free (ignored_fonts, TRUE);
g_string_free (global_xml, TRUE);
/* only create aliases if there is at least one font available */
if (fontset->nfont > 0)
gimp_font_factory_load_aliases (container, context);
FT_Done_FreeType (ft);
FcFontSetDestroy (fontset);
return n_loaded_fonts;
}

View File

@@ -22,6 +22,7 @@
#define __GIMP_FONT_FACTORY_H__
#include <pango/pango.h>
#include "core/gimpdatafactory.h"
@@ -40,10 +41,6 @@ struct _GimpFontFactory
{
GimpDataFactory parent_instance;
gchar *fonts_renaming_config;
gchar *conf;
gchar *sysconf;
GimpFontFactoryPrivate *priv;
};
@@ -61,7 +58,8 @@ GList * gimp_font_factory_get_custom_fonts_dirs (GimpFontFactory
void gimp_font_factory_get_custom_config_path (GimpFontFactory *factory,
gchar **conf,
gchar **sysconf);
gchar * gimp_font_factory_get_fonts_renaming_config (GimpFontFactory *factory);
GSList * gimp_font_factory_get_fonts_renaming_config (GimpFontFactory *factory);
PangoContext * gimp_font_factory_get_pango_context (GimpFontFactory *factory);
#endif /* __GIMP_FONT_FACTORY_H__ */

View File

@@ -100,7 +100,13 @@ gimp_color_selector_palette_palette_changed (GimpContext *context,
GimpPalette *palette,
GimpColorSelectorPalette *select)
{
gchar *palette_name;
gimp_view_set_viewable (GIMP_VIEW (select->view), GIMP_VIEWABLE (palette));
g_object_get (palette, "name", &palette_name, NULL);
gtk_label_set_text (GTK_LABEL (select->name_label), palette_name);
g_free (palette_name);
}
static void
@@ -151,11 +157,20 @@ gimp_color_selector_palette_set_config (GimpColorSelector *selector,
(GIMP_VIEW_RENDERER_PALETTE (GIMP_VIEW (select->view)->renderer),
TRUE);
gtk_box_pack_start (GTK_BOX (select), select->view, TRUE, TRUE, 0);
gtk_widget_show (select->view);
gtk_widget_set_visible (select->view, TRUE);
g_signal_connect (select->view, "entry-clicked",
G_CALLBACK (gimp_color_selector_palette_entry_clicked),
select);
select->name_label = gtk_label_new (NULL);
gtk_label_set_ellipsize (GTK_LABEL (select->name_label),
PANGO_ELLIPSIZE_END);
gtk_widget_set_halign (select->name_label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (select), select->name_label, FALSE,
FALSE, 6);
gtk_widget_set_visible (select->name_label, TRUE);
}
else
{

View File

@@ -39,6 +39,7 @@ struct _GimpColorSelectorPalette
GimpContext *context;
GtkWidget *view;
GtkWidget *name_label;
};
struct _GimpColorSelectorPaletteClass

View File

@@ -127,6 +127,10 @@ static void gimp_dock_window_get_property (GObject
static void gimp_dock_window_style_updated (GtkWidget *widget);
static gboolean gimp_dock_window_delete_event (GtkWidget *widget,
GdkEventAny *event);
#ifdef G_OS_WIN32
static void gimp_dock_window_realize (GimpDockWindow *dock_window,
gpointer data);
#endif
static GList * gimp_dock_window_get_docks (GimpDockContainer *dock_container);
static GList * gimp_dock_window_get_docks_self (GimpDockWindow *self);
static GimpDialogFactory * gimp_dock_window_get_dialog_factory (GimpDockContainer *dock_container);
@@ -266,6 +270,12 @@ gimp_dock_window_init (GimpDockWindow *dock_window)
gtk_window_set_resizable (GTK_WINDOW (dock_window), TRUE);
gtk_window_set_focus_on_map (GTK_WINDOW (dock_window), FALSE);
gtk_window_set_skip_taskbar_hint (GTK_WINDOW (dock_window), FALSE);
#ifdef G_OS_WIN32
g_signal_connect (dock_window, "realize",
G_CALLBACK (gimp_dock_window_realize),
NULL);
#endif
}
static void
@@ -697,6 +707,19 @@ gimp_dock_window_delete_event (GtkWidget *widget,
return FALSE;
}
#ifdef G_OS_WIN32
static void
gimp_dock_window_realize (GimpDockWindow *dock_window,
gpointer data)
{
dock_window->p = gimp_dock_window_get_instance_private (dock_window);
if (dock_window->p->context && dock_window->p->context->gimp)
gimp_window_set_title_bar_theme (dock_window->p->context->gimp,
GTK_WIDGET (dock_window));
}
#endif
/* Returns list of docks from self.
* Delegate to self's dock_columns, when it exists.
*
@@ -995,7 +1018,6 @@ gimp_dock_window_image_changed (GimpDockWindow *dock_window,
GimpImage *image,
GimpContext *context)
{
GimpContainer *image_container = dock_window->p->image_container;
GimpContainer *display_container = dock_window->p->display_container;
/* make sure auto-follow-active works both ways */

View File

@@ -59,7 +59,7 @@ Invoke-Expression ((Get-Content $GIMP_DIR\.gitlab-ci.yml | Select-String 'win_en
# Build babl and GEGL
function self_build ([string]$dep, [string]$option1, [string]$option2)
function self_build ([string]$dep, [string]$unstable_branch, [string]$stable_patch, [string]$option1, [string]$option2)
{
Write-Output "$([char]27)[0Ksection_start:$(Get-Date -UFormat %s -Millisecond 0):${dep}_build[collapsed=true]$([char]13)$([char]27)[0KBuilding $dep"
@@ -76,7 +76,19 @@ function self_build ([string]$dep, [string]$option1, [string]$option2)
$git_options="--branch=$tag"
Write-Output "Using tagged release of ${dep}: $tag"
}
elseif ($unstable_branch)
{
$git_options="--branch=$unstable_branch"
}
git clone $git_options --depth $GIT_DEPTH $repo
# This allows to add some minor patch on a dependency without having a proper new release.
if ($CI_COMMIT_TAG -and $stable_patch)
{
Set-Location $dep
git apply $GIMP_DIR\$stable_patch
Set-Location ..
}
}
Set-Location $dep
git pull
@@ -99,6 +111,6 @@ function self_build ([string]$dep, [string]$option1, [string]$option2)
}
self_build babl
self_build gegl
self_build gegl master build/windows/patches/0001-meson-only-generate-CodeView-.pdb-symbols-on-Windows.patch
Set-Location $GIMP_DIR

View File

@@ -23,6 +23,8 @@ if (-not $GITLAB_CI)
{
Set-Location ..\..\..
}
$PARENT_DIR = '..\'
}
@@ -31,6 +33,7 @@ if (-not $GITLAB_CI)
#if (-not (Get-Command "python" -ErrorAction SilentlyContinue) -or "$(Get-Command "python" -ErrorAction SilentlyContinue | Select-Object -ExpandProperty Source)" -like '*WindowsApps*')
# {
Invoke-Expression ((Get-Content build\windows\1_build-deps-msys2.ps1 | Select-String 'MSYS_ROOT\)' -Context 0,12) -replace '> ','')
$env:PATH = "$MSYS_ROOT/usr/bin;" + $env:PATH
Invoke-Expression ((Get-Content .gitlab-ci.yml | Select-String 'win_environ\[' -Context 0,7) -replace '> ','' -replace '- ','')
# }
@@ -150,14 +153,15 @@ function download_langs ([array]$langsArray)
if ($langfile -ne '' -and -not (Test-Path "$langfilePath" -Type Leaf))
{
Write-Output "(INFO): temporarily installing $($langfilePath -replace '\\\\','\')"
$langfileUnix = $langfile.Replace('\\', '/')
Invoke-WebRequest https://raw.githubusercontent.com/jrsoftware/issrc/main/Files/$langfileUnix -OutFile "$langfilePath"
Copy-Item "${PARENT_DIR}issrc\Files\$langfile" "$langfilePath" -Force
}
}
}
git clone --depth 1 https://github.com/jrsoftware/issrc.git "${PARENT_DIR}issrc"
download_langs $langsArray_Official
New-Item "$INNO_PATH\Languages\Unofficial" -ItemType Directory -Force | Out-Null
download_langs $langsArray_unofficial
Remove-Item "${PARENT_DIR}issrc" -Recurse -Force
### Patch 'AppVer*' against Inno pervasive behavior: https://groups.google.com/g/innosetup/c/w0sebw5YAeg
function fix_msg ([array]$langsArray, [string]$AppVer)
{

View File

@@ -0,0 +1,41 @@
From 32116c80b5dcd8fab1125739de7b62718b497d5b Mon Sep 17 00:00:00 2001
From: Jehan <jehan@girinstud.io>
Date: Thu, 15 May 2025 22:38:55 +0200
Subject: [PATCH] meson: only generate CodeView .pdb symbols on Windows with
CLang.
GCC experiences breakages, which in particular is a problem for our
Windows 32-bit build.
See:
* https://gitlab.gnome.org/GNOME/gimp/-/issues/13881
* https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120051
---
meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index f13104c87..2e1b2646e 100644
--- a/meson.build
+++ b/meson.build
@@ -202,7 +202,7 @@ endif
# Generate native .pdb (CodeView) debug symbols (for DIA or DbgHelp debuggers and LLDB)
pdb_support = cc.has_argument('-gcodeview') and cc.has_link_argument('-Wl,--pdb=')
-if os_win32 and pdb_support
+if os_win32 and pdb_support and cc.get_id() == 'clang'
cflags_common += '-gcodeview'
lflags_common += '-Wl,--pdb='
endif
@@ -537,7 +537,7 @@ build_reference = get_option('gtk-doc') or build_gi_docgen
# Install native debug data (.pdb) on Windows
# Ideally meson should take care of it automatically.
# See: https://github.com/mesonbuild/meson/issues/12977
-if os_win32 and pdb_support
+if os_win32 and pdb_support and cc.get_id() == 'clang'
install_win_debug_script = find_program('./meson_install_win_debug.py')
meson.add_install_script(install_win_debug_script)
endif
--
2.49.0

View File

@@ -82,10 +82,10 @@
</provides>
<releases>
<release version="3.0.4" date="TODO">
<release version="3.0.4" date="2025-05-17">
<description>
<p>
This second micro release in the 3.0 series fixes various bugs and improves usability in various parts of the interface.
This second micro release in the 3.0 series fixes various bugs and improves usability in several parts of the interface.
</p>
</description>
</release>

View File

@@ -29,4 +29,4 @@ Windows 10 and over.
Hardware:
* x86 32 and 64-bit
* ARM 64-bit (experimental)
* ARM 64-bit

View File

@@ -277,8 +277,8 @@ gimp_main (GType plug_in_type,
typedef BOOL (WINAPI *t_SetProcessDEPPolicy) (DWORD dwFlags);
t_SetProcessDEPPolicy p_SetProcessDEPPolicy;
p_SetProcessDEPPolicy = GetProcAddress (GetModuleHandleW (L"kernel32.dll"),
"SetProcessDEPPolicy");
p_SetProcessDEPPolicy = (t_SetProcessDEPPolicy) GetProcAddress (GetModuleHandleW (L"kernel32.dll"),
"SetProcessDEPPolicy");
if (p_SetProcessDEPPolicy)
(*p_SetProcessDEPPolicy) (PROCESS_DEP_ENABLE|PROCESS_DEP_DISABLE_ATL_THUNK_EMULATION);
}

View File

@@ -63,7 +63,7 @@ gimp_font_get_pango_font_description (GimpFont *font)
{
gchar *config;
gchar *sysconfig;
gchar *fonts_renaming_config;
gchar **fonts_renaming_config;
gchar **dirs;
FcConfigSetCurrent (FcInitLoadConfig ());
@@ -82,11 +82,11 @@ gimp_font_get_pango_font_description (GimpFont *font)
if (dirs[i])
FcConfigAppFontAddDir (FcConfigGetCurrent (), (const FcChar8 *)dirs[i]);
FcConfigParseAndLoadFromMemory (FcConfigGetCurrent (),
(const FcChar8 *) fonts_renaming_config,
FcTrue);
for (int i = 0; fonts_renaming_config[i] != NULL; ++i)
if (fonts_renaming_config[i])
FcConfigParseAndLoadFromMemory (FcConfigGetCurrent (), (const FcChar8 *)fonts_renaming_config[i], FcTrue);
g_free (fonts_renaming_config);
g_strfreev (fonts_renaming_config);
g_free (sysconfig);
g_free (config);
g_strfreev (dirs);

View File

@@ -72,7 +72,7 @@ gimp_fonts_refresh (void)
/**
* _gimp_fonts_get_custom_configs:
* @sysconfig: (out) (transfer full): sysconfig path.
* @renaming_config: (out) (transfer full): fonts renaming config.
* @renaming_config: (out) (array zero-terminated=1) (transfer full): fonts renaming config.
* @dirs: (out) (array zero-terminated=1) (transfer full): custom fonts directories.
*
* Retrieve custom configs.
@@ -87,7 +87,7 @@ gimp_fonts_refresh (void)
**/
gchar *
_gimp_fonts_get_custom_configs (gchar **sysconfig,
gchar **renaming_config,
gchar ***renaming_config,
gchar ***dirs)
{
GimpValueArray *args;
@@ -106,7 +106,7 @@ _gimp_fonts_get_custom_configs (gchar **sysconfig,
{
config = GIMP_VALUES_DUP_STRING (return_vals, 1);
*sysconfig = GIMP_VALUES_DUP_STRING (return_vals, 2);
*renaming_config = GIMP_VALUES_DUP_STRING (return_vals, 3);
*renaming_config = GIMP_VALUES_DUP_STRV (return_vals, 3);
*dirs = GIMP_VALUES_DUP_STRV (return_vals, 4);
}

View File

@@ -34,7 +34,7 @@ G_BEGIN_DECLS
gboolean gimp_fonts_refresh (void);
G_GNUC_INTERNAL gchar* _gimp_fonts_get_custom_configs (gchar **sysconfig,
gchar **renaming_config,
gchar ***renaming_config,
gchar ***dirs);
GimpFont** gimp_fonts_get_list (const gchar *filter);

View File

@@ -19,10 +19,13 @@
<section>
<item><attribute name="action">@GROUP@.dialogs-colors</attribute></item>
<item><attribute name="action">@GROUP@.dialogs-brushes</attribute></item>
<item><attribute name="action">@GROUP@.dialogs-brush-editor</attribute></item>
<item><attribute name="action">@GROUP@.dialogs-dynamics</attribute></item>
<item><attribute name="action">@GROUP@.dialogs-dynamics-editor</attribute></item>
<item><attribute name="action">@GROUP@.dialogs-mypaint-brushes</attribute></item>
<item><attribute name="action">@GROUP@.dialogs-patterns</attribute></item>
<item><attribute name="action">@GROUP@.dialogs-gradients</attribute></item>
<item><attribute name="action">@GROUP@.dialogs-gradient-editor</attribute></item>
<item><attribute name="action">@GROUP@.dialogs-palettes</attribute></item>
<item><attribute name="action">@GROUP@.dialogs-fonts</attribute></item>
<item><attribute name="action">@GROUP@.dialogs-tool-presets</attribute></item>

View File

@@ -335,7 +335,7 @@ endif
# Generate native .pdb (CodeView) debug symbols (for DIA or DbgHelp debuggers and LLDB)
pdb_support = cc.has_argument('-gcodeview') and cc.has_link_argument('-Wl,--pdb=')
if platform_windows and pdb_support
if platform_windows and pdb_support and cc.get_id() == 'clang'
compiler_args += '-gcodeview'
linker_args += '-Wl,--pdb='
endif
@@ -2140,7 +2140,7 @@ pkgconfig.generate(libgimpui,
# Install native debug data (.pdb) on Windows
# Ideally meson should take care of it automatically.
# See: https://github.com/mesonbuild/meson/issues/12977
if platform_windows and pdb_support
if platform_windows and pdb_support and cc.get_id() == 'clang'
install_win_debug_script = find_program('build/windows/2_bundle-gimp-uni_sym.py')
meson.add_install_script(install_win_debug_script)
endif

View File

@@ -137,7 +137,7 @@ HELP
desc => 'config path' },
{ name => 'sysconfig', type => 'string',
desc => 'sysconfig path' },
{ name => 'renaming_config', type => 'string',
{ name => 'renaming_config', type => 'strv',
desc => 'fonts renaming config' },
{ name => 'dirs', type => 'strv',
desc => 'custom fonts directories' }
@@ -152,9 +152,10 @@ HELP
if (success)
{
GList *list = gimp_font_factory_get_custom_fonts_dirs (GIMP_FONT_FACTORY (gimp->font_factory));
guint length = g_list_length (list);
gint i;
GList *list = gimp_font_factory_get_custom_fonts_dirs (GIMP_FONT_FACTORY (gimp->font_factory));
GSList *fonts_renaming_config = gimp_font_factory_get_fonts_renaming_config (GIMP_FONT_FACTORY (gimp->font_factory));
guint length = g_list_length (list);
gint i;
gimp_font_factory_get_custom_config_path (GIMP_FONT_FACTORY (gimp->font_factory),
@@ -163,14 +164,19 @@ HELP
config = g_strdup (config);
sysconfig = g_strdup (sysconfig);
renaming_config = g_strdup (gimp_font_factory_get_fonts_renaming_config (GIMP_FONT_FACTORY (gimp->font_factory)));
dirs = g_new0 (gchar *, length + 1);
for (i = 0; list; list = g_list_next (list), i++)
dirs[i] = g_file_get_path (list->data);
g_list_free_full (list, (GDestroyNotify) g_object_unref);
length = g_slist_length (fonts_renaming_config);
renaming_config = g_new0 (gchar *, length + 1);
for (i = 0; fonts_renaming_config; fonts_renaming_config = g_slist_next (fonts_renaming_config), i++)
renaming_config[i] = g_strdup (fonts_renaming_config->data);
}
}
CODE

View File

@@ -304,7 +304,14 @@ script_fu_add_resource_arg (
if (default_resource == NULL)
{
g_warning ("%s declared resource name is invalid %s", G_STRFUNC, declared_name_of_default);
/* Fonts are loaded asynchronously so they may not be loaded
* yet when plug-in procedures' arguments are declared. That's
* OK though because resource argument defaults are not stored
* anyway. And when the procedure will be actually called
* later on, the fonts will likely have been loaded by then.
*/
if (arg->default_value.sfa_resource.resource_type != GIMP_TYPE_FONT)
g_warning ("%s declared resource name is invalid %s", G_STRFUNC, declared_name_of_default);
script_fu_add_resource_arg_default_from_context (procedure, name, nick, blurb, func);
}
else