ryanoasis / nerd-fonts

Iconic font aggregator, collection, & patcher. 3,600+ icons, 50+ patched fonts: Hack, Source Code Pro, more. Glyph collections: Font Awesome, Material Design Icons, Octicons, & more
https://NerdFonts.com
Other
54.76k stars 3.65k forks source link

Caskaydia Cove not displaying on visual studio code, but displayed correctly in the integrated terminal. #785

Closed mina-atef-00 closed 1 year ago

mina-atef-00 commented 2 years ago

🗹 Requirements

🎯 Subject of the issue

Same as Title, Using the same property CaskaydiaCove NF on both the integrated terminal font and the editor font family. But the font is only displayed properly in the integrated terminal.

🔧 Your Setup

★ Screenshots (Optional)

image

Finii commented 2 years ago

I'm sorry I have no Visual Studio Code installed. Anyhow, I have Visual Studio; but that seems to look completely different: image

And there the font shows up and is usable.

Where did you download the font from? Direkt from the Code file list? image In subdir patched-fonts/CascadiaCode/Regular/complete.

If that does not show up, maybe you should try the Caskaydia Cove Regular Nerd Font Complete Mono Windows Compatible.otf font?

Finii commented 2 years ago

Ah best would be to try the font after #723.

Let me provide the patched font somewhere... working :wrench:

https://github.com/Finii/nerd-fonts/tree/feature/cascadia-2111.01-patched/patched-fonts/CascadiaCode/Regular/complete

They one of these please.

Finii commented 2 years ago

Hmm, Visual Studio Code is small :-D Quickly installed.

Works on my machine?

image

I downloaded the fonts here: https://github.com/ryanoasis/nerd-fonts/tree/master/patched-fonts/CascadiaCode/Regular/complete

And just installed one file: Caskaydia Cove Nerd Font Complete Windows Compatible.ttf

Edit: The font in my Windows screenshots look really ugly; I guess because I'm not on that machine but only connected via remmina and antialiasing is turned off then? Maybe I should try nomachine for better looking fonts.

mina-atef-00 commented 2 years ago

Weird, I downloaded it from the link you provided and installed it again, same output.

Finii commented 2 years ago

That is strange. Did you remove all Caskaydia * with this Fonts dialog and then install just that one font file? And restart VSCode afterwards?

miloradowicz commented 2 years ago

Having the same issue in Visual Studio. To me it seems Visual Studio might have a problem with PostScript outlines.

Finii commented 2 years ago

I could not reproduce (i.e. works on my machine) with

https://github.com/Finii/nerd-fonts/tree/feature/cascadia-2111.01-patched/patched-fonts/CascadiaCode/Regular/complete

@miloradowicz Did you remove all Caskaydia*, reboot and install just one of the 2111.01 Caskaydias?

miloradowicz commented 2 years ago

I tried that, it didn't work. To be clear, my issue is with Visual Studio, VS Code seems to work fine. Here are some other things I tried: 1) version 1911.210 from here. It's ttf, and it worked; 2) BlexMono (ttf), FiraCode (ttf), Fantasque (ttf) worked; 3) Hasklig (otf), FuraMono(otf) didn't work.

Finii commented 2 years ago

I have this: image

Download and install this https://github.com/Finii/nerd-fonts/blob/feature/cascadia-2111.01-patched/patched-fonts/CascadiaCode/Regular/complete/Caskaydia%20Cove%20Nerd%20Font%20Complete%20Windows%20Compatible%20Regular.otf

I have no other Caskaydias installed.

image

And I can select it:

remmina_HaskStep7_localhost:1111_20220503-120624

Edit: Screenshots look ugly because I go through RDP

miloradowicz commented 2 years ago

Doesn't work for me on Win11/VS2022.

Finii commented 2 years ago

Unfortunately no screenshot.

Maybe it allows only monospaced fonts now? Probably https://github.com/Finii/nerd-fonts/blob/feature/cascadia-2111.01-patched/patched-fonts/CascadiaCode/Regular/complete/Caskaydia%20Cove%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible%20Regular.otf (... Nerd Font Complete Mono...) Not shure if that contains "Make NerdFonts Monospaced Again" and just only on mobile right now.

miloradowicz commented 2 years ago

Mono doesn't work either. I guess it's a VS2022 thing, I'll stick to ttf fonts for now.

Finii commented 2 years ago

@miloradowicz Caskaydia Code Whatever.ttf works? Or do you mean some other font.

miloradowicz commented 2 years ago
  • version 1911.210 from here. It's ttf, and it worked;

  • BlexMono (ttf), FiraCode (ttf), Fantasque (ttf) worked;

All those above worked. I'm not sure about the origin of the Caskaydia in the link, since it's coming from an outside source. But it was Caskaydia Code Regular, and I needed Light. BlexMono, FiraCode and Fantasque are from this repo.

I tried all the font faces of Caskaydia Code.otf and none of them worked. I've only tried light versions of Hasklig and FuraMono.otf, and they didn't work either. I'm actually not sure if it's a ttf vs otf thing; I tried converting PostScript outlines to TrueType with FontForge, and it didn't help the issue, but I'm not proficient with the tool, so I probably did something wrong. Although I did test the converted font in Windows Terminal and VS Code and it doesn't appear to be broken. Just doesn't work with VS2022.

Finii commented 2 years ago

Is VS 2022 (as the versions I have) still free for open source users? Then I can install that and install test / play around. Maybe you can link me to some MS page, to help me :-)

And you still did not say how 'not working' shows up? The font not in the selector dialog? The font not working if selected? etc?

Ah well, ... image

Edit: Add image

Finii commented 2 years ago

What I see with VS2019 ist that Cascadia is bold while Caskaydia is not, meaning it is not detected as monospaced. If that is the problem, one can work on that. But VS2019 took non-mono-detected fonts no questions asked...

image

Edit: Add image

Finii commented 2 years ago

Hmm, installed VS2022 and was able to select Caskaydia Cove same way as with VS2019:

remmina_HaskStep7_localhost:1111_20220509-142809

The font face looks a bit thinner, and bold is missing, but then, I didn't install bold.

miloradowicz commented 2 years ago

Here's my issue image image Maybe it's a Win11 thing then? I'll try it on a virtual machine.

Finii commented 2 years ago

Hmm, but the issue author claims it happened on Win 10...

This is strange. I installed the font just by double click on the font file, and then ... click 'install' in the font preview window.

And I'm 'admin' on the machine, have no clue if that makes a difference where the font is installed or something.

Finii commented 2 years ago

You use 'light'. Is the problem also present with 'regular' that I used :thinking:

Finii commented 2 years ago

Your Caskaydia version number is strange ... 2007.001 that's definitive an old font file.

image

Finii commented 2 years ago

Looks like I have installed it into some strange personal folder (and it works) and you have it in the system folder :thinking:

Finii commented 2 years ago

Hmm, Delugia works and is even bold ;-)

image

Delugia is where I deviate with the patching a bit from the usual 'Nerd Fonts path' in patching Cascadia Code.

Edit: Just pointing out: Image shows VS2022

Edit 2: Hmm, Delugia Mono is a patched Cascadia Mono, while Caskaydia Cove NF Mono is a patched Cascadia Code.

Finii commented 2 years ago

I would suggest removing all Caskaydia, and then go here: https://github.com/Finii/nerd-fonts/tree/feature/cascadia-2111.01-patched/patched-fonts/CascadiaCode, install all Caskaydia * Nerd Font Mono Windows Compatible.otf, reboot and then try again in VS2022.

That Caskaydia should be even better than the Delugia ones (recent fixes were not backported to Delugia).

After installation, check the font version, it should be 2111.1;Nerd Fonts 2.1.0.

miloradowicz commented 2 years ago

Well, I narrowed down the issue to the Terminal in VS. Here Caskaydia shows up for the Text Editor font. image And here it doesn't for the Terminal window. image Tried with the font you linked above version 2111.01-patched

Finii commented 2 years ago

Waah, there are different 'show settings for', I never noticed that.

Finii commented 2 years ago

At least Delugia seems to be selectable in Terminal. Maybe you can use that until I find out the issue (which will take some time I guess).

image

miloradowicz commented 2 years ago

I don't know if all the different versions I've tried so far behave this way, because I only paid attention to the Terminal settings (I only need NerdFonts for the git powerline), but I suspect that they might've been all kinda "working", just not in the Terminal.

miloradowicz commented 2 years ago

Delugia is where I deviate with the patching a bit from the usual 'Nerd Fonts path' in patching Cascadia Code.

Hmm, I notice that Delugia here is a TrueType font as well.

Finii commented 2 years ago

Hmm, I notice that Delugia here is a TrueType font as well.

'Internally' ttf and otf is almost the same, so I suspect no issue with that per se. But I guess that is really a monospacity problem, that are often present for example with Windows Terminal and others (Linux terminal emulators all have their own absurdities ;-)).

But we will see. The next boring Zoom meeting will nudge me to investigate ;-D

Finii commented 2 years ago

Possible work around: #831

madjxatw commented 2 years ago

It seems that CaskaydiaCove_NF is not rendered as thick as Cascadia Code for me in VS2022. But it has no problem in Windows terminal or even GVim.

Finii commented 2 years ago

@madjxatw Visual thickness can be different between Caskadia Code VF and Caskadia Code static. Unfortunately Windows Terminal comes hard bundled with the VF font, so it is hard to try out (without removing Windows Terminal. Caskaydia is based on the static fonts.

(VF = variable font that has all weights in on file.)

If the difference vanishes for bigger sizes (14pt and above) it could be the font flags that are wrong (MR 761).

Finii commented 2 years ago

I guess this is solved with v2.2.2?

madjxatw commented 2 years ago

It seems better, but still has issues. 1) Caskaydia looks much smaller than Cascadia; 2) Cascadia still looks fuller and smoother than Caskaydia.

Left side is Caskaydia, right side is Cascadia Code PL. Compare the d character in the first line. kascadia_issue

Finii commented 2 years ago

Maybe just one question before I try to reproduce... Did you try the static Cascadia Code font files, or the variable font one, where all weights are in one file?

madjxatw commented 2 years ago

I am using the static OTF files from Microsoft official repo, each weight has a separate file. BTW, I haven't tested them in some other applications, the picture above was taken from Visual Studio 2022.

Finii commented 2 years ago

Thank you, I will try to reproduce.

Finii commented 2 years ago

Ok, at the moment I have the dynamic font installed, because that is bundled with Windows Terminal and it is a hassle (at least I am too dump for a simple solution) to remove just the font but keep the app.

Anyhow, @madjxatw issue is visible on my machine. VS2022: grafik

Caskaydia is wider and the lines are less tall. Additionally it seems the antialliasing has been turned off:

grafik

The same holds for the mono versions of both fonts. Of course the Nerd Font version is not detected as monospaced, but the Nerd Font Mono one is. Just noting because it seems to have nothing to do with 'being detected as monospaced'.

Edit: Add comments on mono

Finii commented 2 years ago

Hmm, the size is identical in both fonts, if looked at with fontforge...

grafik

(In the bottom the path to the Windows Terminal 'installed' font.)

Finii commented 2 years ago

Uninstalled Windows Terminal app, installed the 4 basic Cascadia.otf from Nerd Fonts src/unpatched-fonts/... Same behavior in VS2022.

But indistinguischable in Writer 🤔 grafik

Edit: Note: I have no actual Windows box, this is RDP and it looks always (a bit) jaggy

Finii commented 2 years ago

Hmm, opening the original otf in fontforge and generatig a new font works (i.e. looks good). This is strange, but will take some time until I come round to check that in detail (sorry).

Finii commented 2 years ago

Tried Visual Studio Code (original issue) and there I see no difference in rendering. VSCode Version 1.71.0

Interestingly the problem is not in VS2019 - there the fonts are rendered equally bad :->

image

Also note that the 'Sample:' box in VS2022 shows the same 'bad looking' font, the antialiasing is just at work in the main editor window :thinking:

espenja commented 2 years ago

I tried to enable CaskaydiaCove NF as my VSCode terminal font and it wouldn't work. Tried restarting VSCode and my running Terminal instances. The solution for me was simply to kill explorer.exe in Task Manager and restart it by running File -> Run new task -> explorer.exe to force a refresh of Windows. Sounds silly, but hey, if it works... 🙄

wswind commented 2 years ago

For my issue ( win 11 / VS 2022) CaskaydiaCove NF is not selectable for vs terminal. Delugia is a good workaround. Waiting for this to be fixed.

Finii commented 2 years ago

Hmm, @wswind , is Delugia v2111.01.1 still working for you? You reference v2111.01.

Finii commented 2 years ago

Just installed Delugia v2111.01.1 on my test-box, and it seems to work as expected: image

Delugia and Delugia Mono can be selected but not Delugia Book.

Finii commented 2 years ago

Now the question is: Why is Delugia working but Caskaydia Cove not? As the latest Delugia uses (almost) vanilla Nerd-Fonts-v2.2.2.

Well, CaskaydiaCove NF should not be selectable, because that is the equivalent to Delugia Book. But what is with NFM (Nerd Font Mono)?

Okay, even CaskaydiaCove NFM is not showing up, but Cascadia Code is also missing.

Finii commented 2 years ago

Could it be that the VS terminal thing does only work with ttf and not with otf at all?

wswind commented 2 years ago

Could it be that the VS terminal thing does only work with ttf and not with otf at all?

Yes, this might be the reason. I tried CascadiaCode-2111.01. CascadiaCodePL.ttf can be selected in vs terminal, but CascadiaCodePL-Regular.otf can not. So I think the vs terminal issue has noting to do with this project.