How to change font size using the Python ImageDraw Library
- by Eldila
I am trying to change the font size using python's ImageDraw library.
You can do something like this:
fontPath = "/usr/share/fonts/dejavu-lgc/DejaVuLGCSansCondensed-Bold.ttf"
sans16 = ImageFont.truetype ( fontPath, 16 )
im = Image.new ( "RGB", (200,50), "#ddd" )
draw = ImageDraw.Draw ( im )
draw.text ( (10,10), "Run awayyyy!", font=sans16, fill="red" )
The problem is that I don't want to specify a font. I want to use the default font and just change the size of the font. This seems to me that it should be simple, but I can't find documentation on how to do this.