aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/gd-freetype-test-failure.patch
blob: 49c16ca089bc71a8476465beafb814a94ccc2101 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
Fix a test failure with freetype 2.7:

https://github.com/libgd/libgd/commit/a5570d3ed30ff76c2a8bdd54f4ab1825acca0143

Patch copied from upstream source repository:

https://github.com/libgd/libgd/commit/a5570d3ed30ff76c2a8bdd54f4ab1825acca0143

From a5570d3ed30ff76c2a8bdd54f4ab1825acca0143 Mon Sep 17 00:00:00 2001
From: "Christoph M. Becker" <cmbecker69@gmx.de>
Date: Sun, 29 Jan 2017 17:07:50 +0100
Subject: [PATCH] Fix #302: Test suite fails with freetype 2.7

Actually, the test failures are not necessarily related to freetype
2.7, but rather are caused by subpixel hinting which is enabled by
default in freetype 2.7. Subpixel hinting is, however, already
available in freetype 2.5 and in versions having the "Infinality"
patch.

To get the expected results in all environments, we have to disable
subpixel hinting, what is easily done by setting a respective
environment variable.

See also:
* https://www.freetype.org/freetype2/docs/subpixel-hinting.html
* https://www.freetype.org/freetype2/docs/reference/ft2-tt_driver.html
---
 tests/freetype/bug00132.c                    | 3 +++
 tests/gdimagestringft/gdimagestringft_bbox.c | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/tests/freetype/bug00132.c b/tests/freetype/bug00132.c
index 713dd2d..42ed5b1 100644
--- a/tests/freetype/bug00132.c
+++ b/tests/freetype/bug00132.c
@@ -11,6 +11,9 @@ int main()
 	char *path;
 	char *ret = NULL;
 
+	/* disable subpixel hinting */
+	putenv("FREETYPE_PROPERTIES=truetype:interpreter-version=35");
+
 	im = gdImageCreateTrueColor(50, 30);
 
 	if (!im) {
diff --git a/tests/gdimagestringft/gdimagestringft_bbox.c b/tests/gdimagestringft/gdimagestringft_bbox.c
index 0161ec8..1596a9e 100644
--- a/tests/gdimagestringft/gdimagestringft_bbox.c
+++ b/tests/gdimagestringft/gdimagestringft_bbox.c
@@ -38,6 +38,9 @@ int main()
 	int error = 0;
 	FILE *fp;
 
+	/* disable subpixel hinting */
+	putenv("FREETYPE_PROPERTIES=truetype:interpreter-version=35");
+
 	path = gdTestFilePath("freetype/DejaVuSans.ttf");
 	im = gdImageCreate(800, 800);
 	gdImageColorAllocate(im, 0xFF, 0xFF, 0xFF); /* allocate white for background color */
0'>2022-11-18home: services: redshift: Add 'configuration' action....* gnu/home/services/shepherd.scm: Re-export 'shepherd-configuration-action'. * gnu/home/services/desktop.scm (redshift-shepherd-service): Add 'actions' field. Ludovic Courtès 2022-09-14home: shepherd: Add daemonize? option to configuration....* gnu/home/services/shepherd.scm (home-shepherd-configuration): Add DAEMONIZE?. (home-shepherd-configuration-file): Use CONFIG argument instead of two separate SERVICES and SHEPHERD, respect DAEMONIZE?. (ensure-shepherd-gexp, launch-shepherd-gexp, shepherd-xdg-configuration-files): Adjust according to arguments changes in HOME-SHEPHERD-CONFIGURATION-FILE. Andrew Tropin 2022-09-12home: shepherd: Add shepherd/init.scm to XDG_CONFIG_HOME....* gnu/home/services/shepherd.scm (shepherd-xdg-configuration-files): New variable. (home-shepherd-service-type)[extensions]: Add HOME-XDG-CONFIGURATION-FILES-SERVICE-TYPE extension. Andrew Tropin 2022-04-21home: shepherd: Redirect input port to /dev/null....Suggested by Aleksandr Vityazev <avityazev@posteo.org>. * gnu/home/services/shepherd.scm (home-shepherd-configuration-file): Redirect input port to /dev/null. Ludovic Courtès 2022-04-21home: shepherd: "shepherd.conf" returns one value....Fixes <https://issues.guix.gnu.org/54779>. Reported by Aleksandr Vityazev <avityazev@posteo.org> and Nicolas Graves <ngraves@ngraves.fr>. * gnu/home/services/shepherd.scm (home-shepherd-configuration-file): Return one value. Ludovic Courtès 2022-04-12home: shepherd: Prevent launching the second instance....Fixes <https://issues.guix.gnu.org/54545>. * gnu/home/services/shepherd.scm (launch-shepherd-gexp): Launch shepherd if and only if its socket file does not already exist. Signed-off-by: Ludovic Courtès <ludo@gnu.org> Andrew Tropin 2022-04-07home: shepherd: Default to version 0.9....* gnu/home/services/shepherd.scm (<home-shepherd-configuration>)[shepherd]: Default to SHEPHERD-0.9. (home-shepherd-configuration-file): Use 'start-in-the-background' when it is defined. Ludovic Courtès 2022-03-18home: services: Export record type accessors....* gnu/home/services/shepherd.scm: Export <home-shepherd-configuration> accessors. Re-export <shepherd-service> accessors. Ludovic Courtès 2021-10-09Move (gnu home-services) to (gnu home services)....* gnu/home-services.scm (%guix-home-root-directory): Replace gnu/home-services.scm with "gnu/home/services.scm". Rename to gnu/home/services.scm. * gnu/local.mk (GNU_SYSTEM_MODULES): Rename gnu/home-services.scm to gnu/home/services.scm. * doc/he-config-bare-bones.scm: Replace (gnu home-services) with (gnu home services). * gnu/home.scm: Same. * gnu/home/services/fontutils.scm: Same. * gnu/home/services/mcron.scm: Same. * gnu/home/services/shells.scm: Same. * gnu/home/services/shepherd.scm: Same. * gnu/home/services/symlink-manager.scm: Same. * gnu/home/services/xdg.scm: Same. * guix/scripts/home.scm: Same. * guix/self.scm: Same. Oleg Pykhalov 2021-10-08gnu: Move (gnu home-services) to (gnu home services)....* gnu/home-services/configuration.scm: Move the content ... * gnu/home/services/configuration.scm: ... here. * doc/guix.texi: Replace (gnu home-services mcron) with (gnu home services mcron). Replace (gnu home-services) with (gnu home services). * gnu/home.scm: Replace (gnu home-services fontutils) with (gnu services fontutils). Replace (gnu home-services shells) with (gnu home services shells). Replace (gnu home-services symlink-manager) with (gnu home services symlink-manager). Replace (gnu home-services xdg) with (gnu home services xdg). * gnu/home-services/fontutils.scm: Rename to gnu/services/fontutils.scm. * gnu/home-services/mcron.scm: Move to gnu/home/services/mcron.scm. Replace (gnu home-services shepherd) with (gnu home services shepherd). * gnu/home-services.scm (%service-type-path): Search home services in "gnu/services". * gnu/home-services/shells.scm: Replace (gnu home-services configuration) with (gnu home services configuration). Rename to gnu/home/services/shells.scm. Replace (gnu home-services utils) with (gnu home services utils). * gnu/home-services/shepherd.scm: Move to gnu/home/services/shepherd.scm. * gnu/home-services/symlink-manager.scm: Rename to gnu/home/services/symlink-manager.scm. * gnu/home-services/utils.scm: Rename to gnu/home/services/utils.scm. * gnu/home-services/xdg.scm: Rename to gnu/home/services/xdg.scm. * guix/scripts/home/import.scm: Replace (gnu home-services bash) with (gnu home services bash). * gnu/home-services.scm: Update documentation string. * doc/he-config-bare-bones.scm: Apply new (gnu home-services ...) modules location. * gnu/local.mk (GNU_SYSTEM_MODULES): Same. Oleg Pykhalov