main
tkekec 3 years ago
parent 29e020bdc3
commit 41fd77113a
  1. 1
      python-core.tex

@ -2071,6 +2071,7 @@ draw = ImageDraw.Draw(image)
# drawing text size # drawing text size
text = "hello" text = "hello"
font = ImageFont.truetype(r'C:\Users\System-Pc\Desktop\arial.ttf', 20) font = ImageFont.truetype(r'C:\Users\System-Pc\Desktop\arial.ttf', 20)
## ubuntu -- font can be found with fc-list command
draw.text((5, 5), text, fill ="red", font = font, align ="right") draw.text((5, 5), text, fill ="red", font = font, align ="right")
image.save('test.png') image.save('test.png')
\end{python} \end{python}

Loading…
Cancel
Save