Cannot change powershell default font to Lucida Console

51

4

This is a trivial problem, but it annoys me that I can't get to the bottom of it:

I'm running Windows 8, Powershell version 3.0. By right-clicking on the title bar I can go into the Properties and change the font, size, background colour etc without any problems.

After closing and restarting Powershell, all of the changes I've made stick except that if I've set the font to Lucida Console then on reopening I get the Raster font.

(Note that all of the above applies to when I run Powershell as Administrator.)

So:

  • If I set the font to Lucida, then it switches to Lucida for the remainder of the session.
  • If I set the font to anything other than Lucida, then it stays as that after closing and reopening.
  • If I alter the window sizes or text colours or anything else, the changes persist after reopening.
  • The only thing that goes wrong is that if I set the font to Lucida, it switches to 'Raster fonts' when I reopen.
  • But cmd and powershell ISE don't have this problem - only the powershell console.

Can anyone suggest what might be going wrong?

(One observation I've made is that upon re-opening Powershell after setting the font to Lucida, at first the width of the window is what it would be if the font were Lucida, but then after a second, it widens slightly to accommodate the raster font.)

IHaveAStupidProblem

Posted 2013-01-19T12:37:28.423

Reputation: 511

3Maybe the Lucida font file is corrupt? – aphoria – 2013-01-19T12:55:54.260

2For me on Windows 7 it only happens with font size 12 -- size 14 or 10 work like expected (I didn't try them all). – None – 2013-03-20T11:46:12.297

7

This has been logged with Microsoft Connect - https://connect.microsoft.com/PowerShell/feedback/details/806286/powershell-4-console-font-issue

– Ben Foster – 2013-12-23T11:03:01.963

Answers

17

This guy had the problem as well. His solution worked for me too:

However, my shell in Windows 7 refused to save the setting and insisted on changing back to Raster Fonts when I re-opened PowerShell. It worked fine with Consolas, but I wanted Lucida

The Workaround: Select a font size other than 12 points.

Pieinacup

Posted 2013-01-19T12:37:28.423

Reputation: 179

2Does not work for me. For example, I set defaults to Lucida Console 13p, but PowerShell still will open with Raster font. – djhurio – 2016-07-12T10:59:57.133

Does not work for me either. The problem goes away if you change font in admin PS, close it and then directly open a non-admin PS. Make sure to close the non-admin PS last. – 8DH – 2016-09-27T08:48:18.890

Yep, seems to be only 12pts that has the issue for me. Setting 11pts or 13pts is persisted across sessions. – Tom – 2013-09-20T02:21:03.873

9Since I upgraded from Windows 8 to Windows 8.1, I can't keep the font to Lucida. I tried several different font sizes. At least Consolas works. – bouvierr – 2013-10-23T02:22:08.607

1I experienced the same on Windows 8.1. If I tried to use Lucida my changes were persisted. Consolas however worked fine. This only seemed to affect Powershell as I did not have the same issue with the normal command prompt. – Ben Foster – 2013-12-23T10:40:33.697

12

I've found this behavior before, even with Windows 7. Try this - open a PowerShell window in admin mode (right click the icon open as administrator), change the font and close the window. Now open a PowerShell window with normal user rights and your changes should stick.

Pritesh Patel

Posted 2013-01-19T12:37:28.423

Reputation: 121

this also works for me on win8.1 but only for basic powershell link. If I run github shell I now get a powershell with huge raster font instead of console or lucida font (before I got github shell with default small raster font). – arberg – 2015-02-12T13:04:39.680

Works as described on windows 7 for me. – 8DH – 2016-09-27T08:48:48.000

This is really weird... If I restart my computer and the first PS I open is an admin PS I get the ugly raster fonts but if I first open a normal PS I get the selected font and then an admin PS I do get the correct font there as well. – 8DH – 2016-10-20T07:08:28.333

Worked on Windows 10 Build 17134.Thanks. – E. Sundin – 2018-05-05T17:28:33.037

1I'm on Windows 8.1 and this doesn't work for me. – bouvierr – 2014-02-22T19:21:27.323

1@bouvierr just tested on Windows 8.1, works for me, other solution didn't – Sammaye – 2014-04-05T13:33:27.567

4

  1. Check which code page you are using
    I found the used current code page is not UTF-8 (65001). You can find the current code page in properties -> Options. OR, you can found it by using 'chcp' command

  2. Change the code page to UTF-8
    using command 'chcp 65001'

  3. Change other font
    you can use other font by change the powershell propertes

Pegasus

Posted 2013-01-19T12:37:28.423

Reputation: 41

3

I too had this problem and I just fixed it by changing the system locale of my Windows installation English (United States). Swedish was apparently not supported with Lucide Console in PowerShell prompt. No idea why, but I blogged briefly about it here: http://www.meadow.se/wordpress/setting-the-font-of-a-powershell-console-to-lucida-console-wont-work/

Hope this helps.

emilast

Posted 2013-01-19T12:37:28.423

Reputation: 131

This did the trick for me too. I have an english uk windows with my locale set to dutch. When I changed the locale to en-us it was fixed. – albertjan – 2015-04-28T11:39:25.140

2

I’ve experienced this as well - it seems to be related to fonts with a space in the name!

In the end I gave up and stuck with Consolas as my default CLI font (not as easy on the eye as Lucida Console, IMHO, but better than raster fonts). I did find a potential fix (but can't test it as I don't have admin access on my machine); however it's also worth a look at the SetConsoleFont module from the TechNet Gallery (there’s a 4sysops blog post that might help to get it installed/imported but I don't have a high enough reputation on this site to post that many links in a reply).

I seemed to be getting somewhere with that in that I could change the font and size from within a PSH session (so could presumably do this in my profile) but I didn't really want to go down the unsupported code route...

Mark Wilson

Posted 2013-01-19T12:37:28.423

Reputation: 43

1

This could be a better answer if you try your "potential fix" and edit the answer to provide more details/steps for the fix.

– nixda – 2015-09-22T11:03:02.007

That may be so but, as I explained, I don't have admin access the my machine that's experiencing the issue, so I can't. By posting the info here for others at least it's an option for them to follow up... – Mark Wilson – 2015-09-23T08:46:52.077

2

This may come somewhat late, but I too had this problem. I solved this by unchecking Properties > Options > Use legacy console. After that, I could change the font and size and I got saved.

Mind that I did this with Windows 10.

Saphire

Posted 2013-01-19T12:37:28.423

Reputation: 173

1

Ubuntu Mono (downloadable from the many free font sites) @ 18pt looks almost identical to Lucida Console 14pts.
To get it appearing in the console, just add it to windows and add in a new string entry in:
HKLM\Software\Microsoft\Windows NT\CurrentVersion\console\TrueTypeFont.
Name is 000 (probably... add on an extra 0 from the previous entry) and name is Ubuntu Mono. I just had to restart Powershell for it to find it (Win8.1)

EscapeMCP

Posted 2013-01-19T12:37:28.423

Reputation: 11

0

If you're using a shortcut to run PowerShell, try running the exe directly (as an administrator) instead and change the default properties there. In your case make sure Lucida is highlighted under the Font tab. Recreate the shortcut if necessary once you're done changing properties.

Right click the shortcut and choose "Open file location" for an easy way to find the exe.

I tested this with PowerShell 5.0 in Windows 10

thothrala

Posted 2013-01-19T12:37:28.423

Reputation: 1

-1

I have been working on this issue for two days now in Powershell on 2012 Server in a VM and finally today I found a site with a solution. From reading the site it seems the main cause of the issue is the fonts naming has a double-space in the font.

SOLUTION: Install new font and update registry key to match name, then set in Powershell Command Window Properties as normal.

Details here and all thanks to them :) http://www.bdhphoto.com/script-snippits/windows-powershell-snippits/powershell-font-fix-lucida/

WJDrury, ENGLAND

WJDrury

Posted 2013-01-19T12:37:28.423

Reputation: 1

Welcome to Super User. Although this may answer the question, you should give a more detailed description of the linked content and explain how it relates to the question. This will help ensure that this answer remains useful in the event the linked page is removed or goes offline. For more information, see this Meta Stack Exchange post.

– bwDraco – 2016-06-27T23:31:48.163

I have had several VM machines infected with ransomware by going to bdhphoto.com in the past....user beware. – Ramhound – 2016-06-28T03:15:00.417