0

I want to create a window in CMD so that it has a ratio of 16:9. Just like 1080p or 720p's ratio. Does anyone have a generator or a formula I could use? Thank you and I know it's just aesthetics, but I still care No Judge Zone. the code below is just what I'm using now I would like to keep the cols=99 but I would gladly change if need be.

mode con: cols=99 lines=45
Brett Nelson
  • 113
  • 3
  • 19
  • this is surely dependent on the choosen font. I see no other possibilty than to try and measure. – Stephan Aug 18 '15 at 18:30

1 Answers1

1

As you said you want to keep the column by 99, lines will be 56 since (99/16)*9. But if you use mode con: cols=99 lines=56, the CMD size would not be standard 16:9 ratio size at all.

I found out that "16:9" ratio for CMD is 5:2, or 25:6.
If you need a formula for this, try:

set column=99
set /a lines=(%column%/5)*2
mode con: cols=%column% lines=%lines%

Batch won't round up (e.g. 39.6 to 40), instead, it decreases to 39 since batch only can handle integer type value.

Happy Face
  • 1,061
  • 7
  • 18