Font via DAV
This commit is contained in:
parent
a3583396ec
commit
e6f1f77ec3
1 changed files with 4 additions and 1 deletions
|
@ -92,11 +92,14 @@ async def get_auto_image(
|
|||
image = await load_image(images[index])
|
||||
rnd = await Random.get(index)
|
||||
|
||||
lena_ttf = await dav_get_file("fonts/Lena.ttf")
|
||||
lena_ttf.seek(0)
|
||||
|
||||
# Buchstabe verstecken
|
||||
await image.hide_text(
|
||||
xy=tuple(rnd.choices(range(30, 470), k=2)),
|
||||
text=letter,
|
||||
font=ImageFont.truetype("Lena.ttf", 50),
|
||||
font=ImageFont.truetype(lena_ttf, 50),
|
||||
)
|
||||
|
||||
return image
|
||||
|
|
Loading…
Reference in a new issue