while True:
    font = ImageFont.truetype(font_location, adjusted_points)
height = font.getsize(text)[1]
if height != desired_point_size:
    adjusted_points += 1
else:
    break
Cannot align text with a line drawn on an image