V
V
Victor Potebenko2020-12-29 15:11:19
Python
Victor Potebenko, 2020-12-29 15:11:19

How to pass text size in PIXELS to trueType() function from Pillow.ImageFont?

Hello, I want to print text on a 100x100 pixel image with a width of 20 px. How to do it? By eye, the size in points cannot be determined, since I do not know what font the text will be printed in.

I really hope for your help. I'm doing a school project, I've been struggling with this problem for several weeks now. Maybe tell me another library, or another approach, but at least tell me something, please.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question