Terminal-Icons icon indicating copy to clipboard operation
Terminal-Icons copied to clipboard

Can you guys add these Icons to "Cascadia Code" & "Cascadia Code PL" font by microsoft

Open SirTwsted opened this issue 4 years ago β€’ 10 comments

Is it possible for someone to implement a Font called "Cascadia Code PL" that microsoft created, to have these icons work with this font ?? I dont know if its possible or it just cant, but im asking just in case. πŸ˜‰

SirTwsted avatar Jun 20 '21 15:06 SirTwsted

I believe you might want to repost this on the repo for Nerd Fonts.

https://github.com/ryanoasis/nerd-fonts

It does look like they already have one based off of Cascadia Code. It's called 'Caskadia Cove' (likely a ℒ️ thing w/ MSFT)

https://github.com/ryanoasis/nerd-fonts/releases/download/v2.1.0/CascadiaCode.zip

Tiberriver256 avatar Jun 20 '21 19:06 Tiberriver256

@Tiberriver256 is right. Nerd Fonts already has a patched Cascadia Code font called Caskaydia Cove that works in Terminal-Icons. When installed in Windows, it will show up as CaskaydiaCove NF in the Fonts app. Use that name when setting the font in Windows Terminal or VSCode.

devblackops avatar Jun 20 '21 19:06 devblackops

@devblackops The Icons dont show up next to the file names. Even when using CaskaydiaCove NF or any variations of the NF font. I even tried the fully packed one called - DelugiaCode NF that has all of the nerd fonts in one package with Cascadia Font. I also tried the PL versions of Cascadia which there is 27 variations and None of them show the Icons next to the names, Like you have on the MD of your front page.... So im very confused.... And yes, I did use both codes in PowerShell in Administrative mode:

    • PS> Install-Module -Name Terminal-Icons -Repository PSGallery and
    • Import-Module -Name Terminal-Icons

Nothing happens when I put both of those codes in PowerShell in administration mode. It just goes to the next line. And yes, I already set the PowerShell permission to Unrestricted.

SirTwsted avatar Jun 20 '21 20:06 SirTwsted

@SirTwsted What terminal are you using? Make sure to enable the installed font. In VSCode settings, this would be editor.fontFamily. In Windows Terminal the fontFace property of your selected profile.

Another question, do the colors change for each folder or file? Even if you don't have a compatible font enabled, those should still change. If they aren't, then something else is going on.

devblackops avatar Jun 21 '21 04:06 devblackops

Hi @devblackops
I am on Windows 10 operating system, all updates and patches are up to date. I am using Windows Terminal that has PowerShell v7.1.3 as its default terminal when I open up Windows Terminal.

I am using ( CaskaydiaCove NF ) as the fontFace right now, and I checked the default.json and settings.json of the terminal, and they both have the proper font settings to the same font as my terminal. I was also using the newly released DelugiaCode NF (if i havent mentioned that before) is has every single nerd font available paged into this font.

As to the second question: (No) the colors do not change for each file or folder type.

I am using the (Paradox theme) for 'Oh My Posh', just in case you needed to know that as well. πŸ˜‰

This is the video I followed from a official Microsoft employee that currently works at microsoft. https://www.youtube.com/watch?v=lu__oGZVT98

BTW - I also tried this late last night since I couldnt get any results from Terminal Icons. https://github.com/JustABearOz/PoshColor

Yes, I know its not your mod or page, I just thought it would be good information to help you better understand whats going on. The PoshColor does work UNTIL I restart the terminal. Thats when it goes back to normal, meaning it wont stick. Even when doing it in administration mode and even when opening up permissions to the folder so it can write to it. I'm out of ideas, unless I missed something. I just wanted you to see the different avenues I went through πŸ€”

And lastly, yes I am the administrator and owner of this computer. πŸ˜‰πŸ˜Ž

SirTwsted avatar Jun 22 '21 02:06 SirTwsted

If colors aren't showing as well, then this isn't a font issue. It sounds like the formatting file isn't being loaded (or another module's formatting file is taking precedence. PowerShell will only use one formatting file for a given type at a time. Terminal-Icons has custom formatters for System.IO.DirectoryInfo and System.IO.FileInfo. To eliminate any other modules, can you try starting a new PowerShell session without loading your profile, then explicitly loading Terminal-Icons? Something like this:

pwsh -noprofile { Import-Module Terminal-Icons; Get-ChildItem }

devblackops avatar Jun 22 '21 06:06 devblackops

I entered that line in PowerShell v7.1.3 in administration mode and got back this. Import-Module: The specified module 'Terminal-Icons' was not loaded because no valid module file was found in any module directory.

SirTwsted avatar Jun 22 '21 07:06 SirTwsted

What about non-elevated? It's shouldn't matter if PowerShell is running as administrator or not.

What do you see when you run the following? Both as a normal user and running as Administrator.

Get-Module Terminal-Icons -ListAvailable

devblackops avatar Jun 22 '21 15:06 devblackops

Directory: C:\Users\Twsted\Documents\PowerShell\Modules

ModuleType Version    PreRelease Name                                PSEdition ExportedCommands
---------- -------    ---------- ----                                --------- ----------------
Script     0.5.2                 Terminal-Icons                      Desk      {Add-TerminalIconsColorTheme, Add-Termi…

SirTwsted avatar Jun 23 '21 00:06 SirTwsted

I wanted to note. A friend of mine had me type in a command, and we both found out that microsoft actually installs powershell in several locations at the same time. (yes, I know its weird) but thats microsoft for ya πŸ€·β€β™‚οΈ

$env:PSModulePath
C:\Users\Twsted\Documents\PowerShell\Modules;C:\Program Files\PowerShell\Modules;c:\program files\powershell\7\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules

Just thought i would mention it, if for some reason it might help.

SirTwsted avatar Jun 23 '21 23:06 SirTwsted