Spaces:
Sleeping
Sleeping
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() | |