mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-13 18:56:17 +03:00
None is also not a valid value
This commit is contained in:
parent
d088c804d0
commit
b4b8249c9d
|
@ -981,6 +981,9 @@ class TestImageFont:
|
||||||
font = self.get_font()
|
font = self.get_font()
|
||||||
with pytest.warns(DeprecationWarning):
|
with pytest.warns(DeprecationWarning):
|
||||||
font.getmask2("Hello world", fill=Image.core.fill)
|
font.getmask2("Hello world", fill=Image.core.fill)
|
||||||
|
with pytest.raises(TypeError):
|
||||||
|
with pytest.warns(DeprecationWarning):
|
||||||
|
font.getmask2("Hello world", fill=None)
|
||||||
|
|
||||||
|
|
||||||
@skip_unless_feature("raqm")
|
@skip_unless_feature("raqm")
|
||||||
|
|
|
@ -64,6 +64,9 @@ except ImportError:
|
||||||
core = _imagingft_not_installed()
|
core = _imagingft_not_installed()
|
||||||
|
|
||||||
|
|
||||||
|
_UNSPECIFIED = object()
|
||||||
|
|
||||||
|
|
||||||
# FIXME: add support for pilfont2 format (see FontFile.py)
|
# FIXME: add support for pilfont2 format (see FontFile.py)
|
||||||
|
|
||||||
# --------------------------------------------------------------------
|
# --------------------------------------------------------------------
|
||||||
|
@ -602,7 +605,7 @@ class FreeTypeFont:
|
||||||
self,
|
self,
|
||||||
text,
|
text,
|
||||||
mode="",
|
mode="",
|
||||||
fill=None,
|
fill=_UNSPECIFIED,
|
||||||
direction=None,
|
direction=None,
|
||||||
features=None,
|
features=None,
|
||||||
language=None,
|
language=None,
|
||||||
|
@ -676,7 +679,7 @@ class FreeTypeFont:
|
||||||
:py:mod:`PIL.Image.core` interface module, and the text offset, the
|
:py:mod:`PIL.Image.core` interface module, and the text offset, the
|
||||||
gap between the starting coordinate and the first marking
|
gap between the starting coordinate and the first marking
|
||||||
"""
|
"""
|
||||||
if fill is not None:
|
if fill is not _UNSPECIFIED:
|
||||||
deprecate("fill", 10)
|
deprecate("fill", 10)
|
||||||
else:
|
else:
|
||||||
fill = Image.core.fill
|
fill = Image.core.fill
|
||||||
|
|
Loading…
Reference in New Issue
Block a user