vv icon indicating copy to clipboard operation
vv copied to clipboard

geometry in characters?

Open codr1 opened this issue 1 year ago • 1 comments

Is there a conversion between the number of characters and the length in pixels? E,g, if I want an image that is 30 chars wide and 10 lines long - that would be say 240 x 160 pixels?

codr1 avatar Sep 27 '24 03:09 codr1

On a real VT340, and genuine terminal emulators, the size of a character is 10x20 pixels (at least in 80 column mode), so 30 chars wide and 10 lines long will be 300 x 200 pixels.

However, in most modern terminals, the character size will depend on your font size, so you'll have to query the terminal to determine the size in pixels.

j4james avatar Sep 27 '24 08:09 j4james