From 429cf6f98a311df8215b27babf5e28b4c013c10caa6595d3ebcd87c994dc0337 Mon Sep 17 00:00:00 2001 From: Dirk Stoecker Date: Fri, 22 Oct 2021 12:16:54 +0000 Subject: [PATCH] Accepting request 926944 from home:susnux:branches:graphics Add upstream patch (GIMP issue #6210) OBS-URL: https://build.opensuse.org/request/show/926944 OBS-URL: https://build.opensuse.org/package/show/graphics/gimp?expand=0&rev=58 --- ...xel-font-rendering-system-settings-s.patch | 38 +++++++++++++++++++ gimp.changes | 9 +++++ gimp.spec | 3 ++ 3 files changed, 50 insertions(+) create mode 100644 0001-Issue-6210-Subpixel-font-rendering-system-settings-s.patch diff --git a/0001-Issue-6210-Subpixel-font-rendering-system-settings-s.patch b/0001-Issue-6210-Subpixel-font-rendering-system-settings-s.patch new file mode 100644 index 0000000..9b7094c --- /dev/null +++ b/0001-Issue-6210-Subpixel-font-rendering-system-settings-s.patch @@ -0,0 +1,38 @@ +From a08055f1a18886fdacaf0cba5887b7ff2f687732 Mon Sep 17 00:00:00 2001 +From: Adam Fontenot +Date: Tue, 19 Jan 2021 13:47:27 +0100 +Subject: [PATCH] =?UTF-8?q?Issue=20#6210:=20Subpixel=20font=20rendering=20?= + =?UTF-8?q?system=20settings=20should=20only=E2=80=A6?= +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +… apply to GIMP GUI not text layer rendering in image. + +Reviewer note: this is the theoretical fix, but it won't work right now +because Cairo explicitly bypasses grayscale antialiasing when system set +subpixel one. Still let's push this first patch, but the issue will be +actually fixed when Cairo will merge my MR too: +https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/114 + +(cherry picked from commit 00bbeabaf4d8a434bd64371303ee982fb5403ab6) +--- + app/text/gimptextlayout.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/app/text/gimptextlayout.c b/app/text/gimptextlayout.c +index 47beed7705..56c670ea0b 100644 +--- a/app/text/gimptextlayout.c ++++ b/app/text/gimptextlayout.c +@@ -701,7 +701,7 @@ gimp_text_get_font_options (GimpText *text) + cairo_font_options_t *options = cairo_font_options_create (); + + cairo_font_options_set_antialias (options, (text->antialias ? +- CAIRO_ANTIALIAS_DEFAULT : ++ CAIRO_ANTIALIAS_GRAY : + CAIRO_ANTIALIAS_NONE)); + + switch (text->hint_style) +-- +2.33.1 + diff --git a/gimp.changes b/gimp.changes index 79b2762..5d6c6b3 100644 --- a/gimp.changes +++ b/gimp.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Fri Oct 22 09:50:04 UTC 2021 - Ferdinand Thiessen + +- Add upstream patch (GIMP issue #6210) + + 0001-Issue-6210-Subpixel-font-rendering-system-settings-s.patch + Fix issue where the textool produces false color artifacts + when using font anti-aliasing and system is set to subpixel + rendering. + ------------------------------------------------------------------- Thu Oct 7 12:50:49 UTC 2021 - Marcus Rueckert diff --git a/gimp.spec b/gimp.spec index 4c1ed0a..be3d091 100644 --- a/gimp.spec +++ b/gimp.spec @@ -42,6 +42,8 @@ Source1: macros.gimp # openSUSE palette file Source2: openSUSE.gpl Source99: baselibs.conf +# https://gitlab.gnome.org/GNOME/gimp/-/commit/a08055f1a18886fdacaf0cba5887b7ff2f687732 +Patch0: 0001-Issue-6210-Subpixel-font-rendering-system-settings-s.patch BuildRequires: aalib-devel BuildRequires: alsa-devel >= 1.0.0 @@ -212,6 +214,7 @@ applications that want to make use of the GIMP libraries. %prep %setup -q +%autopatch -p1 export LC_ALL=en_US.UTF-8 export LANG=en_US.UTF-8