Fixed issue#39
This commit is contained in:
parent
993724f108
commit
c812c992d5
BIN
data/Futura.ttc
BIN
data/Futura.ttc
Binary file not shown.
Binary file not shown.
|
@ -29,12 +29,12 @@ class Vzhuh(Base):
|
||||||
else:
|
else:
|
||||||
result.append(text)
|
result.append(text)
|
||||||
|
|
||||||
return '\r\n'.join(result)
|
return '\n'.join(result)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def create_image(text):
|
def create_image(text):
|
||||||
img = Image.open("data/vzhuh_sample.png")
|
img = Image.open("data/vzhuh_sample.png")
|
||||||
draw = ImageDraw.Draw(img)
|
draw = ImageDraw.Draw(img)
|
||||||
font = ImageFont.truetype("data/Futura.ttc", 40, index=2)
|
font = ImageFont.truetype("data/Impact.ttf", 44, index=0)
|
||||||
draw.text((222, 280), text, (0, 0, 0), font=font)
|
draw.text((222, 280), text, (0, 0, 0), font=font)
|
||||||
img.save('data/sample-out.png')
|
img.save('data/sample-out.png')
|
||||||
|
|
Loading…
Reference in New Issue