diff options
author | Ludovic Courtès <ludo@gnu.org> | 2017-04-03 00:13:06 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2017-04-03 00:13:06 +0200 |
commit | 2a0d5de5a9decd785b22dafa69aae5320231f1b7 (patch) | |
tree | 6c532e278025fb46a94f4cb3c3a68063b7011fe1 /gnu/packages/patches/gd-freetype-test-failure.patch | |
parent | 41f6d18fb6ae7adebe72793c625ad4574991fa6d (diff) | |
parent | 245575eaf33801753ac8290e077c4397b2568540 (diff) | |
download | guix-patches-2a0d5de5a9decd785b22dafa69aae5320231f1b7.tar guix-patches-2a0d5de5a9decd785b22dafa69aae5320231f1b7.tar.gz |
Merge branch 'core-updates'
Diffstat (limited to 'gnu/packages/patches/gd-freetype-test-failure.patch')
-rw-r--r-- | gnu/packages/patches/gd-freetype-test-failure.patch | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/gnu/packages/patches/gd-freetype-test-failure.patch b/gnu/packages/patches/gd-freetype-test-failure.patch new file mode 100644 index 0000000000..49c16ca089 --- /dev/null +++ b/gnu/packages/patches/gd-freetype-test-failure.patch @@ -0,0 +1,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 */ |