We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1200dd4 commit 952711aCopy full SHA for 952711a
docs/releasenotes/12.1.0.rst
@@ -41,6 +41,20 @@ TODO
41
API additions
42
=============
43
44
+FreeTypeFont.has_characters
45
+^^^^^^^^^^^^^^^^^^^^^^^^^^^
46
+
47
+``ImageFont.FreeTypeFont`` has a new method for checking whether characters are present
48
+in the font or not. :py:meth:`.ImageFont.FreeTypeFont.has_characters` will return
49
+``True`` if all of the characters in the given string are available::
50
51
+ from PIL import ImageFont
52
+ font = ImageFont.truetype("Tests/fonts/FreeMono.ttf")
53
+ font.has_characters("Test") # True
54
+ font.has_characters(b"Test") # True
55
+ font.has_characters("\u2022") # True
56
+ font.has_characters("\u0000") # False
57
58
Specify window in ImageGrab on macOS
59
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
60
0 commit comments