0

I use KiTTY(PuTTY) and PowerShell/cmd.exe in ConEmu and I want window to contain equal string count both with KiTTY and with cmd.exe.

But I was confronted with difficulty: same font has different pixel size in PuTTY and cmd.exe. For example, I use Consolas 11pt in KiTTY and "C" letter high is 13px. But in cmd.exe with Consolas 11pt "C" letter high is 6px.

This issue is remained in KiTTY/PuTTY and Powershell/cmd.exe both in ConEmu and in single window.

The worst thing in that I can't fit font size so that it has equal pixel size in the KiTTY and in the cmd.exe.

Is there a solution of this issue?

4
  • pt and px are not the same unit.
    – gronostaj
    Jan 18, 2015 at 11:29
  • Yes, of course. I set size font in pt (in KiTTY/cmd.exe settings) and then I measured it in px.
    – shau-kote
    Jan 18, 2015 at 12:09
  • Sorry, I misread your question. I can confirm that this is also the case on my system. I guess it's because points are defined in length units, not pixels, and KiTTY is using different PPI value.
    – gronostaj
    Jan 18, 2015 at 12:23
  • Some time between Windows 7 and 10, Microsoft changed cmd.exe from points to pixels. IMO this was a terrible decision on their part Jan 29, 2018 at 20:13

1 Answer 1

1

cmd.exe measures font height as cell height.

KiTTY measures font height as character height (which is smaller than a cell).

ConEmu may use either cell or character heights according to setting (named "Treat font height as device units"). Also the real height may depends on your monitor dpi value (setting named "Admin monitor dpi with font size"). High-dpi monitors will get larger font size of course.

6
  • Thank for your answer, @Maximus. I tried to switch said two ConEmu settings -- the font in cmd.exe (in ConEmu) became larger. But it still one and a half times less than font in KiTTY/PuTTY (in ConEmu).
    – shau-kote
    Jan 18, 2015 at 14:05
  • KiTTY does not care monitor dpi.
    – Maximus
    Jan 18, 2015 at 17:50
  • Do you mean so-called logical DPI, @Maximus? I use 125% scaling in Windows 7, but in my opinion because of scaling font in PuTTY must be less than font in cmd.exe, isn't it? Anyway, is there a way to enforce KiTTY to have same cell height as cmd.exe?
    – shau-kote
    Jan 18, 2015 at 18:55
  • 1. Saying cmd.exe is incorrect if you are meaning ConEmu. 2. Neither KiTTY nor cmd.exe (itself) can't be configured way you want. But ConEmu has options I've meant above.
    – Maximus
    Jan 18, 2015 at 23:42
  • Of course, @Maximus, I meant "сmd.exe in ConEmu" and "PuTTY in ConEmu". Sorry. But I wrote above that these ConEmu options don't fix issue. Are there others ways which I can try?
    – shau-kote
    Jan 19, 2015 at 15:41

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .