fancy-git icon indicating copy to clipboard operation
fancy-git copied to clipboard

Icons are not rendering properly

Open athulvis opened this issue 3 years ago • 30 comments

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

athulvis avatar Jan 14 '22 21:01 athulvis

Hi, @athulvis

Thank you for using Fancygit.

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

diogocavilha avatar Jan 18 '22 01:01 diogocavilha

@diogocavilha

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

athulvis avatar Jan 18 '22 03:01 athulvis

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

tmarcokr avatar Jan 23 '22 22:01 tmarcokr

@tmarcokr No.. its still same for me

athulvis avatar Jan 27 '22 13:01 athulvis

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

el-leonya avatar Feb 13 '22 13:02 el-leonya

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

el-leonya avatar Feb 13 '22 13:02 el-leonya

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 :(

diogocavilha avatar Feb 20 '22 21:02 diogocavilha

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.

athulvis avatar Feb 21 '22 14:02 athulvis

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

diogocavilha avatar Feb 21 '22 16:02 diogocavilha

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

sbsud avatar Mar 17 '22 09:03 sbsud

same issue in wsl

yasindagasan avatar Apr 13 '22 12:04 yasindagasan

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

Any solutions/suggestions welcome!

EDIflyer avatar Jun 19 '22 22:06 EDIflyer

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 :)

EDIflyer avatar Jun 20 '22 23:06 EDIflyer

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 avatar Jul 12 '22 08:07 hongsoog

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).

EDIflyer avatar Jul 12 '22 09:07 EDIflyer

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 avatar Jul 15 '22 13:07 diogocavilha

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!

diogocavilha avatar Jul 15 '22 13:07 diogocavilha

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 :)

EDIflyer avatar Jul 15 '22 13:07 EDIflyer

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.

harnen avatar Aug 03 '22 09:08 harnen

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?

diogocavilha avatar Aug 03 '22 13:08 diogocavilha

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!

harnen avatar Aug 06 '22 09:08 harnen

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:

diogocavilha avatar Aug 07 '22 14:08 diogocavilha

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"

pwerden avatar Oct 04 '22 20:10 pwerden

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.

Nootaku avatar Oct 07 '22 14:10 Nootaku

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

hajtuJ avatar Oct 31 '22 10:10 hajtuJ

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!

datenfalke avatar Nov 29 '22 17:11 datenfalke

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

k-willowhawk avatar Jan 12 '23 19:01 k-willowhawk

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
  1. Then i opened the Jetbrains Mono Font shipped with fancy-git, as well as SourceCodePro in separate windows.
  2. Then i looked up all missing or wrong Unicode Code Points:
printf '%X\n' "'<copy-paste-icon-here>"

(Note the ' before the icon)

  1. for each missing icon, i looked through the SourceCodePro font and copy pasted it into the Jetbrains Font
  2. 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
  3. I opened the font in Font Book and pressed install
  4. Lastly, i selected the font in my iTerm2 Profile

nihklas avatar Jan 20 '24 14:01 nihklas

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

nihklas avatar Apr 01 '24 14:04 nihklas