forked from pool/cairo
Accepting request 926915 from home:susnux:branches:GNOME:Factory
Add upstream patch to fix applications not being able to explicitly set font anti-aliasing. Needed to fix at least GIMP issue https://gitlab.gnome.org/GNOME/gimp/-/issues/6210 Upstream: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/114 OBS-URL: https://build.opensuse.org/request/show/926915 OBS-URL: https://build.opensuse.org/package/show/GNOME:Factory/cairo?expand=0&rev=151
This commit is contained in:
parent
b2d3511d45
commit
1b081d8eae
@ -0,0 +1,44 @@
|
|||||||
|
From 4f4d89506f58a64b4829b1bb239bab9e46d63727 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Jehan <jehan@girinstud.io>
|
||||||
|
Date: Tue, 19 Jan 2021 12:42:31 +0100
|
||||||
|
Subject: [PATCH] src: do not override explicitly requested grayscale
|
||||||
|
antialiasing.
|
||||||
|
|
||||||
|
If CAIRO_ANTIALIAS_DEFAULT is selected and system is set to subpixel, it
|
||||||
|
is perfectly normal to switch to CAIRO_ANTIALIAS_SUBPIXEL.
|
||||||
|
But when the calling application specifically requested
|
||||||
|
CAIRO_ANTIALIAS_GRAY then Cairo should honor the request.
|
||||||
|
|
||||||
|
This is an issue we have had for years in GIMP, where text on images
|
||||||
|
would render differently depending on the system the file is opened on.
|
||||||
|
This is obviously not right as a graphics work should be system
|
||||||
|
independant and allow the creator to decide if one wants a text to have
|
||||||
|
grayscale or subpixel rendering (a settings which would stick when
|
||||||
|
sharing the work file). Cairo should not override this.
|
||||||
|
The CAIRO_ANTIALIAS_DEFAULT settings exists exactly for this (when we
|
||||||
|
want Cairo to choose for us, in a system-dependant way); other settings
|
||||||
|
are when we need system independance.
|
||||||
|
|
||||||
|
Thanks to Adam Fontenot for initial investigations and tests on this and
|
||||||
|
other contributors before this.
|
||||||
|
---
|
||||||
|
src/cairo-ft-font.c | 3 +--
|
||||||
|
1 file changed, 1 insertion(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c
|
||||||
|
index d2221edec..1f5befec3 100644
|
||||||
|
--- a/src/cairo-ft-font.c
|
||||||
|
+++ b/src/cairo-ft-font.c
|
||||||
|
@@ -1945,8 +1945,7 @@ _cairo_ft_options_merge (cairo_ft_options_t *options,
|
||||||
|
}
|
||||||
|
|
||||||
|
if (other->base.antialias == CAIRO_ANTIALIAS_SUBPIXEL &&
|
||||||
|
- (options->base.antialias == CAIRO_ANTIALIAS_DEFAULT ||
|
||||||
|
- options->base.antialias == CAIRO_ANTIALIAS_GRAY)) {
|
||||||
|
+ options->base.antialias == CAIRO_ANTIALIAS_DEFAULT) {
|
||||||
|
options->base.antialias = CAIRO_ANTIALIAS_SUBPIXEL;
|
||||||
|
options->base.subpixel_order = other->base.subpixel_order;
|
||||||
|
}
|
||||||
|
--
|
||||||
|
2.33.1
|
||||||
|
|
@ -1,3 +1,12 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Fri Oct 22 09:24:48 UTC 2021 - Ferdinand Thiessen <rpm@fthiessen.de>
|
||||||
|
|
||||||
|
- Add upstream patch
|
||||||
|
+ cairo-do-not-override-explicitly-requested-grayscale-aa.patch
|
||||||
|
Do not replace explicitly set applications settings by user
|
||||||
|
settings for font antialiasing.
|
||||||
|
See: https://gitlab.freedesktop.org/cairo/cairo/-/merge_requests/114
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Sun Feb 23 20:24:08 UTC 2020 - Martin Wilck <mwilck@suse.com>
|
Sun Feb 23 20:24:08 UTC 2020 - Martin Wilck <mwilck@suse.com>
|
||||||
|
|
||||||
|
@ -37,7 +37,8 @@ Patch2: cairo-Use-FT_Done_MM_Var-instead-of-free-when-available.patch
|
|||||||
Patch3: cairo-composite_color_glyphs.patch
|
Patch3: cairo-composite_color_glyphs.patch
|
||||||
# PATCH-FIX-UPSTREAM cairo-pdf-add-missing-flush.patch - fix pdf generation (upstream issue #342)
|
# PATCH-FIX-UPSTREAM cairo-pdf-add-missing-flush.patch - fix pdf generation (upstream issue #342)
|
||||||
Patch4: cairo-pdf-add-missing-flush.patch
|
Patch4: cairo-pdf-add-missing-flush.patch
|
||||||
|
# PATCH-FIX-UPSTREAM cairo-do-not-override-explicitly-requested-grayscale-aa.patch -- Fix font antialiasing requested by applications
|
||||||
|
Patch5: cairo-do-not-override-explicitly-requested-grayscale-aa.patch
|
||||||
BuildRequires: gtk-doc
|
BuildRequires: gtk-doc
|
||||||
BuildRequires: pkgconfig
|
BuildRequires: pkgconfig
|
||||||
BuildRequires: pkgconfig(fontconfig)
|
BuildRequires: pkgconfig(fontconfig)
|
||||||
|
Loading…
Reference in New Issue
Block a user