From 045190d3dddfae5e3abd7f91f857b4829e1cfe3a Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Mon, 1 Jun 2015 18:50:37 +1000 Subject: [PATCH] Removed support for FreeType 2.0 --- _imagingft.c | 16 ---------------- setup.py | 9 +-------- 2 files changed, 1 insertion(+), 24 deletions(-) diff --git a/_imagingft.c b/_imagingft.c index ad40ee425..0bbaad865 100644 --- a/_imagingft.c +++ b/_imagingft.c @@ -21,20 +21,8 @@ #include "Python.h" #include "Imaging.h" -#if !defined(USE_FREETYPE_2_0) -/* undef/comment out to use freetype 2.0 */ -#define USE_FREETYPE_2_1 -#endif - -#if defined(USE_FREETYPE_2_1) -/* freetype 2.1 and newer */ #include #include FT_FREETYPE_H -#else -/* freetype 2.0 */ -#include -#endif - #include FT_GLYPH_H #define KEEP_PY_UNICODE @@ -59,11 +47,7 @@ struct { const char* message; } ft_errors[] = -#if defined(USE_FREETYPE_2_1) #include FT_ERRORS_H -#else -#include -#endif /* -------------------------------------------------------------------- */ /* font objects */ diff --git a/setup.py b/setup.py index 216322ec2..35308fce9 100644 --- a/setup.py +++ b/setup.py @@ -453,9 +453,6 @@ class pil_build_ext(build_ext): if os.path.isfile(os.path.join(dir, "ft2build.h")): freetype_version = 21 break - if os.path.isdir(os.path.join(dir, "freetype")): - freetype_version = 20 - break if freetype_version: feature.freetype = "freetype" feature.freetype_version = freetype_version @@ -543,12 +540,8 @@ class pil_build_ext(build_ext): # additional libraries if feature.freetype: - defs = [] - if feature.freetype_version == 20: - defs.append(("USE_FREETYPE_2_0", None)) exts.append(Extension( - "PIL._imagingft", ["_imagingft.c"], libraries=["freetype"], - define_macros=defs)) + "PIL._imagingft", ["_imagingft.c"], libraries=["freetype"])) if os.path.isfile("_imagingtiff.c") and feature.tiff: exts.append(Extension(