Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change font on PowerShell

How do I change the font for PowerShell?

There are only a few kind of fonts in PowerShell Preference.

Is there a way to choose more fonts?

like image 325
KiYugadgeter Avatar asked Feb 04 '17 10:02

KiYugadgeter


People also ask

How do I change the default font in PowerShell?

Use the Shift + Ctrl + , (comma) keyboard shortcut to open the settings UI. Click on the profile to change the settings — for example, Windows PowerShell or Command Prompt. Click the Appearance tab. Under the “Text” section, use the “Font face” setting and type the name of the style – for example, Consolas.

How do I change font size in PowerShell?

To change the font size of the PowerShell ISE editor using the command, we need to use the cmdlet $PSISE which is only loaded inside the PowerShell ISE console. You won't find it in the main PowerShell console. You need to select the Options Property and then need to set its FontSize attribute as shown below.

How do I add a font to PowerShell?

Is there a way to install new fonts to PowerShell? Just install the Terminal App from the Windows Store (the application is created by Microsoft) and change the appearance using the font you want, no need to modify the Registry.


1 Answers

When you launch Powershell.exe, client server runtime sub-system(csrss.exe) spawns a child process called conhost.exe.

You can try this the harder way to deal with the font:

Set-Location HKCU:\Console
New-Item '.\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe'
Set-Location '.\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe'
New-ItemProperty . FaceName -type STRING -value "Lucida Console"
New-ItemProperty . FontFamily -type DWORD -value 0x00000036
New-ItemProperty . FontSize -type DWORD -value 0x000c0000
New-ItemProperty . FontWeight -type DWORD -value 0x00000190

Apart from that, there is a SetConsoleFont module available for PowerShell.

The cmdlet for setting it is:

Set-ConsoleFont 10

You can check 4SysOps for reference.

A few exports are there under kernel32.dll that can change the font also.

like image 153
Ranadip Dutta Avatar answered Sep 27 '22 22:09

Ranadip Dutta