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

Implement icons via alternative font(s) for consoles with limited UTF-8/emoji support #178

Closed
feamsr00 opened this issue Dec 2, 2018 · 8 comments
Labels
area: UI General user interface update enhancement New feature or request

Comments

@feamsr00
Copy link

feamsr00 commented Dec 2, 2018

Simple feat req. Use NerdFont To support some consoles that don't have great UTF-8\emoji support (yet). Thoughts?

@neiljp
Copy link
Collaborator

neiljp commented Dec 3, 2018

This sounds like a useful feature; I would appreciate pointers as to how this might be made to work.

If there are icons/aspects which do not currently render, please let us know the items and environment you're in, in a separate issue :)

@neiljp
Copy link
Collaborator

neiljp commented Dec 15, 2018

@feamsr00 Do you have experience with Nerdfont? See my earlier comment.

I also updated the title to better reflect your specific request.

@neiljp neiljp changed the title Icon Support Implement icons via alternative font(s) for consoles with limited UTF-8/emoji support Dec 15, 2018
@neiljp neiljp added enhancement New feature or request area: UI General user interface update labels Dec 15, 2018
@rht
Copy link
Contributor

rht commented Dec 15, 2018

I have sifted through the internet, couldn't find any ways for a cli app to vendor in custom fonts. The only way to move forward with the glyphs is to either auto-detect the font support of a terminal, or provide an explicit flag to enable/disable glyphs.

@feamsr00
Copy link
Author

feamsr00 commented Jun 28, 2019

Oh hello, let me wipe the dust off here :)

I do have experience as a NF user. I've used it powerline for zsh (via WSL) extensively.

Truthfully the easiest way to get it to work, would be just that, detect if the font is available (OS specific of course) and set a display flag to use them instead. As for including\redist the font, I'd either use a system package installer if you intend to use one which should allow that, or include in an "extras" dir that the user can optionally drop in themselves.

@rht
Copy link
Contributor

rht commented Jun 29, 2019

For the powerline setup, IIRC there is a configuration parameter that can be specified by the user, e.g.

let g:lightline = {
  \ 'separator': { 'left': '', 'right': '' },
  \ 'subseparator': { 'left': '', 'right': '' }
  \}

This way, the user can use whichever unicode glyph they want. And no font distribution is required.
Then, there would be a documentation to describe how to install fonts which support displaying the specific unicode glyphs.

@amanagr
Copy link
Member

amanagr commented Jun 29, 2019

This seems like a good idea to me. We can have a two configs - one with good emoji/glyph support and one without.

@neiljp
Copy link
Collaborator

neiljp commented Jan 20, 2021

To update this: we have started isolating the unicode we use into config/symbols.py, so in principle we could have "symbol themes" too at some point. As with regular themes and exposing them to be more easily configured, or keybindings (#680), my concern with this is that we start to tie ourselves into keeping the names/structure fixed.

For those installing from git, or willing to do so from a named (tagged) version, this does mean it should already be possible to adjust the symbol style to your liking, as long as we've not missed extracting a symbol into that file that you want to adjust :)

@neiljp
Copy link
Collaborator

neiljp commented Apr 15, 2021

@feamsr00 This was a great issue to understand the problem and possibilities for solution, but I'm closing this in favor of #938 which is expected to ultimately be the approach to be implemented to solve this 👍

@neiljp neiljp closed this as completed Apr 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: UI General user interface update enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants