I am using PIL on cloud function How do I point the “fonts” to that file.
I wonder shall I save the “fonts file” to the cloud storage and point the path? Any ideas or comments will be appreciated. Than you!
from PIL import Image, ImageDraw
from PIL import ImageFont
From Google.cloud import storage
storage_client = storage.Client()
. . . . . .
with blob.open() as file:
img = Image.open(file)
draw = ImageDraw.Draw(img)
font = ImageFont.truetype("simsun.ttc", 18). ## <- the font here
. . . . . .