1

My version is 5.1 but the Lucida Console font is not able to show the full range of glyphs for most, if not all, Unicode characters. Isn't PowerShell making use of the installed fonts in the Windows host on which it is running?

An example is U+2227 = "∧" = logical and in mathematics. It displays in Lucida Console used in gVim on Windows 10, but not in a Powershell console using the exact same font.

Is there a switch to turn display of glyphs that are already in the installed fonts?

2 Answers 2

4

First you should know that PowerShell doesn't know anything about font rendering. It's a shell (like cmd or bash) and not a terminal. It simply passes the character stream to the terminal and must connect to a terminal to work, therefore you can do nothing in this case except changing to a better terminal. The default terminal in Windows is conhost.exe which is highly ancient and doesn't even support Unicode properly. If you notice you'll see that the interface and settings dialog are actually the same (with slightly different color palette) if you open cmd or powershell because both run on conhost if not called from another terminal. Some alternative terminals being the official Windows Terminal, putty, mobaxterm, ConEmu, cmder...

Then comes the issue of glyph substitution. Windows does font substitution, font linking or font fallback in most situations and many apps also customized that process further so that font rendering work smoothly. That makes you think that the character is available in Lucida Console but it's actually not. That glyph is just substituted with from another font. You can check the characters available in each font with Character Map. The nearest characters in Lucida Console are U+221F and U+2229

Unfortunately in a terminal with fixed-width font substitution is much more harder because the width of the character in another font is different. As a result

... The console is very picky about the replacement glyph for “unsupported characters”. I could not find how to make such a glyph to coexist with presence of glyphs for U+0000 and/or U+0001. (If the console finds one of the latter two glyphs in a font, it ignores the replacement glyph.)

What limitations does the Windows console have regarding Unicode?

Character Map for Lucida Console

The real solution is to use a better terminal with good font substitution support. Try Windows Terminal and you'll soon realize how bad conhost is

1

This is a limitation of the way the window works and displays. The font Lucidia Console doesn't have all those unicode characters in it, so it doesn't display them. You can't substitute a different font in the middle of the window to show a specific glyph, as it's an all or nothing deal.

This can be solved by setting the window to use a different font.

2
  • While this answer provides useful related information, it doesn't to me seem to answer the original question (which I've edited to provide an example - awaiting peer review) which seems to be asking more specifically why some glyphs that are present in the font aren't displaying when used in Powershell.
    – joharr
    Feb 20, 2020 at 22:46
  • Character Map doesn't like U+2227, it takes me to U+2229: , which I can paste & display in PowerShell. Feb 22, 2020 at 4:49

You must log in to answer this question.

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