the full documentation is available at /reference/imagedraw html drawing text the imagedraw object also has text(method for drawing text onto an image the text(method takes four argumentsxytextfilland font the xy argument is two-integer tuple specifying the upper-left corner of the text box the text argument is the string of text you want to write the optional fill argument is the color of the text the optional font argument is an imagefont objectused to set the typeface and size of the text this is described in more detail in the next section since it' often hard to know in advance what size block of text will be in given fontthe imagedraw module also offers textsize(method its first argument is the string of text you want to measureand its second argument is an optional imagefont object the textsize(method will then return twointeger tuple of the width and height that the text in the given font would be if it were written onto the image you can use this width and height to help you calculate exactly where you want to put the text on your image the first three arguments for text(are straightforward before we use text(to draw text onto an imagelet' look at the optional fourth argumentthe imagefont object both text(and textsize(take an optional imagefont object as their final arguments to create one of these objectsfirst run the followingfrom pil import imagefont now that you've imported pillow' imagefont moduleyou can call the imagefont truetype(functionwhich takes two arguments the first argument is string for the font' truetype file--this is the actual font file that lives on your hard drive truetype file has the ttf file extension and can usually be found in the following folderson windowsc:\windows\fonts on macos/library/fonts and /system/library/fonts on linux/usr/share/fonts/truetype you don' actually need to enter these paths as part of the truetype file string because python knows to automatically search for fonts in these directories but python will display an error if it is unable to find the font you specified the second argument to imagefont truetype(is an integer for the font size in points (rather thansaypixelskeep in mind that pillow creates png images that are pixels per inch by defaultand point is / of an inch