share
Super UserWhy is my PowerShell font a different size than my Visual Studio font?
[+3] [1] xofz
[2009-10-27 22:22:40]
[ fonts powershell visual-studio ]
[ https://superuser.com/questions/61699/why-is-my-powershell-font-a-different-size-than-my-visual-studio-font ]

Both are Consolas. I have my PowerShell font size set to 16. The dialog window tells me that this means that each character is 8 screen pixels wide and 16 screen pixels high. It looks perfect, the exact size I want it to be in Visual Studio.

Since I'm running at 96 dpi, I assumed this would mean that to have the same size as in PowerShell, I would have to set it to be 12 in the "Fonts and Colors" section of Tools --> Options. (72 ppi / 96 dpi) * 16 pixels = 12 points.

However, the resulting font size is larger than the PowerShell size; in fact, even size 11 is still larger. Size 10 is smaller (too small). Does this mean that the Size listbox of the Visual Studio font options is not listing the size in points? What am I missing here?

Do your fonts really need to be exactly the same? It is an interesting question so +1, but seems far to much work for such little outcome! - William Hilsum
Could antialiasing be enabled for PowerShell? Sometimes that can give the illusion that a font is bigger than it really is - Josh Hunt
[+2] [2011-04-08 13:25:36] Bacon Bits [ACCEPTED]

As far as I can tell, it's a side effect of how the console renders fonts. Based on what I see here [1] it looks like the console font system rasterizes characters on a very simple grid (similar to how character are in actual standard text mode).

Short answer: The console uses a different font rendering engine. Fonts look different there just like they look different on Linux or Mac.

Criteria for Console Fonts [2]

More information on consoles can be found in the MSDN Console [3] reference. Details on font-based functions for the console are here [4].

[1] https://devblogs.microsoft.com/oldnewthing/2007/05/16
[2] https://web.archive.org/web/20140901124501/http://support.microsoft.com:80/kb/247815
[3] https://docs.microsoft.com/en-us/windows/console/console-reference
[4] https://docs.microsoft.com/en-us/windows/console/console-functions

1