Spaces:
Sleeping
Sleeping
File size: 375 Bytes
5e76d98 |
1 2 3 4 5 6 7 8 9 10 11 |
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()
|