@classmethod
def from_text_bounded(cls, text, box_size, max_font_size, font_fn, *args,
    min_font_size=6, **kwargs):
    """Create image from text, reducing the font size until it fits. Inefficient."""
    return cls.generate_bounded(box_size, range(max_font_size, 
        min_font_size - 1, -1), lambda size: cls.from_text(text, font_fn(
        size), *args, **kwargs))
