Detail
Exact size depends on many factors. I’ll just show you how to calculate different metrics of font.
- Height of red area:
offset_y
- Height of green area:
ascent - offset_y
- Height of blue area:
descent
- Black rectangle:
font.getmask(text).getbbox()