summaryrefslogtreecommitdiff
path: root/tests/freetype
diff options
context:
space:
mode:
authorChristoph M. Becker <cmbecker69@gmx.de>2017-01-29 17:07:50 +0100
committerChristoph M. Becker <cmbecker69@gmx.de>2017-01-29 17:07:50 +0100
commita5570d3ed30ff76c2a8bdd54f4ab1825acca0143 (patch)
tree66532e83822f73b7b4119b380dfa03c18f508be4 /tests/freetype
parentb4d153ba96d473658bfb0bad0a0d813c724d7b0c (diff)
downloadlibgd-a5570d3ed30ff76c2a8bdd54f4ab1825acca0143.tar.gz
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
Diffstat (limited to 'tests/freetype')
-rw-r--r--tests/freetype/bug00132.c3
1 files changed, 3 insertions, 0 deletions
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) {