diff --git a/api/advent22_api/routers/_misc.py b/api/advent22_api/routers/_misc.py index 3e099ae..54a25eb 100644 --- a/api/advent22_api/routers/_misc.py +++ b/api/advent22_api/routers/_misc.py @@ -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