mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-27 01:34:24 +03:00
Fixed bug when checking FreeType2 version if it is not installed
This commit is contained in:
parent
ef9a8e5f7f
commit
ca3ad49de3
|
@ -170,8 +170,10 @@ class FreeTypeFont:
|
|||
except ImportError:
|
||||
pass
|
||||
else:
|
||||
freetype_version = parse_version(features.version_module("freetype2"))
|
||||
if freetype_version < parse_version("2.8"):
|
||||
freetype_version = features.version_module("freetype2")
|
||||
if freetype_version is not None and parse_version(
|
||||
freetype_version
|
||||
) < parse_version("2.8"):
|
||||
warnings.warn(
|
||||
"Support for FreeType 2.7 is deprecated and will be removed"
|
||||
" in Pillow 9 (2022-01-02). Please upgrade to FreeType 2.8 "
|
||||
|
|
Loading…
Reference in New Issue
Block a user