mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-24 17:06:16 +03:00
Merge pull request #1247 from radarhere/freetype
Removed support for FreeType 2.0
This commit is contained in:
commit
0877c9959f
16
_imagingft.c
16
_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 <ft2build.h>
|
||||
#include FT_FREETYPE_H
|
||||
#else
|
||||
/* freetype 2.0 */
|
||||
#include <freetype/freetype.h>
|
||||
#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 <freetype/fterrors.h>
|
||||
#endif
|
||||
|
||||
/* -------------------------------------------------------------------- */
|
||||
/* font objects */
|
||||
|
|
9
setup.py
9
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(
|
||||
|
|
Loading…
Reference in New Issue
Block a user