unit1-certification-app / test /test_lithuanian.py
knoel's picture
solved github issue #142, changed font (#1)
5e76d98 verified
raw
history blame contribute delete
375 Bytes
from PIL import Image, ImageDraw, ImageFont
import os
font_path = os.path.join(os.path.dirname(__file__), "..", "NotoSans-Regular.ttf")
font = ImageFont.truetype(font_path, 20)
test_text = "Lithuanian letters: Ė ė Ą ą Č č abcdef"
img = Image.new("RGB", (600, 100), "white")
draw = ImageDraw.Draw(img)
draw.text((10, 10), test_text, font=font, fill="black")
img.show()