diff --git a/_imagingft.c b/_imagingft.c index d8f6d6338..8ec7fd471 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(