I know that all characters in a monospaced font like Courier New have bounding boxes of the exact same size. An * and a ] both have bounding boxes of same sizes, however, each of these characters fill up different amounts of 'space' within the bounding box, since an * is made up of fewer pixels than a ]

The bounding box in question can be viewed if I highlight a single character with my mouse, the blue tall rectangular box. What is the exact dimension of this box in pixels, and does this box have any actual name?

I wanted to make a Python program to generate ascii art which needs to know the dimension of this box, essentially I want to scan thru a regular non-text/non-ascii image, in these bounding box size increments one by one, finding and storing the average color value within each of the bounding boxes in the image somewhere else

However I realized that depending on the image size itself, the size of the 'bounding box' sized increments would also have to be different for each image. How would I go about 1) finding the dimensions of the bounding box of a Courier New character 2) decide how big it should be on a per image basis?

0

There are 0 best solutions below