Relative Content

Tag Archive for pythonimagepython-imaging-library

Finding the image size for a specific text

The task is this: each time the program receives input text of a different size, the maximum number of characters on a line, a font for transferring images for future use, the size of the font, its c, background color and the size of indents from the text up, down, left and right (measured in pixels , one size for all sides. My problem is that I don’t know how to calculate the size for the image. I’m using the PIL module.
Clarification: the font is transferred as an absolute path that leads to drive C, the windows folder, and then fonts

Finding the image size for a specific text

The task is this: each time the program receives input text of a different size, the maximum number of characters on a line, a font for transferring images for future use, the size of the font, its c, background color and the size of indents from the text up, down, left and right (measured in pixels , one size for all sides. My problem is that I don’t know how to calculate the size for the image. I’m using the PIL module.
Clarification: the font is transferred as an absolute path that leads to drive C, the windows folder, and then fonts