def text(self, image, fonts, font_sizes=None, drawings=None, squeeze_factor=0.75, color=None):
    color = (color if color else self._color)
    fonts = tuple([truetype(name, size) for name in fonts for size in (font_sizes or (65, 70, 75))])
    draw = Draw(image)
    char_images = []
    for c in self._text:
        font = random.choice(fonts)
        (c_width, c_height) = draw.textsize(c, font=font)
        char_image = Image.new('RGB', (c_width, c_height), (0, 0, 0))
        char_draw = Draw(char_image)
        char_draw.text((0, 0), c, font=font, fill=color)
        char_image = char_image.crop(char_image.getbbox())
        for drawing in drawings:
            d = getattr(self, drawing)
            char_image = d(char_image)
        char_images.append(char_image)
    (width, height) = image.size
    offset = int((((width - sum((int((i.size[0] * squeeze_factor)) for i in char_images[:(- 1)]))) - char_images[(- 1)].size[0]) / 2))
    for char_image in char_images:
        (c_width, c_height) = char_image.size
        mask = char_image.convert('L').point((lambda i: (i * 1.97)))
        image.paste(char_image, (offset, int(((height - c_height) / 2))), mask)
        offset += int((c_width * squeeze_factor))
    return image
def text(self, image, fonts, font_sizes=None, drawings=None, squeeze_factor=0.75, color=None):
    color = (color if color else self._color)
    fonts = tuple([truetype(name, size) for name in fonts for size in (font_sizes or (65, 70, 75))])
    draw = Draw(image)
    char_images = []
    for c in self._text:
        font = random.choice(fonts)
        (c_width, c_height) = draw.textsize(c, font=font)
        char_image = Image.new('RGB', (c_width, c_height), (0, 0, 0))
        char_draw = Draw(char_image)
        char_draw.text((0, 0), c, font=font, fill=color)
        char_image = char_image.crop(char_image.getbbox())
        for drawing in drawings:
            d = getattr(self, drawing)
            char_image = d(char_image)
        char_images.append(char_image)
    (width, height) = image.size
    offset = int((((width - sum((int((i.size[0] * squeeze_factor)) for i in char_images[:(- 1)]))) - char_images[(- 1)].size[0]) / 2))
    for char_image in char_images:
        (c_width, c_height) = char_image.size
        mask = char_image.convert('L').point((lambda i: (i * 1.97)))
        image.paste(char_image, (offset, int(((height - c_height) / 2))), mask)
        offset += int((c_width * squeeze_factor))
    return image