diogocavilha / fancy-git

That's a terminal prompt changer that shows a few cool git informations about your repository state. You can choose among different styles and enjoy all the aliases it provides you. Feel free for contributing, pull requests and issues are always welcome! ;)
GNU General Public License v2.0
481 stars 64 forks source link

Icons are not rendering properly #103

Open athulvis opened 2 years ago

athulvis commented 2 years ago

Fancy git is a cool project. Anyway when I installed in in Debain Testing, the icons are not rendering properly

It looks as shown in the screenshot:

Screenshot_20220115_031316

Font: SauceCodePro NF 10pt

Screenshot_20220115_031938

Konsole version: konsole 21.08.2

Any help is appreciated.

Thanks and regards,

Athul

diogocavilha commented 2 years ago

Hi, @athulvis

Thank you for using Fancygit.

Are you facing that problem whatever the Fancygit font you use?

athulvis commented 2 years ago

@diogocavilha

Yeah.. I tried with the different fonts mentioned in the documentation. but the icons doesn't appear.

tmarcokr commented 2 years ago

Hi @athulvis , I'm facing the same problem. Have found a solution?

athulvis commented 2 years ago

@tmarcokr No.. its still same for me

el-leonya commented 2 years ago

I have the same problem not only with konsole, but also with vscode. Everything works fine in Kitty terminal

el-leonya commented 2 years ago

Hi @athulvis, @tmarcokr do you have this problem with vscode terminal on linux?

diogocavilha commented 2 years ago

Hi guys. Hope you're all doing good.

This is an issue when using Fancygit on KDE, unfortunately. I've been looking for the solution but I can't solve it yet. I'm so sorry for that :(

athulvis commented 2 years ago

As far as I understand, the issue is no support for the given emojis in KDE terminal. The emoji for virtual environment is showing for me.

Screenshot_20220221_194658

One not a good solution is to use supporting emojis in the configuration file.

diogocavilha commented 2 years ago

Maybe a possible workaround would be overriding the default values by using: https://github.com/diogocavilha/fancy-git#gear-advanced-tweaking---override-some-default-config-values

sbsud commented 2 years ago

Same issue with mac terminal and iterm (and vscode). I was able to override defaults and get most of the icons to load. But would have been good for it to work without the overrides. The first icon still does not load and your documentation does not specify the override variable for it. Also very cumbersome to find the icon from the font and update the environment variables. Can you comment on why the icons may not be loading? I am using the Jetbrains mono nerd medium font.

image

image

yasindagasan commented 2 years ago

same issue in wsl

EDIflyer commented 2 years ago

Same issue in Windows Terminal - have tried other nerdfonts packages too - image

Any solutions/suggestions welcome!

EDIflyer commented 2 years ago

OK in the end found Sauce-Code-Pro-Nerd-Font-Complete-Windows-Compatible.ttf seems to be the only one that works in Windows Terminal - tried all the others! Icons now working but I'm finding it's quite a 'light' font... image

There are some rather nice ones on Nerd Font with PowerLine glyphs (e.g Caskaydia Cove Nerd Font from https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/CascadiaCode.zip) - is there any way of supporting these options @diogocavilha? Would be great to have a broader range of fonts to pick from :)

hongsoog commented 2 years ago

The issue is related to the terminal emulator capability to render the emoji in the fancygit recommended fonts.

I have tries several terminal enumlaters, the find 'lxterminal' shows the icons without any problem.

TL; DR

$ sudo apt install lxterminal
$ lxterm&

Then go to Edit - Preferences menu of lxterminal window, select Style tab and choose your favorate fonts(e.g. SauceCodePro NF Regulat) and click OK. Done!!

Cheers!!

EDIflyer commented 2 years ago

Thanks @hongsoog - however I'm using Windows Terminal for an SSH connection to a virtual server, it looks like your suggestion is for running on a local machine (apologies if misunderstood).

diogocavilha commented 2 years ago

There are some rather nice ones on Nerd Font with PowerLine glyphs (e.g Caskaydia Cove Nerd Font from https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/CascadiaCode.zip) - is there any way of supporting these options @diogocavilha? Would be great to have a broader range of fonts to pick from :)

@EDIflyer It's a bit tricky. I've already tried many other nerd fonts but they have not the same compatibility when it comes to icon rendering. That's why I've implemented the possibility of changing icons by exporting new values with environment variables. It's hard to pick up many fonts and having the same character working for them in terminal. I'd have to check which font is being used in order to know the set of icons that work properly for that. But this approach would slow down the terminal iterativity even more :(

diogocavilha commented 2 years ago

The issue is related to the terminal emulator capability to render the emoji in the fancygit recommended fonts.

I have tries several terminal enumlaters, the find 'lxterminal' shows the icons without any problem.

TL; DR

$ sudo apt install lxterminal
$ lxterm&

Then go to Edit - Preferences menu of lxterminal window, select Style tab and choose your favorate fonts(e.g. SauceCodePro NF Regulat) and click OK. Done!!

  • Tested on Unbuntu 20.04 LTS with remote connection with MobaXterm from Windows 10.

Cheers!!

@hongsoog thank you so much for that solution!

EDIflyer commented 2 years ago

OK, thanks @diogocavilha - I can totally appreciate the difficulties in supporting multiple fonts I'll perhaps try something different then as for normal font usage I much prefer the Caskaydia Cove and similar - the ones that work don't render quite a nicely for text for me. As mentioned @hongsoog's suggestion only works if running on a local Linux machine, whereas as I'm SSHing in from Windows Terminal. Cheers :)

harnen commented 2 years ago

The same issue on the default Ubuntu 22.04 terminal. I tried all the suggested fonts but not a single one displays all the icons.

EDIT: it worked with the SourceCodePro font set up system-wide.

diogocavilha commented 2 years ago

The same issue on the default Ubuntu 22.04 terminal. I tried all the suggested fonts but not a single one displays all the icons.

Hi, @harnen.

Nor even the SourceCodePro font worked?

harnen commented 2 years ago

The same issue on the default Ubuntu 22.04 terminal. I tried all the suggested fonts but not a single one displays all the icons.

Hi, @harnen.

Nor even the SourceCodePro font worked?

Ha, I've just reinstalled the SourceCodePro font and set it system-wide (it doesn't show in the terminal) and it worked. I might have done something incorrectly before... Anyway, thanks a lot!

diogocavilha commented 2 years ago

The same issue on the default Ubuntu 22.04 terminal. I tried all the suggested fonts but not a single one displays all the icons.

Hi, @harnen. Nor even the SourceCodePro font worked?

Ha, I've just reinstalled the SourceCodePro font and set it system-wide (it doesn't show in the terminal) and it worked. I might have done something incorrectly before... Anyway, thanks a lot!

Oh, that's great! :smiley:

pwerden commented 2 years ago

I faced the same issue with icons not showing correctly (Debian 11, bash - KDE terminal Version 20.12.3). For me the only solution that worked was to use font "SourceCodePro+Powerline+Awesome+Regular"

Nootaku commented 2 years ago

Hello,

Could you please give us access to the original icons that you are using ?
I have included the missing icons in theme-functions.sh by copying unicode icons from the web. While this works, I cannot find the git-branch icons.

Also as an improvement idea, maybe you could regroup all icons in one file and import them where necessary.

hajtuJ commented 2 years ago

For wsl users:

Hi @bsides I've used several fonts from www.nerdfonts.com: SourceCodePro.zip, DroidSansMono.zip, FiraMono.zip, Noto.zip. ..and they didn't work.

Now, I've changed my workflow, now I'm using Ubuntu 20.04 laptop with the standard Terminal and there I tried above fonts without success and the only fonts have worked were the included in FancyGit repo (https://github.com/diogocavilha/fancy-git/raw/master/fonts/SourceCodePro%2BPowerline%2BAwesome%2BRegular.ttf).

Regards. Ref: https://github.com/diogocavilha/fancy-git/issues/70#issuecomment-671361925

datenfalke commented 1 year ago

I faced the same issue with icons not showing correctly (Debian 11, bash - KDE terminal Version 20.12.3). For me the only solution that worked was to use font "SourceCodePro+Powerline+Awesome+Regular"

this!

k-willowhawk commented 1 year ago

Had the same issue running in iTerm2 on macOS ventura. Same solution, use the linked SourceCodePro-Powerline-Awesome-Regular font mentioned in previous comments.

nihklas commented 9 months ago

For anyone still having this Problem on MacOS: I had the Issue, that whichever font i used, some icons were missing. I preferred the Jetbrains Mono Font, but it missed all the status icons. When using the SourceCodePro Font i had every status icon, but any Separator Icon except the standard one was missing from there. I fixed it by patching a new Jetbrains Mono Font myself:

  1. I installed FontForge

    brew install --cask fontforge
  2. Then i opened the Jetbrains Mono Font shipped with fancy-git, as well as SourceCodePro in separate windows.

  3. Then i looked up all missing or wrong Unicode Code Points:

    printf '%X\n' "'<copy-paste-icon-here>"

    (Note the ' before the icon)

  4. for each missing icon, i looked through the SourceCodePro font and copy pasted it into the Jetbrains Font

  5. When i was ready, i pressed CTRL-SHIFT-G and generated the font under a new name

    • Make sure you select TrueType as the format tho
  6. I opened the font in Font Book and pressed install

  7. Lastly, i selected the font in my iTerm2 Profile

nihklas commented 7 months ago

I opened a Pull-Request to add the missing icons into all Font-files (see #152)