mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 07:57:27 +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 "Python.h" | ||||||
| #include "Imaging.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 <ft2build.h> | ||||||
| #include FT_FREETYPE_H | #include FT_FREETYPE_H | ||||||
| #else |  | ||||||
| /* freetype 2.0 */ |  | ||||||
| #include <freetype/freetype.h> |  | ||||||
| #endif |  | ||||||
| 
 |  | ||||||
| #include FT_GLYPH_H | #include FT_GLYPH_H | ||||||
| 
 | 
 | ||||||
| #define KEEP_PY_UNICODE | #define KEEP_PY_UNICODE | ||||||
|  | @ -59,11 +47,7 @@ struct { | ||||||
|     const char* message; |     const char* message; | ||||||
| } ft_errors[] = | } ft_errors[] = | ||||||
| 
 | 
 | ||||||
| #if defined(USE_FREETYPE_2_1) |  | ||||||
| #include FT_ERRORS_H | #include FT_ERRORS_H | ||||||
| #else |  | ||||||
| #include <freetype/fterrors.h> |  | ||||||
| #endif |  | ||||||
| 
 | 
 | ||||||
| /* -------------------------------------------------------------------- */ | /* -------------------------------------------------------------------- */ | ||||||
| /* font objects */ | /* 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")): |                     if os.path.isfile(os.path.join(dir, "ft2build.h")): | ||||||
|                         freetype_version = 21 |                         freetype_version = 21 | ||||||
|                         break |                         break | ||||||
|                     if os.path.isdir(os.path.join(dir, "freetype")): |  | ||||||
|                         freetype_version = 20 |  | ||||||
|                         break |  | ||||||
|                 if freetype_version: |                 if freetype_version: | ||||||
|                     feature.freetype = "freetype" |                     feature.freetype = "freetype" | ||||||
|                     feature.freetype_version = freetype_version |                     feature.freetype_version = freetype_version | ||||||
|  | @ -543,12 +540,8 @@ class pil_build_ext(build_ext): | ||||||
|         # additional libraries |         # additional libraries | ||||||
| 
 | 
 | ||||||
|         if feature.freetype: |         if feature.freetype: | ||||||
|             defs = [] |  | ||||||
|             if feature.freetype_version == 20: |  | ||||||
|                 defs.append(("USE_FREETYPE_2_0", None)) |  | ||||||
|             exts.append(Extension( |             exts.append(Extension( | ||||||
|                 "PIL._imagingft", ["_imagingft.c"], libraries=["freetype"], |                 "PIL._imagingft", ["_imagingft.c"], libraries=["freetype"])) | ||||||
|                 define_macros=defs)) |  | ||||||
| 
 | 
 | ||||||
|         if os.path.isfile("_imagingtiff.c") and feature.tiff: |         if os.path.isfile("_imagingtiff.c") and feature.tiff: | ||||||
|             exts.append(Extension( |             exts.append(Extension( | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user