Align photo watermark caption to the right
This commit is contained in:
@@ -57,11 +57,11 @@ def render_captioned_photo(
|
||||
while draw.textlength(text, font=font) > available and len(text) > 2:
|
||||
text = text.rstrip("…")[:-1] + "…"
|
||||
draw.text(
|
||||
(layout.margin, photo_height + layout.footer_height / 2),
|
||||
(width - layout.margin, photo_height + layout.footer_height / 2),
|
||||
text,
|
||||
font=font,
|
||||
fill="black",
|
||||
anchor="lm",
|
||||
anchor="rm",
|
||||
)
|
||||
out = BytesIO()
|
||||
canvas.save(out, "JPEG", quality=93, optimize=True)
|
||||
|
||||
Reference in New Issue
Block a user