title: How to get the font pixel height using PIL's ImageFont class?
body: <p>I am using PIL' ImageFont module to load fonts to generate text images.
  I want the text to tightly bound to the edge, however, when using the ImageFont to get the font height, It seems that it includes the character's padding. As the red rectangle indicates.<a href="https://i.stack.imgur.com/9XW9H.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9XW9H.png" alt="enter image description here"></a></p>
  
  <pre><code>c = 'A'
  font = ImageFont.truetype(font_path, font_size)
  width = font.getsize(c)[0]
  height = font.getsize(c)[1]
  im = Image.new("RGBA", (width, height), (0, 0, 0))
  draw = ImageDraw.Draw(im)
  draw.text((0, 0), 'A', (255, 255, 255), font=font)
  im.show('charimg')
  </code></pre>
  
  <p>If I can get the actual height of the character, then I could skip the bounding rows in the bottom rectangle, could this info got from the font?
  Thank you.</p>