50

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.)

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.

  • Yep, seems to be only 12pts that has the issue for me. Setting 11pts or 13pts is persisted across sessions. – Tom Sep 20 '13 at 2:21
  • 9
    Since 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 Oct 23 '13 at 2:22
  • 1
    I 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 Dec 23 '13 at 10:40
  • 2
    Does not work for me. For example, I set defaults to Lucida Console 13p, but PowerShell still will open with Raster font. – djhurio Jul 12 '16 at 10:59
  • 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 Sep 27 '16 at 8:48
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.

  • 1
    I'm on Windows 8.1 and this doesn't work for me. – bouvierr Feb 22 '14 at 19:21
  • 1
    @bouvierr just tested on Windows 8.1, works for me, other solution didn't – Sammaye Apr 5 '14 at 13:33
  • 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 Feb 12 '15 at 13:04
  • Works as described on windows 7 for me. – 8DH Sep 27 '16 at 8:48
  • 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 Oct 20 '16 at 7:08
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

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.

  • 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 Apr 28 '15 at 11:39
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...

  • 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 Sep 22 '15 at 11:03
  • 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 Sep 23 '15 at 8:46
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.

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)

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

-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

  • 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 Jun 27 '16 at 23:31
  • I have had several VM machines infected with ransomware by going to bdhphoto.com in the past....user beware. – Ramhound Jun 28 '16 at 3:15

protected by bwDraco Jun 27 '16 at 23:31

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.