Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Linux character-set #881

Closed
fasterinnerlooper opened this issue Aug 13, 2016 · 12 comments
Closed

Add support for Linux character-set #881

fasterinnerlooper opened this issue Aug 13, 2016 · 12 comments
Assignees
Labels

Comments

@fasterinnerlooper
Copy link

When I use the "agnoster" theme, I'm expecting to see what is shown here:
Agnoster zsh theme
What I actually see is this:
2016-08-12
Is there a good way to make these seemingly Linux-specific characters appear in conhost? It would make the environment feel more natural for someone coming from a customised environment.

Using Windows 10 Pro 1607 (14393.51)

@bitcrazed
Copy link
Contributor

Hey @sjetha, thanks for reporting. This is a Console rendering issue and something I'm hoping we can remedy in the next OS release.

@fpqc
Copy link

fpqc commented Aug 13, 2016

@bitcrazed @zadjii-msft Powerline characters require special patched fonts to work as well. Since Cmd.exe does not support any of those fonts by default, it will not render even if you are doing the UTF-8 conversion correctly.

You can see that the problem is not with bash.exe because the fonts render fine in ConEMU, which chooses the fallback characters correctly:
2016-08-12 1

Also, the powerline characters are considered "invalid codepoints" in utf-8, or "private use area" ones. They are nonstandard, and that's why they must be patched into fonts. (By the way, the reason why that looks so strange is because my color scheme in conemu is set up wrong (I am using the same or similar oh-my-zsh theme as the OP), and also because bash.exe does not properly translate all xterm color escape sequences)

@deto
Copy link

deto commented Aug 13, 2016

@fpqc: I've installed the powerline fonts in Windows and can switch to them in the normal "properties" dialog for the console. I don't use oh-my-zsh, but can report that the triangle chevron-like characters work fine in my vim-airline plugin bar.

@fpqc
Copy link

fpqc commented Aug 13, 2016

@deto No idea where you set those fonts! Source code pro didn't show up in cmd.exe but maybe it will if I run bash.exe directly?

@lesleyxyz
Copy link

lesleyxyz commented Aug 15, 2016

Do you still have the same issue if you install an ssh server and use PuTTY?
You can use this as workaround if it's bothering you a lot

@fpqc
Copy link

fpqc commented Aug 15, 2016

@laklek yeah that works I guess, but it turns out the console supports this character just fine.

@deto
Copy link

deto commented Aug 15, 2016

@fpqc You know, there must be some difference between the fonts in the powerline/fonts repo that Windows picks up on. I had just installed them all (via the script they provide), but only some of them show up in the "Font" pane that conhost uses. Not sure if it's just a case of some meta-data in the font files not being correctly configured.

Here's what shows up for me:

"Anonymice" Powerline
DejaVu Sans Mono for Powerline
Droid Sans Mono Dotted for Powerline
Droid Sans Mono Slashed for Powerline
monofur for Powerline
Hack
Ubuntu Mono derivative Powerline

@fpqc
Copy link

fpqc commented Aug 15, 2016

Probably format. The Source Code Pro fonts are OpenType (which MS freaking developed and standardized) while the ones that work are TTF. More evidence of how little love the console had gotten!

@zadjii-msft
Copy link
Member

I'm going to close this issue, because the primary problem here is the default font that was selected (likely consolas) doesn't have the proper triangle/arrow/powerline related glyphs in it. It definitely is possible to find fonts that work with conhost that do have those glyphs though, so just play around with a bunch till one works that you like. I'm personally using DejaVu Sans Mono and Menlo, both which have an arrow that works with my vim setup.

Yes, it's true that not all fonts work with conhost at the moment. It's something we'd love to fix, but IIRC with the rendering pipeline we have now, only a few are going to work until we overhaul it more dramatically.

@mrmckeb
Copy link

mrmckeb commented Mar 12, 2017

@zadjii-msft Is this something that's going to make the Creators Update? I've had a number of issues with fonts rendering special characters correctly - I've tried DejaVu Sans Mono and it seems to be missing a lot of characters when I test it. Perhaps there's something else I need to configure?

@zadjii-msft
Copy link
Member

@mrmckeb I believe DejaVu Sans Mono should be working correctly -

image

As far as font fallback goes, that didn't make the cut for Creators Update.

@mrmckeb
Copy link

mrmckeb commented Mar 14, 2017

Thanks, I'll try that again - but looking forward to more work here in future. You guys have done an amazing job and at the very least enabled me to work full-time in Windows again - which is amazing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

7 participants