tweet-printer/rendertest.py

9 lines
295 B
Python
Raw Normal View History

2018-05-11 08:40:35 +00:00
from PIL import Image, ImageDraw, ImageFont
if __name__ == "__main__":
img = Image.new("RGB", (100, 100), (47,47,47))
font = ImageFont.truetype("fonts/unifont-10.0.07.ttf", 20)
draw = ImageDraw.Draw(img)
draw.text((0,25), "A🙏B", font=font, fill=(255,255,255))
img.show()