mirror of
https://github.com/python-pillow/Pillow.git
synced 2024-12-24 17:06:16 +03:00
compatibility code for ancient FreeType
This commit is contained in:
parent
df2ea75683
commit
39ae5d62f0
|
@ -1007,7 +1007,13 @@ font_render(FontObject* self, PyObject* args)
|
|||
case FT_PIXEL_MODE_GRAY2:
|
||||
case FT_PIXEL_MODE_GRAY4:
|
||||
if (!bitmap_converted_ready) {
|
||||
|
||||
#if FREETYPE_MAJOR > 2 ||\
|
||||
(FREETYPE_MAJOR == 2 && FREETYPE_MINOR > 6)
|
||||
FT_Bitmap_Init(&bitmap_converted);
|
||||
#else
|
||||
FT_Bitmap_New(&bitmap_converted);
|
||||
#endif
|
||||
bitmap_converted_ready = 1;
|
||||
}
|
||||
error = FT_Bitmap_Convert(library, &bitmap, &bitmap_converted, 1);
|
||||
|
|
Loading…
Reference in New Issue
Block a user