title: Kerning text in Python PIL
body: <p>I have some code to produce an image with text on it, using PIL:</p>
  <pre><code>from PIL import Image, ImageDraw, ImageFont
  
  width = 2480
  height = 3071
  message = &quot;Hello&quot;
  font = ImageFont.truetype(&quot;Arial.ttf&quot;, size=900)
  
  img = Image.new('RGB', (width, height), color='black')
  
  imgDraw = ImageDraw.Draw(img)
  
  textWidth, textHeight = imgDraw.textsize(message, font=font)
  xText = (width - textWidth) / 2
  yText = (height - textHeight) / 2
  
  imgDraw.text((152, 2100), message, font=font, fill=(255, 255, 255))
  
  img.save('result.png') 
  
  </code></pre>
  <p>I get a result like this: <a href="https://i.stack.imgur.com/7WRob.png" rel="nofollow noreferrer">Example</a></p>
  <p>But I need the text to have less space between letters. I intend to use this code for a batch of 40+ words located in a CSV file. How can I automatically adjust the kerning? I've seen other articles pointing to a related problem but they haven't helped.</p>