I want to load "fonts" from Google Storage, I've try two ways, but none of them work. Any pointers? Appreciated for any advices provided.
First:
I follow the instruction
load_font_from_gcs(uri)
given in the answer here, but I received an NameError: name 'load_font_from_gcs' is not defined message. I installed google storage dependency and executefrom google.cloud import storage
.
Second:
I try to execute the following code (reference #1) , and running into an
blob has no attribute open()
error, just the same answer I get it here, but as the reference in this link, it give a positive answer.
reference #1
bucket = storage_client.bucket({bucket_name})
blob = bucket.get_blob({blob_name)
with blob.open("r") as img:
imgblob = Image.open(img)
draw = ImageDraw.Draw(imgblob)