def get_text_box(x, y, font, image, text):
    """Returns the crop box of a section of image given text coords and font size"""
    est_text_width, est_text_height = font.getsize(text)
    width = min(est_text_width, image.width - x)
    height = min(est_text_height, image.height - y)

    return x, y, width, height