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

Icons are not rendering properly #103

Open
athulvis opened this issue Jan 14, 2022 · 29 comments
Open

Icons are not rendering properly #103

athulvis opened this issue Jan 14, 2022 · 29 comments

Comments

@athulvis
Copy link

athulvis commented Jan 14, 2022

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
Copy link
Owner

Hi, @athulvis

Thank you for using Fancygit.

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

@athulvis
Copy link
Author

athulvis commented Jan 18, 2022

@diogocavilha

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

@tmarcokr
Copy link

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

@athulvis
Copy link
Author

@tmarcokr No.. its still same for me

@el-leonya
Copy link

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

@el-leonya
Copy link

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

@diogocavilha
Copy link
Owner

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
Copy link
Author

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
Copy link
Owner

diogocavilha commented Feb 21, 2022

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
Copy link

sbsud commented Mar 17, 2022

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
Copy link

same issue in wsl

@EDIflyer
Copy link
Contributor

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

Any solutions/suggestions welcome!

@EDIflyer
Copy link
Contributor

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 added a commit to EDIflyer/fancy-git that referenced this issue Jun 20, 2022
@hongsoog
Copy link

hongsoog commented Jul 12, 2022

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!!

@EDIflyer
Copy link
Contributor

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
Copy link
Owner

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
Copy link
Owner

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
Copy link
Contributor

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
Copy link

harnen commented Aug 3, 2022

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
Copy link
Owner

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
Copy link

harnen commented Aug 6, 2022

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
Copy link
Owner

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! 😃

@pwerden
Copy link

pwerden commented Oct 4, 2022

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
Copy link

Nootaku commented Oct 7, 2022

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
Copy link

hajtuJ commented Oct 31, 2022

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: #70 (comment)

@datenfalke
Copy link

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
Copy link

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

@Deprinz2015
Copy link

Deprinz2015 commented Jan 20, 2024

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

@Deprinz2015
Copy link

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

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

No branches or pull requests