Skip to content
This repository has been archived by the owner on Apr 24, 2020. It is now read-only.

PuTTY does not render nerdfonts correctly #436

Closed
debiansid opened this issue Mar 13, 2017 · 10 comments
Closed

PuTTY does not render nerdfonts correctly #436

debiansid opened this issue Mar 13, 2017 · 10 comments

Comments

@debiansid
Copy link

I am trying to ssh into Ubuntu linux with powerlevel9k installed from Windows 10 with Putty and Nerd-fonts installed. but the icons does not show correctly. even after I change the code in icon.zsh

POWERLEVEL9K_VCS_BRANCH_ICON='\ue725'
POWERLEVEL9K_VCS_TAG_ICON='\UF02B'
POWERLEVEL9K_HOME_ICON='\uf015'
POWERLEVEL9K_LINUX_ICON='\ue712'

vcs_tag and home icon are wrong.
but linux and branch icon working.

@canna002
Copy link

I have the same exact issue. I tried a variety of patched fonts, awesome fonts and nerd fonts. I use the method mentioned in the website below to install the fonts:

https://www.groovypost.com/howto/install-fonts-windows-10/

Some of the fonts can be selected in Putty whereas others are hidden:

https://www.asia-home.com/images/vimutf8putty5appearance.jpg

When I SSH using Putty the icons from the fonts are not displayed correctly. In some fonts the icons are tool small or narrow in width. In other fonts the icons do not appear, a question mark of some sort is displayed. I have enabled UTF-8 and everything should work. I have noticed that if I use nerd fonts without specifying the extra icons then everything is fine but I want to get the extra icons included with the fonts to display. For instance the Linux penguin.

@bhilburn
Copy link
Member

@debiansid @canna002 - Interesting. I've never tried to do anything special in PuTTY, so unfortunately I'm not sure that I have any advice to offer. I imagine that it is not uncommon to try and do this, though, so if we can get it figured out it would be good to put in the wiki.

So, just to be clear, you see problems even if you use something other than nerdfonts?

@bhilburn bhilburn changed the title nerd-font mode does not show icons corrcetly nerd-font mode does not show icons correctly Mar 14, 2017
@bhilburn bhilburn changed the title nerd-font mode does not show icons correctly PuTTY does not render nerdfonts correctly Mar 14, 2017
@debiansid
Copy link
Author

@bhilburn Yes.
but when I use SecureCRT, it can render nerd-fonts correctly.

@debiansid
Copy link
Author

Here is my thoughts.Is there a way to determin ssh clients' type, ex. Prompt 2 on iOS; putty/securecrt on windows. Then set different shell or powerlevel9k-mode?

@bhilburn
Copy link
Member

@debiansid - Ah, so, just to be clear, if there was a p9k mode that worked in PuTTY, that would do what you want it to - it doesn't have to be Nerd Fonts?

@debiansid
Copy link
Author

@bhilburn
Nerd Fonts are the best on Win10+PuTTY(my thoughts), so if there is a way to get it work on PuTTY, that would be perfect.

@bhilburn
Copy link
Member

bhilburn commented Apr 4, 2017

Okay, this doesn't look like something we'll really be able to do on our end. It's really entirely up to PuTTY. This is one you'll need to file against PuTTY, I'm afraid, and it's likely not going to be something they'll really be able to tackle since I think they piggy-back on the Windows Console, which is very limited in what it can render.

This might be your best show, for now: http://mikelindegarde.com/post/2016/03/10/feeling-like-a-real-developer

@chrisl8
Copy link

chrisl8 commented Jan 17, 2019

Doing some testing I found that even with the Windows Nerd Fonts TTF installed, many glyphs don't translate properly or at all across puTTY.

So I used the Nerd Font cheat sheet on their home page, tested out glyphs until I found ones that did work and replaced the current ones with working glyphs that were similar enough to the proper ones.

This is what I have so far:

POWERLEVEL9K_VCS_UNSTAGED_ICON='\uf704'                                                                                                                                                       
POWERLEVEL9K_VCS_STASH_ICON='\uf48d'                                                                                                                                                          
POWERLEVEL9K_VCS_STAGED_ICON='\uf916'                                                                                                                                                         
POWERLEVEL9K_HOME_ICON='\uf46d'                                                                                                                                                               
POWERLEVEL9K_CARRIAGE_RETURN_ICON='\uf810'                                                                                                                                                    
POWERLEVEL9K_OK_ICON='\uf62b'

Again, no idea why this is the case.

Also, FYI, to get the list of currently in use icons run get_icon_names while running powerlevel9k.

It would be cool to have "nerdfonts-complete-over-putty" mode, but obviously somebody would have to work out all the weirdness and build it.

@dritter
Copy link
Member

dritter commented Jan 17, 2019

Hey @chrisl8 ,
IMHO it is not the right thing to exchange all icons. Instead I think this is a configuration issue. Could you try to configure your putty as described in this comment and see if that helps?

Thanks

@chrisl8
Copy link

chrisl8 commented Jan 24, 2019

@dritter If I enable 'Allow selection of variable-pitch fonts' and pick a variable pitch version of Nerd Fonts it does seem to display more, but not all, of the glyphs, however:

  1. They look terrible as they are wider than their given spaces, thus being clipped.
  2. It makes puTTY very slow. Text is slow to display and regularly the entire screen repaints from top to bottom.

I can do more testing to give better details and screen shots if you want more information, but going down the variable-pitch fonts road produced such bad results, that I decided that must be why that option is disabled by default in puTTY.

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

No branches or pull requests

5 participants