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

Fluent Terminal on Win 10 doesn't render glyphs #70

Closed
chilcano opened this issue Jun 22, 2020 · 31 comments
Closed

Fluent Terminal on Win 10 doesn't render glyphs #70

chilcano opened this issue Jun 22, 2020 · 31 comments
Assignees

Comments

@chilcano
Copy link

Hi there.
I'm using Fluent Terminal on Windows 10 to SSH to a Raspberry Pi where FancyGit has been installed, but the fonts by default (SourceCodePro+Powerline+Awesome Regular) doesn't work. I've installed Inconsolata fonts (https://www.nerdfonts.com/font-downloads) and it worked partially (see imagen).

fancy-git-error-0

Both fonts were installed in Windows 10 and were selected in Fluent Terminal.

Any idea is welcome.
Regards.

@diogocavilha
Copy link
Owner

diogocavilha commented Aug 3, 2020

Hi, @chilcano

Thank you for using (or trying to use) Fancy Git!
Sorry for been late... is it still a problem?

In case that suggested font doesn't work, try the one called "Noto Mono".

Please, let me know if it's working so.

@chilcano
Copy link
Author

chilcano commented Aug 4, 2020

Hi @diogocavilha
Today Fancy-Git was auto-updated to the new version and the "fork" glyph doesn't render properly, even after installing "Noto Mono" in Fluent Terminal (Windows 10).

image

Any help is welcome.
Regards.

@diogocavilha
Copy link
Owner

@chilcano it's weird.

I'm afraid to say it's because of the terminal. FancyGit has never been installed on Windows terminal before. I think you're the first one to do that. At least, the first one I've noticed.

Do you mind to help me on solving that problem? I mean, I'll have to create another branch for that specific purpose, in order to make some changes. So I'll let you know about that branch and you could check it out over there.
What do you think of it?

I tell you that because I can't test it on Windows.
But before creating any branch I'll search for related behavior about Fluent Terminal.


In order to start I'd like to ask you for executing two things, for now.

1 - Change the font size on your terminal, just to check if the icons appear properly. Like, change font size and restart the terminal.

2 - Try to execute these commands:

echo ""
echo " "
echo " "
echo "  "

If possible, attach a screenshot of the output here, please.

Thank you!

@chilcano
Copy link
Author

chilcano commented Aug 4, 2020

Hi @diogocavilha
Sure, I can help you, just let me know.

  1. Done.
    I've changed the Font size, padding, weigth and re-open the terminal and nothing happened. See img.

image

  1. I couldn't execute these commands. Only thing I'm seeing is echo "" .... (see box char).
    image

Thanks.

@diogocavilha
Copy link
Owner

diogocavilha commented Aug 5, 2020

Hi, @chilcano

About the second one... I suspected that. I also see the boxes over here, but when I execute those "echos", an icon shows up. I mean, even if copy that and paste on terminal, the icon shows up.

I'll keep looking for a solution.
It must be charset related config on Windows.

@chilcano
Copy link
Author

chilcano commented Aug 6, 2020

Hi @diogocavilha

I've copy&paste the "echos" into 2 Fluent Terminals.
The first one (terminal on WSL2 with Ubuntu) renders a glyph.
The second one (terminal to remote Raspberry Pi) doesn't render the glyphs, only blank spaces.
image

Anything, just let me know.
Regards.

@bsides
Copy link

bsides commented Aug 8, 2020

I can help you guys as well, I'm using it on WSL 2 with Ubuntu, Cascadia Code PL font and Windows Terminal Preview. As expected, no icons are rendered because this font was made for Powerline only (I think):

I bet this could be helpful too, for example, search for git: https://www.nerdfonts.com/cheat-sheet

@chilcano which of the nerd fonts did you install (the ttf)? I'm having a hard time with their huge zip.

@chilcano
Copy link
Author

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.

@diogocavilha
Copy link
Owner

Hi, @bsides and @chilcano.
Thank you guys!!! That's great counting on you! Thanks ever so much!

So, @chilcano, I don't get it, are you using Ubuntu now? Is it working?

@chilcano
Copy link
Author

Hi @diogocavilha
I have 2 laptops:

  1. Laptop Windows + WSL2 + Ubuntu + Fluent Terminal - here the glyphs are not working
  2. Laptop Ubuntu + standard Terminal - here it works only if I use the bundled fonts (https://github.com/diogocavilha/fancy-git/raw/master/fonts/SourceCodePro%2BPowerline%2BAwesome%2BRegular.ttf).

@bsides
Copy link

bsides commented Aug 10, 2020

You're welcome, anything to help the project.

I moved to powerline and followed this tutorial and it work out great.

I'm sorry I couldn't help more but it looks like fancy-git is more Linux oriented than I expected. I can help here with tests if you want though.

@diogocavilha
Copy link
Owner

Hi @bsides

Yes, that's the point, FancyGit has been really made for Linux only. It might be the key for that problem. Linux is the realm of FancyGit.

@chilcano I'm so sorry about that. But maybe, once you're on Windows, the solution is using Powerline instead. If you're on Linux, FancyGit could be better, once it uses only pure bash.

FancyGit has also plenty of aliases that wouldn't work on Windows, I think.

@chilcano
Copy link
Author

Thanks @bsides, @diogocavilha for your support.
I've used https://www.nerdfonts.com/cheat-sheet to create ~/.fancygit/config-override.sh with all glyphs not rendered (see screenshot) and with that Fluent Terminal + WSL2 + FancyGit has worked.
E.g. In NerdFonts Cheat Sheet I've copied&pasted the icons in config-override.sh.

image

I've had to select a patched fonts in Fluent Terminal that fits in the FancyGit prompt (font size). For example, the octocat icon has different HEX codes and it is rendered in different sizes for each patched family font.

@diogocavilha, the ~/.fancygit/config.sh uses the glyphs from SourceCodePro Powerline Awesome Regular and Fluent Terminal doesn't render the default glyphs, but does the patched fonts from NerdFonts (they are frequently updated).
Could you recommend us an config-override.sh suitable to work with patched NerdFonts?.
Regards.

@diogocavilha
Copy link
Owner

diogocavilha commented Aug 15, 2020

Yep @chilcano. I'm gonna make some experiments so.

I remember that I've already tried to use that one on FancyGit a long time ago. I don't remember why I've chosen the SourceCodePro instead. But yep, I'm gonna give it a try again. If everything goes well, I can't say why not to use it.

I'll update this thread on any news about that.

Thanks!

@diogocavilha
Copy link
Owner

diogocavilha commented Aug 17, 2020

Hi, @chilcano. I'm making some tests with NerdFonts and I like what I see. =D

I think FancyGit will get even better with that!!! As soon as I have a new version of that, I'll ask you to change to the test branch. So you can check if it works.

@chilcano
Copy link
Author

Hi @diogocavilha that sounds great...looking forward to trying it soon. :)

@diogocavilha
Copy link
Owner

diogocavilha commented Aug 19, 2020

Hi, @chilcano and @bsides, feel free to pull the branch 6.3.x.

After pulling it, please run fancygit configure-fonts in order to install the new font called Sauce-Code-Pro-Nerd-Font-Complete-Windows-Compatible.ttf, which is one of the Nerd Fonts collection. At this commit, the goal is to keep FancyGit working as it should do. Just in order to fix the problems you're facing there.

Don't forget to change the terminal font to the Sauce Code.

On next versions I'll implement a couple of new styles by using some new symbols that I've seen on this new font.

@chilcano
Copy link
Author

After this:

$ cd ~/.fancygit
$ git pull
$ git checkout 6.3.x
$ fancygit configure-fonts

I'm getting this:
image

This branch is working smoothly.
Thanks for this great update, and looking forward to trying the new styles soon 👍
Regards.

@chilcano
Copy link
Author

Unfortunately, the embedded terminal in VS Code in Ubuntu is not rendering the glyphs.

I'm using this config in VSCode and tested with 'SauceCodePro Nerd Font Mono, 'SauceCodePro Nerd Font and 'SauceCodePro NF.

{
    //"terminal.integrated.fontFamily": "Consolas, 'Courier New', monospace",
    //"terminal.integrated.fontFamily": "'SourceCodePro+Powerline+Awesome Regular'",
    //"terminal.integrated.fontFamily": "'SauceCodePro Nerd Font Mono'",
    "terminal.integrated.fontFamily": "'SauceCodePro NF'",
    //"terminal.integrated.fontFamily": "'SauceCodePro Nerd Font'"
}

However, if switch to older fonts (SourceCodePro+Powerline+Awesome Regular), they are rendered properly. I've copied Source* and Sauce* ttf files to ~/.fonts and ~/.local/share/fonts and executed fc-cache.
Is that a cache problem?.

image

Any idea?.

@diogocavilha
Copy link
Owner

Maybe fc-cache -f

@chilcano
Copy link
Author

I executed fc-cache -f without success. I had to configure the VS Code's settings.json with both fonts.

{
    "terminal.integrated.fontFamily": "'SauceCodePro NF', 'SourceCodePro+Powerline+Awesome Regular'"
}

Above you can see I'm using Source* fonts as fallback, and in this way VS Code still will render the glyphs without problems.

If I remove Sauce* fonts, execute fc-cache -f, select Source* fonts in Gnome-Tweaks, disable "Preferences > Custom font" in Gnome-Terminal (see img below) and reopen the Gnome-Terminal; the Gnome-Terminal shown the glyphs like VSCode does. BTW the Source* fonts don't appear as a custom font in Gnome-Terminal.

image

@diogocavilha Seems that you still are using the glyphs from Source* fonts.

Hope this helps.
Regards.

@diogocavilha
Copy link
Owner

diogocavilha commented Sep 6, 2020

Hi @chilcano

I've replaced all the icons. Are you still facing any problem on that branch?
I need to solve that problem in order to release the new version.

The new styles will not be released yet, maybe on next one.

@chilcano
Copy link
Author

chilcano commented Sep 7, 2020

Hi @diogocavilha
thanks for your support. I've updated with the 6.3.x branch and Ubuntu Terminal is working as previous update did, but unfortunately the VSCode still not working as expected. To render the glyphs in VSCode's embedded Terminal I have to setup the Source* fonts:

...
    //"terminal.integrated.fontFamily": "'SauceCodePro NF'",                            // this doesnt work
    "terminal.integrated.fontFamily": "'SourceCodePro+Powerline+Awesome Regular'",      // this works
...

Hope this helps.
Regards.

@diogocavilha diogocavilha linked a pull request Sep 14, 2020 that will close this issue
@diogocavilha diogocavilha removed a link to a pull request Sep 14, 2020
@diogocavilha
Copy link
Owner

Hello @chilcano

In case it still doesn't, let's discuss about that in a new issue, once I've released a new version with a couple of changes.
This way I can focus on that.

Could you, please, create another issue for that?

@diogocavilha
Copy link
Owner

@all-contributors please add @chilcano for userTesting

@allcontributors
Copy link
Contributor

@diogocavilha

I've put up a pull request to add @chilcano! 🎉

@diogocavilha
Copy link
Owner

@all-contributors please add @bsides for userTesting

@allcontributors
Copy link
Contributor

@diogocavilha

I've put up a pull request to add @bsides! 🎉

@diogocavilha
Copy link
Owner

@all-contributors please add @chilcano for userTesting

@allcontributors
Copy link
Contributor

@diogocavilha

I've put up a pull request to add @chilcano! 🎉

@chilcano
Copy link
Author

Hello @chilcano

In case it still doesn't, let's discuss about that in a new issue, once I've released a new version with a couple of changes.
This way I can focus on that.

Could you, please, create another issue for that?

Sure. I will do it.
Cheers.

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

No branches or pull requests

3 participants